Final-review fixes:
- CRITICAL: optimisticApply no longer re-captures `original` from an
already-applied buffer after a window reload (in-memory `applied` set is
empty post-reload). A proposal already carrying `original` is marked applied
and skipped, so Reject's revert target survives save+reload (INV-51/54).
Adds a reload-safety host-E2E that reproduces the prior-session state.
- MINOR: the preview toolbar +N/-N summary now counts against the landed text
(current minus pending proposals) via the new pure landedTextOf(), so a
pending change is shown once (as a proposal), not double-counted (INV-50).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
renderReview diffs against landedText (current minus pending proposals), so block
offsets are landedText-relative while authorSpans arrive in currentText coords. A
colored block after a length-changing pending proposal was mis-colored. Map the
spans through toLanded so authorship coloring stays aligned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The default .vscode-test/user-data socket path exceeds macOS's ~103-char UNIX
socket limit when the repo lives at a long path (e.g. a git worktree), so the
host-E2E harness failed to launch (listen EINVAL). Point --user-data-dir at a
short /tmp root so the IPC socket stays under the limit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>