Repository navigation
refactor(mobile): adopt shared controls and add component catalog - #18541
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR combines several new shared mobile controls with production adoption across filters, notices, settings inputs, sliders, and native theming, alongside a substantial development catalog route. Although the catalog is development-only and many extractions preserve existing behavior, the cross-cutting UI and accessibility changes are broader than a small mechanical refactor. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
e8daf8e to
7546df0
Compare
7546df0 to
ff0bfd1
Compare
Design-system progress
API adoption and Pen rendering are tracked separately. This is cumulative through this PR, not a claim that all native renderers are finished.
Custom Appearance cards stay. Segmented controls stay native. Composer, thread-row and task-tray redesigns remain deferred.
Shared chips, form controls, and feedback notices need consistent theme behavior and a development catalog for verifying them. This preserves the already-reviewed implementations and their production adoption, while leaving the segmented-control change in a separate PR above this one.
The original four PRs were merged into the old segmented-control base during restacking. This replacement keeps their changes available to land first: #18534, #18535, #18536, and #18538.
Verification: native iOS and Android captures below; 53 focused tests pass on the full stack, and dependency checks pass before the segmented-control layer. The full-stack tree is unchanged by the reorder.
Filters and pull-request metadata each repeated chip markup. Add
Chipfor themed compact labels and filter triggers, and use it in thread/PR filters and both loaded/loading PR label lists. Keep native menu behavior and iOS glass. Selected filter triggers also expose their selected accessibility state.Validation: mobile typecheck and 53 dependency/theme tests pass. Targeted lint has only existing warnings in PullRequestRouteScreen. Inspected native iOS and Android filters, selected an environment through the iOS native menu, then reset it. Visual changes are intentionally small. Before is left, after is right.
Model: GPT-6.1. Harness: Codex.
Font sliders and the auto-settle number picker were feature-owned controls. Extract
SliderRowandNumberField, then keep small settings adapters that supply their domain bounds and labels. Preserve the native Android slider/stepper, native iOS picker, and existing iOS slider gestures.Centralize palette access for native controls in
useControlTheme; the shared buttons and switch also use it. Tighten the component-to-feature dependency ceiling from 32 to 30.Validation: mobile typecheck and 53 dependency/theme tests pass. Targeted lint reports existing gesture/Reanimated compiler warnings in the moved slider implementation. Native iOS slider changed from 16 to 17 and back to 16; opened and cancelled the iOS numeric picker; incremented and restored the Android number. These checks use the isolated test environment. Before is left, after is right. Numeric controls and Android sliders preserve their appearance. The iOS slider thumb now uses the theme accent so it stays visible on tinted dark cards.
Model: GPT-6.1. Harness: Codex.
Inline errors and the dismissible composer error duplicated their message, dismissal, and accessibility presentation. Add
Noticeand adopt it in both. Keep error text selection and Android live regions, centralize VoiceOver announcements, and use the shared glass treatment for floating iOS feedback with a solid themed Android fallback.Validation: mobile typecheck, targeted lint, and 53 dependency/theme tests pass. Native screenshots show an invalid-folder failure on iOS and Android, without creating a project. Before is left, after is right. Floating composer before/after captures below use the production component in the development catalog. Its error icon stays red.
Model: GPT-6.1. Harness: Codex.
Mobile's shared controls need one repeatable place to check themes, selection, disabled/loading states, and native presentation. Add a development-only
t3code-dev://dev/componentscatalog that uses the production components with local example state. It includes theme and light/dark switching, forms, lists, buttons, chips, notices, sheets, menus, dialogs, the floating create action, and progress. Search keeps its existing autofocus default, with an opt-out for this inline example.The stack adopts shared action rows, buttons, segmented controls, chips, sliders, numeric fields, and notices in production screens. Existing native menu, sheet, dialog, search, header/toolbar, FAB, switch, and progress components remain the shared implementations for their current callers; this does not replace native presentation with a separate widget framework.
Validation: mobile typecheck and 53 dependency/theme tests pass. Captured the real iOS and Android clients in all six built-in themes, light and dark, plus Material You on Android. The catalog changes local example state; theme previews update the device's appearance preferences.
Model: GPT-6.1. Harness: Codex.