Repository navigation
Fix minimal mode toggle relayout hang - #7076
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughRefactors minimal-mode state derivation and change handling out of ChangesMinimal-Mode Refactor and Invalidation Optimization
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (3 errors, 1 warning)
✅ Passed checks (21 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
@austinywang I can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 241,260 of the 240,000 allowed lines of code this month. Reviews resume on 1 July 2026 (in 1 day). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
✅ Action performedReview finished.
|
|
To use Codex here, create a Codex account and connect to github. |
…de-toggling-minimal-mode-hangs-the
|
Latest head after merging |
@austinywang I can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 241,260 of the 240,000 allowed lines of code this month. Reviews resume on 1 July 2026 (in 1 day). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
To use Codex here, create a Codex account and connect to github. |
1 similar comment
|
To use Codex here, create a Codex account and connect to github. |
Greptile SummaryThis PR fixes a relayout hang when toggling Minimal Mode by moving
Confidence Score: 5/5The change is safe to merge: it replaces broad @AppStorage subscriptions on three heavy views with narrow chrome-only leaf subscribers, backed by a deliberately non-observable cache class so ContentView itself never invalidates on a mode toggle. All AppKit side-effect calls are correctly consolidated in handleWorkspacePresentationModeChange, triggered by both onAppear and onChange in WorkspacePresentationModeChangeObserver. The runtime cache is initialized from UserDefaults.standard at @State creation and re-confirmed on first mount via onAppear. The regression test uses an isolated UserDefaults suite, mounts a real window, and verifies zero heavy-view body re-evaluations after a mode toggle. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
UD[("UserDefaults\n(modeKey)")]
subgraph HeavyViews["Heavy Views - no AppStorage subscription"]
CV["ContentView\n(@State cache)"]
WCV["WorkspaceContentView"]
VTS["VerticalTabsSidebar"]
end
subgraph ChromeLeaves["Chrome Leaf Views - own @AppStorage subscription"]
OBS["WorkspacePresentationModeChangeObserver"]
TML["WorkspaceTitlebarModeLayer"]
ESSL["MinimalModeTitlebarEventSurfaceLayer"]
SAM["WorkspaceContentMinimalModeSafeAreaModifier"]
TPM["WorkspacePresentationModeContentTopPaddingModifier"]
OVL["MinimalModeSidebarTitlebarControlsOverlay"]
end
CACHE["WorkspacePresentationModeRuntimeCache\n(non-observable class)"]
UD -->|"@AppStorage"| OBS
UD -->|"@AppStorage"| TML
UD -->|"@AppStorage"| ESSL
UD -->|"@AppStorage"| SAM
UD -->|"@AppStorage"| TPM
UD -->|"@AppStorage"| OVL
OBS -->|"handleWorkspacePresentationModeChange"| CV
CV -->|"writes"| CACHE
CV -->|"reads"| CACHE
CV -->|"contains"| WCV
CV -->|"contains"| VTS
CV -->|"embeds"| OBS
WCV -->|"modifier"| SAM
CV -->|"modifier"| TPM
CV -->|"wraps"| TML
CV -->|"embeds"| ESSL
VTS -->|"overlay"| OVL
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
UD[("UserDefaults\n(modeKey)")]
subgraph HeavyViews["Heavy Views - no AppStorage subscription"]
CV["ContentView\n(@State cache)"]
WCV["WorkspaceContentView"]
VTS["VerticalTabsSidebar"]
end
subgraph ChromeLeaves["Chrome Leaf Views - own @AppStorage subscription"]
OBS["WorkspacePresentationModeChangeObserver"]
TML["WorkspaceTitlebarModeLayer"]
ESSL["MinimalModeTitlebarEventSurfaceLayer"]
SAM["WorkspaceContentMinimalModeSafeAreaModifier"]
TPM["WorkspacePresentationModeContentTopPaddingModifier"]
OVL["MinimalModeSidebarTitlebarControlsOverlay"]
end
CACHE["WorkspacePresentationModeRuntimeCache\n(non-observable class)"]
UD -->|"@AppStorage"| OBS
UD -->|"@AppStorage"| TML
UD -->|"@AppStorage"| ESSL
UD -->|"@AppStorage"| SAM
UD -->|"@AppStorage"| TPM
UD -->|"@AppStorage"| OVL
OBS -->|"handleWorkspacePresentationModeChange"| CV
CV -->|"writes"| CACHE
CV -->|"reads"| CACHE
CV -->|"contains"| WCV
CV -->|"contains"| VTS
CV -->|"embeds"| OBS
WCV -->|"modifier"| SAM
CV -->|"modifier"| TPM
CV -->|"wraps"| TML
CV -->|"embeds"| ESSL
VTS -->|"overlay"| OVL
Reviews (8): Last reviewed commit: "Keep minimal mode side effects on observ..." | Re-trigger Greptile |
Greptile SummaryThis PR fixes a UI hang on minimal-mode toggle by moving
Confidence Score: 3/5The core invalidation fix is correct and the leaf-view decomposition is clean, but MinimalModeInvalidationProbe lands in production Sources/ as a #if DEBUG-only test hook with no shipped behaviour. The narrowing of @AppStorage subscriptions to leaf views is architecturally sound and the regression test validates the contract. The problem is Sources/MinimalModeInvalidationProbe.swift: it is entirely compiled away in release builds but adds a debug-only EnvironmentKey and three matching #if DEBUG body hooks to ContentView, WorkspaceContentView, and VerticalTabsSidebar with no production caller. Per the repo's explicit rule this class of observability seam belongs in a debug folder or test-support module, not in Sources/. Sources/MinimalModeInvalidationProbe.swift and the three #if DEBUG probe blocks inside ContentView.body, WorkspaceContentView.body, and VerticalTabsSidebar.body should be relocated before merge. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
UD["UserDefaults modeKey change"]
OBS["WorkspacePresentationModeChangeObserver @AppStorage subscriber"]
TML["WorkspaceTitlebarModeLayer @AppStorage subscriber"]
STCO["MinimalModeSidebarTitlebarControlsOverlay @AppStorage subscriber"]
TESL["MinimalModeTitlebarEventSurfaceLayer @AppStorage subscriber"]
MSAM["WorkspaceContentMinimalModeSafeAreaModifier @AppStorage subscriber"]
CTPM["WorkspacePresentationModeContentTopPaddingModifier @AppStorage subscriber"]
CV["ContentView.handleWorkspacePresentationModeChange imperative NSWindow chrome updates"]
TB["workspaceTitlebarBand re-evaluates"]
SB["HiddenTitlebarSidebarControlsView re-evaluates"]
ES["MinimalModeTitlebarEventSurfaceView re-evaluates"]
WCV["WorkspaceContentView safe-area edge"]
PAD["ContentView top padding"]
UD --> OBS
UD --> TML
UD --> STCO
UD --> TESL
UD --> MSAM
UD --> CTPM
OBS -->|onChange callback| CV
TML -->|titlebar visibility only| TB
STCO -->|overlay only| SB
TESL -->|event surface only| ES
MSAM -->|safe-area edges only| WCV
CTPM -->|top padding only| PAD
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
UD["UserDefaults modeKey change"]
OBS["WorkspacePresentationModeChangeObserver @AppStorage subscriber"]
TML["WorkspaceTitlebarModeLayer @AppStorage subscriber"]
STCO["MinimalModeSidebarTitlebarControlsOverlay @AppStorage subscriber"]
TESL["MinimalModeTitlebarEventSurfaceLayer @AppStorage subscriber"]
MSAM["WorkspaceContentMinimalModeSafeAreaModifier @AppStorage subscriber"]
CTPM["WorkspacePresentationModeContentTopPaddingModifier @AppStorage subscriber"]
CV["ContentView.handleWorkspacePresentationModeChange imperative NSWindow chrome updates"]
TB["workspaceTitlebarBand re-evaluates"]
SB["HiddenTitlebarSidebarControlsView re-evaluates"]
ES["MinimalModeTitlebarEventSurfaceView re-evaluates"]
WCV["WorkspaceContentView safe-area edge"]
PAD["ContentView top padding"]
UD --> OBS
UD --> TML
UD --> STCO
UD --> TESL
UD --> MSAM
UD --> CTPM
OBS -->|onChange callback| CV
TML -->|titlebar visibility only| TB
STCO -->|overlay only| SB
TESL -->|event surface only| ES
MSAM -->|safe-area edges only| WCV
CTPM -->|top padding only| PAD
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
Greptile SummaryThis PR fixes the minimal-mode toggle hang (#5732) by moving
Confidence Score: 4/5The core isolation refactor is correct and the new leaf views are well-scoped; the one concrete issue is a test-only The architectural change is sound — isolating Sources/MinimalModeInvalidationProbe.swift and its three Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant U as User/PaletteCommand
participant UD as UserDefaults
participant OBS as WorkspacePresentationModeChangeObserver
participant CV as ContentView
participant TML as WorkspaceTitlebarModeLayer
participant ESL as MinimalModeTitlebarEventSurfaceLayer
participant SAM as WorkspaceContentMinimalModeSafeAreaModifier
participant PPM as WorkspacePresentationModeContentTopPaddingModifier
participant STO as MinimalModeSidebarTitlebarControlsOverlay
U->>UD: set(modeKey, "minimal")
UD-->>OBS: "@AppStorage fires onChange"
OBS->>CV: handleWorkspacePresentationModeChange(isMinimalMode: true)
CV->>CV: setTitlebarControlsHidden / applyWindowDecorations / syncTrafficLightInset
UD-->>TML: "@AppStorage fires → body re-evaluates (hides titlebar band)"
UD-->>ESL: "@AppStorage fires → body re-evaluates (enables event surface)"
UD-->>SAM: "@AppStorage fires → body re-evaluates (ignoresSafeArea edges)"
UD-->>PPM: "@AppStorage fires → body re-evaluates (top padding)"
UD-->>STO: "@AppStorage fires → body re-evaluates (shows sidebar controls)"
Note over CV: ContentView body NOT re-evaluated
Note over CV: WorkspaceContentView body NOT re-evaluated
Note over CV: VerticalTabsSidebar body NOT re-evaluated
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant U as User/PaletteCommand
participant UD as UserDefaults
participant OBS as WorkspacePresentationModeChangeObserver
participant CV as ContentView
participant TML as WorkspaceTitlebarModeLayer
participant ESL as MinimalModeTitlebarEventSurfaceLayer
participant SAM as WorkspaceContentMinimalModeSafeAreaModifier
participant PPM as WorkspacePresentationModeContentTopPaddingModifier
participant STO as MinimalModeSidebarTitlebarControlsOverlay
U->>UD: set(modeKey, "minimal")
UD-->>OBS: "@AppStorage fires onChange"
OBS->>CV: handleWorkspacePresentationModeChange(isMinimalMode: true)
CV->>CV: setTitlebarControlsHidden / applyWindowDecorations / syncTrafficLightInset
UD-->>TML: "@AppStorage fires → body re-evaluates (hides titlebar band)"
UD-->>ESL: "@AppStorage fires → body re-evaluates (enables event surface)"
UD-->>SAM: "@AppStorage fires → body re-evaluates (ignoresSafeArea edges)"
UD-->>PPM: "@AppStorage fires → body re-evaluates (top padding)"
UD-->>STO: "@AppStorage fires → body re-evaluates (shows sidebar controls)"
Note over CV: ContentView body NOT re-evaluated
Note over CV: WorkspaceContentView body NOT re-evaluated
Note over CV: VerticalTabsSidebar body NOT re-evaluated
Reviews (3): Last reviewed commit: "Fix minimal mode notification anchor cal..." | Re-trigger Greptile |
Greptile SummaryThis PR fixes the hang when toggling Minimal Mode by moving
Confidence Score: 4/5The invalidation fix is sound and the regression test covers the core behavioral contract; relocating MinimalModeInvalidationProbe out of the production source tree should be done before merging. The five new leaf views correctly scope @AppStorage subscriptions to narrow chrome subtrees, and the imperative side-effect handler preserves the old onChange behavior without reintroducing broad invalidation. The probe mechanism in MinimalModeInvalidationProbe.swift — entirely #if DEBUG, no production caller, placed in Sources/ — breaks the project rule against test-only seams in production source; the same pattern repeats in ContentView and WorkspaceContentView bodies. Sources/MinimalModeInvalidationProbe.swift and the #if DEBUG probe blocks in Sources/ContentView.swift and Sources/WorkspaceContentView.swift. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
UD["UserDefaults workspacePresentationMode"]
UD -->|"@AppStorage"| WTL["WorkspaceTitlebarModeLayer"]
UD -->|"@AppStorage"| MTESL["MinimalModeTitlebarEventSurfaceLayer"]
UD -->|"@AppStorage"| WCMSAM["WorkspaceContentMinimalModeSafeAreaModifier"]
UD -->|"@AppStorage"| WPMCTPM["WorkspacePresentationModeContentTopPaddingModifier"]
UD -->|"@AppStorage"| MMSTCO["MinimalModeSidebarTitlebarControlsOverlay"]
UD -->|"@AppStorage"| WPMCO["WorkspacePresentationModeChangeObserver"]
WPMCO --> CVH["ContentView.handleWorkspacePresentationModeChange"]
subgraph Heavy["Heavy views - no longer subscribe"]
CV["ContentView.body"]
WCV["WorkspaceContentView.body"]
VTS["VerticalTabsSidebar.body"]
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
UD["UserDefaults workspacePresentationMode"]
UD -->|"@AppStorage"| WTL["WorkspaceTitlebarModeLayer"]
UD -->|"@AppStorage"| MTESL["MinimalModeTitlebarEventSurfaceLayer"]
UD -->|"@AppStorage"| WCMSAM["WorkspaceContentMinimalModeSafeAreaModifier"]
UD -->|"@AppStorage"| WPMCTPM["WorkspacePresentationModeContentTopPaddingModifier"]
UD -->|"@AppStorage"| MMSTCO["MinimalModeSidebarTitlebarControlsOverlay"]
UD -->|"@AppStorage"| WPMCO["WorkspacePresentationModeChangeObserver"]
WPMCO --> CVH["ContentView.handleWorkspacePresentationModeChange"]
subgraph Heavy["Heavy views - no longer subscribe"]
CV["ContentView.body"]
WCV["WorkspaceContentView.body"]
VTS["VerticalTabsSidebar.body"]
end
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Sources/WorkspaceContentView.swift (1)
142-160: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winRemove the DEBUG invalidation probe from this production view.
This adds a test-only hook to
Sources/WorkspaceContentView.swiftand executes it frombody, which turns the render path into instrumentation surface. Please keep the regression probe in test-only scaffolding instead of shipping it through the app view.As per coding guidelines, “Do not add test-only or debug-only seams in production Swift source files” and “Do not mutate state from
bodyor helpers called bybody.” As per path instructions,Sources/**must apply.github/review-bot-rules/no-test-debug-seam-in-production-source.md.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Sources/WorkspaceContentView.swift` around lines 142 - 160, Remove the DEBUG-only invalidation probe from WorkspaceContentView’s production body so the render path is not instrumented. Keep minimalModeInvalidationProbe and the workspaceContentBody callback out of Sources/WorkspaceContentView.swift, and move any regression probing into test-only scaffolding instead. Update panelVisibleInUI/body so they remain pure view rendering code with no test/debug seams or state mutation triggered from body.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Sources/ContentView.swift`:
- Around line 971-973: Remove the DEBUG-only minimalMode invalidation probe seam
from ContentView and any other production view body paths that call it, since
these callbacks are test/debug-only and should not execute during body
evaluation. Update the relevant ContentView sections that reference
minimalModeInvalidationProbe so they no longer invoke arbitrary probe closures
from body, and replace the coverage with behavior-level tests or production-safe
instrumentation outside the view hierarchy.
In `@Sources/WorkspacePresentationModeChangeObserver.swift`:
- Around line 17-22: The initial Minimal Mode sync is currently only triggered
from the observer’s onAppear path, which can run before the window is registered
and leave the first chrome update skipped. Update
WorkspacePresentationModeChangeObserver and the downstream ContentView handling
so the initial onChange callback is fired from a window-ready signal (such as
window registration) rather than relying on appearance alone, ensuring the first
sync reaches the titlebar-controls/metrics/shadow logic even when observedWindow
is not yet available.
---
Outside diff comments:
In `@Sources/WorkspaceContentView.swift`:
- Around line 142-160: Remove the DEBUG-only invalidation probe from
WorkspaceContentView’s production body so the render path is not instrumented.
Keep minimalModeInvalidationProbe and the workspaceContentBody callback out of
Sources/WorkspaceContentView.swift, and move any regression probing into
test-only scaffolding instead. Update panelVisibleInUI/body so they remain pure
view rendering code with no test/debug seams or state mutation triggered from
body.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e9fc7b61-8dd9-4d96-a8c2-131c55b24a68
📒 Files selected for processing (13)
Sources/ContentView.swiftSources/Debug/EnvironmentValues+MinimalModeInvalidationProbe.swiftSources/Debug/MinimalModeInvalidationProbe.swiftSources/Debug/MinimalModeInvalidationProbeKey.swiftSources/MinimalModeSidebarTitlebarControlsOverlay.swiftSources/MinimalModeTitlebarEventSurfaceLayer.swiftSources/WorkspaceContentMinimalModeSafeAreaModifier.swiftSources/WorkspaceContentView.swiftSources/WorkspacePresentationModeChangeObserver.swiftSources/WorkspacePresentationModeContentTopPaddingModifier.swiftSources/WorkspaceTitlebarModeLayer.swiftcmux.xcodeproj/project.pbxprojcmuxTests/WorkspaceContentViewVisibilityTests.swift
Summary
ContentViewand toggles the workspace presentation mode throughUserDefaults, asserting minimal-mode toggles do not re-evaluate the heavy root/content/sidebar bodies.@AppStoragesubscriptions out ofContentView,WorkspaceContentView, andVerticalTabsSidebarinto narrow chrome-specific leaf views/modifiers so the toggle updates only the titlebar/safe-area/overlay chrome that changes.Fixes #5732
Testing
git diff --check./scripts/check-pbxproj.sh./scripts/lint-pbxproj-test-wiring.shpython3 scripts/swift_file_length_budget.pyPer task instruction, I did not run
./scripts/reload.sh, reload-cloud, orxcodebuild; CI will provide compile/test coverage.Localization audit: no user-facing strings were added or changed; staged Swift additions were checked for newly-added string literals.
Demo Video
Review Trigger (Copy/Paste as PR comment)
Checklist
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Fixes a hang when toggling Minimal Mode by scoping updates to chrome-only layers so heavy views don’t re-render. Adds a regression test that mounts a real window and asserts zero body re-evaluations on toggles. Fixes #5732.
Bug Fixes
@AppStorageout ofContentView,WorkspaceContentView, andVerticalTabsSidebarinto leaf layers/modifiers:WorkspaceTitlebarModeLayer,MinimalModeTitlebarEventSurfaceLayer,WorkspaceContentMinimalModeSafeAreaModifier,WorkspacePresentationModeContentTopPaddingModifier,MinimalModeSidebarTitlebarControlsOverlay.WorkspacePresentationModeChangeObserver→handleWorkspacePresentationModeChangeto update titlebar controls, window decorations, geometry, resizer band, and traffic-light inset without recomputing content.MinimalModeSidebarTitlebarControlsOverlay.MinimalModeInvalidationProbe(mounts a real window; toggles via isolatedUserDefaultswithdefaultAppStorage) to assert zero body re-evaluations; drains the run loop for updates and switches toswift-testingassertions.Refactors
UserDefaultsdirectly.WorkspacePresentationModeRuntimeCacheto keep mode side effects on observed state (drives traffic-light inset and fullscreen updates) without invalidatingContentView.Written for commit 0dd40bc. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes