Skip to content

fix(mobile): keep Material You pane framing consistent on foldables - #11841

Open
PixPMusic wants to merge 2 commits into
pingdotgg:mainfrom
PixPMusic:fix/android-foldable-material-parity
Open

PixPMusic wants to merge 2 commits into
pingdotgg:mainfrom
PixPMusic:fix/android-foldable-material-parity

Conversation

@PixPMusic

@PixPMusic PixPMusic commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • give the unfolded thread-list header the same opaque surface as the folded header, with 12dp below search and rounded upper list corners
  • move the pane gap into the shared workspace frame, so chat and Settings use the same spacing; keep a separate gap when the inspector is open
  • round Settings subpages consistently, while preserving native form-sheet framing and headers when Material You Layout is off
  • retain stock-theme panel contrast without changing their text, button, or message colors

Why

Material You Layout already styles the folded thread list and chat, but the unfolded sidebar still uses different header spacing and surfaces. Settings also bypasses the rounded detail frame. This is a focused parity fix on top of the merged theme work in #10691 and #10692, not a revival of the broader redesign in #6081. The header/action behavior from #5385 stays intact.

The header token is made opaque only while Material You Layout is enabled; wallpaper colors still supply their own header surface. iOS and non-Material layout paths retain their existing framing. No palette inspector, screenshot assets, server changes, or new settings are included.

UI Changes

Same Pixel 9 Pro Fold emulator, disposable Showcase Studio data, Material You Layout enabled, and matching theme/mode for each pair. Left is before; right is after. Before captures use 6dbea7ed09, whose mobile sources are identical to the pinned main base b5b29e7b8b; after captures use 8af949faf1.

Default T3 Code — light
Open thread — before Open thread — after
Default T3 Code — light unfolded thread before Default T3 Code — light unfolded thread after
Appearance subpage — before Appearance subpage — after
Default T3 Code — light Appearance before Default T3 Code — light Appearance after
Default T3 Code — dark
Open thread — before Open thread — after
Default T3 Code — dark unfolded thread before Default T3 Code — dark unfolded thread after
Appearance subpage — before Appearance subpage — after
Default T3 Code — dark Appearance before Default T3 Code — dark Appearance after
Iris — light
Open thread — before Open thread — after
Iris — light unfolded thread before Iris — light unfolded thread after
Appearance subpage — before Appearance subpage — after
Iris — light Appearance before Iris — light Appearance after
Iris — dark
Open thread — before Open thread — after
Iris — dark unfolded thread before Iris — dark unfolded thread after
Appearance subpage — before Appearance subpage — after
Iris — dark Appearance before Iris — dark Appearance after
System wallpaper colors — light
Open thread — before Open thread — after
System wallpaper colors — light unfolded thread before System wallpaper colors — light unfolded thread after
Appearance subpage — before Appearance subpage — after
System wallpaper colors — light Appearance before System wallpaper colors — light Appearance after
System wallpaper colors — dark
Open thread — before Open thread — after
System wallpaper colors — dark unfolded thread before System wallpaper colors — dark unfolded thread after
Appearance subpage — before Appearance subpage — after
System wallpaper colors — dark Appearance before System wallpaper colors — dark Appearance after
Folded list — default light (preserved layout)
Before After
Default light folded list before Default light folded list after

Verification

  • 54 focused tests passed: mobileThemeVariables, materialYouTheme, mobileTheme, mobileThemeRuntime, and appearancePreferences
  • mobile TypeScript check passed; changed-file lint and formatting passed
  • Android debug build installed and exercised against disposable showcase data
  • checked folded and unfolded layouts, open chat, Settings/Appearance, Add Environment as both a Settings subpage and standalone sheet, and inspector spacing
  • independent Codex review and Fable 5.1 at high reasoning; accepted findings fixed and Fable follow-up clean
  • no web/desktop, provider, or wire-contract changes; iOS was source-reviewed but not simulator-tested in this pass

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • No animation behavior changed; static layout evidence is included

Model: GPT-6 Astra & Fable 5.1 | Harness: Codex & Claude Code in T3 Code

