feat(files): let the path picker jump to a typed path and sort by name or date - #399
Open
shenlvkang-collab wants to merge 1 commit into
Open
feat(files): let the path picker jump to a typed path and sort by name or date#399shenlvkang-collab wants to merge 1 commit into
shenlvkang-collab wants to merge 1 commit into
Conversation
…e or date The picker's current-folder line was a read-only breadcrumb, so reaching a deep folder meant tapping through every level, and the listing was fixed to name order, so the file an agent had just written was somewhere in a 500-entry list. The current folder is now an editable field: Enter or Go jumps there, a full file path lands in its folder with that file selected, and a path that does not resolve keeps the listing you had and says so, instead of the reset to the root that a stale initialPath gets. A Sort control orders the listing by name or modified time in either direction, folders always first, and the choice is remembered per device like the hidden toggle. Each entry shows a compact modified time (time of day today, month-day this year, else the date). GET /api/filesystem/browse stamps every entry with mtimeMs to make that possible; the stat that already fetched a file's size now serves both, so it is still one stat per entry. Entries without an mtime (an older server, the in-container listing) sort after dated ones and then by name. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McLWqCWBuQYGuPMScb4Aou
shenlvkang-collab
force-pushed
the
pr/path-picker-sort-jump
branch
from
September 10, 2026 05:03
02e0772 to
58b4cb0
Compare
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
The shared filesystem path picker (Link Existing, the mobile keyboard's 📁 Path key, the Docker workspace picker) had two gaps that made it slow to use on a phone:
This PR:
<input>: type or paste a path and press Enter (or Go) to jump there. A full file path lands in its folder with that file selected (one Enter away from Select). A path that does not resolve keeps the listing you had and shows the server's message, instead of the reset-to-root that a staleinitialPathgets (that fallback is unchanged for non-typed loads). The listing is fetched only on submit, never per keystroke.codeman:pathPickerSort), like the show-hidden toggle. Re-sorting is client-side, no round trip, selection kept.GET /api/filesystem/browseentries carrymtimeMs. The stat that already fetched a file's size now serves both, so it is still one stat per entry. Entries without an mtime (an older server, the in-container listing) sort after dated ones and then by name, so the order is always stable.Docs:
docs/wiki/Working-With-Files.md(path picker section). Changeset: minor.Test plan
test/path-picker-sort.test.ts(new, jsdom): default order, re-sort without a request, persistence, corrupt/throwing localStorage, undated entries, modified label, typed-path jump, error keeps listing, file path → parent + selected, Select Current Folder / Refresh use the field.test/routes/file-routes.test.ts: entries stamped withmtimeMs(file, directory, symlink) with exactly one stat per entry.test/path-picker-hidden.test.ts,test/path-picker-ui.test.ts,test/frontend-public-tooling.test.tsunchanged and green.tsc --noEmit, eslint on the touched TS, prettier on all touched files.🤖 Generated with Claude Code
https://claude.ai/code/session_01McLWqCWBuQYGuPMScb4Aou