feat(file-open): add Open Recent picker for recently opened files#2297
Open
sinelaw wants to merge 2 commits into
Open
feat(file-open): add Open Recent picker for recently opened files#2297sinelaw wants to merge 2 commits into
sinelaw wants to merge 2 commits into
Conversation
Adds a recent-files list (issue #926): every user-initiated file open is recorded per window (most recent first, capped at 20) and persisted in the workspace file, so the list survives restarts. The list is exposed through a new "Open Recent" action available from the File menu (right under "Open File...") and the command palette. It opens a fuzzy-filterable prompt picker, pre-selected on the most recent entry; entries whose file no longer exists are skipped, and an empty list shows a status message instead of an empty picker. Paths are stored relative to the workspace root when possible (like read_only_files), and the new workspace field is serde-defaulted so older session files load unchanged. Closes #926 https://claude.ai/code/session_01DRkE5mej83XAHjmRMc3LSo
…restarts Three new e2e tests for issue #926's orchestrator-session interactions: - per-window isolation: files opened in one window never appear in another window's Open Recent picker - multi-window quit (save_all_windows_workspaces) then restart rooted at either directory restores only that directory's list - restarting in a never-opened directory starts with an empty list https://claude.ai/code/session_01DRkE5mej83XAHjmRMc3LSo
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.
Closes #926
What
Adds a recent-files feature: every user-initiated file open is recorded per window (most recent first, capped at 20) and persisted in the workspace file, so the list survives restarts.
The list is exposed through a new Open Recent action, reachable from:
open_recentaction stringIt opens the standard fuzzy-filterable prompt picker (same pattern as Select Theme), pre-selected on the most recent entry. Selecting an entry opens it through the normal open-file path.
Design notes
Editor::open_file— the user-initiated path. Session restore usesopen_file_internal, so restoring a workspace doesn't scramble the recency order. Virtual/hidden buffers (panels, plugin UIs) are never recorded.recent_filesfield on the existing per-projectWorkspacestruct, stored relative to the workspace root when possible (same convention asread_only_files). Older session files load unchanged.generate_dynamic_itemshas no access to editor state (it only receivesthemes_dir), and threading window state through the menu expansion path (TUI + native macOS menus) would have been much more invasive. The picker also gives type-to-filter for free, which a commenter on the issue asked for.Testing
tests/e2e/recent_files.rs: menu entry rendering, empty-list status message, list-and-open via palette, most-recent-first ordering, persistence across sessions, deleted-file skipping. All pass.https://claude.ai/code/session_01DRkE5mej83XAHjmRMc3LSo
Generated by Claude Code