Skip to content

fix(mobile): keep quick-commands button steady while capabilities load - #9979

Merged
brennanb2025 merged 5 commits into
mainfrom
brennanb2025/quick-commands-button-steady
Jul 22, 2026
Merged

brennanb2025 merged 5 commits into
mainfrom
brennanb2025/quick-commands-button-steady

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The tab-row quick-commands button rendered only after the status.get capability probe resolved true. 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:

  • Support confirmed → open the Quick Commands sheet.
  • Host confirmed unsupported → explain that a desktop update is required.
  • Probe still resolving → explain that desktop capabilities are still being checked.
  • Disconnected / create in flight → remain disabled, matching the adjacent New Tab button.

The sheet still opens only after support is confirmed because older hosts strip agentPrompt from terminal creation.

Screenshots

Supported host: stable button Supported host: sheet opens Unsupported host: actionable toast
Quick Commands button in the tab row Quick Commands sheet Desktop update required toast

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 typecheck
  • pnpm exec oxlint app/h/[hostId]/session/[worktreeId].tsx src/session/quick-commands-tab-stability-source.test.ts
  • pnpm exec oxfmt --check app/h/[hostId]/session/[worktreeId].tsx src/session/quick-commands-tab-stability-source.test.ts
  • Live iOS Simulator QA against a supported desktop runtime and a capability-less mock host.

Notes

Cross-platform and SSH behavior is unchanged: capability decisions still come from the connected host runtime and do not assume local execution.

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

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@brennanb2025, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c84513fd-02e3-4a9b-b8c9-50194425d22c

📥 Commits

Reviewing files that changed from the base of the PR and between 0e40ac2 and feddf4e.

📒 Files selected for processing (1)
  • mobile/src/session/quick-commands-tab-stability-source.test.ts
📝 Walkthrough

Walkthrough

The session tab bar now always renders QuickCommandsTabButton, preventing layout changes during capability probing. Pressing it opens quick commands when supported, shows an update-required toast when unsupported, and shows a capability-checking toast while support remains unknown. Added source-based tests verify the stable tab structure and require confirmed support before displaying the quick-commands sheet.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: keeping the quick-commands button mounted while capabilities load.
Description check ✅ Passed The description is mostly complete and covers the required content, though it uses Problem/Fix instead of the template's Summary heading.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

❤️ Share

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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: daa5cfc9-b1d6-43f8-a318-543e20eb9f2a

📥 Commits

Reviewing files that changed from the base of the PR and between aae4beb and 0e40ac2.

📒 Files selected for processing (2)
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/session/quick-commands-tab-stability-source.test.ts

@brennanb2025
brennanb2025 merged commit 11310ee into main Jul 22, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant