refactor(mobile): organize design system and shared components #20043
t3/mobile-ds-action-sheets fromrefs/pull/20043/head·merged by juliusmarminge View on GitHubThe mobile component folder mixed design-system controls with feature UI. Move the controls and their platform implementations into src/components/ui, keep cross-feature app components in src/components, and move seven feature-owned components into their owning features. Update imports and test mocks directly, without re-export shims or rendering changes.
| Folder | Contents |
|---|---|
components/ui | Text, symbols, buttons, rows, menus, dialogs, sheets, feedback, chrome, and their platform helpers |
components | Shared composer pieces, file/media previews, branding, domain icons, loading and error-boundary UI |
features/threads | Browser app icon, attachment button, copy button, clone banner |
features/files | Audio preview |
features/projects | Source-control icon |
features/connection | Permission-update notice |
Validation: mobile typecheck; 25 focused tests including platform dependency graphs, header menus, Git branches, questions, and project creation; native static checks; changed-file lint and formatting. React Doctor reported no change-specific findings. No visual behavior changes, so screenshots do not apply.
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.
| Pen component | After this PR |
|---|---|
| Component organization | Added here: components/ui, shared composites, feature-owned components |
| Host / native theme | Colors only; native typography and shapes left |
| List / Section / Row | Shared RN rows; native Form / ListItems left |
| Toggle | Native switches; Android checkmark treatment left |
| Segmented | Native + themed; custom rendering deferred |
| Menu | Shared Menu used for Android markdown links; iOS native per-link menus retained |
| Sheet | Shared API; Compose renderer and detent API left |
| Dialog | Native alerts / confirm / prompt; Android actions styled; action sheets deferred |
| SearchField | Shared API; native Android search left |
| Button / IconButton | Android native; standalone iOS native rendering left |
| Chip | Shared RN chip; native Android variants left |
| Toast | Custom themed toast retained |
| FAB | Native Android FAB; menu left |
| Toolbar | Unified API and platform renderers |
| AppBar | Native Android adopted; large / collapsing variants left |
| Picker / Slider / Stepper | Native sliders on both; full Picker / Stepper family left |
| Progress / EmptyState | Native progress + loader adoption; native iOS empty state left |
| Typography / shapes / motion | Control tokens adopted; native Host injection left |
| Split / list-detail / rail | Deferred broader layout work |
Custom Appearance cards stay. Segmented controls stay native. Composer, thread-row and task-tray redesigns remain deferred.
Model: GPT-6.1. Harness: Codex.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge added labelsmacroscope-review
Approvability#
Verdict: Approved at
1c0da7bMacroscope's review found this PR approvable — This PR reorganizes existing mobile UI and feature components without introducing new behavior; production changes are limited to equivalent import and relative-path updates. The large diff is primarily renames and caller/test updates, with no product-default or deployment changes.
No code changes detected at
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).cdb3864. Prior analysis still applies.Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
ℹ️ No successful
mainbaseline artifact is available yet. This run establishes the initial measurement.Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅ Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅ Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Codex Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅ Codex Live turn messages — 1 — 8 ✅ Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅ Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅ Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅ Claude Live turn messages — 1 — 8 ✅ Baseline: unavailable · PR result:
cdb3864· Source CI: successScenario and decoded snapshot size
10 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.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
juliusmarminge merged this86f4a74
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed