Skip to content

refactor(mobile): use shared Menu for markdown long presses - #20019

Merged
juliusmarminge merged 1 commit into
t3/mobile-ds-native-sliderfrom
t3/mobile-ds-action-sheets
Oct 15, 2026
Merged

juliusmarminge merged 1 commit into
t3/mobile-ds-native-sliderfrom
t3/mobile-ds-action-sheets

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Chat link long-presses should use menus, without introducing a new bottom-sheet interaction.

Route Android markdown link gestures through the shared Menu component while preserving the existing anchored menu and action handlers. Keep iOS’s existing native per-link context menus and remove the action-sheet fallback. The rich-text adapter forwards only link long-presses, leaving ordinary taps and text selection with the markdown renderer.

This replaces the earlier action-sheet implementation in this PR. There is no new Dialog.actions API or catalog example.

Validation

  • Mobile typecheck and focused lint passed.
  • React Doctor: 100/100 for the changed file.
  • Device gestures have not been rerun for this revision; this PR remains a draft.

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
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.

Toast decision: retain the custom themed Toast on both platforms for Git progress, success, and errors. The native Snackbar experiment in #20017 was dropped after visual review.


Devin Review

@juliusmarminge
juliusmarminge added this pull request to stack #19267 October 15, 2026 20:08
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 15, 2026
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 5a5f458 to 47b5197 Compare October 15, 2026 20:08
@juliusmarminge juliusmarminge changed the title feat(mobile): expose native action sheets through Dialog feat(mobile): share native action sheets through Dialog Oct 15, 2026
@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Oct 15, 2026
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch 2 times, most recently from a0e1550 to 8c23c7f Compare October 15, 2026 20:15
@juliusmarminge
juliusmarminge removed this pull request from stack #19267 October 15, 2026 20:15
@juliusmarminge
juliusmarminge changed the base branch from t3/mobile-ds-dialog-styling to t3/mobile-ds-native-toast October 15, 2026 20:15
@juliusmarminge
juliusmarminge added this pull request to stack #20021 October 15, 2026 20:16
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 15, 2026
@juliusmarminge juliusmarminge changed the title feat(mobile): share native action sheets through Dialog refactor(mobile): use shared Menu for markdown long presses Oct 15, 2026
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 8c23c7f to 192018f Compare October 15, 2026 20:18
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Oct 15, 2026
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 192018f to cf0622d Compare October 15, 2026 20:37
@juliusmarminge juliusmarminge added the 🚀 Mobile Continuous Deployment Trigger Expo preview build label Oct 15, 2026
@juliusmarminge
juliusmarminge removed this pull request from stack #20021 October 15, 2026 20:55
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from cf0622d to 50158c0 Compare October 15, 2026 20:55
@juliusmarminge
juliusmarminge changed the base branch from t3/mobile-ds-native-toast to t3/mobile-ds-native-slider October 15, 2026 20:55
@juliusmarminge
juliusmarminge added this pull request to stack #20030 October 15, 2026 20:55
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Expo continuous deployment is ready!

  • Project → t3-code
  • Platforms → android, ios
  • Scheme → t3code-preview
  🤖 Android 🍎 iOS
Fingerprint 035e46c0805270afe707381d97627b8ca606ecb4 e944a9ee6b12d9b4dedf94a3f538611c061be178
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: 035e46c0805270afe707381d97627b8ca606ecb4
App version: 2.0.0
Git commit: e0b943d071b01a3cbfe09538bfa2992a29d17739
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: e944a9ee6b12d9b4dedf94a3f538611c061be178
App version: 2.0.0
Git commit: 66cbf3d37ab0f420220ae574dd185b81b3cc6188
Update Details Update Permalink
DetailsBranch: pr-20019
Runtime version: 035e46c0805270afe707381d97627b8ca606ecb4
Git commit: eda5377f21e25533a973d5dace464b249111a918
Update Permalink
DetailsBranch: pr-20019
Runtime version: e944a9ee6b12d9b4dedf94a3f538611c061be178
Git commit: eda5377f21e25533a973d5dace464b249111a918
Update QR

@github-actions

github-actions Bot commented Oct 15, 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 — 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 — 2 — 8 ✅

Baseline: unavailable · PR result: 9083b00 · 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: 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.

@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 50158c0 to 717d1e4 Compare October 15, 2026 22:24
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 717d1e4 to 5bc12ed Compare October 15, 2026 22:33
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch 2 times, most recently from ebef9e7 to f7e380c Compare October 15, 2026 22:34
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). size:M 30-99 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). size:L 100-499 changed lines (additions + deletions). labels Oct 15, 2026
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from f7e380c to 316240a Compare October 15, 2026 22:38
@juliusmarminge
juliusmarminge force-pushed the t3/mobile-ds-action-sheets branch from 316240a to 9083b00 Compare October 15, 2026 22:47
@juliusmarminge
juliusmarminge marked this pull request as ready for review October 15, 2026 22:47
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 2f98d640-f969-4acc-802b-906e068859ab
📥 Commits

Reviewing files that changed from the base of the PR and between 8361c0f and 9083b00.

📒 Files selected for processing: 1
  • apps/mobile/src/native/EnrichedMarkdownText.tsx

Limit details: You’ve used all 10 included reviews currently available. Your 28 included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

📝 Walkthrough

Android file-context menus now use Menu and open on long press. iOS no longer uses the ActionSheetIOS fallback. The Markdown renderer receives the menu’s optional long-press callback through MarkdownMenuAnchor.

Changes: Markdown context menus

Layer / File(s) Summary
Platform-specific link context menus
apps/mobile/src/native/EnrichedMarkdownText.tsx
Android link long presses build and open the file-context menu through Menu. MarkdownMenuAnchor passes the optional long-press callback to the Markdown renderer. The iOS ActionSheetIOS fallback is removed.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 9083b

The changed link-menu path has no established merge-blocking issue. Device gesture validation remains a normal pre-merge check.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the intended behavior and reports validation, but it does not use or provide the required Problem, Change, Scope and approval, and Verification sections. It also lacks require… Rewrite the description using the required headings. Add the problem and expected behavior, explain the implementation, provide a triaged issue or maintainer approval with scope justification, and document focused verification with observed…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: using the shared Menu for mobile markdown long presses.
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.
Full details: Description check

Explanation

The description explains the intended behavior and reports validation, but it does not use or provide the required Problem, Change, Scope and approval, and Verification sections. It also lacks required UI screenshots or a clear explanation of why approval is not needed.

Resolution

Rewrite the description using the required headings. Add the problem and expected behavior, explain the implementation, provide a triaged issue or maintainer approval with scope justification, and document focused verification with observed results. Add before/after screenshots for the UI change, or explain why they cannot be provided.

  • Fix all pre-merge checks with AI
✨ 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

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

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

@macroscopeapp

macroscopeapp Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9083b00

Macroscope's review found this PR approvable — This is a focused one-file mobile refactor that reuses the existing shared menu and preserves the existing Android anchoring and action flow. Its only observable impact is localized markdown link-menu presentation and gesture plumbing, with no schema, security, deployment, or product-default changes.

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

@juliusmarminge
juliusmarminge merged commit 9fbc753 into main Oct 15, 2026
36 of 38 checks passed
@juliusmarminge
juliusmarminge deleted the t3/mobile-ds-action-sheets branch October 15, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews 🚀 Mobile Continuous Deployment Trigger Expo preview build size:M 30-99 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