Skip to content

feat(shortcuts): jump to the latest agent needing input - #27256

Open
Mirksen wants to merge 3 commits into
stablyai:mainfrom
Mirksen:feat/jump-to-latest-attention
Open

Mirksen wants to merge 3 commits into
stablyai:mainfrom
Mirksen:feat/jump-to-latest-attention

Conversation

@Mirksen

@Mirksen Mirksen commented Oct 10, 2026 •

Copy link
Copy Markdown

ELI5

Press Cmd+Shift+U on macOS, or Ctrl+Shift+U on Windows/Linux, to open the agent that most recently asked for input. Orca selects its workspace, tab and exact split pane. The request stays pending; the shortcut neither answers it nor grants permission.

What Changed

Before, reaching that request required finding its workspace and pane manually. After, Jump to latest agent needing input provides a configurable default shortcut that also works while a terminal has focus.

The action reads Activity's existing fresh waiting/blocked status and ranks requests by their state start time. Heartbeats and completed historical turns do not move an older request ahead. It skips deleted/archived workspaces, confirmed removed panes, closed tabs and folder paths blocked by the existing activation gate. It validates the original request's execution host before navigating, so losing a remote catalog entry cannot redirect the jump to a same-ID local workspace.

The existing Activity pane activator is extracted and reused for terminal, structured-chat, folder, floating and SSH/remote navigation. For a sleeping target it waits for the already-running restoration gate, then focuses the requested tab and leaf. A newer thread selection or a change of workspace, execution host or view cancels that deferred focus; a blocked gate or missing target never falls back to a sibling tab. With no eligible request or while a dialog owns input, the action does not consume the chord. Remapping, disabling and terminal-first policy use the existing keybinding infrastructure.

Why

This is a direct newest pending request action. Seeing a request does not resolve it, so repeated presses stay on that request until the agent resumes or a newer request arrives.

Related open PRs #21696 and #26280 respectively cycle agents needing input and drain unread results. This action deliberately has neither behavior. Reusing Activity classification and activation avoids a second status source or a separate pane-focus implementation.

Linked Issue

Fixes #27255

Visual Proof

The same isolated macOS fixture contains an older blocked request and a newer waiting request. Before: the binding is disabled and pressing the chord leaves main selected. After: restoring the default and pressing it selects e2e-secondary and highlights the newer waiting agent. Only the synthetic sidebar is captured; no real workspace, account or shell content is included.

Before: disabled After: default enabled
Before After

The Electron test additionally asserts focus on the exact split pane's input, both pending status labels remaining visible, repeat navigation, and every test window remaining hidden.

Testing

  • I manually tested these changes locally — agent-driven Playwright against a built, isolated Electron app on macOS; native OS focus is not claimed.

  • Automated tests added/updated.

  • Two focused Vitest runs passed: 40 tests across selection, activation, bindings and the new command; 19 tests across the new and existing app commands. Five command tests overlap, for 54 distinct tests. Coverage includes heartbeat ordering, answered/stale/unconfirmed requests, read-but-pending requests, removed panes, closed tabs, archived/deleted workspaces, cold SSH tabs, lost remote ownership, folder path gates, floating terminals, structured chats, child visibility, malformed identities, ties, remapping and terminal-first behavior.

  • Review follow-up 3b76d29f: 115 tests passed across seven focused files, including nine new fixtures for deferred terminal/structured focus, stale workspace/host/view/deleted targets, blocked recovery, missing target tabs and superseding selections. Seven assertions failed against the pre-fix activator; all nine fixtures pass with the fix. Existing Activity routing, activation-gate and empty-workspace recovery tests also pass.

  • The five new keybinding tests fail against clean upstream 5fae0fa3 and pass with this change.

  • Renderer typecheck passed: node node_modules/typescript/bin/tsc --noEmit -p config/tsconfig.tc.web.json.

  • Changed-code quality gate, scoped lint, formatting, commit hooks and git diff --check passed.

  • Electron main/preload/renderer build with --mode e2e passed; the bundled CLI also built.

  • Final keyboard acceptance passed: SKIP_BUILD=1 ORCA_BACKGROUND_LAUNCH=1 pnpm exec playwright test tests/e2e/jump-to-latest-attention.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1.

The enhanced screenshot journey initially reached its checks but timed out during fixture cleanup on a heavily loaded host. The final test fixes its renderer clock and allows 180 seconds for isolated profile setup/teardown, while preserving the normal individual UI assertion limits; it passed in 50.9 seconds total. Electron required execution outside the shell sandbox; windows stayed hidden throughout.

Full-repository lint/test/build are not claimed. The broad E2E typecheck reports the same 258 distinct diagnostics on clean upstream and this branch, with none added by these files; these include unrelated cloud dependencies and existing test fixtures. Windows/Linux native UI and live SSH were not run locally; platform keybinding and host-routing behavior have unit coverage.

