fix(next): let legacy workspace defaults take front-tab names
Problem
Leo reported: "likewise the auto naming for workspaces and tabs where's that". Legacy cmux workspaces can arrive as ~ or an empty name, but NEXT only recognized workspace-N as daemon-owned. Those rows were treated as manually named, so a useful front-tab label could never reach the sidebar.
Change
Treat the empty and home-folder defaults retained by older daemons as automatic names. A meaningful front-tab label can now replace them, while a non-empty workspace title still wins. The regression coverage exercises both the model predicate and the live label rule.
Changelog
- Fixed: legacy
~and empty workspace defaults now accept automatic front-tab names.
Validation
python3 scripts/verify-local.py --only swift-syntax --swift-changedpassed locally.- Native Swift tests are routed to the managed fleet; the exact receipt will be added before merge.
Scope
This is the small sidebar behavior fix for legacy defaults. The classic prompt/model auto-namer remains a separate structural HOLD.
Agent session: big-red
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes legacy workspace naming so ~ and empty default names on older daemons are recognized as automatic, letting front-tab labels replace them in the sidebar while preserving user-renamed names.
WorkspaceModel.isUnnamed(_:)treats empty and~names as daemon defaults only when the daemon lacks name-source provenance.WorkspaceAutoName.isUserNamedandNewWorkspaceName.forLastTabgate onnameSourceandnameRevision, so a user-renamed~survives while legacy defaults still take front-tab names.forLastTaband the reader detectallowsLegacyDefaultsfrom the daemon'sworkspaceNameSourcecapability; new daemons never treat~as automatic.- A non-empty workspace title still wins over an automatic front-tab name.
- Adds regression tests for the model predicate, the live labeling rule, and moved last-tab naming.