update sessions/0043/SESSION-0043.0-TRANSCRIPT-2026-06-13T07-18--INPROGRESS.md

This commit is contained in:
Ben Stull
2026-06-13 07:29:04 -07:00
parent e804c46ba0
commit 5dc7d19419
@@ -11,10 +11,68 @@
## Launch prompt
_(launch prompt not captured at claim time)_
`/goal plan-and-execute #42 (SLICE-1 of the document-edit flow — Ask-Claude
entry-point menu wiring), per specs/coauthoring-document-edit-flow.md`
## Plan
**SLICE-1 — #42 (reach)** of the document-edit flow Solution Design
(`specs/coauthoring-document-edit-flow.md`, §7.2). Anchor: Feature #42
(`type/feature`); design graduated (session 0041) → §4.3 R3 satisfied.
Goal (INV-38): "Ask Claude to Edit" reachable from the editor **body** and the
editor **tab**, selection-aware (selection → `editSelection`; no selection →
`editDocument`), both gated to markdown/authorable docs, both routing through the
single `runEditAndPropose` path. Smallest increment — command already exists.
Tasks:
1. `package.json` — add `editSelection` + `editDocument` to `editor/context`
(selection-aware `when`, markdown+authorable) and `editor/title/context`
(selection-aware, `resourceLangId == markdown`); keep titles.
2. `trackChangesPreview.ts``cowriting.editDocument` accepts an optional tab
`uri` arg (mirror `showTrackChangesPreview`'s #41 resolution): open/resolve the
clicked doc, else fall back to the active editor.
3. E2E (`test/e2e/suite/`) — menu entries present + selection-aware + markdown-gated;
`editDocument(uri)` resolves the tab doc and produces a document-scoped proposal.
No model change, no new persisted artifact. No deploy pipeline (VS Code extension).
## Results
**SLICE-1 (#42, reach) shipped to `main`** — PR
[#49](https://git.benstull.org/benstull/vscode-cowriting-plugin/pulls/49)
(merged), issue #42 closed.
- `package.json``editSelection` + `editDocument` added to `editor/context`
(selection-aware, `editorLangId == markdown` + `file`/`untitled`) and
`editor/title/context` (selection-aware, `resourceLangId == markdown`);
existing `editor/context` `editSelection` entry markdown-gated to match INV-38.
- `src/trackChangesPreview.ts``cowriting.editDocument` now accepts the clicked
tab's resource `Uri` (opens it if needed), falling back to the active editor;
mirrors `showTrackChangesPreview`'s #41 resolution.
- `test/e2e/suite/f12Reach.test.ts` — 4 new host E2E (menu wiring declarative +
tab-URI targeting + no-arg fallback).
- `docs/MANUAL-SMOKE-F12.md` — SLICE-1 reach smoke steps.
Verification: `tsc --noEmit` clean; **208 unit** green; **65/5 host E2E** green
(main suite up from 61 → 65 with the 4 new tests).
**Next:** SLICE-2 — #47 (review, **P1**): document edits propose per changed
block (`diffToBlockHunks`, INV-39 supersedes INV-37; word-precise intra-block
attribution INV-40; block-insertion anchoring INV-41). Then SLICE-3 — #46
(accept-all, INV-42).
## Deferred decisions
_Autonomous-mode low-confidence calls the driver made and would have
liked operator input on. Appended as the session runs; surfaced at
finalize. Empty if none._
- **Markdown-gating `editSelection`'s `editor/context` entry** (driver call,
low-confidence). Spec §5/INV-38 say both Ask-Claude entries are markdown-gated,
but F8 made the `editSelection` *command* work on any authorable doc and its
current right-click entry has no `editorLangId == markdown` gate. Followed the
spec: gated the **menu** entries to markdown while leaving the command handlers'
behavior intact (palette still works on any authorable file). Removes the
body right-click Ask-Claude-Edit-Selection on non-markdown files — acceptable
since the proposal review surface (F10 preview) is markdown-only.