Summary by CodeRabbit

  • New Features

    • Added a unified settings screen experience with consistent headers, navigation actions, and form-sheet support across mobile settings and related screens.
    • Introduced rounded Material You layouts with coordinated header styling, spacing, clipping, and adaptive sidebar/inspector insets.
    • Improved appearance-aware theme colors and header presentation.
  • Bug Fixes

    • Corrected Material You layout spacing and header border behavior across supported screens.
  • Tests

    • Added coverage for rounded layouts, theme palettes, opacity handling, and light/dark appearances.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 15, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR changes production Android framing and pane geometry across the workspace and many settings-related routes, including a new shared header/content abstraction. Its behavior is limited to the existing opt-in Material You Layout mode, but the cross-cutting runtime impact is broader than a small isolated UI fix.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 94edffeb-dcd8-4d8d-b658-f5a5b5b4310b

📥 Commits

Reviewing files that changed from the base of the PR and between b5b29e7 and 8af949f.

📒 Files selected for processing (19)
  • apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
  • apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
  • apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx
  • apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
  • apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx
  • apps/mobile/src/features/settings/SettingsClientStorageRouteScreen.tsx
  • apps/mobile/src/features/settings/SettingsEnvironmentsRouteScreen.tsx
  • apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx
  • apps/mobile/src/features/settings/SettingsProjectGroupingRouteScreen.tsx
  • apps/mobile/src/features/settings/SettingsRouteScreen.tsx
  • apps/mobile/src/features/settings/appearance/AppearancePreferencesProvider.tsx
  • apps/mobile/src/features/settings/components/SettingsScreen.tsx
  • apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx
  • apps/mobile/src/features/usage/UsageLimitsPooled.tsx
  • apps/mobile/src/features/usage/UsageRouteScreen.tsx
  • apps/mobile/src/lib/materialYouTheme.test.ts
  • apps/mobile/src/lib/mobileThemeVariables.test.ts
  • apps/mobile/src/lib/mobileThemeVariables.ts
💤 Files with no reviewable changes (1)
  • apps/mobile/src/features/threads/ThreadRouteScreen.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Material You mobile layout

