You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): queued-message panel fits its rows and Save/Cancel fit their labels - #36928
On the phone, queued chat messages left a big empty box above the composer that you could scroll through, and in the queued-message editor the Save and Cancel words spilled out of their small round buttons and ran into each other in languages like Russian and German. Now the box is exactly as tall as its messages, and Save and Cancel are buttons that fit their words.
What Changed
Queue scroll range (Mobile queued messages leave a large empty scrollable panel above the composer #36554). Each queued card measures whether its text needs "Show more" with an invisible copy of the full message. That copy is absolutely positioned under the two visible lines, but nothing clipped it, so a long message's hidden copy stretched the queue's scroll area. Two queued messages gave 1,172 px of blank scrolling over 102 px of rows (1,752 px with drag reorder on), and the scroll-to-newest on append landed in that blank space. The card text wrapper in MobileQueuedCardText now clips with overflow: hidden, so the probe still measures the full text but can't extend the scroll range.
Save/Cancel in the queued editor (Mobile queued-message editor puts Save and Cancel text in fixed-width icon buttons #36604). Save and Cancel used sendButton / ghostButton, the 38 pt round controls meant for icons, so any label longer than about three letters overflowed. They are now label pills (sendLabelButton, ghostLabelButton in composer-input-styles) that size to their text, and live in a small MobileNativeChatEditActions component. If a row ever runs out of room (a 320 pt phone in de/es/fr/ru), the labels end in an ellipsis instead of overlapping.
Save moved out of the Send/Stop swap. editSession is only passed by MobileQueuedMessageComposer, which never passes stop, so the old "Stop takes Save's slot" branch was unreachable. Save also gained the button role and disabled state that Cancel already had.
Why
The probe belongs to MobileQueuedCardText, so clipping it at its own wrapper fixes every list that shows a card (plain and drag reorder) without touching the shared scroller or its height cap.
Keeping Save and Cancel as text matches the desktop queued editor, which uses text buttons, and what main already showed. The other mobile edit composers (PR comments, task comments) use an X icon and a send arrow instead. That would avoid translation length entirely, but it would change what this editor shows rather than fix it. Easy to switch if we prefer that look.
Automated tests added/updated, or explained why not below
New config/scripts/mobile-web-app/mobile-web-app-queued-messages-render.test.mjs (Chromium and WebKit). It checks that the queue scrolls only as far as its rows, in plain and drag-reorder mode, and that whole Save and Cancel labels sit inside their own buttons without overlapping at 360 pt in every shipped locale. All six cases fail on main (1,172 / 1,752 px of extra scroll; English "Cancel" already spills out of its button) and pass on this branch.
Measured at 320/360/390 pt across all 11 locales in both engines. Everything fits at 360 and 390. At 320, de/es/fr/ru truncate with an ellipsis and nothing overlaps.
Focused mobile tests for the queue, the queued editor and the composer pass (149 tests, including the dependents test-dependents.sh listed). check:code-quality:changed and check:react-doctor:changed are clean.
Not run on a physical phone. The captures come from the real components rendered in the same engines the app's WebViews use.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Mobile-only layout change: no wire, host, SSH or desktop impact. Separate, pre-existing issue found while testing: react-native-web never fires onTextLayout, so on the page "Show more" never appears for a long queued message. That will be a follow-up.
Waiting for blessing (changes how the queued editor looks). To try it: on the phone, queue two messages while an agent works, one of them long; the panel is as tall as its rows and scrolling stops at the last one. Then open a queued message's More menu, pick Edit, and switch the app language to Русский or Deutsch: Cancel reads as text and Save is a filled pill sized to its word. Worktree: /Users/kelvinamoaba/orca/workspaces/orca/mobile-queued-messages-36554-36604.
Mobile verify is red because of main, not this PR: src/platform/dictation-capture-bridge-budget.test.tsx has failed on main since #36922 (main's Mobile Checks run 41285348129). PR checks passed is green on this head.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f2c84b38-fa0d-4b31-8940-12605acebc4e
Commits
Reviewing files that changed from the base of the PR and between 0b22932 and fcf361f.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
The queued-message layout now clips its measurement probe and content. The composer uses a dedicated component for translated Cancel and Save actions, with shared label-control styles and the existing cancel and send handlers. Browser tests check queued-row scroll range in plain and drag modes and action-label layout across supported locales.
Severity of issue fixed: Medium
Merge Risk: Minimal · previous review 0b229
The changes are mergeable; the browser test could better detect overlaps with adjacent controls.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes both primary mobile fixes: queued-message panel sizing and Save/Cancel label fit.
Linked Issues check
The changes address both active linked issues. For #36554, MobileQueuedCardText wraps the full-message measurement copy in probeBounds with overflow: 'hidden'. The added Chromium and WebKit test…
Out of Scope Changes check
The changed production files support the two linked mobile layout fixes. The new style entries support translated Save and Cancel labels. The extracted edit-actions component preserves the existing ha…
Description check
The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #36554 and #36604), Visual Proof with before/after captures for both the queue and the…
Full details: Linked Issues check
Explanation
The changes address both active linked issues. For #36554, MobileQueuedCardText wraps the full-message measurement copy in probeBounds with overflow: 'hidden'. The added Chromium and WebKit test checks the scroll range in plain and drag-reorder modes. For #36604, MobileNativeChatEditActions uses label-sized controls, keeps labels to one line, provides button roles and hit slop, and disables Save when canSave is false. The test checks Save and Cancel layout for every shipped locale at 360 pt. The reported 320 pt measurements cover truncation without overlap. Existing edit handlers and queue actions remain in use.
Full details: Out of Scope Changes check
Explanation
The changed production files support the two linked mobile layout fixes. The new style entries support translated Save and Cancel labels. The extracted edit-actions component preserves the existing handlers and accessibility behavior. The browser test directly verifies queue sizing and editor layout. No unrelated product behavior or platform area is changed.
Full details: Description check
Explanation
The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #36554 and #36604), Visual Proof with before/after captures for both the queue and the editor in Russian, German, and a 320 pt case, Testing with manual and automated test notes, Agent skill upstream boundary, Notes, and a completed Checklist. The AI Disclosure section is empty. Per the template, that section is only needed for non-StablyAI contributors, so this gap is minor. The final Checklist item (pnpm lint, typecheck, test, and build) is unchecked, and the description says CI will cover it or that local runs are preferred. The Review section is empty, but the template does not require content there. The description also says the change is waiting for blessing on the queued editor's look, and it explains the design choice against the alternatives.
Full details: Docstring Coverage
Explanation
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 5 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Check both edit actions against every direct action-row child.
The queued editor can render attach and microphone controls beside Cancel and Save. Session pickers are not part of this queued-editor path. The current test only checks Cancel against Save, so an overlap with another direct row child can pass.
MobileNativeChatEditActions and MobileNativeChatComposerMic use fragments, which makes their rendered controls direct children of the row. The flexible spacer is also a direct child and can remain in the geometric check. Return each edit action with its element and bounds before checking all row children and both row edges.
Suggested fix
- return box+ return { button, box }
})
- if (cancel.right > save.left + 0.5) {+ if (cancel.box.right > save.box.left + 0.5) {
problems.push('cancel overlaps save')
}
- if (save.right > row.getBoundingClientRect().right + 0.5) {- problems.push('save past the row')+ const rowBox = row.getBoundingClientRect()+ for (const [name, action] of [+ ['cancel', cancel],+ ['save', save]+ ]) {+ if (action.box.left < rowBox.left - 0.5 || action.box.right > rowBox.right + 0.5) {+ problems.push(`${name} past the row`)+ }+ for (const sibling of row.children) {+ if (sibling === action.button) continue+ const siblingBox = sibling.getBoundingClientRect()+ if (+ action.box.left < siblingBox.right - 0.5 &&+ action.box.right > siblingBox.left + 0.5+ ) {+ problems.push(`${name} overlaps an action-row sibling`)+ }+ }
}
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c1ce05d8-a89f-4cf5-a3d7-e1393f12e413
Commits
Reviewing files that changed from the base of the PR and between 5eac01e and 0b22932.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
…ated Save/Cancel
The queue card's invisible full-text line-count probe overflowed its two-line
row and stretched the queue's scroll range far past the real rows. Clip it to
the card text.
The queued-message editor drew Save and Cancel labels inside 38pt round icon
controls, so translated labels spilled over each other. They are now pills that
hug their label and truncate only when the row runs out of room.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
On the phone, queued chat messages left a big empty box above the composer that you could scroll through, and in the queued-message editor the Save and Cancel words spilled out of their small round buttons and ran into each other in languages like Russian and German. Now the box is exactly as tall as its messages, and Save and Cancel are buttons that fit their words.
What Changed
MobileQueuedCardTextnow clips withoverflow: hidden, so the probe still measures the full text but can't extend the scroll range.sendButton/ghostButton, the 38 pt round controls meant for icons, so any label longer than about three letters overflowed. They are now label pills (sendLabelButton,ghostLabelButtonincomposer-input-styles) that size to their text, and live in a smallMobileNativeChatEditActionscomponent. If a row ever runs out of room (a 320 pt phone in de/es/fr/ru), the labels end in an ellipsis instead of overlapping.editSessionis only passed byMobileQueuedMessageComposer, which never passesstop, so the old "Stop takes Save's slot" branch was unreachable. Save also gained the button role and disabled state that Cancel already had.Why
MobileQueuedCardText, so clipping it at its own wrapper fixes every list that shows a card (plain and drag reorder) without touching the shared scroller or its height cap.Linked Issue
Fixes #36554
Fixes #36604
Visual Proof
Rendered from the real components in Chromium (the Android WebView engine), main on the left and this branch on the right.
Queue, two messages, scrolled to the end
Queued editor at 360 pt, Russian
Queued editor at 360 pt, German
Last-resort case: 320 pt, Russian (labels truncate, nothing overlaps)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New
config/scripts/mobile-web-app/mobile-web-app-queued-messages-render.test.mjs(Chromium and WebKit). It checks that the queue scrolls only as far as its rows, in plain and drag-reorder mode, and that whole Save and Cancel labels sit inside their own buttons without overlapping at 360 pt in every shipped locale. All six cases fail on main (1,172 / 1,752 px of extra scroll; English "Cancel" already spills out of its button) and pass on this branch.Measured at 320/360/390 pt across all 11 locales in both engines. Everything fits at 360 and 390. At 320, de/es/fr/ru truncate with an ellipsis and nothing overlaps.
Focused mobile tests for the queue, the queued editor and the composer pass (149 tests, including the dependents
test-dependents.shlisted).check:code-quality:changedandcheck:react-doctor:changedare clean.Not run on a physical phone. The captures come from the real components rendered in the same engines the app's WebViews use.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Mobile-only layout change: no wire, host, SSH or desktop impact. Separate, pre-existing issue found while testing: react-native-web never fires
onTextLayout, so on the page "Show more" never appears for a long queued message. That will be a follow-up.Waiting for blessing (changes how the queued editor looks). To try it: on the phone, queue two messages while an agent works, one of them long; the panel is as tall as its rows and scrolling stops at the last one. Then open a queued message's More menu, pick Edit, and switch the app language to Русский or Deutsch: Cancel reads as text and Save is a filled pill sized to its word. Worktree:
/Users/kelvinamoaba/orca/workspaces/orca/mobile-queued-messages-36554-36604.Mobile verifyis red because of main, not this PR:src/platform/dictation-capture-bridge-budget.test.tsxhas failed on main since #36922 (main's Mobile Checks run 41285348129).PR checks passedis green on this head.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)