Repository navigation
refactor(layout): share device and breakpoint decisions - #28
Merged
Merged
Conversation
Route iPhone/iPad checks through Device, Duo through AppModel.isDuo, and width rules through Breakpoint. Merge the reading scroll edge and top clip into one modifier. Values and behavior are unchanged.
Drop the iPhone and folded-Duo NavigationStack. The split view already collapses into push and Back, so every device shares one hierarchy and one set of routes. Push posts through a value path so Back returns to the feed in collapsed layouts.
PixPMusic
force-pushed
the
refactor/shared-layout-decisions
branch
from
November 9, 2026 02:58
a84d4bb to
379f21a
Compare
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.
What changed and why
Layout decisions were scattered: nine raw
userInterfaceIdiomchecks, the Duo flag named after one of its effects (usesSwipeSidebar), and width cutoffs inlined as700,520, and850. Some decisions depend on hardware and some on available width, and the code didn't make clear which was which.This PR keeps behavior and values the same and puts each kind of decision in one place:
Device.isPhone/Device.isPad(Slipstream/Features/Layout.swift): the hardware family, used for platform conventions (navigation style, safe areas, system chrome). It never stands in for available space, since an iPad window can be narrower than an iPhone.AppModel.isDuo: renamed fromusesSwipeSidebar. Duo is phone hardware recognized from its first hinge update, so it stays observable state on the model.SwipeSidebarToolbaris renamedDuoSidebarToolbarto matchDuoSidebarLayout.Breakpoint.compactFeed/.inlinePostActions/.sideBySideLive: the width rules, measured from the pane rather than the screen.FeedViewderivescompactonce and passes it to search and card titles; Mac search width now derives fromcompactinsideFeedSearch.ReadingEdge: a single modifier replacingReadingScrollEdge+ReadingContentClip, which were always applied together with the same value.ContentView.usesStack(_:): names the existing rule "iPhone and Duo use a stack when compact; iPad keeps one split view".Routes were already shared: both navigation hierarchies use
LibrarySidebarandLibraryDestinationwith the same selection values. The separate iPhone/DuoNavigationStackand iPadNavigationSplitVieware intentionally kept, because merging them would change navigation behavior.Stacked on #27 (
fix/ipad-compact-search). Merge #27 first; this PR's diff is only the refactor commit.Verification
swift test: all 22 tests passed../scripts/build.sh iosand./scripts/build.sh macos --ad-hoc: both succeeded with no warnings in changed files.git diff --check: clean.Before / after evidence
Narrow iPad window, Library:
Full-screen iPad, Library:
Full-screen iPad, channel banner:
Full-screen iPad, post page (cropped above comments; video frame differs due to autoplay):
Model: Claude Opus 5.5 | Harness: Claude Code in T3 Code