Draw the file list as folders rather than a column of paths - #187
Merged
Conversation
A run that wrote 351 files put 349 of them in one directory, and the Files pane drew all 351 as full paths, one per line. Every row began with the same prefix, the part that told them apart was the part the pane elided, and the folder they shared was never said out loud. The prefix belongs on one line above the rows. artifact-tree.ts groups the listing by directory and builds a native details per folder, the same choice activity-group.ts made: it collapses with no state of ours and the keyboard already reaches it. main.ts still builds the file row, so the click, the open mark and the new badge did not move. A row shows the leaf name and keeps the whole path in its title and its data-path. The top level is open and everything under it is shut. Those are two different problems: a workspace with one directory would otherwise open to a single row naming that directory, and a pane that shows nothing until you click is not an improvement on one that shows too much. The hundreds of files are one step down, which is the step worth folding. A folder holding the open file, or one this turn wrote, opens regardless, so a fresh file is never hidden behind a fold. Nothing here is tuned to a count. A rule that opens a folder when it is small enough turns a listing into an argument about what small is. A folder name is part of a path the agent chose, so it reaches the page through textContent like everything else in web/, and the first test is the injection case. Claude-Session: https://claude.ai/code/session_01PG2vuux5tMsjnZBLWJzMyp
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.
The problem
A run wrote 351 files and put 349 of them in one directory. The Files
pane drew all 351 as full paths, one per line:
Every row starts with the same prefix, the part that tells them apart is
the part the pane elides, and the folder they share is never said out
loud. The prefix belongs on one line above the rows, not repeated down
the whole column.
The fix
web/src/artifact-tree.tsgroups the listing by directory and builds anative
detailsper folder, the same choiceactivity-group.tsmade:it collapses with no state of ours, the keyboard already reaches it, and
the browser knows what to do with it.
main.tsstill builds the file row, so the click, the open mark and the"new" badge did not move. A row shows the leaf name and keeps the whole
path in its
titleand itsdata-path, so nothing downstream had tochange.
Which folders start open
The top level is open and everything under it is shut. Those are two
different problems. A workspace with a single directory in it would
otherwise open to one row naming that directory, and a pane that shows
nothing until you click is not an improvement on one that shows too
much. The hundreds of files are one step down, and that is the step
worth folding.
A folder holding the file the pane is showing, or a file the turn just
wrote, opens regardless, so a fresh file is never hidden behind a fold.
Nothing here is tuned to a count. A rule that opens a folder when it is
small enough turns a listing into an argument about what small is.
On the listing in this screenshot
The 351 files become one open
doclang-testrow, holdingFINDINGS.mdand a shutassets · 349 files.Checks
npm run checkcleannpm test: 435 pass, 0 fail, up from 419npm run buildproduces the bundle, and the running server serves itA folder name is part of a path the agent chose, so it reaches the page
through
textContentlike everything else inweb/. The first test inartifact-tree.test.tsis the injection case, and nothing in thatmodule assembles markup.
I could not drive the running server from the browser in this session,
the extension lands on a Chrome error page for loopback, so the folder
rendering is covered by the tests and by confirming the server serves
the new bundle and stylesheet rather than by a screenshot.
https://claude.ai/code/session_01PG2vuux5tMsjnZBLWJzMyp