Repository navigation
Several files in one annotate review (0.29 PR 4, bundles) - #1718
Merged
Merged
Conversation
plannotator annotate spec.md mock.html notes.md (every argument an existing file named by its path) opens ONE review of the files, in the typed order, with one decision. No flag, no file-count limit. - Shared rule (annotate-target.ts, vendored to Pi): probeAnnotateBundlePath, the bundle selection, resolveAnnotateBundleFiles (type and 2MB checks that name the file). Prose, URLs, folders and searched names keep the #1483 tiers; the ambiguity error gains a hint on hosts that open bundles. Strict gates take only a single target or only file paths (else exit 2). - Server mode annotate-bundle in Bun and Pi: /api/plan carries bundle, /api/doc follows the single-file rule per file, history saved per text file at open, per-file draft copies (#1710), host status documents, archive surface annotate-bundle with target.documents. - CLI: host result record gains documents; the agent message names every file. - Editor: first file opens by itself, header switcher (2 of 3 · name), the Files tab and All files panel in bundle order, export one section per file in bundle order, Ask AI surface line names file N of M. - Tool contract: description line for lists, plannotatorBundleSubject, isOlderCliBundleRefusal; Bash take-over maps several file paths to a list. Mod launches bundles and maps an older CLI's refusal to an update message. - Pi and OpenCode (embedded and CLI bridge) slash commands open bundles too. Co-Authored-By: Claude <noreply@anthropic.com>
- Move annotate-bundle out of @plannotator/core into packages/shared (no new core export, so the published-UI smoke passes without a core publish). - A list of file paths with a missing file fails naming it (shared 'missing' selection) on the CLI, Pi and OpenCode; tool list entries are passed as paths (bare word -> ./word) so the tool and Bash take-over get the same rule. - Strict refusal decided by probe only (no fetch, live probe or Resolved: line). - A symlinked bundle file is served: its real directory is a root for it. - The CLI uses the shared selection end to end (a.md ./a.md opens a.md). - .env named as refused; bundle files have no Close pill and leaving a linked document returns to the last bundle file; docs; engine-harness bundle case. Co-Authored-By: Claude <noreply@anthropic.com>
A stray . or .. (or any existing directory) beside file paths was read as a
missing file ('File not found: .'), where main opened the file. The missing
selection now needs the new pathExists option (annotatePathExists): only a
token with nothing at its path, and nothing found by search, is missing.
Wired on the CLI, Pi and OpenCode; test rows on the shared rule and the CLI.
Symlink-root comment corrected; AGENTS.md notes the dotted-word edge.
Co-Authored-By: Claude <noreply@anthropic.com>
backnotprop
added a commit
that referenced
this pull request
Oct 5, 2026
Brings in #1719 (platform flag), #1717, 0.28.4 and #1718 (bundles). Resolution keeps both sides: - Pi review delivery uses classifyReviewOutcome (the server's platform flag; nothing inferred from the annotation count) inside the shared launchCodeReview, with this branch's decision heading. The platform status post is labeled "Posted to the pull request". - Bundles go through launchAnnotate, shared by /plannotator-annotate and the tool. A tool list target opens one annotate-bundle review in order (only the shared selection's bundle outcome opens; missing, folder or URL entries refuse). Its subject is plannotatorBundleSubject in the result, list, close and decision heading. - Tests: bundle via the tool (order, list, feedback, close), a list that would open fewer files refuses, description-only review feedback through the tool path, and the platform post delivered verbatim. Co-Authored-By: Claude <noreply@anthropic.com>
backnotprop
added a commit
that referenced
this pull request
Oct 5, 2026
Brings in #1719 (explicit review `platform` flag), #1717, 0.28.4 and #1718 (bundles). Resolutions and follow-ups: - cli-bridge annotate: bundle framing ("Files: …") and the older-CLI several-paths mapping kept, plus the tool's gated bare approval, failure reports and the agent-close log. - The tool opens a list target as one bundle review through the same launch (annotateBundle: each file its own CLI argument; a single tool target is never re-split); the subject is plannotatorBundleSubject in the result, list and decision heading; an older CLI's refusal answers the bundle update text. Slash-command bundles get the same subject. - Review headings use the platform flag (isPlatformPost, isPRMode fallback only without the flag): "Review posted" for the status post, "Changes requested" for anything else, never inferred from zero annotations. - opencode-review carries both #1719's platform and the additive annotationCount. - Tests: a bundle via the tool (argv order, name, list, heading, older CLI), description-only PR feedback vs a platform post. Co-Authored-By: Claude <noreply@anthropic.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 4 of the 0.29 agent-sessions design (
.product/drafts/agent-sessions-0.29/DESIGN.md, section A). Several files open as one annotate review, in the order given, with one decision.What it does
plannotator annotate spec.md ui/mock.html notes.mdopens one review when every argument is an existing file named by its path. There is no flag and no file-count limit. The same works from:plannotatortool, withtarget: [...]/plannotator-annotate a.md b.mdon Pi, and on OpenCode (embedded and CLI bridge)In the browser:
--gate, Approve covers every file.Argument rule (shared,
packages/shared/annotate-target.ts)~, or with an@prefix. A name found only by searching the project does not count. Duplicate paths are dropped. An unsupported file type or a file over 2MB fails, and the error names the file.Server (Bun and the Pi mirror)
New mode
annotate-bundle, built on folder mode:/api/planaddsbundle: [{ path, renderAs }], andprojectRootis the deepest directory that holds every file./api/docuses the single-file rule: the cwd plus each file's own directory. A document a bundle file links to opens as a linked document; anything outside those roots gets 403. The editor never walks the bundle root.documents: [{ path, annotationCount }]. The archive surface isannotate-bundle.Files: a, b, con every host.Contract and mod
targetto review several files together, in the order you want them read."plannotatorToolArgsalready passed one argument per file.plannotatorBundleSubjectnames the bundle ("3 files: spec.md, mock.html, notes.md"). That name appears in the opened text, the list, and the decision heading.isOlderCliBundleRefusaldetects an older CLI: its ambiguity error lacks the hint line.looksLikeFilePathreads a word's shape (path separator, leading~.@, or a file extension).target: [...]only when every word looks like a file path. Prose still runs as written.Tests
annotate-target.test.ts): every rule above, including prose plus one file, prose plus two files, a URL, a folder, and a searched name.annotate-bundle.scenarios.ts):/api/planannotate-bundle-cli.test.ts):documentsshared/annotate-bundle.test.ts, the export order infeedbackDocuments.test.ts, the All files order inannotationScope.test.ts, the Ask surface line insession-bridge.test.ts.App.bundle.test.tsx, added to the CI DOM list): the first file opens; the switcher and the file list keep the given order; the bundle root is never fetched; Next works; Send Feedback has one section per file in bundle order, each comment once.Runs:
bun test(all): 6345 pass (after the follow-up commit).DOM_TESTS=1 bun test --isolate packages/editor: 281 pass.bun run typecheck: clean.claude plugin validate apps/hook: passes.scripts/test-claude-code-mod.shcould not run here: the local Claude Code has hooks modules turned off by the rollout switch.Headless Chromium against the built app, running
plannotator annotate ui/mock.html notes.md:ui/mock.html,notes.mdin that order.## …/ui/mock.htmlsection followed by a## …/notes.mdsection.Deviations and notes
annotate-folder;list_documentslists the bundle files.