You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#960 / #961 brought the version diff to annotate mode — but only for single-file sessions. Folder sessions (plannotator annotate <dir>) still serve every file as a plain render: the file tree's only change signal is the git-based workspace status (uncommitted changes), so a committed-clean folder shows no change signal anywhere, and opening a file never shows what changed since the last round.
This closes the same iterative-loop gap #960 described, for multi-doc reviews: annotate a docs folder → the agent revises several files → reopen the folder and see the highlighted changes per file before the next round. Today that loop forces a choice between the folder's navigation and the single file's diff.
Request
Run the existing history pipeline for eligible files in folder sessions:
Snapshot on first open — when a folder session first serves an eligible file, save it to the per-file version history (lazily, memoized per server launch; the existing saveToHistory dedupe keeps unchanged files from minting versions).
Serve the diff fields on the doc response — previousPlan/versionInfo alongside the doc content, same fields single-file sessions use.
Render the existing diff UI in the doc view — inline highlights and the +N/-M badge via the same PlanDiffViewer machinery, plus per-file version browsing.
Notes / constraints
History stays continuous across modes. Reuse the existing path-keyed annotate slug, so a file has one version thread whether opened solo or via its folder. No new storage concept.
No history-based tree badges — the git workspace-status badges are untouched; the diff renders in the file view only.
Same gates as single-file sessions — the annotatable-file size cap, the annotateHistory config toggle, and graceful degradation to a plain render if history storage is unavailable.
Per CLAUDE.md, lands in both the Bun (packages/server/annotate.ts) and Pi (apps/pi-extension/server/serverAnnotate.ts) runtimes.
One question: is it right for this to ride the existing annotateHistory toggle (default-on), or would you prefer a separate opt-in for folder sessions?
Summary
#960 / #961 brought the version diff to annotate mode — but only for single-file sessions. Folder sessions (
plannotator annotate <dir>) still serve every file as a plain render: the file tree's only change signal is the git-based workspace status (uncommitted changes), so a committed-clean folder shows no change signal anywhere, and opening a file never shows what changed since the last round.This closes the same iterative-loop gap #960 described, for multi-doc reviews: annotate a docs folder → the agent revises several files → reopen the folder and see the highlighted changes per file before the next round. Today that loop forces a choice between the folder's navigation and the single file's diff.
Request
Run the existing history pipeline for eligible files in folder sessions:
saveToHistorydedupe keeps unchanged files from minting versions).previousPlan/versionInfoalongside the doc content, same fields single-file sessions use.+N/-Mbadge via the samePlanDiffViewermachinery, plus per-file version browsing.Notes / constraints
.md/.txtonly — HTML deferred, mirroring how feat(annotate): per-file version diff for .md and .html (rendered HTML highlights) #961 landed markdown-first.annotateHistoryconfig toggle, and graceful degradation to a plain render if history storage is unavailable.CLAUDE.md, lands in both the Bun (packages/server/annotate.ts) and Pi (apps/pi-extension/server/serverAnnotate.ts) runtimes.One question: is it right for this to ride the existing
annotateHistorytoggle (default-on), or would you prefer a separate opt-in for folder sessions?Happy to contribute this — PR incoming.