Skip to content

feat: quick project swap from the bottom keyboard - #27

Merged
rubenperezrial merged 2 commits into
mainfrom
feat/quick-project-swap
Oct 5, 2026
Merged

rubenperezrial merged 2 commits into
mainfrom
feat/quick-project-swap

Conversation

@rubenperezrial

Copy link
Copy Markdown

What

One-tap project swap from the bottom (reply) keyboard: a new row above the agent/context grid, below any queued prompts.

  • Label 🔄 {folder}: targets the project the last switch moved away from (settings.swapProject), falling back to the most recently active other project. Hidden when no other project exists.
  • Works while a session is busy: unlike the /projects menu, the press detaches the running session and switches in one step (the run keeps going in the background and is re-attachable).
  • Recognized as keyboard input, so it never enters the prompt queue.
  • Confirmation reuses the projects.selected message; new i18n key projects.swap_unavailable added to all 10 locales.
  • PRODUCT.md updated.

Why

Switching between projects on the phone required /projects → select → /sessions → select, and was blocked entirely while a session was running. The common case is bouncing between the two active projects, so it was made a single tap.

Tests

bun run check green: lint + build + 1875 tests (0 fail, 166 files). New coverage:

  • swap handler: stored-target preference, fallback to the most recent other project, no-other-project reply, error reply (4 tests)
  • keyboard: swap row placement (above the grid, below queued prompts), hidden with a null label (3)
  • interaction guard: the swap press passes the busy gate (1)
  • switch service: records the left project as the swap target, skips same-worktree switches (2)
  • message router: swap route registration + routing to the handler (2)

Adds a keyboard row above the agent/context grid that switches to the other project in one tap. Target: the project the last switch moved away from (settings.swapProject), falling back to the most recently active other project. The press is allowed while the session is busy: it detaches the running session instead of blocking. i18n for all locales and PRODUCT.md updated.
The project list can return entries without a name (cached session directories), which made the swap confirmation show the full worktree path.
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.

1 participant