SIGN IN SIGN UP

fix(annotate): plan-review Options menu and Settings parity in annotate (#1602)

* fix(annotate): give annotate the plan-review Options menu and Settings

Annotate renders the same document app as plan review, but its Options
menu and Settings hid items that work there. Enable them; keep only rows
that describe a plan decision plan-only.

- Agent Instructions in every annotate session, via a mode-aware
  buildAnnotateAgentInstructions: document wording, no deny/resubmit,
  a per-surface read command (.plan, .rawHtml, .targetUrl, /api/doc) and
  the targeting rules the validator supports (diagramAnchor on POST,
  htmlAnchor and pageUrl by PATCH, folder comments are session-level).
  Plan instructions are byte-identical.
- Settings annotate mode gains Display, Saving, Labels, Obsidian, Bear,
  Octarine. Hooks, Save Plans, plan-arrival auto-save, Permission Mode and
  OpenCode Agent Switching stay plan-only (agent switching is now hidden
  in annotate, where it never applied).
- Save to Obsidian/Bear/Octarine are hidden when the session has no
  document text (raw HTML, live app, folder with no file open); the server
  skipped the empty plan, so they were silent no-ops.

Tests execute every curl/JSON example in the annotate instructions
against a real annotate server, plus a Settings DOM parity test.

* fix(annotate): disclose shared notes-app switch, fix folder read, gate parity for hosts

- Annotate's Obsidian/Bear/Octarine descriptions now say the same switch
  makes plan review save each approved plan there (the approve body reads
  the same cookies); "Saved to" and the tags preview no longer say plan
  in annotate. Plan review is unchanged.
- Folder read command uses /api/doc?doc=1 and jq '.markdown // .rawHtml',
  so HTML and data files print instead of null; the executed-instructions
  test now covers .md, .html and .yaml.
- New optional Settings prop annotateParity (default false): hosts keep
  the pre-parity annotate tab set; Plannotator's AppHeader passes true.
  Documented in packages/ui/HANDOFF.md.
M
Michael Ramos committed
cace822c68f756c1674e66ebad8036eef5c000ab
Parent: afed22a
Committed by GitHub <noreply@github.com> on 9/24/2026, 12:27:20 AM