fix(mobile): undo toasts keep their action on one row#23910

merged2
main
GitHub fork: fix/mobile-toast-inline-action
opened14h agobySsaphid
View on GitHubTwo-way sync enabledPR last imported 12h ago

Problem

On mobile, the undo toast that appears after settling, pinning, snoozing or archiving a thread from Home is a tall card. Toast always puts its action on a second row under the message, so "Settled thread" sits next to empty space while Undo sits alone below it. The card is roughly twice the needed height and hides about one and a half thread rows at the top of the list.

Change

Toast now shows a short message, its action, and the dismiss button on one row. A toast with a description, such as the Git progress toast with Open PR, keeps the action on its own row, as it does at accessibility text sizes (fontScale >= 1.5). At those sizes an inline button would leave the message too narrow to read on small phones.

The change is only in apps/mobile/src/components/ui/Toast.tsx. Its callers (the Home and sidebar undo notice, Git action progress, and the development component catalog) are unchanged.

Scope and approval

Very small visual fix for an obvious layout bug in an existing mobile component. It adds no new behavior, setting or workflow. React Native mobile only; web and desktop have their own toasts and are unaffected.

Verification

iPhone 16 Pro Simulator on iOS 26.5, T3 Code Dev client against an isolated local dev server, same thread and default text size for both runs. Flow: long-press a thread on Home, choose Settle, then tap Undo.

Before (base 8d3b061): the undo toast is two rows tall and Undo sits alone on the second row.

Before: Settled thread toast with Undo on a separate second row

Before: settle from the Home menu shows a tall toast; Undo restores the thread

After (candidate 1484c6e): the message, Undo and dismiss button share one row, and Undo still restores the thread.

After: Settled thread toast with Undo inline beside the dismiss button

After: settle from the Home menu shows a one-row toast; Undo restores the thread

Accessibility text size keeps the stacked layout

Simulator content size set to Accessibility Large. The action moves to its own row so the message keeps the full width.

After at Accessibility Large text: Undo on its own row below the message

Before recording (MP4) · After recording (MP4)

GIFs are sampled at 10 fps from the simulator recordings, with about 1.5 s of idle lead-in trimmed. Their timing is not evidence of performance.

  • vp lint apps/mobile/src/components/ui/Toast.tsx and the mobile tsc --noEmit typecheck both passed.
  • No unit test was added. The change is pure layout, and the repo's guidance is not to assert rendered structure.
  • Not exercised natively: Android, the Git progress toast (it keeps its description layout through the stacked path) and iPad widths.
  • An independent review with Codex / GPT-6.1 Sol (high) found an accessibility-size squeeze in the first version. The description and fontScale fallback fix it, and a second review of the final head found no actionable issues.

Implementation: Claude Opus 5.5 in Claude Code, running in T3 Code. Review: GPT-6.1 Sol through Codex in T3 Code.

🤖 Generated with Claude Code

Checks

All checks passed

Added 2 commits

  • fix(mobile): keep toast actions on the message row06e2129
  • fix(mobile): keep toast actions stacked for descriptions and large text1484c6e
Synced from GitHub

Approvability

Verdict: Approved at 1484c6e

Macroscope's review found this PR approvable — This is a small, isolated mobile toast layout fix that preserves action behavior and keeps descriptive or accessibility-sized toasts stacked. It adds no new workflow, schema, infrastructure, or configuration behavior.

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

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 51273020db3245f4ec29514a419d29b5dcb012dc and 1484c6eb96febb475d2be500d081d68a8ca64678.

📒 Files selected for processing: 1
  • apps/mobile/src/components/ui/Toast.tsx

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

📝 Walkthrough

The toast now places its action beside the message when there is no description and the font scale is below 1.5. In other cases, it places the action below the message.

Changes: Toast action layout

Layer / File(s)Summary
Conditional action placement
apps/mobile/src/components/ui/Toast.tsx
The toast reads the window font scale and constructs the action button once. It renders the action in the message row when there is no description and the font scale is below 1.5; otherwise, it renders the action below the row. The dismiss button remains in the row.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: 🔵 Low · up to 1484c

On narrow screens, a toast with a longer action label may clip its dismiss button. The risk is limited and does not block merging.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title is concise, uses the repository's conventional commit format, and clearly describes the mobile toast layout fix.
Description checkPassedThe description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the approval exemption, provides before-and-after UI evidence, reports checks and limitati…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the approval exemption, provides before-and-after UI evidence, reports checks and limitations, and identifies the agent and review harness.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Synced from GitHub

Review requested

Date (UTC)ReviewerWhere
2026-10-23JuliusDiscord DM

Logged so this PR shows when a maintainer was asked to review it.