Skip to content

feat: include app.defaultWorkspacePath in generated cmux.json template - #12

Merged
evandhoffman merged 1 commit into
mainfrom
feat/template-default-workspace-path
Jun 20, 2026
Merged

feat: include app.defaultWorkspacePath in generated cmux.json template#12
evandhoffman merged 1 commit into
mainfrom
feat/template-default-workspace-path

Conversation

@evandhoffman

Copy link
Copy Markdown
Collaborator

What

app.defaultWorkspacePath (added in #5) was missing from the commented-out template that cmux writes to ~/.config/cmux/cmux.json on first launch. The setting worked everywhere it's consumed — resolver, Settings → App row, JSON-path parsing, schema, docs — but never appeared in a fresh config, making it undiscoverable for users browsing the file.

This adds it to the app section of defaultTemplateSections() in Sources/KeyboardShortcutSettingsFileStore+Template.swift, beside the related workspaceInheritWorkingDirectory key. The value comes from the catalog default (""), so it renders as a commented placeholder:

// "defaultWorkspacePath": "",

Notes

  • One-line change; mirrors the existing sibling workspaceInheritWorkingDirectory line (same DefaultsKey<String> pattern already used throughout this file).
  • The template is only written when cmux.json is missing, so existing users won't see the line regenerated — they delete/rename the file and relaunch, or add the key by hand.
  • No localization impact: this is a JSON key in a generated config, not user-facing UI text.

https://claude.ai/code/session_01CNYr3XgjVDLsPNnPQxarn4

PR #5 added the `app.defaultWorkspacePath` setting everywhere it is
consumed (resolver, Settings UI row, JSON-path parsing, schema, docs) but
never added it to the commented-out template that cmux writes to
~/.config/cmux/cmux.json on first launch. As a result the setting was
absent from a fresh config and undiscoverable by users browsing the file.

Add it to the `app` section of defaultTemplateSections() next to the
related `workspaceInheritWorkingDirectory` key, sourcing the value from
the catalog default ("") so it renders as a commented placeholder:
`// "defaultWorkspacePath": "",`

Claude-Session: https://claude.ai/code/session_01CNYr3XgjVDLsPNnPQxarn4
@evandhoffman
evandhoffman enabled auto-merge (squash) June 20, 2026 15:52
@evandhoffman
evandhoffman merged commit 9fcdeb7 into main Jun 20, 2026
12 of 13 checks passed
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