Skip to content

refactor(mobile): split native menus by platform - #12382

Merged
juliusmarminge merged 2 commits into
mobile-platform/home-headerfrom
mobile-platform/menus
Sep 18, 2026
Merged

juliusmarminge merged 2 commits into
mobile-platform/home-headerfrom
mobile-platform/menus

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 18, 2026

Copy link
Copy Markdown
Member

The shared menu wrapper loads and initializes the iOS themed MenuView wrapper on Android before choosing its Android branch. Use a base iOS ControlPillMenu and an .android.tsx override and preserve its existing export from ControlPill, so all callers keep the same API. Keep iOS gesture suppression and menu lifecycle handlers with the native menu, and Android anchoring and haptics with the Android implementation.

Verification:

  • Existing menu action color tests: 6 passed; mobile workspace typecheck passed.
  • Targeted lint passed with a refs warning on the preserved iOS props forwarding code.
  • Both release exports succeeded. Source maps resolve only the matching ControlPillMenu implementation.

The existing menu branches and handlers are preserved. No visual or interaction change is intended; evidence is release module resolution and existing tests.
Based on #12381.

Runtime verification on September 18, 2026: the integrated stack at 47a3dcb was tested on an iPhone 17 Pro simulator (iOS 27.0) and T3Code_API_36_1 emulator (Android 16.0), one at a time. Compatible development clients were built and installed from this checkout, then connected to a disposable environment with seeded Git projects. Coverage included Home/list rendering, thread navigation, file search and word wrap, terminal menus and session selection, review diff selection, archive menus, and Settings Add Environment / scanner open and close. Temporary connections were removed and the devices and test servers were stopped. Tablet layouts, QR decoding, and Live Activity start/update/stop were not exercised. Screenshots use seeded demo content; any test counts in demo messages or terminal output are fixture text, not validation results.

The iOS native menus and Android nested menus were exercised through file word wrap, terminal text size/session selection, and review diff selection. Runtime evidence is attached to #12391.

The pre-existing iOS archive keyboard issue and stale-connection loading limitation are recorded with comparison evidence in #12399.

Prepared with Codex.

@juliusmarminge
juliusmarminge added this pull request to stack #12385 September 18, 2026 04:16
@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 18, 2026
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 7.8 KiB
Codex Live turn WebSocket decoded 56.3 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.5 KiB 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 7.8 KiB
Claude Live turn WebSocket decoded 57.0 KiB 66.4 KiB
Claude Live turn messages 9 21

Baseline: unavailable · PR result: 7828c61 · Source CI: success

Scenario 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: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Sep 18, 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: Team

Run ID: ced1971e-ad7e-451f-b986-2f3483bdc81c

📥 Commits

Reviewing files that changed from the base of the PR and between f23d3fa and 7828c61.

📒 Files selected for processing (1)
  • apps/mobile/src/components/ControlPillMenu.tsx

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


📝 Walkthrough

Walkthrough

The change extracts ControlPillMenu from ControlPill.tsx into shared type, Android, and iOS modules. ControlPill.tsx now re-exports the component.

Changes

ControlPillMenu extraction

Layer / File(s) Summary
Menu contract and exports
apps/mobile/src/components/ControlPillMenu.types.ts, apps/mobile/src/components/ControlPill.tsx
Adds ControlPillMenuProps and re-exports ControlPillMenu from the existing component module.
Android menu implementation
apps/mobile/src/components/ControlPillMenu.android.tsx
Adds anchored-menu rendering and conditional long-press handling with haptic feedback.
iOS menu implementation
apps/mobile/src/components/ControlPillMenu.tsx
Adds themed native menu rendering and coordinates long-press, touch, accessibility, and menu lifecycle events.
ControlPill integration cleanup
apps/mobile/src/components/ControlPill.tsx
Removes the embedded menu implementation and its menu-specific dependencies.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 7828c

The menu split retains existing interaction and callback behavior, with no concrete merge-blocking risk identified.

🚥 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 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: splitting native mobile menus by platform.
Description check ✅ Passed The description explains what changed, why the refactor was needed, the intended lack of UI changes, and verification results. It does not use the template headings or include the checklist, but the r…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@macroscopeapp

macroscopeapp Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7828c61

Macroscope's review found this PR approvable — This refactor separates the existing iOS and Android menu implementations without changing callers, APIs, or interaction logic. Runtime impact is limited to loading the platform-specific implementation, with no new user-facing capability or product-default change.

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 18, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 18, 2026 05:58

Dismissing prior approval to re-evaluate 7828c61

@macroscopeapp

This comment has been minimized.

