Skip to content

Keep the queue steer shortcut aligned with displayed messages - #37166

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/lt1031-queue-steer
Nov 1, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/lt1031-queue-steer

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​90 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​86
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

Dragging a queued message to the top of native chat could leave Cmd/Ctrl+Shift+Enter sending the message that used to be first. The same shortcut could also send a card's saved text while its inline editor held unsaved changes.

The shortcut now targets the first displayed card, including while a reorder is waiting for the host to publish it. While the first card is being edited, the shortcut does nothing. Save or Cancel restores it. Editing a later card leaves the first card's shortcut available. The composer draft and the editor's unsaved text are preserved.

Plan: use the displayed queue as the source for shortcut selection, and check whether that card is the one being edited. No saved fields, wire changes, or implicit save-and-send behavior. The ordering plan received independent review and a fresh check before implementation.

Intended difference from the common pattern: the shortcut remains available while a reorder is pending and sends the displayed card's explicit ID. STA-13165 explicitly requires this window; the host processes changes one at a time per session. Intended edited-head protection: STA-13119 requires preserving unsaved text when this shortcut is pressed from the main composer. Queued-message editing retains its existing inline Save/Cancel; the shortcut does nothing for the card being edited (STA-13119).

Review path: full.

QA classification: Native chat UI, qa=tests. Renderer tests cover a move in flight, an accepted move before host publication, unsaved edits on the first or a later card, and the existing shortcut on an unedited first card while a later card is edited. Existing named queue, edit, reorder, and keyboard tests cover surrounding behavior. No agent transport code changes. No phone change: mobile actions already send explicit card IDs and have no steer-head shortcut.

Tracked in STA-13165 and STA-13119.

Intended, pre-existing: inside the inline editor, the steer-head chord does nothing; use Save to update the queued text. This PR preserves that behavior.

Intended, pre-existing and unchanged: a press is refused only when that same message already has an action on its way, not while a different message is busy; host, capability and session checks still gate the shortcut as before, because desktop and paired hosts can run different versions.

Validation: the new tests fail on main (3 of 16: both reorder windows send the old first message, and the shortcut sends the edited first message's saved text) and pass on this branch (16 of 16). The six named queue-message, reorder, inline-edit, list and platform-shortcut test files pass (117 tests). CI tests and packaging pass.

@brennanb2025
brennanb2025 marked this pull request as ready for review November 1, 2026 21:37
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: a7ea7c02-2d2e-4d56-bfd4-d8c949574ca8
Commits

Reviewing files that changed from the base of the PR and between 17a857a and 44efebe.

Files selected for processing: 2
  • src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.ts

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: 32dff1cb-866b-4127-a92e-0960ce5d94d8
Commits

Reviewing files that changed from the base of the PR and between 0fa5dae and 17a857a.

Files selected for processing: 2
  • src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-queued-messages.ts

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

Walkthrough

steerHead now selects the head card from the current reordered cards and refuses to steer while that card is being edited. Tests cover steering during pending and accepted reorder previews, the selected message ID, and editing the head or another card.

Merge Risk: Minimal · previous review 17a85

No actionable merge-blocking risk was identified in the queue-steering change.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% 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. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes aligning the queue steer shortcut with displayed messages.
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.
Description check Passed The description is detailed and covers most of the required template content. It explains the user-facing before and after: the Cmd/Ctrl+Shift+Enter shortcut now targets the first displayed card, incl…
Full details: Description check

Explanation

The description is detailed and covers most of the required template content. It explains the user-facing before and after: the Cmd/Ctrl+Shift+Enter shortcut now targets the first displayed card, including during a pending reorder, and does nothing while that card is being edited. It gives the mechanism (queue controller selects from the displayed queue and checks the edited card) and the alternatives it avoided (no saved-field, wire, or implicit save-and-send changes). It also covers the testing performed, including new tests that fail on main and pass on this branch, and the platform scope (renderer-only, no phone or agent transport changes). Linked issues are given as STA-13165 and STA-13119, and the description says these are tracked there. Gaps: the 'Fixes #' section is not a GitHub issue link, so the outside-contributor linked-issue requirement is not clearly met. The Visual Proof section is missing; this is a UI/behavior change and the template requires a before/after or a N/A with reason. The Risk section has no explicit Level (Low/Medium/High) and no explicit back-out plan, although the description states that 'Outside risky areas' applies and the change is small. The AI Disclosure, Agent skill upstream boundary checkbox, and checklist items are not addressed. The Testing section lists no manual testing platform and does not tick the manual testing checkbox. Overall the description is mostly complete, with non-critical gaps, so it passes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% 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 2 functions across 2 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.

Share

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review loop status: Keep the queue steer shortcut aligned with displayed messages

The problem. In native chat, Cmd/Ctrl+Shift+Enter sends the first queued message into the running turn. After you dragged a queued message to the top, the list showed the new order right away, but until the host published the move the shortcut still sent the message that used to be first. Separately, if you were editing the first queued message inline, the shortcut sent its old saved text and left your edit stale. Both came from the shortcut choosing its target separately from what the list shows (it read the host's raw order and ignored the open editor).

What changes for users. The shortcut now sends the message shown first, including while a reorder is still on its way. While the first message is being edited, the shortcut does nothing; Save or Cancel brings it back. Editing a later message leaves the shortcut working on the first one. The composer draft and the unsaved edit are kept. Phone has no such shortcut and is unchanged.

Review. Full path, one round: an adversarial correctness reviewer (every caller, the false-return path, scope switches, editor lifecycle, sending/paused/command heads) and an architecture challenger (own design from the tickets, both references, history) each found nothing to fix. A fresh reference comparison found no unlabelled differences. Fixed: nothing needed. Deferred: none.

Verified. The new tests fail on main (3 of 16) and pass on the branch (16 of 16); the six related test files pass (117 tests). CI: green on the merged head 44efebe (Merge origin/main, no conflicts; static analysis and typecheck, all 12 test shards, mac and Windows packaging pass). Review and evidence cover 17a857a; the main merge since changed nothing in this PR's files. QA: tests only (keyboard shortcut selection in the composer; no layout or copy change, so no screenshot).

Not verified. No running-app run; the review typed this flow as renderer-tested.

Differences from the common pattern (intended). The shortcut stays available during a pending reorder and sends the displayed message's ID (the ticket requires that window; the host applies the move and the send one at a time per session, and the send names its message explicitly). The edited first message is protected from the shortcut (the ticket asks for it; neither reference guards this).

For Brennan's review

@brennanb2025
brennanb2025 merged commit 4e235d5 into main Nov 1, 2026
42 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/lt1031-queue-steer branch November 1, 2026 23:58
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