652 Commits

Author SHA1 Message Date
Michael Ramos 17c808cdca chore: bump version to 0.19.23
For provenance purposes, this commit was AI assisted.
v0.19.23
2026-05-25 12:29:50 -07:00
Michael Ramos dbe2d6e4cb Replace update banner with passive dot indicator in Options menu (#793)
* Replace persistent update banner with passive dot indicator in Options menu (#790)

The floating update banner that appeared every session is removed. Update
availability is now surfaced as a small dot on the Options button that
auto-dismisses (cookie-persisted per version) when the menu is opened.
The version section inside the menu shows install command and release
notes when an update exists.

* fix: restore ActionMenuSectionLabel import in both header menus

* Add TextShimmer to update notice and simplify menu version section

- Add reusable TextShimmer component (motion-primitives adaptation)
- Add reusable BorderTrail component for future use
- Shimmer "New update available!" text in the Options menu
- Simplify button to plain text link in emerald
- Remove Project repo link, make "Plannotator" header link to repo
2026-05-25 12:09:42 -07:00
Michael Ramos 7db5e9b8d9 Fix Windows Pi shim spawning (#792)
* Fix Windows Pi shim spawning

* Fix Pi smoke process cleanup

* Kill Windows Pi process trees
2026-05-25 11:50:50 -07:00
Michael Ramos 4de62e83e1 Add Droid slash-command integration (#787)
* feat: add Droid slash-command integration

* fix: restore Droid command launcher behavior

* chore: remove archive command from homepage

* fix(droid): tighten last-message session resolution
2026-05-24 09:29:13 -07:00
Michael Ramos 127f6c2ccc Make /workspaces/ system-themed with a custom dark palette (#788)
* Make /workspaces/ system-themed with a custom dark palette

Until now the page force-pinned the light tokens regardless of the
visitor's actual theme preference, which is rough at night.

Two changes:

1. The wrapper class is renamed `ws-force-light` → `ws-page-scope` and
   now defines two token sets:
   - default (no `.light` on <html>): a near-neutral, very-dark-gray
     palette specific to this page
   - `html.light .ws-page-scope`: the existing light palette, unchanged

   The page now follows whatever theme the global Nav toggle has set,
   the same way every other marketing page does.

2. The dark palette is intentionally NOT the global Plannotator dark
   theme. It uses near-zero chroma (`oklch(0.X 0 0)`) for surfaces
   (background 0.13, card 0.17, muted 0.22, border 0.27) so the
   landing page reads as a clean dark-gray sheet — Linear/Vercel
   energy rather than the warmer blue-tinted dark used in the docs
   and the editor. Primary stays violet (oklch(0.75 0.18 280)) so the
   OSS-commitment stamp and submit button still pop.

Every existing rule on the page already uses var(--background),
var(--card), var(--border), etc., plus relative-color tweaks like
`oklch(from var(--primary) l c h / 0.5)` — so they automatically
pick up the right values in both modes with no further changes.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Warm up the dark palette and tone down the green/violet

Three follow-ups based on visual review of the new dark mode:

- Bg/card/muted/border ladder lifted ~2 L-points and given a touch
  of warm chroma (0.01 at hue 55) — page reads as dark walnut /
  leather instead of stark neutral charcoal.
- --secondary (Today / Next / Compound labels) dropped from
  oklch(0.70 0.15 180) to oklch(0.62 0.08 180) — same teal hue,
  desaturated and slightly dimmer so the row recedes.
- --primary (Join button, OSS contributor stamp, focus ring)
  dropped from oklch(0.75 0.18 280) to oklch(0.65 0.10 280) —
  same violet hue, dialed down to a dusty plum.

Light mode is unchanged — still inheriting .theme-plannotator.light.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-24 00:08:22 -07:00
Michael Ramos 6254a3c181 chore: bump version to 0.19.22
For provenance purposes, this commit was AI assisted.
v0.19.22
2026-05-23 23:30:57 -07:00
Michael Ramos 05392eb99e Fix copy (Cmd+C) broken in Safari on plan viewer (#785)
* Fix copy (Cmd+C) broken in Safari on plan viewer

Safari rejects async navigator.clipboard.writeText() outside the
immediate user-gesture window.  The old keydown handler broke the
gesture chain with an await, and web-highlighter already clears
the DOM selection on mouseup so native copy had nothing to grab.

Switch Viewer to the synchronous copy event + clipboardData.setData()
which works across all browsers.  Add an execCommand fallback to the
AnnotationToolbar copy button for extra safety.

* Remove copy button from annotation toolbar

Cmd+C now works reliably via the native copy event, so the toolbar
copy button is redundant. Code block and table copy buttons are kept.

* Show copy button on touch devices only

Touch users have no Cmd+C fallback since web-highlighter clears the
native selection. Detect (pointer: coarse) and conditionally render
the copy button + execCommand fallback for iPad/phone users.

* Reset copied state when selection changes on touch devices

* Keep copy button on code block hover toolbar for desktop users

* Scope copy handler to viewer container

Prevents the copy handler from hijacking Cmd+C when the target is
outside the viewer (sidebar, annotations panel, code popout, etc.).

* Remove overly aggressive container scope check from copy handler

* Add copy event handler to HtmlViewer for Safari support

* Keep copy button visible in HtmlViewer toolbar

The iframe copy event can't reach the parent document handler, so the
toolbar button is the only copy path for HTML annotation mode.

* Use hideCopyButton prop instead of overloading copyText

Separates "what text to copy" from "whether to show the button."
Only Viewer's text selection toolbar hides it (desktop only, has
keyboard handler). HtmlViewer and code block toolbars always show it.

* Memoize touch device check in Viewer
2026-05-23 23:11:58 -07:00
Michael Ramos 5438f66456 fix: honor CLAUDE_CONFIG_DIR in session log discovery (#786)
Resolve DEFAULT_SESSIONS_DIR and DEFAULT_PROJECTS_DIR from
CLAUDE_CONFIG_DIR when set, falling back to ~/.claude.
Add projectsDirOverride param to findSessionLogsByAncestorWalk
so all four resolution tiers respect custom config paths.

Closes #783
2026-05-23 19:19:06 -07:00
Michael Ramos abca636889 Tighten Nav for mobile (#782)
Three changes that reclaim horizontal room on narrow viewports so the
Docs link stops drifting into the logo:

- Nav side padding 24px -> 16px on mobile (px-4 sm:px-6)
- Link group gap 8px -> 6px on mobile (gap-1.5 sm:gap-2)
- Hide the theme toggle on mobile (the React island lives in a
  hidden sm:flex wrapper); mode is still respected from cookies and
  the toggle is back at sm+

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:27:29 -07:00
Michael Ramos 647802117f Hide Blog link in Nav on mobile (#781)
Mobile screens were running out of horizontal room and the Docs link
was overlapping the Plannotator logo. Hiding Blog (and the separator
before it) on screens narrower than sm reclaims that space — Docs
shifts into where Blog used to be, no overlap.

Blog stays visible at sm+ where the full row fits comfortably.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:24:44 -07:00
Michael Ramos ed994f3a3b Make Company optional in the UI (frontend-only) (#780)
Form labels Company 'optional', client validation no longer flags it
as Required when blank, and the submit handler stubs '(not provided)'
into the payload when the user leaves it empty so the worker's
existing 'company required' contract stays untouched.

Worker, schema, and DB are not changed.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:14:06 -07:00
Michael Ramos c4590d7cee Drop redundant 'engineering knowledge base' tagline (#779)
The strong heading already says 'Collaborative knowledge base for
agent artifacts'; trailing 'Craft your shared engineering knowledge
base.' was just restating it.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:06:13 -07:00
Michael Ramos c74b3a9b2e Add 'Versioned and accessible' to Next phase (#778)
* Add 'Versioned and accessible' to the Next phase copy

Tail clause notes that the standards extracted from artifacts and
reviews aren't a one-shot output — they're versioned over time and
visible to both your agents and your teammates.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Drop 'product' from Compound phase copy

'faster product verification' → 'faster verification'.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:04:05 -07:00
Michael Ramos 0dc7a0c5ac Move Turnstile widget below the submit button (#777)
Re-applied on top of post-#776 main.
2026-05-22 18:01:39 -07:00
Michael Ramos e7e81aa9f2 Always show OSS contributor checkbox (revert progressive disclosure) (#776)
Removes the "show only when team-size = Just me" behavior added in
PR #773. The checkbox + lifetime-free-access note are now visible to
every visitor regardless of team size.

Reverts the wrapper div, the setContributorVisibility() helper + its
call site in the pill picker, and the .ws-contrib-block CSS.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:00:20 -07:00
Michael Ramos d90e4f814d Reword the Compound phase copy (#775)
Tighten the first sentence (drop "during generation, in review, and"
which was redundant with "before and after code lands"), then add
the gating + quality/speed payoff as the second beat.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 18:00:07 -07:00
Michael Ramos fc6d175c67 Soften workspaces page-title (#774)
"From review surfaces to integrated verification systems" reads like a
slide title. Replacing with "From review surfaces to standards your
agents learn from" which still captures both ideas (verification +
agents that improve from the team's reviews) but drops the corporate
phrasing.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 17:51:53 -07:00
Michael Ramos 35e572a385 Progressive disclosure for the OSS contributor checkbox (#773)
The OSS-contributor claim is personal-scope (one human attesting they
contributed), so it only makes sense for individual signups. Hide the
checkbox + helper note until the user picks "Just me" on team size.
Switching to any non-solo size hides it again and resets the state to
false so team signups can't accidentally carry is_contributor=true.

Small fade-in animation on reveal so the layout shift doesn't feel
abrupt.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 17:35:13 -07:00
Michael Ramos d9832b761c Pin light theme inside .ws-force-light on /workspaces/ (#772)
The earlier force-light approach (adding the `.light` class to <html>
from a head script) gets undone the moment the React ModeToggleIsland
hydrates: its mount effect always calls `classList.remove('light')`
before re-applying based on the saved cookie. If the visitor's saved
theme is dark, the page flashes light then flips to dark.

Inline the light theme tokens inside `.ws-force-light` instead. The
toggle component can still flip the global `.light` class on/off, but
the workspaces page's tokens are pinned at the wrapper scope and
unaffected. Result: deterministic light mode regardless of the
visitor's saved preference.

Generated with [Devin](https://cli.devin.ai/docs)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 15:29:55 -07:00
Michael Ramos 93e8b5dfcf Add Plannotator Workspaces waitlist (page + worker + CI) (#771)
* Add Plannotator Workspaces waitlist (page + worker + CI)

Marketing
- New /workspaces/ page: hero+form sibling layout on desktop; mobile
  reorders to hero -> form -> info -> banners so the CTA is reachable
  on the first scroll. Uses the marketing site tokens/fonts and the
  existing border-x editorial column. Theme-aware via the cookie.
- Adds a "head" slot to Base.astro for per-page <head> additions.
- Nav: new "Workspaces" link with a "soon" pill.
- Landing: small Workspaces CTA band before the final install CTA.

Waitlist worker (apps/waitlist-service)
- Cloudflare Worker + D1 (SQLite). Mirrors the paste-service layout.
- Endpoints: POST /signup (Turnstile-protected, rate-limited, honeypot),
  GET /health, GET /admin/count, GET /admin/list gated by Bearer
  ADMIN_TOKEN.
- Validation: required email + company + team_size; optional note +
  is_contributor; honeypot field; freemail-aware company auto-inference.
- D1 schema includes a non-destructive 001 migration that adds note
  and is_contributor columns. 19/19 validation unit tests pass; tsc
  clean.

CI
- Adds a deploy-waitlist job to .github/workflows/deploy.yml mirroring
  paste-service. Uses the existing CLOUDFLARE_API_TOKEN and
  CLOUDFLARE_ACCOUNT_ID secrets, so no new repo config is required.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Force light mode on /workspaces/

The page is designed and signed off in light. Override the saved theme
cookie via a head-slot inline script that adds the `.light` class
before paint. Base.astro's cookie reader only adds the class (never
removes), so any saved-dark preference can't undo this.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-22 15:01:43 -07:00
Michael Ramos 4db7fcc5da chore: bump version to 0.19.21
For provenance purposes, this commit was AI assisted.
v0.19.21
2026-05-21 01:56:04 -07:00
Michael Ramos 2a5528693f Add Ask AI to plan and annotate reviews (#763)
* Add Ask AI to plan and annotate reviews

- mount shared AI runtime on plan, annotate, review, and Pi servers

- add shared document chat UI and comment-popover Ask AI entry point

- default providers from detected agent origin and document first-run announcement

- reuse shared code-review AI hook and document setup/docs

* Address Ask AI review followups

Stabilize AI chat session resets and callbacks, preserve per-origin provider defaults, share AI chat formatting utilities, and avoid blocking startup on model discovery.

* Fix AI permission details and Pi CLI lookup

Show formatted tool input in document AI permission cards and make Pi AI provider CLI detection work on Windows.

* Fix Pi model discovery in AI capabilities

Keep AI runtime startup non-blocking while making the capabilities endpoint await pending Pi/OpenCode model discovery before returning provider metadata.
2026-05-21 01:32:17 -07:00
Michael Ramos fa4482d7d5 chore: bump version to 0.19.20
For provenance purposes, this commit was AI assisted.
v0.19.20
2026-05-19 08:30:48 -07:00
Yoni Hornstein 42c85f0add fix(browser): treat no-op BROWSER values as unset so headless sessions can fall back (#756)
Claude Code's agent view (and similar background/headless environments) sets
$BROWSER=true to mean "do not launch a browser." The previous logic took that
literally and ran `true http://localhost:NNNN` via `Bun.$`, which exits 0 without
opening anything. The server then sits forever in waitForDecision() with no
visible UI and no way for the user to recover the URL.

Detect the documented no-op sentinels (`true`, `false`, `none`, `:`, `0`, `1`)
on both PLANNOTATOR_BROWSER and BROWSER and treat them as if the variable were
unset. This lets shouldTryRemoteBrowserFallback() reach the VS Code IPC
fallback in remote sessions and lets openBrowser() fall through to the
platform default when nothing else is configured.

Refs #154.
2026-05-19 08:03:49 -07:00
Robert Dailey 29390c9e71 fix(opencode): store active plan backing file outside workspace (#743)
The backing file used for edit-based plan submission was stored at
.opencode/plans/_active-plan.md inside the workspace, causing it to
appear in git status and editor file trees. It is now stored at
~/.plannotator/active/{project}/_active-plan.md alongside the version
history.

- Move getPlanBackingPath to derive path from project name under
  ~/.plannotator/active/
- Derive project name from ctx.directory basename via sanitizeTag at
  call site
- Delete backing file on approval since it is no longer needed after the
  session ends
- Update tests to reflect new path contract
2026-05-18 17:17:48 -07:00
Robert Dailey b3f1deb8d3 fix(opencode): skip end bounds check on empty file in validateEdits (#752)
When a file has no content (lineCount === 0), any edit is a pure insert
and the end field is semantically irrelevant. The previous check
rejected payloads where end was present on an empty file because end >
lineCount always evaluated true, breaking first-call submit_plan
invocations from agents or frameworks that include end unconditionally.

- Skip end > lineCount validation when lineCount === 0; applyEdits
  handles it via splice clamping
- Add applyEdits test: edit on empty file with start=1, end=1 produces
  correct output
- Add validateEdits test: passes for empty file with start=1 and end=1

Fixes #742
2026-05-18 17:17:09 -07:00
Michael Ramos 82636e1286 Add interactive goal setup UI (#731)
* Add interactive goal setup UI

* Refine goal interview skip and question flow

* Fix review findings: recommendation combo, option-only recs, single deselect

* Persist goal setup working JSON files

* Refine goal setup copy and facts controls

* Remove generated goal package from PR

* Address goal setup review issues

* Remove goal setup slash command adapters

* Disable fact comment attachments

* Fix goal setup fact comment state

* Address goal setup review cleanup

* Fix goal setup fact submission edge cases
2026-05-18 08:39:29 -07:00
Michael Ramos f471ebf99e chore: bump version to 0.19.18
For provenance purposes, this commit was AI assisted.
v0.19.18
2026-05-17 23:53:11 -07:00
Michael Ramos 76eeea840e fix(docs): update stale Pi URLs from badlogic to earendil-works
For provenance purposes, this commit was AI assisted.
2026-05-17 23:53:07 -07:00
Andrea Arturo Venti Fuentes 1ec5243448 chore(deps): drop stub @types/dompurify
dompurify ships its own types since v3.x — the @types package is an
empty stub. Removes it from both root and packages/ui devDependencies.

Credit to @av1155 who identified this in #726.

For provenance purposes, this commit was AI assisted.
2026-05-17 23:24:41 -07:00
Muhammad Hashmi 9873cdb3f6 Fix Codex annotate-last message selection (#740) 2026-05-17 20:45:10 -07:00
Lea Fox 1b1cefbc2a Fix directory name for OpenCode commands (#736)
* Fix directory name for OpenCode commands

https://opencode.ai/docs/commands/#:~:text=Create%20markdown%20files%20in%20the%20commands/%20directory%20to%20define%20custom%20commands.

I believe an s is missing from the OPENCODE_COMMANDS_DIR path

* fix(install): apply same command→commands fix to PowerShell script

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
2026-05-17 14:59:29 -07:00
Robert Dailey 807cc5f09b feat(submit-plan): replace dual-mode with edit-based interface (#730)
* feat(submit-plan): replace text/file-path mode with edit-based interface

Switches the OpenCode submit_plan tool from a dual-mode interface
(inline text or file path) to an edit-based one. The plugin now owns a
backing file at .opencode/plans/_active-plan.md; the agent never reads
or writes it directly. On denial, the response includes the current plan
with line numbers so the agent can apply surgical edits instead of
resubmitting the entire document, reducing token waste on iterative
revisions.

- Add applyEdits, validateEdits, formatWithLineNumbers, and
  getPlanBackingPath helpers to the plugin
- Validate edit ranges (bounds, overlap, size limit) before mutating the
  backing file
- Return line-numbered plan in denial responses to anchor targeted edits
- Remove getPlanDirectory, validatePlanPath, and file-path auto-
  detection from plan-mode.ts
- Replace plan-mode.test.ts path-validation coverage with submit-
  plan.test.ts for the edit engine
- Update custom-feedback.md and opencode.md docs for edit-based
  semantics

Refs #365

* chore(opencode): drop unused buildPlanFileRule import

Removed in PR #730 deny path along with the only call site, but the
import was left behind.

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
2026-05-15 09:54:04 -07:00
roman 57fa1c6e03 migrate pi extension from mariozechner to earendil-works (#729)
* fix(pi): move to earendil-works packages and links

* fix(docs): close markdown link for earendil pi URL

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
2026-05-15 09:48:16 -07:00
Michael Ramos 9fed785141 chore: bump version to 0.19.17
For provenance purposes, this commit was AI assisted.
v0.19.17
2026-05-14 17:36:52 -07:00
Michael Ramos 934b1705c5 Revise fact definition for clarity and testability
Clarified the definition of a fact in the context of goal outcomes, emphasizing testability and simplicity.
2026-05-14 14:55:37 -07:00
Michael Ramos 0454db0aa4 Clarify description of facts in SKILL.md 2026-05-14 14:54:13 -07:00
Michael Ramos 2ca5690ccf Revise interview process and define goal facts
Updated the interview section to emphasize deriving facts about the goal and clarified the definition of a fact in the fact sheet section.
2026-05-14 14:52:51 -07:00
Michael Ramos 5a306416cf Simplify goal setup skill to interview-driven flow (#727)
* refactor: simplify goal setup skill to interview-driven flow

Replace the 5-document gated pipeline (brief, plan, verification,
blockers, goal-prompt + scaffold script) with a leaner process:
rearticulate → interview → fact sheet (single gate) → agent-driven
planning → goal output.

* fix: gate the plan with Plannotator too
2026-05-14 11:36:17 -07:00
Michael Ramos 3f91cd7c0e feat: add --version / -v flag to CLI (#725)
Injects the version from package.json at compile time via Bun's --define
so compiled binaries report the correct version (e.g. `plannotator 0.19.16`).
Uncompiled dev runs fall back to `plannotator dev`.
2026-05-13 16:22:13 -07:00
Michael Ramos 12e3e2d35b chore: bump version to 0.19.16
For provenance purposes, this commit was AI assisted.
v0.19.16
2026-05-13 12:42:12 -07:00
Michael Ramos 95750ab657 feat: search-based code navigation with peek view (#711)
* feat: search-based code navigation with peek view (#694)

Add IDE-like code navigation to the review UI. Cmd/Ctrl+click a token
in a diff to find its definitions and references across the repo via
ripgrep, displayed in a VS Code-style peek panel below the diff.

Backend: bounded rg search with language-aware definition patterns
(TS/JS, Python, Go, Rust), ranked results (same file > changed files >
same directory), confidence labels, and graceful degradation when rg
is not installed. Both Bun and Pi servers implement the endpoints.

Frontend: Dockview peek panel with syntax-highlighted full-file preview
on the left and grouped reference list on the right. Clicking a
reference scrolls the preview; double-clicking an in-diff result
navigates to the file with a gold line flash.

Closes #694

* fix: resolve Pi server TypeScript errors for code-nav

Add missing spawn import, type the close callback parameter,
and use double-cast for parseBody → CodeNavRequest.

* fix: clear loading state on cached preview hits

Without this, clicking a cached file while a fetch is in-flight
leaves isLoading stuck true — the spinner hides the preview.

* feat: show pointer cursor on Cmd/Ctrl+hover for navigable tokens

Adds pn-token-nav class with thicker underline and pointer cursor
when hovering a token while holding the modifier key, signaling
the token is Cmd+clickable for code navigation.

* refactor: remove go-to-diff navigation from peek panel

Strip the in-diff badge, double-click-to-jump, highlightDiffLine
wiring, and onCodeNavGoToDiff from the peek panel. The peek view
is the primary interaction — jump-to-diff adds complexity without
clear value at this stage.

* chore: remove dead code from code-nav cleanup

Delete unused highlightDiffLine.ts, remove codeNavChangedFiles
and codeNavActiveSide from context and App.tsx, drop stale
extractChangedFiles import.

* chore: add code-nav endpoints to AGENTS.md, remove dead activeSide state

* fix: don't classify bare indented calls as definitions

Change the TS/JS method pattern from zero-or-more (*) to
one-or-more (+) declaration keywords, so plain calls like
startServer(config) are no longer misclassified as definitions.

* feat: show toast when code-nav is unavailable in platform-only PR mode

Instead of opening the peek panel and showing misleading "No results",
Cmd+click in non-local PR mode shows a brief toast explaining that
code navigation requires a local checkout.

* fix: strip hljs hardcoded background from code-nav preview

The highlight.js github-dark theme sets a fixed dark background
on all .hljs elements. Apply transparent override for the entire
peek preview so code inherits the active theme's background.
2026-05-13 12:24:37 -07:00
Michael Ramos 32e871415f chore: bump version to 0.19.15
For provenance purposes, this commit was AI assisted.
v0.19.15
2026-05-13 08:18:34 -07:00
Michael Ramos f2ab0f165d fix: Pi port=0 parity + update marketing docs
- Accept PLANNOTATOR_PORT=0 in Pi network.ts (matches Bun server)
- Add PLANNOTATOR_ORIGIN and PLANNOTATOR_VERIFY_ATTESTATION to env vars docs
- Fix port range from 1-65535 to 0-65535
- Add jj diff modes, commit-based base, and expanded API table to code review docs

For provenance purposes, this commit was AI assisted.
2026-05-13 07:24:36 -07:00
Michael Ramos 6db7ca9184 feat(review): pick a commit as the diff base (#709) (#723)
* feat(review): pick a commit as the diff base (#709)

Widens the base picker for `branch` and `merge-base` diff modes from
"branch only" to any commit-ish. `getGitContext` now returns the last
20 commits on HEAD; the picker shows them in a new "Recent commits"
group, and SHA-like or HEAD~N queries get a "Use … as base" affordance
for manual entry. Backend changes are minimal because git diff already
accepts any commit-ish on the left side of the range.

* feat(review): tabbed Branches/Commits in base picker (#709)

Replaces the three-section list (Local / Remote / Recent commits) with
a Branches | Commits tab strip — commits were below a scroll wall in
repos with many branches. SHA-like and HEAD~N queries auto-focus the
Commits tab so manual entry stays one keystroke away.
2026-05-13 07:09:17 -07:00
Cody Partington b04c9e1f30 fix(review): persist file comment drafts across close/reopen (#721)
* fix(review): persist file comment drafts across close/reopen

File comment popover lost in-progress text when dismissed via click-outside / Escape / X — local state died with the unmount. Line-comment toolbar already does this via a module-level draft map; mirror the pattern in `CommentPopover` behind an opt-in `draftKey` prop and wire both file-comment call sites (`AllFilesDiffView`, `DiffViewer`).

* fix(review): scope file-comment draft key by PR identity

File-path-only key leaked drafts across in-place PR switches.

* fix(review): remount all-files comment popover on context change

The all-files panel shares one CommentPopover instance across every
file. Switching files (or PR/scope) batches close+open into a single
state transition, so React reuses the instance with stale text in
state and the draft-sync effect writes it under the new draftKey.
Key the popover by the same expression as draftKey so any change in
file, PR, or scope forces a fresh mount that reads its own draft.
Also clear the anchor when the file list reloads so a popover
anchored to a removed DOM node doesn't survive a diff swap.

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
2026-05-13 06:54:33 -07:00
Leonardo Reis c0e36138fc Add Codex install guidance (#720) 2026-05-13 05:51:12 -07:00
Michael Ramos 927ca6d27e fix(gitlab): handle concatenated JSON pages from glab --paginate (#717)
glab api --paginate joins page responses as adjacent JSON arrays
(`[...][...]`), which JSON.parse rejects. This caused MR reviews to fail
with "JSON Parse error" for any MR with more than 100 changed files.

Replace the bare JSON.parse with a walker that splits the output into
top-level arrays (string- and depth-aware so `][` inside diff content
is not mistaken for a page boundary) and merges them.

Fixes #714
2026-05-13 05:33:07 -07:00
Michael Ramos 3fb0b9cf03 fix(gitlab): persist unposted inline comments + split pr-provider from browser-safe pr-types (#719)
Closes #680. Two changes that landed together because the persistence fix
exposed a hidden architectural constraint.

1. GitLab inline comments: when one or more discussion POSTs failed
   (e.g. transient `i/o timeout`), the failed comment bodies were lost.
   Now `submitGlMRReview` writes them to
   `~/.plannotator/failed-comments/{host}-{project}-mr{iid}-{ts}.json`
   in both the all-fail and partial-fail branches. The throw-vs-warn
   split is preserved deliberately: all-fail throws so the UI retries
   from a clean state, partial-fail warns so the UI doesn't resubmit
   already-posted content.

2. Split `packages/shared/pr-provider.ts` into `pr-types.ts`
   (browser-safe types + pure label/URL helpers) and `pr-provider.ts`
   (server-only dispatch that imports pr-github / pr-gitlab). The
   review-editor browser bundle previously dragged pr-gitlab.ts in as
   dead code via static imports, which silently constrained the file
   to never use Node built-ins. Adding `fs`/`os`/`path` for (1) broke
   the review build until we routed browser imports to pr-types and
   left server callers on the now server-only pr-provider facade.

Server-only `pr-provider.ts` re-exports `pr-types` so existing
server-side imports keep working unchanged.
2026-05-13 05:27:28 -07:00
Michael Ramos 1c40655e17 fix(opencode): intercept annotate/review/archive commands before LLM (#713) (#718)
OpenCode's command dispatcher appends `arguments` to the `.md` body and
runs `resolvePromptParts()` over the combined string, which auto-attaches
any file path it finds as a `FilePart`. With `/plannotator-annotate
/path/to/huge.md`, that meant the agent received the file's content as a
user message before the annotation UI even opened — blowing the context
on large files (GLM-5 auto-compact reported in #713).

Move `plannotator-annotate`, `plannotator-review`, and `plannotator-archive`
from the post-hoc `event` handler to `command.execute.before`, matching
the pattern `plannotator-last` already used. The hook clears `output.parts`
in place so the agent never receives the command turn; handlers then run
the UI and inject feedback via `client.session.prompt` as a separate turn.

Empty the bodies of the three `.md` files for defense in depth — only the
frontmatter is needed for OpenCode to register the slash command.

Also fixes a latent bug in the `plannotator-last` path: `output.parts = []`
reassigns the throwaway wrapper object's property but doesn't touch the
`parts` array the caller in `prompt.ts:1944` uses directly. Switched to
`output.parts.length = 0` to mutate in place. `plannotator-last` only
escaped notice because its parts array was always a single benign text
part.
2026-05-13 05:27:02 -07:00