Skip to content

feat(projects): add Recent / Pinned Projects picker (#1895)#2302

Open
sinelaw wants to merge 1 commit into
masterfrom
claude/peaceful-goodall-wb0kxb
Open

feat(projects): add Recent / Pinned Projects picker (#1895)#2302
sinelaw wants to merge 1 commit into
masterfrom
claude/peaceful-goodall-wb0kxb

Conversation

@sinelaw

@sinelaw sinelaw commented Jun 10, 2026

Copy link
Copy Markdown
Owner

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.

  • Open Recent Project — a picker listing pinned projects first (marked with ★), then recents by recency, excluding the current project. Selecting one switches to it (reusing the existing Switch Project code path).
  • Pin/Unpin Current Project — toggles whether the current project stays at the top of the list.
  • Both are in the command palette; Open Recent Project is also under the File menu.

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.json under the data dir (next to workspaces/), 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

  • Unit (services::recent_projects): MRU ordering, de-dup, cap-keeps-pinned, pin toggle, save/load round-trip, and resilience to missing/corrupt/future-version files.
  • E2E: opens the picker from the command palette and asserts the rendered list (pinned ★ first).
  • Menu: asserts the File menu contains the entry.
  • Manual validation (tmux): launched 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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Recent Projects / Pinned Projects list under File menu for faster project switching

2 participants