Repository navigation
feat(panel): select code to comment, keep several line comments open, and light a thread's lines on hover - #3818
Merged
Merged
Conversation
… and light a thread's lines on hover Files changed offers a floating Comment press over code selected as text on lines GitHub takes a comment on, read from the file's shadow root once the drag lets go (diff-view/text-selection.ts), which opens the line comment on those lines. Several line comments now stand open at once across lines and files, held above the virtual list with their words (comment-drafts.ts), keyed by file and range: one per last line and side, a closed one coming back with its words, the last opened or written in lit. A new comment takes the keyboard once the list stands its note in the window. The pointer resting on a review thread lights the lines it is on. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…lines' rows alone Pierre hangs the gutter's + past the numbers' column over a line's first characters, and lights the notes under lit lines with them, so a comment being written stood in a coloured band. The + now stands inside the column, and a note under lit lines keeps its own ground. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
luke/select-to-comment-drafts
branch
from
October 19, 2026 11:15
473c65f to
43df2e8
Compare
…ain after a press off the code The chip a line's threads minimize to lights their lines as each thread does once shown. A press on a file's header or a note no longer counts as the start of a drag, so the selection it leaves standing is not read and offered again as the press lets go. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…ines again once the pointer leaves a thread it shows A chip of threads ending on one line lights the widest of their ranges rather than its first thread's, and what the pointer rests on stands as a stack, so moving from a thread shown under the chip back onto the chip lights the chip's lines again. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… in, by the diff's own row order The widest of a chip's thread ranges is the one whose first line's row the diff draws first (`rowPlace`), rather than the old side's before the new, so an added row drawn before a removed one is never left unlit. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…efore the rows drawn The threads under one chip all end on a drawn line, so a first line no row of the patch holds stands before every drawn row, and the chip lights that thread's range rather than a shorter one. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… the chip The setting reaches the list through the app's state a few turns after the press, which a loaded CI worker took longer than one settle for. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…n now names it Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
This was referenced Oct 19, 2026
This branch was successfully deployed
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.
C2 of the "Better comment box" stack, after #3792 (C1, merged). It makes three changes to Files changed in the Pull request tab: you can select code to comment on it, keep several line comments open at once, and hover a review thread to light the lines it is on. It is cut from
main, so no restack was needed. It includes #3794, #3796, #3798 and #3799.Summary
diff-view/text-selection.ts). Once the drag lets go, the bundle reads the selection from that file's shadow root throughSelection.getComposedRanges. It maps each end to its Pierre row (data-line,data-line-type):DiffListProps.onSelectText. The view only shows the button wherecommentLinesaccepts the range, meaning the hunk lines GitHub takes; expanded context lines get nothing.comment-drafts.ts). Line comments are no longer limited to one at a time: several can be open across lines and files.mainshows the same, so style(desktop): Files changed as cards that share one edge, with a quiet fold and a clearer header #3794 didn't cause them.LOOK_CSS).Desktop and panel only. No change to the service or to what is sent over the wire. Comments still go through
memberPullRequestWrite.Screenshots
Taken from the real
AgentPullRequestTabwith the real diff bundle and the builtstyles.css, using synthetic fixtures in headless Chromium driven by Playwright. Every step was a real interaction: a mouse drag to select, a press on Comment, typing, then hovering the thread.Evidence
pnpm check:affectedruns out of memory in this sandbox, so I ran the parts one at a time on the merged tree. All passed:tscfor@luke/paneland@luke/desktop./scripts/oxlint.sh,biome check packages/panel,./scripts/repository-checks.sh,pnpm knip,node scripts/discarded-effect.mjs@luke/panel: 198 files, 2,130 testscd apps/desktop && node scripts/build.mjs, within the bundle budget, which was not re-recordedTests (+11)
diff-view/text-selection.test.ts(5): only a press on the code starts a drag (a press on a header or a note doesn't, so a selection left behind isn't offered again); a unified selection from a removed row to an added row; an unchanged row in the old column of a split diff; a drag ending at a row's start, across a gap; a selection ending in a note.changes-model.test.ts(1):rowPlacefollows the order the diff draws its rows, so an added row drawn before a removed row comes first.agent-pull-request-tab.test.ts(5):line-commentkey.Invariants
./scripts/check.shgreen. (CI)astype assertion.Effect.runPromise/runSync/runForkoutside the runtime edges.setTimeout/setInterval/new Promise/AbortController/fs.watch. The bundle waits onerequestAnimationFrameafter a drag lets go, and the field waits on aMutationObserver, which is disconnected once it fires or on unmount.AGENTS.mdsentence names a changed part.PRIVACY.mdunchanged. The Comment button's word is ordinary text that session replay masks, and the tab staysph-no-capture.Notes
Made with Luke