Repository navigation
[Experiment #1560] Findings: thread-owning composer open path - #1776
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andnotes.mdsays 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
CommentThreadhandle at open time without losing input focus, so a Stream Deck dial can discard a draft withthread.dispose().controller.createCommentThreadand thenworkbench.action.addCommentat the same line never focuses the owned thread's input.addCommentis 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.CommentMode.Editingdraft (canReply = false, Expanded): the host focuses the draft's editor, the dial-submit built-ineditor.action.submitCommentlands on the owned thread and comment, anddispose()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).thread.reveal({ focus: Reply })works because Codev.app bundles codev-vscode as a built-in, and built-ins keep their declared proposals. It throwsCANNOT use API proposal: commentRevealin VS Code, Cursor and Marketplace installs. It's kept as the alternative if B's presentation is rejected.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
codev/experiments/1560-thread-owning-open-path/notes.md: hypothesis and criteria (written before the probe ran), source trace, results table, limitscodev/experiments/1560-thread-owning-open-path/followup-issue-draft.md: the draft vscode: thread-owning builder-review composer — restore dial-cancel via an owned editing-mode draft (#1560 recipe B) #1775 was filed fromcodev/experiments/1560-thread-owning-open-path/results/*.json: raw probe results per host and proposal statecodev/projects/1560-*/status.yaml: porch bookkeeping (protocol complete)codev/state/experiment-1560_thread.md: builder thread