Repository navigation
Agent panel speed: backend reuse, batch tool, long-poll reads, Fast preset - #925
Merged
Merged
Conversation
Enter allows the active card once, Cmd/Ctrl+Enter takes its broadest allow, Esc declines. Hints show on the buttons. Keys in text fields, menus and focused controls are left alone; a card carrying page text and lasting approvals of sensitive sites still need a click.
The command opens the side panel of the tab it was pressed in. On an open panel it moves focus to the message box; pressed there, it closes the panel. Alt+Shift+K is free in Chrome's defaults on every platform (Ctrl/Cmd+E and the tab-search Cmd+Shift+A are taken).
…f sight The side panel plays a short bundled sound when the conversation it shows finishes a turn or starts waiting for approval while the panel is hidden or its window is unfocused, next to the existing notification. Options page: "Play a sound when a task finishes" (ab_turn_sound, storage.sync, default on). The WAV is synthesized, no third-party audio.
…nversations Most of the panel's time to first text is model thinking. A Fast/Thorough button next to the model menu sets a new conversation's reasoning effort (Fast: low for Codex and Claude Code) and, for Claude Code with no model chosen, the Sonnet entry from the CLI's own model menu. Fast is the default; the choice is remembered (ab_panel_speed). An explicit model or effort still wins, and existing conversations keep their options.
… multi-site tasks
A panel-only MCP tool, chrome_use_plan {steps, sites}. Outside full
access its tool call already waits for the user's approval; the panel
renders that request (Claude can_use_tool, Codex MCP elicitation) as a
plan card with the sites and numbered steps, Approve (Enter) and Reject
(Esc) with an optional reason. A Claude rejection carries the reason:
the service accepts a bounded {deny: reason} decision for tool approvals.
Codex's decline has no text, so its reason is not sent. The tool
description tells the model to use it only when the conversation asks
before tools run.
- chrome_use_batch (--tools all): run up to 20 predictable steps in order. Each step goes through the same path as a standalone call (own lease, action id, recorded check, confirmation gate); the batch stops at the first failed or held step and lists the rest as not run. Allowlist of input/navigation/read tools, no nesting, whole batch validated before anything runs, 90 s budget checked per step against its timeout. Two input steps in a row are spaced by a seeded humanized pause (humanize::pause_between_actions), never a fixed sleep. - Panel only: a second single input call in a row gets a one-line hint to use chrome_use_batch, at most once every 6 calls. - chrome_use_snapshot passes --max-bytes (maxChars, default 50000) and --from, and notes a cut tree; chrome_use_read cuts page text at a line break (maxChars, default 50000) in response, stdout and text block. - The final assessment is owed only when the turn's admitted leases include a state-changing action (input, eval, downloads, unknown tools); read-only turns (reads, snapshots, screenshots, navigation, tabs, scroll, hover) end with reason readOnly instead of notAssessed. PROMPT and chrome_use_task description updated; stealth sentence kept.
- Approval keys never answer a card whose view is hidden; Esc from a control outside the card is left to it. - The chime treats the panel as out of sight when the document is hidden or its browser window is not focused (not when the page has focus). - The keyboard command opens the window's panel when per-tab panels are not configured, as notifications do. - The speed preset's model applies only where its chip is offered, and never to the default-model retry. - chrome_use_plan's reply claims no approval (full access and Pi run it unasked); its limits (12 x 150 chars) keep the largest plan under the service's review budget. Service test: the plan stays reviewable and a rejection reaches Claude with the reason.
Capture the MCP client-timeout fixtures for the installed versions. Both close a timed-out chrome_use call as a failed tool with the text client_timed_out matches, before an ordinary completed terminal line, and ignore the late reply; Codex 0.173.0 now also sends notifications/cancelled. List both in GENERATION_REUSE. Tests now check every listed version against its own fixture (handshake version, timed-out call closed before the turn ends, clientTimeout retirement), so an entry without a fixture fails. scripts/verify-backend-reuse.sh captures, redacts and checks the fixtures for whatever claude/codex is installed and prints the entry to add (capture/check-timeout.mjs; redact.mjs now also strips run paths, home, user and host names).
conversationRead takes an optional waitMs (capped at 8 s, inside the service's 10 s, the native host's 12 s and the bridge's 15 s budgets) and answers as soon as the conversation's journal moves past the cursor or its state or queue changes, or empty at the deadline. The wait does not hold the engine lock: the store bumps a watch counter on every journal append and state save, and the read subscribes under the lock before it re-checks. Writes to other conversations wake it but do not end it. At most 4 reads wait at once, since each holds one of the 16 service connection slots; past that a read answers at once with readWaited false. serviceStop wakes waiting reads so they do not hold the exit. Replies carry readWaitMaxMs so panels send waitMs only to services that accept it (older services refuse unknown fields).
… 600 ms Once a read reply carries readWaitMaxMs, the read loop sends waitMs while a turn runs and reads again right after each waited reply, keeping a 150 ms floor between reads so streamed text arrives in batches. Idle conversations keep the 1800 ms cadence; services without readWaitMaxMs keep the 600 ms busy cadence and are never sent waitMs. A failed waiting read stops waitMs until the host reconnects, and failures back off exponentially (30 s cap). Plain reads after an action or on selection run beside a waiting read instead of being skipped, a reply whose cursor was overtaken is read again from the new cursor, and switching conversations restarts the loop so the new selection is not held behind the old waiting read.
… steps, document batch and caps
…ments and long-polled reads Check 21 runs two chrome_use_batch calls through the real MCP: each step gets its own lease, action id and browserActionTarget, and a failing middle click stops the batch (the click after it never reaches the site). Check 22 ends read-only turns (single tools and a batch) without an assessment and expects reason readOnly, and click turns notAssessed. Check 23 counts the side panel's conversationRead requests at the service proxy while a slow turn streams: waitMs reads, far fewer than one per 600 ms, text shown promptly.
|
Caution Review failedThe pull request is closed.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speeds up the agent side panel, based on a study of Claude in Chrome 1.0.109 and 188 recorded panel turns (first text p50 14 s; ~3.5 s per model round trip; cold backend start on every message).
Changes
Stealth: all changes are in the CLI, service and extension pages; nothing page-visible.
Verification