F10 #31: render resolved proposals inline at their anchor block #36

Merged
benstull merged 1 commits from feature/31-inline-anchor-proposals into main 2026-06-12 08:33:01 +00:00
Owner

What

In the F10 review preview, renderReview now renders each pending Claude proposal inline at its resolved anchor — as a cw-proposal block right after the current-side block its anchorStart falls in — instead of appending all proposals as trailing blocks. So "what is Claude proposing, and where?" is answered by position.

This implements the inline-at-anchor placement the graduated F10 Solution Design already specified (coauthoring-interactive-review.md §2/§6.2); the trailing-block behavior shipped in #29 was a recorded v1 deferral.

Behavior

  • A resolved proposal renders in place, after its anchor's block.
  • Proposals in the same block are ordered by anchorStart then id (deterministic — INV-33).
  • A proposal whose anchor doesn't resolve (or precedes all blocks) still trails as a cw-proposal-unanchored block — never dropped (INV-34).
  • ✓/✗ still route only through the F4 seam; the webview never mutates the document (INV-34/21 unchanged).

Tests

  • Unit (+5): mid-document placement; two proposals in distinct blocks; same-block ordering determinism; resolved-before-trailing/unanchored; mixed-set determinism.
  • E2E: the F10 propose test now asserts the proposal renders before the following block (in place); accept still lands + clears.
  • 194 unit + 51 E2E green; tsc --noEmit clean.

Closes #31

🤖 Generated with Claude Code

## What In the F10 review preview, `renderReview` now renders each pending Claude proposal **inline at its resolved anchor** — as a `cw-proposal` block right after the current-side block its `anchorStart` falls in — instead of appending all proposals as trailing blocks. So "what is Claude proposing, and where?" is answered by position. This implements the inline-at-anchor placement the graduated F10 Solution Design already specified (`coauthoring-interactive-review.md` §2/§6.2); the trailing-block behavior shipped in #29 was a recorded v1 deferral. ## Behavior - A resolved proposal renders in place, after its anchor's block. - Proposals in the same block are ordered by `anchorStart` then `id` (deterministic — INV-33). - A proposal whose anchor doesn't resolve (or precedes all blocks) still trails as a `cw-proposal-unanchored` block — never dropped (INV-34). - ✓/✗ still route only through the F4 seam; the webview never mutates the document (INV-34/21 unchanged). ## Tests - **Unit (+5):** mid-document placement; two proposals in distinct blocks; same-block ordering determinism; resolved-before-trailing/unanchored; mixed-set determinism. - **E2E:** the F10 propose test now asserts the proposal renders before the following block (in place); accept still lands + clears. - 194 unit + 51 E2E green; `tsc --noEmit` clean. Closes #31 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 1 commit 2026-06-12 08:32:51 +00:00
In the F10 review preview, renderReview now emits each pending proposal whose
anchor resolves as a cw-proposal block immediately after the current-side block
its anchorStart falls in — answering "what is Claude proposing, and where?" by
position — instead of appending all proposals as trailing blocks. Proposals in
the same block are ordered by anchorStart then id (deterministic, INV-33); a
proposal whose anchor doesn't resolve (or precedes all blocks) still trails as a
cw-proposal-unanchored block, never dropped (INV-34).

This implements the inline-at-anchor placement the graduated F10 Solution Design
already specified (coauthoring-interactive-review.md §2/§6.2); the trailing-block
behavior shipped in #29 was a recorded v1 deferral.

Unit: mid-document placement, two proposals in distinct blocks, same-block
ordering determinism, anchored-before-trailing, mixed-set determinism.
E2E: the F10 propose test now asserts the proposal renders before the following
block (in place); accept still lands + clears.

194 unit + 51 E2E green; typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit fd263ec674 into main 2026-06-12 08:33:01 +00:00
Sign in to join this conversation.