Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): center toast actions beside wrapped messages #24986

MergedPixPMusic(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/24986/headmerged by juliusmarminge View on GitHub

Problem

When a toast message wraps at a large app text size, its action sits above the message's vertical center. At 22 pt, “Changes are ready to review.” should remain centered beside Undo, the status icon, and the dismiss control.

Change

Wrap the inline action in a centered view so Button's self-start cannot override the row alignment. This is a one-line layout change; wrapping, callbacks, and swipe behavior are preserved.

Scope and approval

Alex requested this correction while reviewing the font captures in T3 Code. It is a focused alignment fix for an obvious visual bug, following merged #23968; no prior public issue is needed. It is separate from the font policy (#24925) and native glass appearance (#24926). The system fontScale condition in ToastContent is removed by #24925; this PR only centers the inline action. #24925 is a companion pull request, not a tracking issue for this alignment fix.

Verification

Native Duo captures cover app 11/16/22, including matched before/after at 22; iPad and Android also cover the row at 22. The companion font PR (#24925) was present during capture. vp run check:changed passed on the integrated branch. No UI test was added for this visual layout change.

22 pt before22 pt after
duo toast action 22 beforeduo toast action 22 after
Internal minimum / default / maximum
11 pt16 pt22 pt
duo toast action 11 centeredduo toast action 16 centeredduo toast action 22 centered
iPad at 22 pt ipad toast 22
Android at 22 pt android toast centered 22

Model: GPT-6.1 Sol (xhigh reasoning) | Harness: Codex in T3 Code

    1. Approvability

      Verdict: Approved at 5e2de4c

      Macroscope's review found this PR approvable — This is a small, self-contained mobile layout fix that centers existing inline toast actions when messages wrap. It does not alter toast behavior, callbacks, accessibility, defaults, or other production concerns.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    2. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      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 aa247c52a01de58c69e6944268125ffdfe76318f and 5e2de4cc9cf02e61f5819d413073a5f5220f2c23.

      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; 8 remain after this review.

      Walkthrough

      Inline actions in the mobile toast now render inside a vertically centered View. Non-inline actions are unchanged.

      Changes: Mobile toast action alignment

      Layer / File(s)Summary
      Wrap inline toast action
      apps/mobile/src/components/ui/Toast.tsx
      The inline action now renders inside a self-center wrapper. Non-inline action rendering is unchanged.
      Priority: Low

      Estimated code review effort: 1 (Trivial) | ~3 minutes

      Change: Bug fix

      Possibly related issues

      • pingdotgg/t3code#24242 — This change affects the mobile toast action layout, but does not establish that the oversized notification issue is fully fixed.

      Possibly related PRs

      • pingdotgg/t3code#23968 — This PR changes the inline-action rendering logic introduced by #23968.
      • pingdotgg/t3code#24925 — This PR changes the rendering of inline actions whose visibility condition is also modified by #24925.

      Suggested reviewers: saphid

      Merge Risk: Minimal · up to 5e2de

      The toast alignment change is mergeable with no identified blocking risk.

      Pre-merge checks: Passed 3 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Linked Issues checkWarningThe change satisfies the toast alignment objective described for #24925, but the linked issue also requires app-owned toast layout to remain independent of system text scaling. ToastContent at the r…Remove the system fontScale dependency from the toast layout condition, while preserving the centered inline action wrapper. Verify that the toast keeps the same layout across system text sizes and still follows the Appearance font prefer…
      Passed Passed checks: 3 passed
      Check nameStatusExplanation
      Title checkPassedThe title is concise, specific, and accurately describes the main mobile layout fix.
      Out of Scope Changes checkPassedThe whole-PR diff changes only apps/mobile/src/components/ui/Toast.tsx. The change wraps the inline toast action in View className="self-center", which directly supports the linked toast layout ob…
      Description checkPassedThe description includes all required sections. It explains the problem, the one-line change, scope and approval rationale, verification results, platform coverage, screenshots, test status, and agent…
      Full details: Out of Scope Changes check

      Explanation

      The whole-PR diff changes only apps/mobile/src/components/ui/Toast.tsx. The change wraps the inline toast action in View className="self-center", which directly supports the linked toast layout objective. No unrelated source, test, or configuration changes are present.

      Full details: Description check

      Explanation

      The description includes all required sections. It explains the problem, the one-line change, scope and approval rationale, verification results, platform coverage, screenshots, test status, and agent details.

      Full details: Linked Issues check

      Explanation

      The change satisfies the toast alignment objective described for #24925, but the linked issue also requires app-owned toast layout to remain independent of system text scaling. ToastContent at the reviewed head still computes inlineAction with fontScale < 1.5. This preserves a system-size-dependent layout and does not satisfy the issue's explicit requirement to remove that condition.

      Resolution

      Remove the system fontScale dependency from the toast layout condition, while preserving the centered inline action wrapper. Verify that the toast keeps the same layout across system text sizes and still follows the Appearance font preference.

      Finishing Touches: 💡 1
      🛠️ Fix failing CI checks: 💡
      • Commit to this branch
      • Create a new PR
      🧪 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.
    3. juliusmarminge merged this796fc0a

    4. juliusmarminge closed this

Sign in to join this conversation.