@juliusmarminge
juliusmarminge merged commit 429d66c into main Sep 18, 2026
23 checks passed
@juliusmarminge
juliusmarminge deleted the mobile-platform/menus branch September 18, 2026 19:55
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 19, 2026
## What's Changed
* fix(mobile): use singular label for one settings environment by @juliusmarminge in pingdotgg/t3code#12282
* feat(mobile): add copy thread ID to thread list actions by @jakeleventhal in pingdotgg/t3code#12228
* fix(mobile): remove Android input underline backgrounds by @juliusmarminge in pingdotgg/t3code#12394
* chore(deps): upgrade Effect to rc.115 and Alchemy to beta.78 by @juliusmarminge in pingdotgg/t3code#12326
* chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 by @juliusmarminge in pingdotgg/t3code#12327
* chore(relay): deploy with the Alchemy CLI and publish client config through an Action by @juliusmarminge in pingdotgg/t3code#12401
* chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates by @dependabot[bot] in pingdotgg/t3code#12411
* fix(git): prevent stale branch selections from restoring files by @yashranaway in pingdotgg/t3code#10574
* chore(deps): bump parents that carry vulnerable transitive dependencies by @juliusmarminge in pingdotgg/t3code#12417
* fix(web): keep a file-to-symlink type change from crashing the diff view by @Mnigos in pingdotgg/t3code#11075
* Use T3 Device panel for mobile testing by @juliusmarminge in pingdotgg/t3code#12414
* fix(web): client spans reach the trace proxy again by @yordis in pingdotgg/t3code#12332
* fix(bitbucket): preserve rate limits from optional PR reads by @juliusmarminge in pingdotgg/t3code#12486
* fix(mobile): synchronize native permission registry access by @juliusmarminge in pingdotgg/t3code#12482
* fix(build): retain multiple license notices for one package by @juliusmarminge in pingdotgg/t3code#12489
* fix(build): parse executable imports without matching source strings by @juliusmarminge in pingdotgg/t3code#12488
* fix(mobile): synchronize native notification delegates by @juliusmarminge in pingdotgg/t3code#12483
* fix(relay): accept delegated thread IDs in activity routes by @juliusmarminge in pingdotgg/t3code#12484
* fix(git): explain fetch failures without exposing remote output by @juliusmarminge in pingdotgg/t3code#12485
* fix(web): sidebar search matches message content by @koushikxd in pingdotgg/t3code#11761
* fix(server): restore secrets when settings persistence fails by @juliusmarminge in pingdotgg/t3code#12487
* fix(ci): accept V2 transfer reports without cross-scenario comparisons by @juliusmarminge in pingdotgg/t3code#12492
* fix(web): speed up PR previews with fewer GitHub requests by @dominic-r in pingdotgg/t3code#11825
* fix(server): retry transient git failures during checkpoint capture by @saphid in pingdotgg/t3code#11665
* fix(mobile): keep archived threads visible during iOS search by @juliusmarminge in pingdotgg/t3code#12420
* perf(mobile): isolate Material You conversion on Android by @juliusmarminge in pingdotgg/t3code#12379
* perf(mobile): isolate iOS Live Activity imports by @juliusmarminge in pingdotgg/t3code#12380
* refactor(mobile): split home headers by platform by @juliusmarminge in pingdotgg/t3code#12381
* refactor(mobile): split native menus by platform by @juliusmarminge in pingdotgg/t3code#12382
* refactor(mobile): isolate thread row appearance by platform by @juliusmarminge in pingdotgg/t3code#12383
* refactor(mobile): split settings selection rows by platform by @juliusmarminge in pingdotgg/t3code#12384
* refactor(mobile): centralize platform header rendering by @juliusmarminge in pingdotgg/t3code#12388
* refactor(mobile): configure thread headers through the shared core by @juliusmarminge in pingdotgg/t3code#12389
* refactor(mobile): share file header actions and search configuration by @juliusmarminge in pingdotgg/t3code#12390
* refactor(mobile): share terminal header and menu configuration by @juliusmarminge in pingdotgg/t3code#12391
* refactor(mobile): share archived thread header configuration by @juliusmarminge in pingdotgg/t3code#12399
* refactor(mobile): compose review menus through the shared header by @juliusmarminge in pingdotgg/t3code#12400
* feat(mobile): search projects when starting a task by @juliusmarminge in pingdotgg/t3code#12496
* fix(mobile): preserve multiple model favorites by @juliusmarminge in pingdotgg/t3code#12505
* feat(server): export log records over OTLP by @yordis in pingdotgg/t3code#12493
* fix(mobile): use native settings and snooze controls by @juliusmarminge in pingdotgg/t3code#12512
* feat(web): sort pull requests by what is blocked on me by @flamboh in pingdotgg/t3code#12508
* fix(mobile): prefer pull-to-refresh on list screens by @juliusmarminge in pingdotgg/t3code#12515
* fix(acp): accept SDK elicitation requests by @shivamhwp in pingdotgg/t3code#11294
* fix(release): read relay configuration without loading deployment providers by @juliusmarminge in pingdotgg/t3code#12518
* fix(ci): reconcile native change labels against pinned commits by @juliusmarminge in pingdotgg/t3code#12517
* fix(release): strip Alchemy progress before parsing relay state by @juliusmarminge in pingdotgg/t3code#12519
* refactor: remove obsolete code by @t3dotgg in pingdotgg/t3code#9917
* fix(server): release oversized pull request diff cache entries by @juliusmarminge in pingdotgg/t3code#12523
* feat(mobile): view and control agent devices by @juliusmarminge in pingdotgg/t3code#12531
* fix(preview): recover host registration after request timeouts by @juliusmarminge in pingdotgg/t3code#12535
* fix(mobile): align built-in theme colors with desktop by @juliusmarminge in pingdotgg/t3code#12534
* feat(desktop): export main process telemetry over OTLP by @yordis in pingdotgg/t3code#12520
* fix(codex): surface app permission requests as approvable by @Exotic209093 in pingdotgg/t3code#7861
* chore(desktop): leave main process metrics export off until a metric exists by @juliusmarminge in pingdotgg/t3code#12540
* fix(release): drop placeholder allowBuilds entry that broke desktop builds by @juliusmarminge in pingdotgg/t3code#12544

## New Contributors
* @dependabot[bot] made their first contribution in pingdotgg/t3code#12411
* @koushikxd made their first contribution in pingdotgg/t3code#11761

**Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260918.1895...v0.0.43-nightly.20260919.1948

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260919.1948
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.

1 participant