The follow-up is submitted at 3b76d29f. Upstream workflow approval and CI results are reported separately from local validation; local checks are not presented as upstream CI results.

AI Disclosure

Implemented and reviewed with OpenAI Codex (GPT-6), including an independent source review and agent-driven macOS Playwright acceptance. All status fixtures are synthetic; no live agent reply or permission was sent.

Review

Cross-platform modifiers use Mod and existing matching/label infrastructure. Execution hosts retain status ownership; no process, authentication, IPC, wire protocol, or provider-specific integration is added. Folder and floating workspaces remain supported. Selection runs only when the command is invoked, with existing Activity history bounds and one candidate scan; no polling or new subscriptions. UI styling is unchanged. Review findings on lost remote ownership, blocked folder paths and asynchronous recovery focus were addressed with focused fixtures.

Agent skill upstream boundary

  • Not applicable; no agent skill source, fixtures or registry entries are copied or changed.

Notes

This shortcut is an app/terminal action. Forwarding it from an embedded browser guest is outside this PR. It relies on fresh reported agent status, not inferred terminal text. It does not promise to drain unread badges or resolve a request.

Source was validated on 5fae0fa3; a final upstream fetch found no overlapping changed paths. No release version or installed Orca application is changed.

Author: GitHub @Mirksen. X/Twitter handle: not provided.

Checklist

  • This PR is focused on one user-facing shortcut.
  • Explained the before/after, mechanism and alternatives.
  • Before/after screenshots attached.
  • Reviewed for correctness, security and performance.
  • Cross-platform, SSH/remote and shortcut impact considered.
  • Full pnpm lint, pnpm typecheck, pnpm test and pnpm build — scoped checks and limitations are recorded above; full CI results remain pending.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe1fc4e0-d767-4dab-b1ea-265463b9a925


📥 Commits

Reviewing files that changed from the base of the PR and between 0041f7a and 3b76d29.



📒 Files selected for processing (4)
  • src/renderer/src/components/activity/activity-thread-actions-gated-activation.test.ts
  • src/renderer/src/components/activity/activity-thread-actions.test.ts
  • src/renderer/src/components/activity/activity-thread-actions.ts
  • src/renderer/src/lib/worktree-agent-activation-gate.ts


🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/activity/activity-thread-actions.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
📝 Walkthrough

Walkthrough

Adds a remappable shortcut to jump to the newest reachable agent request that is waiting for input or blocked. The shortcut resolves the target from current agent status, then activates its workspace and thread. When no eligible request exists, the command passes through. Tests cover keybinding behavior, target eligibility, command handling, and end-to-end navigation. Documentation describes platform-specific keys and supported workspace types.



Priority: ⬇️ Low

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 3b76d

The change adds a shortcut that jumps to the newest agent request awaiting input. The incremental changes make the jump wait for pending workspace activation before focusing the exact tab and pane. No merge-blocking risk was identified.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

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 20 functions across 15 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Direct issue #27255 has coding requirements. The PR adds the remappable worktree.jumpToLatestAttention action with the requested Mod+Shift+U default. resolveLatestAttentionThread selects the new…
Out of Scope Changes check Passed The changes remain within issue #27255. The command registration, keybinding definition, activity-thread resolution, activation-gate refactor, documentation, unit tests, and Electron test all implemen…
Title check Passed The title clearly and concisely describes the primary change: adding a shortcut to jump to the latest agent needing input.
Description check Passed The description follows the required template and includes the user impact, implementation details, rationale, linked issue, visual proof, testing results, AI disclosure, review notes, compatibility c…

  • Fix all pre-merge checks with AI
  • 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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e216202-6f63-443f-a325-a70b3992e187
📥 Commits

Reviewing files that changed from the base of the PR and between 3a8f8e1 and 0041f7a.

📒 Files selected for processing (13)
  • docs/site/content/docs/notifications.mdx
  • src/renderer/src/app-shell/app-command-handlers-latest-attention.test.ts
  • src/renderer/src/app-shell/app-command-handlers.ts
  • src/renderer/src/app-shell/latest-attention-command.ts
  • src/renderer/src/components/activity/activity-event-builder-context.ts
  • src/renderer/src/components/activity/activity-thread-actions.ts
  • src/renderer/src/components/activity/latest-attention-thread.test.ts
  • src/renderer/src/components/activity/latest-attention-thread.ts
  • src/shared/keybindings-latest-attention.test.ts
  • src/shared/keybindings/definitions-core-4.ts
  • src/shared/keybindings/types.ts
  • src/shared/plugins/plugin-command-actions.ts
  • tests/e2e/jump-to-latest-attention.spec.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.

Comment thread src/renderer/src/components/activity/activity-thread-actions.ts

This branch has not been deployed

No deployments
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.

[Feature]: Direct shortcut to the latest pending agent input request

1 participant