Skip to content

[Experiment #1560] Findings: thread-owning composer open path - #1776

Merged
amrmelsayed merged 10 commits into
mainfrom
builder/experiment-1560
Oct 5, 2026
Merged

amrmelsayed merged 10 commits into
mainfrom
builder/experiment-1560

Conversation

@amrmelsayed

Copy link
Copy Markdown
Collaborator

Docs-only: no production code. This PR lands the findings of spike #1560 on main (owner's word: "preserve the findings"). The throwaway probe used to produce them was removed from the tree. History keeps it in 077949ac4, and notes.md says how to restore it.

Refs #1560
Implementation follow-up: #1775 (filed, not spawned)

Answer

The spike asked whether the builder-review composer can own its CommentThread handle at open time without losing input focus, so a Stream Deck dial can discard a draft with thread.dispose().

  • Hypothesis disproved (final). Running controller.createCommentThread and then workbench.action.addComment at the same line never focuses the owned thread's input. addComment is a toggle (addOrToggleCommentAtLine): it collapses or expands an existing thread, and before the thread mounts it creates a second, unowned one. It failed in every variant on VS Code 1.140 and Codev.app 1.138, in plain and diff editors.
  • Recipe B verified on the stable API. An owned thread whose only comment is an empty CommentMode.Editing draft (canReply = false, Expanded): the host focuses the draft's editor, the dial-submit built-in editor.action.submitComment lands on the owned thread and comment, and dispose() is clean (host editor stays open; a dial-submit after dispose delivers nothing). It passed in plain editors, diff editors and range-less file comments, 5/5 repeats, on both hosts with no API proposal. This is what vscode: thread-owning builder-review composer — restore dial-cancel via an owned editing-mode draft (#1560 recipe B) #1775 implements, pending the owner's look-and-feel check (it renders as an edit-mode comment, not the bare reply box).
  • Recipe A works on Codev.app only. The proposed thread.reveal({ focus: Reply }) works because Codev.app bundles codev-vscode as a built-in, and built-ins keep their declared proposals. It throws CANNOT use API proposal: commentReveal in VS Code, Cursor and Marketplace installs. It's kept as the alternative if B's presentation is rejected.
  • Escape phantom-submit noted (pre-existing, out of scope). After workbench.action.hideComment (Escape's command), focus stays in the collapsed input and a dial-submit delivers the escaped text. This happens on the shipped vscode: review-flag gestures must prompt for comment prose (native inline thread, Submit/Cancel) — remove the promptless deck default #1552 path as well as A and B, so B doesn't introduce it. A real Escape keypress hasn't been checked.

The probe drove the same command ids the deck dials use, headlessly. Still for the owner to verify by hand: real dictation, the real deck, a real Escape keypress, and B's look.

Contents

@amrmelsayed
amrmelsayed merged commit 9c49689 into main Oct 5, 2026
7 checks passed
@amrmelsayed
amrmelsayed deleted the builder/experiment-1560 branch October 5, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant