Repository navigation
fix(mobile): keep quick-commands button steady while capabilities load - #9979
Conversation
The tab-row quick-commands button only rendered once the capability probe resolved true, so it popped in after the row was already visible (and vanished during reconnect re-probes). Render it whenever support is not confirmed absent and disable it until the probe settles — pre-quick-commands hosts strip agentPrompt, so the action (not the button) must wait for confirmation. Confirmed-unsupported hosts still hide it entirely.
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe session tab bar now always renders 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
Per feedback on the disabled/hidden states: the button now always renders and stays tappable. Tapping against a desktop that confirmed no support shows "Desktop update required for quick commands" (mirroring the browser streaming copy); tapping while the capability probe is still resolving says to try again in a moment. The sheet still opens only once support is confirmed, since pre-quick-commands hosts strip agentPrompt.
Add a focused source-contract test for the always-mounted tab action and confirmed-support sheet gate. Keep the non-obvious safety comment concise, and remove PR screenshots now hosted as GitHub user attachments.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: daa5cfc9-b1d6-43f8-a318-543e20eb9f2a
📒 Files selected for processing (2)
mobile/app/h/[hostId]/session/[worktreeId].tsxmobile/src/session/quick-commands-tab-stability-source.test.ts
stablyai#9979) * fix(mobile): keep quick-commands button steady while capabilities load The tab-row quick-commands button only rendered once the capability probe resolved true, so it popped in after the row was already visible (and vanished during reconnect re-probes). Render it whenever support is not confirmed absent and disable it until the probe settles — pre-quick-commands hosts strip agentPrompt, so the action (not the button) must wait for confirmation. Confirmed-unsupported hosts still hide it entirely. * fix(mobile): explain unsupported quick commands on tap instead of hiding Per feedback on the disabled/hidden states: the button now always renders and stays tappable. Tapping against a desktop that confirmed no support shows "Desktop update required for quick commands" (mirroring the browser streaming copy); tapping while the capability probe is still resolving says to try again in a moment. The sheet still opens only once support is confirmed, since pre-quick-commands hosts strip agentPrompt. * docs(pr): add QA screenshots for quick-commands button states * test(mobile): lock quick-commands button stability Add a focused source-contract test for the always-mounted tab action and confirmed-support sheet gate. Keep the non-obvious safety comment concise, and remove PR screenshots now hosted as GitHub user attachments. * test(mobile): structurally guard quick-command action mount
Problem
The tab-row quick-commands button rendered only after the
status.getcapability probe resolvedtrue. While the probe was pending, the button was absent, so it popped into the tab row after load and disappeared/reappeared during reconnect re-probes.Fix
Always render the button and handle capability state on tap:
The sheet still opens only after support is confirmed because older hosts strip
agentPromptfrom terminal creation.Screenshots
AI Review Report
Reviewed the supported, unsupported, probing, disconnected, reconnect, and create-in-flight paths. Added a deterministic regression test that holds the button mount constant while verifying that the sheet remains capability-gated.
Performance Audit
No new RPCs, timers, subscriptions, polling, list scans, or render-time derived work. The existing single retrying capability probe is unchanged; the only steady-state cost is one small tab action that was already mounted on supported hosts.
Security Audit
The action continues to fail closed: unsupported and unresolved hosts cannot open the sheet or launch an agent prompt. No new input, persistence, transport, or authorization surface is introduced.
Testing
pnpm test src/session/quick-commands-tab-stability-source.test.ts src/terminal/quick-commands.test.ts src/transport/runtime-capability-probe.test.ts— 15 tests passed.pnpm typecheckpnpm exec oxlint app/h/[hostId]/session/[worktreeId].tsx src/session/quick-commands-tab-stability-source.test.tspnpm exec oxfmt --check app/h/[hostId]/session/[worktreeId].tsx src/session/quick-commands-tab-stability-source.test.tsNotes
Cross-platform and SSH behavior is unchanged: capability decisions still come from the connected host runtime and do not assume local execution.