Layer / File(s) Summary
Theme runtime variables
apps/mobile/src/lib/mobileThemeVariables.ts, apps/mobile/src/lib/mobileThemeVariables.test.ts, apps/mobile/src/lib/materialYouTheme.test.ts, apps/mobile/src/features/settings/appearance/AppearancePreferencesProvider.tsx
Runtime theme variables now accept the Material You layout flag and provide an opaque header color. Tests cover light, dark, custom, and Material You palettes.
Shared settings screen
apps/mobile/src/features/settings/components/SettingsScreen.tsx
Adds shared settings framing, Android header handling, rounded Material You content clipping, form-sheet handling, and reusable content wrapping.
Settings route migration
apps/mobile/src/features/settings/*, apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx, apps/mobile/src/features/diagnostics/SettingsDiagnosticsRouteScreen.tsx, apps/mobile/src/features/usage/*
Settings-related routes now use SettingsScreen instead of local Android header branches. Existing titles, actions, content, and platform-specific native headers are wired through the shared component.
Material You workspace integration
apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx, apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx, apps/mobile/src/features/threads/*
Material You layouts add pane insets, update sidebar surfaces and spacing, remove the thread canvas split-view margin, and apply shared content framing to archived threads.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SettingsRouteScreen
  participant SettingsScreen
  participant AndroidScreenHeader
  participant SettingsScreenContent
  SettingsRouteScreen->>SettingsScreen: render settings content and header props
  SettingsScreen->>AndroidScreenHeader: render shared Android header
  SettingsScreen->>SettingsScreenContent: render Material You framed content
Loading

Possibly related PRs

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 8af94

No merge-blocking behavior regression was identified in the Material You framing changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 18 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: consistent Material You pane framing on foldable mobile layouts.
Description check ✅ Passed The description includes complete What Changed, Why, UI Changes, Verification, and Checklist sections. It explains the scope, provides before/after UI evidence, and documents testing and limitations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge

juliusmarminge commented Sep 15, 2026

Copy link
Copy Markdown
Member

this looks very odd:

CleanShot 2026-09-14 at 19 59 14@2x

also, is there any reason we should not always use the material you layout? does android app usually let the user choose? to me it just looks better on so would be happy to always use it on android devices?

@PixPMusic

Copy link
Copy Markdown
Contributor Author

Ah yeah the highlight doesn't quite look right. I'll try to iterate on that @juliusmarminge

As for the option--I also prefer it, but I originally kept it as a toggle for a couple reasons:

  • I didn't want to override the design you guys have going
  • Not everyone is on a Pixel. This is very "Google-y" design language. Some people may not prefer it.

I'm totally for switching over or at least setting it as default for new users? Gather bug reports?

@juliusmarminge

Copy link
Copy Markdown
Member

I'm totally for switching over or at least setting it as default for new users? Gather bug reports?

Yea sounds like a good first step

@juliusmarminge

Copy link
Copy Markdown
Member

and shouldn't these surfaces have the same color in this mode or?
CleanShot 2026-09-14 at 20 20 59

i'm just throwing stuff out there since i've not used android for the past 15 years i have no idea how these things are meant to look xd

@PixPMusic

Copy link
Copy Markdown
Contributor Author

I'm actually looking closer at some of the apps I used for comparison and it turns out I was entirely wrong on the sidebar and detail using the same header surface color across a handful of system and Google apps

However, no, those are all different colors in most apps. I'll have my agent reply with some examples of other apps.

@PixPMusic

Copy link
Copy Markdown
Contributor Author

@juliusmarminge Following up with current Android 17 references. The apps don't use one uniform surface or selection rule:

  • Messages: the selected conversation is an inset, fully rounded pill, even for the first row. It doesn't flood the parent list's top corners.
  • Phone: selected calls follow the grouped cell shape instead. This gives us a real comparison for the flooded/grouped-cell alternative.
  • Settings: list and detail panes have different surfaces; the search bar is an outlined pill.

So distinct pane colors aren't inherently wrong, but these references don't justify accidental seams or inconsistent spacing. The selected-thread shape is a separate choice from the pane surfaces.

These are original, unedited emulator captures at 2076 × 2152, 390 dpi, with updated Google apps. Both palettes were applied through Settings → Wallpaper & style → Home screen → Colors: blue wallpaper colors, then pink from Other colors. Each app was captured with Android's light and dark modes.

The fixture set contains 8 fictional local contacts, 17 SMS messages, and 6 call-history entries. Nothing was sent or dialed. These are SMS, not RCS; they don't establish an RCS color-token mapping.

Messages — populated SMS; first row selected — blue and pink, light and dark

Messages uses an inset, fully rounded selection, including the first conversation. The list and conversation canvas use different surfaces.

Blue / system light Blue / system dark
messages-after-blue-light messages-after-blue-dark
Pink / system light Pink / system dark
messages-after-pink-light messages-after-pink-dark
Phone — selected call history — blue and pink, light and dark

Phone uses a navigation rail, call list, and detail pane with distinct surfaces. Its selected first call follows the grouped cell shape: rounded top corners, much squarer bottom corners.

Blue / system light Blue / system dark
phone-blue-light phone-blue-dark
Pink / system light Pink / system dark
phone-pink-light phone-pink-dark
Settings — two-pane network page — blue and pink, light and dark

Settings uses different pane surfaces, an outlined pill-shaped search field, and grouped list cells.

Blue / system light Blue / system dark
settings-blue-light settings-blue-dark
Pink / system light Pink / system dark
settings-pink-light settings-pink-dark
Messages — before population — blue and pink, light and dark

The empty state was captured before adding the fictional SMS conversations.

Blue / system light Blue / system dark
messages-before-blue-light messages-before-blue-dark
Pink / system light Pink / system dark
messages-before-pink-light messages-before-pink-dark
Contacts — populated list — blue and pink, light and dark

Contacts uses a navigation rail and a full-width grouped list here. Opening a contact replaces the list rather than keeping a persistent list/detail split.

Blue / system light Blue / system dark
contacts-blue-light contacts-blue-dark
Pink / system light Pink / system dark
contacts-pink-light contacts-pink-dark
Clock — world cities — blue and pink, light and dark

Clock uses a wide two-column card layout, not master-detail. It stays dark in both system modes in this build.

Blue / system light Blue / system dark
clock-blue-light clock-blue-dark
Pink / system light Pink / system dark
clock-pink-light clock-pink-dark
Extra checks — second Messages row selected; Contacts detail

The second Messages row gets the same fully rounded inset selection as the first. Contacts detail opens full-width at this configuration.

Messages — second row selected Contacts — detail
messages-second-selected-blue-light contacts-detail-pink-light
Versions and emulator caveats
  • Android 17 Google APIs 16 KB ARM64 image, SDK 37.1, revision 9; emulator 37.1.11. This is not Pixel firmware.
  • Settings' built-in large-screen layout was enabled with persist.settings.large_screen_opt.enabled=true.
  • Messages: messages.android_20260824_01_RC04.phone_dynamic (321730063).
  • Phone: 237.0.973536915. Contacts: 4.87.27.974164896. Clock: 9.1 (965977594).
  • Google apps were updated using Aurora Store's anonymous Google Play downloads; no personal Google account was connected.
  • Messages needed a cold relaunch after some theme changes to restore its native two-pane layout.
  • Clock did not expose a light-theme setting; its light/dark labels above refer to system mode, not a light Clock rendering. No alarms were enabled.

Reference capture and verification by the Codex agent in T3 Code. No application-code changes in this reference pass.

@juliusmarminge

Copy link
Copy Markdown
Member

Of course why would android be consistent 🙃🙃🙃

For real trusting your judgement here more than mine on how we should have our layout...

I'll need to think about the iPhone Duo layout as well in the coming weeks so if i don't have to think about android design systems thats just a bonus :)

@PixPMusic

Copy link
Copy Markdown
Contributor Author

Thinking about hiding the search bar into a secondary FAB or moving the filter to the secondary FAB so the search can be part of the main toolbar row especially on foldable.

I think I need a variant comparison skill :)

Having the search bar hidden on the two column layout would help clean up the layout and align the baselines of each pane. I think the offset of the search bar width will make more sense if it's replacing the toolbar rather than making it larger

@juliusmarminge

Copy link
Copy Markdown
Member

Leaving this in case the iPad layout is of interest: https://github.com/user-attachments/assets/40fa18b6-03c3-4a33-9b24-f8e791ab9b63

@PixPMusic

Copy link
Copy Markdown
Contributor Author

I actually use the iPad app a decent amount and have a couple PRs open addressing some multi window bugs

The idea I'm having would diverge slightly from the IOS layout

@PixPMusic

PixPMusic commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Five local app variants, captured on Android 17 with disposable data. No code pushed.

Variant Header Floating buttons
A Filter, Settings Search + Compose
B Search field, Settings Filter + Compose
C Search, ⋮ with Filter and Settings Compose
D Search, Settings Filter + Compose
E Search, Settings Filter + New thread

All FABs are rounded squares. A–D use an 80dp Compose button and 56dp secondary buttons where present. E uses 56dp for both buttons, with an extended New thread label. Stacked buttons share a right edge and an 8dp gap.

T3 Code · light and dark

Light

A B C D E
a-default-light b-default-light c-default-light d-default-light e-default-light

Dark

A B C D E
a-default-dark b-default-dark c-default-dark d-default-dark e-default-dark
Grove · light and dark

Light

A B C D E
a-grove-light b-grove-light c-grove-light d-grove-light e-grove-light

Dark

A B C D E
a-grove-dark b-grove-dark c-grove-dark d-grove-dark e-grove-dark
System wallpaper colors · light and dark

Light

A B C D E
a-wallpaper-light b-wallpaper-light c-wallpaper-light d-wallpaper-light e-wallpaper-light

Dark

A B C D E
a-wallpaper-dark b-wallpaper-dark c-wallpaper-dark d-wallpaper-dark e-wallpaper-dark
Folded · wallpaper dark
A B C D E
a-folded-wallpaper-dark b-folded-wallpaper-dark c-folded-wallpaper-dark d-folded-wallpaper-dark e-folded-wallpaper-dark
Search active
A B C D E
a-search-active-dark b-search-active-dark c-search-active-dark d-search-active-dark e-search-active-dark
Filter and overflow menus
A B C D E
Header filter b-filter-menu-dark c-overflow-dark
c-filter-menu-dark
d-filter-menu-dark e-filter-menu-dark
Other states
C: another selected row E: New thread
c-other-row-selected-dark e-new-thread-dark

Material You Layout is on throughout. Typecheck and changed-file lint passed in all five worktrees. Implementation and captures: Codex in T3 Code.

@juliusmarminge

Copy link
Copy Markdown
Member

I don't really use search that much, the reason i have it always available on iOS is cause the toolbar is something a lot of Apple apps use, so I'm fine collapsing it to a button on android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants