Fix iOS unread count badge contrast
Summary
- Make the iOS workspace back-button unread count badge use a fixed white circle with black text.
- Avoid adaptive
.primary/systemBackgroundcolors for this badge because the toolbar sits over dark terminal chrome.
Verification
xcodebuildmcp swift-package build --package-path Packages/iOS/CmuxMobileShellUI --target-name CmuxMobileShellUI --configuration debugfailed before compile because this worktree has no localGhosttyKit.xcframework../ios/scripts/reload-cloud.sh --tag dog --device-id E4058DA9-F4C7-52DD-951D-0354061B8E89 --wait 1200succeeded and installeddev.cmux.ios.dogon Lawrence’s iPhone../scripts/reload-cloud.sh --tag dogsucceeded and installedcmux DEV dog.app../ios/scripts/reload.sh --tag dog --simulator "iPhone 17" --no-launchwas blocked by the repo guard against local Xcode builds.xcodebuildmcp device launch --device-id E4058DA9-F4C7-52DD-951D-0354061B8E89 --bundle-id dev.cmux.ios.doglaunched successfully.
Dogfood
Open a workspace detail on iPhone with unread activity in another workspace. The back-button count should render as black text on a white circular badge over the dark terminal bar.
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
[!NOTE]
Low Risk
Localized UI styling, CI cache hardening, and accessibility-aligned zoom behavior with unit tests; no auth, data, or security surface.
Overview
Fixes the iOS workspace back-button unread count badge so it stays readable over dark terminal toolbar chrome. The badge no longer uses adaptive .primary / systemBackground; it takes an explicit WorkspaceBackButtonBadgeContrast (.darkBackground → white circle + black text, .lightBackground → black circle + white text). WorkspaceShellView passes .darkBackground on the compact stack detail toolbar.
CI (swift-package-tests): After restoring GhosttyKit.xcframework, the workflow now checks for Info.plist, deletes a corrupt cache entry, and re-downloads when invalid (not only on cache miss). GhosttyKit package test failure handling renames the exit-status variable to test_status (behavior unchanged).
macOS canvas: Discrete keyboard/wheel zoom respects Reduce Motion via an injectable shouldReduceMotionForDiscreteZoom on CanvasRootView (skips animation and applies zoom immediately). CanvasViewportZoomTests stub that hook and add coverage for the reduce-motion path.
Reviewed by Cursor Bugbot for commit 1afa9c8625b3a08f1a0005b67b1aa67bdebd85da. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes the iOS workspace back-button unread badge contrast with fixed black/white colors so the count stays readable over dark terminal chrome. Also hardens CI cache validation for GhosttyKit.xcframework and adds a Reduce Motion seam and tests for macOS discrete zoom.
-
New Features
- Adds
WorkspaceBackButtonBadgeContrastwith.darkBackground(white badge, black text) and.lightBackground(black badge, white text; default). WorkspaceShellViewpasses.darkBackgroundfor the compact workspace toolbar.
- Adds
-
Refactors
- Moves
WorkspaceBackButtonBadgeContrastinto its own file. - CI: Validates cached
GhosttyKit.xcframeworkby checkingInfo.plistand re-downloads when invalid. - macOS: Injects
shouldReduceMotionForDiscreteZoominCanvasRootViewand adds tests to verify immediate zoom when Reduce Motion is on.
- Moves
Summary by CodeRabbit
- Style
- Updated the workspace back button unread-count badge to use an explicit black/white contrast scheme instead of adaptive/primary-based tinting.
- Added dedicated badge contrast presets for dark vs. light terminal chrome and applied them to badge fill and text for consistent readability.
- Chores
- Improved CI cache validation for a prebuilt framework by detecting missing metadata after restore and forcing a re-download when invalid.
- Tightened the unit test runner’s failure handling for more reliable nonzero-exit behavior.