Repository navigation
feat(chat): collapse the turn change card to one line and list files in compact rows - #253
Merged
Merged
Conversation
…in compact rows The card with a turn's changed files took most of the screen for a turn that touched several files: it was always expanded, each file was a 44px row with its full path in a mono font, and its frame differed from the other cards in the conversation. The line under its title had no border color and took the text color. The card is now a Collapsible like the ShowUI card: one line with the number of files, the lines added and removed and the undo button, which stays usable while collapsed. Opening it lists the files in the compact rows the Changes tab uses, with the file name first and its folder in the subtle text color. That label is now a shared component, FilePathLabel, used by both places, and getPathParts moved to lib/pathParts. The subtitle is gone, and on a phone the undo button shows only its icon. The diff of a file opens under its row as before.
…peated in the turn change card The row above a diff already names the file. With both callers of WorkspaceDiffSurface hiding the header, the hideFileHeaders option and PierreDiffSurface's hideFileHeader are removed and the header is always off.
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.
What changed
The card that lists a turn's changed files in the conversation (
CurrentTurnChangeCard):row-sm): the file name first, then its folder in the subtle text color. That label is now a shared component,FilePathLabel, used by both places;getPathPartsmoved fromWorkspacePanel.tsxtolib/pathParts.tsand keeps the leading slash of a folder outside the workspace.rounded-lg border border-border, like the other cards in the conversation column.WorkspaceDiffSurfacenow hide the header, so itshideFileHeadersoption is removed;PierreDiffSurface'shideFileHeaderhad no caller passingfalseand is removed too. The header is always off.Why
For a turn that touched several files the card took most of the screen: it was always expanded and each file was a 44px row with its full path in a mono font. The line under its title used
border-bwithout a color and took the text color. Its frame (rounded-xlwith a ring) differed from the other cards beside it.Not included
The per-file added and removed line counts that the diff's own header showed are no longer visible in the card. The checkpoint only carries the list of paths and the totals, so per-file counts in the rows would need an API change.
How it was tested
desktop/src/components/chat/CurrentTurnChangeCard.test.tsx: 10 tests. Eight of them fail on the old component. The test for the file header fails on the commit before the header was removed (run against an export of that commit).desktop/src/lib/pathParts.test.ts: new.desktop/src/components/chat/MessageList.test.tsx: eight existing tests adapted to expand the card before looking for file rows.desktop:bun run lintpasses;bun run test -- --rungives 229 files, 2863 passed, 4 skipped, 0 failed.bun testwas not run on this branch.