feat(projects): add Recent / Pinned Projects picker (#1895)#2302
Open
sinelaw wants to merge 1 commit into
Open
feat(projects): add Recent / Pinned Projects picker (#1895)#2302sinelaw wants to merge 1 commit into
sinelaw wants to merge 1 commit into
Conversation
Switching between a handful of projects previously meant typing or browsing to each path through Switch Project every time. This adds a fast, familiar "recent projects" workflow (VS Code / IntelliJ style). A project switch in Fresh restarts the editor against the new working directory, so a single recording hook at the real boot points (the TUI run loop and the session server's editor build) captures both the initial launch and every later switch — no per-switch instrumentation. - New `services::recent_projects` store: an MRU list with pinned entries, persisted as `recent_projects.json` under the data dir (atomic write, like the workspace store), capped to 20 unpinned entries while always keeping pinned ones. Corrupt / future-version files degrade to empty rather than failing. - `Open Recent Project` opens a picker (reusing the suggestion-prompt infrastructure) listing pinned projects first with a star marker, then recents by recency, excluding the current project; selecting one reuses the Switch Project code path. - `Pin/Unpin Current Project` toggles the current project's pinned flag. - Both reachable from the command palette; `Open Recent Project` is also added to the File menu. - i18n keys added across all 14 locales. Tested: unit tests for the store (ordering, dedup, cap-keeps-pinned, pin toggle, save/load round-trip, resilience); an e2e test that opens the picker from the palette and asserts the rendered list; and a menu test for the File entry. https://claude.ai/code/session_01V2RS85cmJMWXqHQoX96oe5
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 #1895.
What
Adds a fast, familiar "recent projects" workflow (VS Code / IntelliJ style) so switching between a handful of projects no longer means typing or browsing to each path through Switch Project every time.
How it works
A project switch in Fresh restarts the editor against the new working directory, so a single recording hook at the real boot points (the TUI run loop and the session server's editor build) captures both the initial launch and every later switch — no per-switch instrumentation needed.
The list lives in
recent_projects.jsonunder the data dir (next toworkspaces/), written atomically like the workspace store. It is local convenience state, never load-bearing: a missing / corrupt / future-version file degrades to an empty list. Unpinned entries are capped at 20; pinned entries are always kept.Design notes:
docs/internal/recent-projects-design.md.Testing
services::recent_projects): MRU ordering, de-dup, cap-keeps-pinned, pin toggle, save/load round-trip, and resilience to missing/corrupt/future-version files.fresh, opened the picker (pinned project shown first with ★), selected a project and confirmed the editor switched into it, and exercised Pin/Unpin (status message + persisted store update). Record-on-open confirmed by the store updating on switch.cargo fmt,cargo clippy --all-targets, and the test suites are green. i18n keys were added across all 14 locales.https://claude.ai/code/session_01V2RS85cmJMWXqHQoX96oe5
Generated by Claude Code