Skip to content

Allow saving quick command lists beyond forty - #32972

Merged
AmethystLiang merged 3 commits into
mainfrom
bug-saving-quick-commands-stopped-working
Oct 24, 2026
Merged

AmethystLiang merged 3 commits into
mainfrom
bug-saving-quick-commands-stopped-working

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​439 $\color{#cf222e}{\Huge{\mathbf{−}}}$​126 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​313
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100 $\color{#cf222e}{\Huge{\mathbf{−}}}$​78 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22

Problem

Saving a new quick command stopped working after 40 saved commands, including commands tied to missing projects.

Solution

Remove the 40-command limit for current clients. Older paired clients safely receive only the commands they can read, so they cannot overwrite hidden commands.

ELI5

You can now keep adding quick commands instead of hitting a small hidden limit.

What Changed

  • Preserve and save quick-command lists larger than 40 entries.
  • Allow desktop and mobile to create commands beyond 40.
  • Add capability-based compatibility for older paired clients.

Why

The old limit blocked saves even when existing commands were no longer useful. Compatibility filtering keeps older clients safe while current clients can use full lists.

Linked Issue

Fixes #32933

Visual Proof

N/A — this removes a save restriction without changing the visual design.

Testing

  • Added and updated automated coverage for lists over 40 commands, persistence, concurrent additions, mobile saving, and legacy-client compatibility.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

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

Considered backwards compatibility for paired older clients; no platform-specific path or shortcut changes.

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)

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 8224b1e5-c2f0-45e7-9312-9f44327cda49
Commits

Reviewing files that changed from the base of the PR and between a749fa7 and 1d58628.

Files selected for processing: 2
  • src/main/runtime/rpc/methods/terminal-quick-command-client-capabilities.test.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-client-capabilities.ts

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

Quick commands can now be normalized, stored, and added beyond 40 entries. RPC responses and mutations apply capability-based compatibility rules for clients that do not support long prompts or large lists. Desktop, remote, web, and CLI clients advertise large-list support. The mobile quick-command sheet no longer blocks creation at 40 commands.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 1d586

Older clients can no longer overwrite a quick command hidden by its long prompt through this RPC path. No actionable merge-blocking issue remains.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 16 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Inconclusive The description follows the template and covers ELI5, What Changed, Why, Linked Issue (Fixes #32933), Visual Proof (N/A with reason), Testing, and Notes. Several items are incomplete. The 'AI Disclosu… Complete the following items. (1) Fill in the AI Disclosure section, or state that it does not apply. (2) Fill in or remove the empty Review section. (3) State which platforms were tested (macOS, Linux, Windows, SSH), or confirm that no man…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "Allow saving quick command lists beyond forty" matches the main change. The diff removes the 40-command cap (MAX_QUICK_COMMANDS) from the shared normalizer, the runtime settings controller,…
Linked Issues check Passed Issue #32933 requires quick-command saves to keep working after the former 40-command limit, including commands linked to missing projects. The PR removes the 40-command cap in src/shared/terminal-qui…
Out of Scope Changes check Passed All changed areas support issue #32933. Changes include: removal of the 40-command cap in shared parsing, runtime settings, and mobile UI; the new large-lists runtime capability constant and its inclu…
Full details: Title check

Explanation

The title "Allow saving quick command lists beyond forty" matches the main change. The diff removes the 40-command cap (MAX_QUICK_COMMANDS) from the shared normalizer, the runtime settings controller, and the mobile and desktop sheets. It adds capability-based projection so older paired clients see at most 40 commands. The title is short, specific, and describes the user-facing effect.

Full details: Linked Issues check

Explanation

Issue #32933 requires quick-command saves to keep working after the former 40-command limit, including commands linked to missing projects. The PR removes the 40-command cap in src/shared/terminal-quick-commands.ts (MAX_QUICK_COMMANDS removed, normalization no longer stops at 40). It removes the controller-level 'Quick command limit reached' check in src/main/runtime/runtime-client-settings.ts and the mobile canAdd gating in QuickCommandsList.tsx and QuickCommandsSheet.tsx. Tests cover a 100-command list being stored unchanged (terminal-quick-commands.test.ts, settings-update tests, including missing-project commands), concurrent additions (paired-settings.spec.ts), desktop add at 40 (terminal-quick-command-hosts.test.ts), and mobile add with a disabled-free add row. Older paired clients that lack the new large-lists capability are protected. src/main/runtime/rpc/methods/terminal-quick-command-client-capabilities.ts projects at most LEGACY_MAX_QUICK_COMMANDS (40) for them, and assertTerminalQuickCommandMutationReadableForClient rejects only mutations that the client could not read, with an explicit update message. Current clients (desktop renderer, web, and remote-runtime capability lists) advertise TERMINAL_QUICK_COMMAND_LARGE_LISTS_RUNTIME_CAPABILITY and receive full lists. The previous PASS conclusion remains supported by the current code at the reviewed head.

Full details: Out of Scope Changes check

Explanation

All changed areas support issue #32933. Changes include: removal of the 40-command cap in shared parsing, runtime settings, and mobile UI; the new large-lists runtime capability constant and its inclusion in desktop, web, and remote-runtime capability lists; the new RPC projection and mutation-readability guard in terminal-quick-command-client-capabilities.ts, wired into settings.getTerminalQuickCommands and settings.updateTerminalQuickCommands in client-ui.ts; and tests for these paths. The long-prompt projection file and its test file are removed. Their logic is consolidated into the new client-capabilities module and tested in terminal-quick-command-client-capabilities.test.ts, so this is a refactor that supports the same compatibility path. The LEGACY_MAX_QUICK_COMMANDS export and the MAX_QUICK_COMMANDS removal are directly tied to the cap. No unrelated product area is changed.

Full details: Description check

Explanation

The description follows the template and covers ELI5, What Changed, Why, Linked Issue (Fixes #32933), Visual Proof (N/A with reason), Testing, and Notes. Several items are incomplete. The 'AI Disclosure' section is empty. The 'Review' section is empty. The 'Self-reviewed for correctness, security, and performance' box and the 'pnpm lint, typecheck, test, and build' box are unchecked. The manual testing box is unchecked, and the Testing section does not list platforms tested. The 'Problem' and 'Solution' sections are not in the template, but they are useful. The Notes section does not address the security, cross-platform, Remote SSH, or mobile items listed in the template.

Resolution

Complete the following items. (1) Fill in the AI Disclosure section, or state that it does not apply. (2) Fill in or remove the empty Review section. (3) State which platforms were tested (macOS, Linux, Windows, SSH), or confirm that no manual test was run. (4) Confirm that pnpm lint, typecheck, test, and build pass, or state that CI covers them. (5) Check or explain the unchecked self-review item. (6) In Notes, address the template's review points: security, cross-platform support, Remote SSH, mobile, backwards compatibility, and performance. The Testing section lists mobile and legacy-client coverage, but the other points are not covered.

Finishing Touches: 💡 1
📝 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.

❤️ Share

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

@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
  • 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: b7945e9c-674c-4adf-a2e4-b92481ca90cb
📥 Commits

Reviewing files that changed from the base of the PR and between 4687e90 and 2a626735548045201c09520dc4accae4d8a4a351.

📒 Files selected for processing: 23
  • mobile/src/session/QuickCommandsList.test.ts
  • mobile/src/session/QuickCommandsList.tsx
  • mobile/src/session/QuickCommandsSheet.test.ts
  • mobile/src/session/QuickCommandsSheet.tsx
  • mobile/src/terminal/quick-commands.ts
  • src/cli/runtime/websocket-transport.test.ts
  • src/main/ipc/desktop-renderer-runtime-capabilities.ts
  • src/main/persistence/applying-settings/settings-update-terminal-quick-commands.test.ts
  • src/main/runtime/orca-runtime-test-mocks.spec.ts
  • src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts
  • src/main/runtime/orca-runtime-tests/paired-settings.spec.ts
  • src/main/runtime/rpc/methods/client-ui.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-client-capabilities.test.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-client-capabilities.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-long-prompt-capability.test.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-long-prompt-capability.ts
  • src/main/runtime/runtime-client-settings.ts
  • src/renderer/src/store/slices/terminal-quick-command-hosts.test.ts
  • src/shared/remote-runtime-client-capabilities.ts
  • src/shared/terminal-quick-command-capabilities.ts
  • src/shared/terminal-quick-commands.test.ts
  • src/shared/terminal-quick-commands.ts
  • src/shared/web-runtime-client-capabilities.ts
💤 Files with no reviewable changes: 7
  • src/main/runtime/orca-runtime-test-mocks.spec.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-long-prompt-capability.ts
  • src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts
  • src/main/runtime/rpc/methods/terminal-quick-command-long-prompt-capability.test.ts
  • mobile/src/terminal/quick-commands.ts
  • mobile/src/session/QuickCommandsList.test.ts
  • src/main/runtime/runtime-client-settings.ts

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

@AmethystLiang
AmethystLiang force-pushed the bug-saving-quick-commands-stopped-working branch from 2a62673 to a749fa7 Compare October 24, 2026 00:10
@AmethystLiang
AmethystLiang force-pushed the bug-saving-quick-commands-stopped-working branch from a749fa7 to 1d58628 Compare October 24, 2026 06:12
@AmethystLiang
AmethystLiang merged commit 42f59f3 into main Oct 24, 2026
60 checks passed
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.

[Bug] Saving quick commands stopped working

1 participant