Prioritize mobile toolbar controls over long titles
Closed
AZ
23d ago+301+301+012345678901234567890123456789-250-250-012345678901234567890123456789
Summary
- Replace the mobile toolbar title width cap with semantic SwiftUI layout priorities.
- Give the title a compressible toolbar role and trailing controls a fixed toolbar role.
- Add an inline workspace UI regression that asserts a long title yields before the chat and terminal buttons.
Verification
xcodebuild test -scheme CmuxMobileShellUI -destination 'platform=iOS Simulator,id=5AD831AA-8F8C-42F6-BA3E-DA9A0D971C26' -derivedDataPath /tmp/cmux-tprio-pkg -only-testing:CmuxMobileShellUITests/WorkspaceToolbarLayoutPriorityTestsxcodebuild test -workspace ios/cmux.xcworkspace -scheme cmux-ios -configuration Debug -destination 'platform=iOS Simulator,id=5AD831AA-8F8C-42F6-BA3E-DA9A0D971C26' -derivedDataPath /tmp/cmux-ios-tprio-uitests -only-testing:cmuxUITests/cmuxUITests/testInlineWorkspaceLongTitleYieldsToTrailingToolbarControls./scripts/reload.sh --tag tprio./ios/scripts/reload.sh --tag tprio --simulator cmux-tprio-verify --no-setup
Dogfood
- macOS tag: http://127.0.0.1:17320/tprio
- iOS tag:
tprioon simulatorcmux-tprio-verify(5AD831AA-8F8C-42F6-BA3E-DA9A0D971C26) - Screenshot evidence:
/tmp/cmux-tprio-evidence/inline-workspace-long-title-final.png
Notes
- Full package suite still has unrelated existing
WorkspaceMacSelectionTestsfailures around pending machine selection restore state. - Existing workspace-detail long-title UI tests currently fail before toolbar assertions because the preview harness does not render
MobileWorkspaceTitleMenu.
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Prioritize mobile toolbar controls over long titles on iOS so chat and terminal buttons always stay visible. Replace width caps with a shared priority toolbar across inline previews and production, with tests that enforce truncation and title height fitting.
-
Refactors
- Removed width-cap/geometry code; added
MobileToolbarPriorityHost,MobileToolbarItemLayoutRole, and sharedMobileWorkspacePriorityToolbar. - Moved
WorkspaceDetailViewtoolbar into.principalwith prioritized back/title/trailing clusters; inline preview now uses the same toolbar and fixed-size trailing controls. - Simplified
WorkspaceTitleMenuto a compressible title; extractedWorkspaceDetailPreviewWorkspaceBuilderwith stable action capabilities.
- Removed width-cap/geometry code; added
-
Bug Fixes
- Long titles now truncate before chat and terminal controls in inline previews and production workspace detail.
- Tightened UI tests: added inline and production coverage for truncation, and a height-fit check so the compact title never grows taller than nearby controls.
Summary by CodeRabbit
-
New Features
- Introduced improved mobile workspace header toolbar composition with explicit layout prioritization for back, title, and trailing controls, ensuring long titles stay readable.
-
Bug Fixes
- Fixed long workspace title layout to correctly yield/truncate around back and trailing controls (including inline toolbars and chat-toggle combinations), reducing overlap/clashing.
-
Tests
- Added/updated UI regression checks for “title yields to trailing controls,” including inline and screenshot coverage, and refreshed toolbar title-height fitting assertions.