Conversation
Adds a user preference to force single-column mode on tablets/large screens. When enabled, the 2-pane adaptive layout collapses to a single column where tapping an article takes over the full screen and back returns to the article list. Default is off (adaptive behavior unchanged). - FlowSingleColumnPreference: new boolean preference (ON/OFF) - DataStoreExt: register key "flowSingleColumn" in both PreferencesKey and legacy DataStoreKey - Settings/Preference/SettingsProvider: wire preference through the settings system - AppEntry: override scaffold directive with maxHorizontalPartitions=1 when enabled - FeedsPageStylePage: add "Layout" section with toggle switch - strings.xml: add single_column_layout and layout string resources https://claude.ai/code/session_01DJ46HYUPdGBeDXuYgrqGNB
The navigator's scaffoldValue only recomputes on navigation events, not when scaffoldDirective alone changes. Without a navigation event, isTwoPane stays stale after toggling, requiring a rotation or app restart to take effect. Add a LaunchedEffect that watches forceSingleColumn via snapshotFlow and navigates to the List pane on every change (after initial composition), triggering the navigator to recompute scaffoldValue with the updated directive. https://claude.ai/code/session_01DJ46HYUPdGBeDXuYgrqGNB
Covers build setup, architecture overview, preferences system pattern, adaptive layout notes (including the single-column toggle behavior), key libraries, and branch naming convention. https://claude.ai/code/session_01DJ46HYUPdGBeDXuYgrqGNB
When the single-column preference is enabled, only force maxHorizontalPartitions=1 in portrait. In landscape (screenWidthDp > screenHeightDp) the adaptive directive is used as-is, so a tablet rotated sideways naturally shows the two-pane view. https://claude.ai/code/session_01DJ46HYUPdGBeDXuYgrqGNB
…irv2Q Add single-column layout toggle for adaptive feed list
Synchronize README-zh-TW and enhance RSS discovery features
* Fix mark-as-read-on-scroll never reaching the last screenful The last items in the article list had no scroll distance left to pass above the viewport's top edge once the list was fully scrolled, so they could never satisfy the "scrolled past the first visible item" read condition. Add a trailing Spacer sized to the live-measured height of the Box wrapping the LazyColumn (via onSizeChanged), giving the list enough extra scroll range for the last item to reach the same read line as every other item. The spacer is unconditional and independent of the existing FAB/bottom-bar clearance spacers. * Fix trailing articles never being marked read on scroll The trailing spacer added to fix the scroll-boundary bug let the list scroll past the last real article, but once no item with contentType == CONTENT_TYPE_ARTICLE remained visible, firstItemKey became null and the read-detection loop never matched it, so found stayed false and the whole batch of trailing articles was silently discarded instead of committed as read. Treat firstItemKey == null as every remaining article having already scrolled past the read line, matching the same "read line" semantics used for every other item in the list. --------- Co-authored-by: Claude <noreply@anthropic.com>
ibrahim-iqbal
left a comment
There was a problem hiding this comment.
Read through end-to-end. Core idea is good and the toggle wiring itself is clean; a few structural things worth surfacing before it lands.
The single-column toggle itself — clean.
FlowSingleColumnPreferencefollows the existing preference pattern (companiondefault,put, DataStore key,LocalFlowSingleColumncomposition local). No new machinery.- In
AppEntrythe override is scoped to portrait only (isLandscape = screenWidthDp > screenHeightDp), which is the right call — landscape typically has room for the two-pane layout and forcing single-column there would be a foot-gun. - Using
calculatePaneScaffoldDirective(...).copy(maxHorizontalPartitions = 1)is the correct adaptive-API surface for this override rather than reimplementing the directive from scratch.
Two things worth flagging:
- Scope creep — the
FlowPage.ktchanges are a separate fix. The trailingSpacer(viewport-height)+ thefirstItemKey == nullinitialisation flip in the "found" loop is a mark-as-read-on-scroll bug fix that has nothing to do with the single-column toggle. It looks correct (the comment explainingfirstItemKey == nullis spot on — a viewport with only the trailing spacer visible currently treats nothing as read). But it should really be a second PR; a reviewer looking at this later to understand the toggle will be confused why a spacer was added to FlowPage, and if the mark-as-read change needs to be reverted it drags the toggle with it. Even splitting it into a follow-up commit in the same PR with a clear message would help. CLAUDE.mdat the repo root. A per-project AI-context file is fine for local use, but committing it intomainis a project-policy call the maintainer should make explicitly — the repo doesn't currently carry any of the equivalent.cursorrules/AGENTS.md/.aider.conffiles, so this would set a precedent. Suggest either dropping it from this PR and gitignoring it, or opening a separate one-file PR that just asks the maintainer whether they want that convention in the repo.
Small things:
LocalConfiguration.current.screenWidthDp > screenHeightDp— works for the common case. Foldables with unusual aspect ratios or half-folded states may report screen dimensions that don't match the user's perception of "landscape". Not a blocker; matches how the rest of the codebase reads orientation.- The PR body is currently empty. Even a two-line summary ("Adds a settings toggle to force single-column in portrait, mirrors sync-URL style row") would speed up review considerably.
Toggle change LGTM once split from the FlowPage fix and the CLAUDE.md question.
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.
No description provided.