Skip to content

Add app.defaultWorkspacePath to pick where Open Folder starts - #14455

Merged
teamleaderleo merged 3 commits into
mainfrom
feat/3156-default-workspace-path
Sep 25, 2026
Merged

teamleaderleo merged 3 commits into
mainfrom
feat/3156-default-workspace-path

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #3156

What it does

Adds a cmux.json setting that pins the folder the Open Folder panel starts in:

{ "app": { "defaultWorkspacePath": "~/code" } }
  • Applies to File > Open Folder and the command palette's Open Folder.
  • Supports a leading ~. Environment variables are not expanded: cmux started from the Dock only sees launchd's environment, so variables exported in a shell rc would not resolve.
  • Empty (the default), a missing folder, or a relative path fall back to today's behavior: start in the active workspace's directory. A non-empty value that is not a folder logs a warning.
  • It is a cmux.json setting only for now, like app.windowTitleTemplate; there is no Settings window row yet.
  • The command palette's Open Folder now also starts in the active workspace's directory when the setting is empty, so both entry points behave the same.

The "+ New Workspace" dialog the issue described no longer has a path field; Open Folder is where you pick a folder for a new workspace now, so that is where the setting applies. Starting new terminals somewhere other than the inherited directory is already covered by app.workspaceInheritWorkingDirectory: false plus Ghostty's working-directory.

Prior work

Tests

OpenFolderPanelStartDirectoryTests (CmuxSettings package) covers ~, absolute paths, whitespace, missing folders, relative paths, ~user, and the fallback to the active workspace directory. The embedded schema is regenerated (generate-cmux-config-schema.py --check passes).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds a cmux.json setting, app.defaultWorkspacePath, that pins the folder File > Open Folder and the command palette's Open Folder start in. Fixes #3156.

  • Supports a leading ~; a non-empty value that isn't an existing folder logs a warning.
  • Empty, relative, or missing-folder values fall back to the active workspace's directory.
  • The command palette's Open Folder now also starts in the active workspace's directory when the setting is empty, so both entry points behave the same.

Written for commit 95e3b7a. Summary will update on new commits.

Review in cubic

People who keep projects under one root had to navigate there from the
active workspace's directory every time they opened a folder. The new
app.defaultWorkspacePath setting pins where the Open Folder panel starts
(File menu and command palette). It supports ~ and $VAR. When it is empty
or not an existing folder, the panel starts in the active workspace's
directory as before.

Fixes #3156

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 25, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e098c0bb-ba0b-4ae1-bf2b-572c53363bbb

📥 Commits

Reviewing files that changed from the base of the PR and between 446c2c4 and 95e3b7a.

⛔ Files ignored due to path filters (1)
  • Packages/macOS/CmuxFoundation/Sources/CmuxFoundation/ConfigValidation/CmuxConfigSchema.generated.swift is excluded by !**/*.generated.*
📒 Files selected for processing (10)
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Keys/AppCatalogSection.swift
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/OpenFolderPanelStartDirectory.swift
  • Packages/macOS/CmuxSettings/Tests/CmuxSettingsTests/OpenFolderPanelStartDirectoryTests.swift
  • Sources/AppDelegate.swift
  • Sources/CmuxSettingsFileStore+SupportedPaths.swift
  • Sources/CmuxSettingsJSONPathSupport.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettingsFileStore+Template.swift
  • skills/cmux-settings/references/all-keys.md
  • web/data/cmux.schema.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@blacksmith-sh

This comment has been minimized.

teamleaderleo and others added 2 commits September 25, 2026 05:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up:
- The iOS/macOS conventions guard rejects all-static enums, so the
  resolver is now a struct with its dependencies in the initializer.
- Drop $VAR expansion. cmux launched from the Dock only sees launchd's
  environment, so shell-exported variables would silently not resolve.
  A leading ~ is supported.
- Log a warning when a non-empty setting is not an existing folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 76747df into main Sep 25, 2026
64 of 65 checks passed
@teamleaderleo
teamleaderleo deleted the feat/3156-default-workspace-path branch September 25, 2026 10:23
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Update: none of these failures reproduced on a rerun, so they look flaky. Nothing to do here unless you know otherwise.
These app-host tests newly fail in main's full suite at 2a40caa61c, after this pull request merged. They did not fail in the previous full-suite run at 2d844cb43f, and are not in scripts/ci/app-host-known-failures.json.

Commits in the range: 2d844cb...2a40caa

Pull requests run only the suites their diff reaches, so main's full suite is where this shows first. If this pull request is the cause, please fix forward or revert; if it is not, say so here. This is an automated attribution and can be wrong, most often for a flaky test.

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.

Setting: default working directory for new workspaces (app.defaultWorkspacePath)

1 participant