cmux NEXT New Tab: start on the most recent project, or in no project
A New Tab opened in a fresh workspace showed "Choose folder", even when every chat that day had been in one project (Leo's dogfood photo). Each new tab needed a pick before its chat could start in that project.
A New Tab with no project of its own (no folder, the home folder or a private agent-home folder) now starts on the project of the most recently used chat on this Mac. The project chip names it, and Return, an Ask row and New chat start the chat there. Like a manual pick, it goes through the host's workspace.useFolder on that key press or click, so the host's folder rules still apply. Picking another project, or choosing a folder, replaces it.
These keep their folder as before:
- tabs that already have a project folder;
- pages the host named a start folder for (
startCwd); - tabs that are already open.
"Most recent" means the newest chat by updatedAt that runs on this Mac and isn't archived or a side chat. Chats on peers or Cloud hosts don't count, and neither do chats in a private agent-home folder, the home folder or /. New terminal still opens in the tab's own folder.
The folder menu also offers "Do not work in a project", as ChatGPT and Claude Code do (Leo, 2026-10-18). It sits above New Worktree, Add project and Choose folder…, with a checkmark while it's chosen, and the strip reads "No project". Picking it turns off the most-recent-project start. The chat then starts with chat.new and noProject, in the host's private agent-home folder, and never in the tab's or the start folder. Picking a folder afterwards replaces it.
Not covered: a fresh chat pane opened without the New Tab page still starts with "Choose folder". It sets its folder through a different path (projectDraft and the host's gesture-gated folder rules), so that belongs in its own change.
Validation
- Red, then green:
bun test --timeout 60000 test/new-tab-recent-project.test.tsx. It covers the helper's choice, which skips agent-home, home, peer and Cloud chats; a folderless tab, a home tab and an agent-home tab all starting on the recent project; and a project tab and a host start folder keeping theirs. Red at c76fd47 (the helper is missing), green at the fix (4 pass). - No project: red at 44a9e3e6d (the menu had no such row), green at 2638c3fbb (6 pass). The test picks the row on a page that has a start folder, checks that the strip reads "No project", and checks that Return asks with no folder and
noProject. AscreenActionstest checks thatchat.newgets{ harness, noProject: true }and no cwd. - 142 pass, 0 fail across the 75 New Tab, composer, folder, location, project and gallery test files.
vp checkand the type-scale, layers, text-focus and system-blue checks are clean. The new stringcomposer.noProject("No project") is in all 21 locales. - The other
new-tab-*tests pass with a 60 s timeout. On this machine the default 5 s timeout fails two of them on base too, on a cold import.
Changelog
- Changed: A New Tab with no project of its own starts on the project of your most recent chat.
- Added: The New Tab project menu offers Do not work in a project.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
A New Tab with no project of its own now starts on the project of the most recently used local chat instead of showing "Choose folder", and the project menu offers "Do not work in a project".
- The recent-project pick goes through the host's
workspace.useFolder, so the host's folder rules still apply. - "Most recent" means the newest chat by
updatedAton this Mac that isn't archived or a side chat; chats on peers or Cloud hosts, and chats in a private agent-home, home, or/folder, don't count. - Tabs with a project folder, a host start folder (
startCwd), or already open keep theirs; new terminal still opens in the tab's own folder. - "Do not work in a project" is checked while chosen and the strip reads "No project"; the chat starts with
chat.newnoProjectin the host's private folder. - A fresh chat pane opened without the New Tab page still starts with "Choose folder", since it sets its folder through a different path (
projectDraft).