Repository navigation
Code browser: file tree and viewer for a session's working directory #127
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestepicLarge feature. Decide and break down before building.Large feature. Decide and break down before building.
Description
Why
File peek reads the one path the agent printed. That is the right first step and a thin one from a phone, where the thing you want is to wander: open the tree, tap a file, read it, tap the next. Every hosted agent UI (Happy Coder, Conductor, Amp) has some form of this. flue already has the viewer, the cache, the route, and the wire verbs; this grows them into a browser.
Rough scope
- A file tree for the session's working directory, in a panel beside the terminal on desktop and a drawer on mobile. Tapping a file opens the existing
FileContentsviewer (virtualized, shiki in a worker, LRU cache). Nothing about the viewer changes. - Own route,
/d/$deviceId/s/$sessionId/files?path=..., next to the existing/fileroute, so a tree can be opened in its own tab the way a peeked file can today. - Git decorations on rows: modified, untracked, ignored. Hidden files toggle. Directories collapse and expand, state survives navigation within the session.
- Later, once the basics hold: a fuzzy file finder (Cmd+P), and noticing that the tree changed under you.
Hard parts, named up front
- Big repos. The tree must never enumerate the whole working directory to draw the first screen; a monorepo or a
node_moduleswould stream megabytes over the same Noise channel your keystrokes ride. The listing protocol is its own ticket, Fast directory listing over the wire for big repos #128, and this epic depends on it. - Which tree component. Pierre's
@pierre/treesis virtualized and was demoed on 1.5 million files, but it wants the full path list up front and renders Preact in a shadow root. Own tree on@tanstack/react-virtual(already in the viewer) is the other path. Spike: Pierre's @pierre/diffs and @pierre/trees in flue #129 decides. - Same reader, same rules. The tree reads and never writes, and like file peek it is not fenced to a subtree: a paired device can already spawn a shell anywhere (
internal/daemon/file.go, the comment at the top).
Notes
- Depends on Fast directory listing over the wire for big repos #128. Informed by Spike: Pierre's @pierre/diffs and @pierre/trees in flue #129. A sibling of Diff view: see what the agent changed #130, which is the diff view; they share the tree and the viewer but are separate features.
- The directory picker in Session composer: start agent sessions from any device #112 is the same listing protocol with a different surface; build Fast directory listing over the wire for big repos #128 once, use it twice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestepicLarge feature. Decide and break down before building.Large feature. Decide and break down before building.
Activity