Repository navigation
feat(desktop): mark files viewed and count their threads and lines on Files changed's tree rows - #3798
Merged
Conversation
…-cli does Minimize inline comments folded each open thread to its head row, and left resolved and outdated threads as they were, since those already stand folded; on a pull request whose threads were resolved it changed nothing to see. It now means what stage-cli's means: each line's threads draw as one chip at the end of the line, in a row of no height, so the diff reads as if the line held no comments. The chip names who wrote on the line, how many comments, and how many are open; pressing it shows or hides the line's threads, and the tab's find reads them and opens the line it brings into view. I turns the setting on and off inside Files changed. 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>
…on no line a row for their chip Two findings from review. The chip's fold was drawn anew each time it opened or closed, so a find that opened a resolved thread's own fold inside it had that fold drawn closed again, and a keyboard press lost the focus; the fold is now kept and told whether it is open. And the chip of threads on no line, above the diff or under a file's picture, floated up over what stood before it; it now takes a row of its own. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…iet fold and a clearer header Each file's code area kept room for a scroll bar up and down, which a Mac that always shows scroll bars drew as a strip at the end of every line, so the rows and the bands between hunks stopped short of the file's header. The code area keeps none now, and the header, the bands, the rows, and the threads share one left and one right edge. Each file is a card on the panel's ground, rounded whole and set apart by the room between files; its header stuck at the top stands square, the card's rounded top scrolled away. The fold is a compact quiet mark with no fill while its file is open. The header names the file's folder quietly and its name in the full ink, cutting the folder first where the row runs short; its letter stands on a tint of its own colour; and Viewed says V in its hint. The bands between hunks are 24 px and quieter, and the tree's search stands level with the first card. 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>
…anged-design Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Adds I to Files changed's shortcut table (Review group) and to its dispatch record, after #3795. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Viewed's hint now reads V from Files changed's shortcut table (#3795). 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>
… Files changed's tree rows Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…luke/files-changed-tree-viewed-counts
…drawn 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. |
…anding in the marks' place Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…he tree's tests on no clock 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>
2 tasks done
This was referenced Oct 19, 2026
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.
Summary
T1 of the "File tree: viewed and counts" stack, which brings stage-cli's tree rows to Files changed. Each file row in the tree beside Files changed now ends in:
+N −M, shown only where the row has room for it.useViewedFilesdoor the header's Viewed box and V use, so it shows pending and refusal the same way. A press shows at once. If GitHub refuses, the mark goes back and the write note under the bar says why. Marking a file viewed folds it in the list, as the box does.Folder rows are unchanged. No new GitHub request: the data comes from the viewed read, the review threads, and the changes answer.
Stacked on #3794.
How it's drawn
FileMark(file-tree/contract.ts) gains optionallines,threadsandviewed, andFileTreePropsgainsonViewed. The tree bundle draws them through Pierre's ownrenderRowDecoration, as one run of four parts in a fixed order. The newfile-tree/row-marks.tsholds the decoration, the sheet that styles it, and how a press is matched to the toggle.−M, then+N, then the count's number, then the speech mark. The run is one line of a wrapping flex box with its second line clipped.unsafeCSSinto an inline<style>, which the panel'sstyle-src 'self'refuses. So the tree's existing thin-scrollbar rule never applied. The tree's rules are now a constructed sheet adopted by its shadow root, which the policy allows (as for the terminal,terminal/adopted-styles.ts). It's adopted again whenever Pierre moves its element. The thin scrollbar therefore now applies, as its comment always said it would.mark()asks it to redraw (setComposition) whenever a viewed mark or count changes.Screenshots
PR #3645 drawn in the Files changed harness (Chromium, the panel's real CSP and stylesheet). The pointer rests on
changes-list.tsx. Four files are marked viewed and six review threads sit on three files.Tests
file-tree/index.test.ts(new) mounts the real bundle and draws real Pierre rows in jsdom:vieweddraws no toggle.agent-changes-tab.test.ts:mark-file-viewed, ticks the header box and folds the file;Evidence
pnpm check:affectedran out of memory indiscarded-effect. Its other steps passed, so I ran the fallback list:tsc --noEmitfor panel and desktop: clean;vitest --project panel: 197 files, 2116 tests passed;./scripts/oxlint.sh: 0 errors;pnpm knip: clean;./scripts/repository-checks.sh: passed;biome check: no errors.cd apps/desktop && node scripts/build.mjs: passed, bundle budget included.Invariants
Made with Luke