Split LayoutStore by responsibility#933
Closed
robinebers wants to merge 2 commits into
Closed
Conversation
9b28463 to
0670a0a
Compare
Owner
Author
|
Superseded by #952. The replacement keeps only the mechanical LayoutStore responsibility split, is stacked on the compact dead-code PR #950 instead of the rejected layout-normalization stack, and changes no persistence or behavior. It produces exactly three files at 491/345/60 lines; the normalized implementation hash is unchanged, 73 focused tests and 960 XCTest cases plus 3 Swift Testing cases pass, the signed app launches, and the replacement has zero review threads with all available checks green. I am closing this harder-to-review stacked version; its branch and history remain available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Splits the 889-line
LayoutStoreinto focused grouping, ordering, pinning, presentation, and model files without changing behavior. This PR is stacked on #926 so reviewers see only the responsibility split.What was happening
What this changes
LayoutStore.swift.LayoutStore+Grouping.LayoutStoreModels.Heads-up
codex/normalize-layout-persistence); do not merge this before its base PR.availableToAdd, the global pin count, and unused projection fields) in the new focused files. The resolved tree is verified.Tests
script/build_and_run.sh verifycompleted a release build, signed app staging, launch, and process verification.git diff --checkpassed; moved method bodies match the Preserve and normalize saved layout identifiers #926 base apart from file separators.Note
Low Risk
Pure file split with moved code and internal visibility tweaks; tests and PR description assert no runtime or persistence changes.
Overview
Refactors
LayoutStoreinto smaller files so persisted mutations stay inLayoutStore.swiftand read-only projections, helpers, and UI-facing state move into dedicated extensions andLayoutStoreModels.swift.New files carry the moved logic:
LayoutStore+Grouping(dashboard/Customize projections, spend-capable providers,orderedProviders),LayoutStore+Ordering(metricOrder, drag-reorder and merge helpers),LayoutStore+Pins(pin caps, denial reasons,pinnedGroups), andLayoutStore+Presentation(popover navigation forwarding, transient notice surfaces,cancelDrag).ProviderGroup,ProviderMetrics,ProviderRow, and customize notice types now live inLayoutStoreModels.swift.To let extensions share state without a wrapper layer,
navigation,pinNotice/shareNotice/customizeNotice,registry, andisProviderEnabledareletand module-internal instead ofprivate.setProviderExpandedis grouped with other persistence helpers near the bottom of the core file. No intended behavior, persistence format, or caller contract changes—organization only.Reviewed by Cursor Bugbot for commit 0670a0a. Bugbot is set up for automated code reviews on this repo. Configure here.