Repository navigation
Add the ai-chat-acp viewer: part rows, permission card, session bar (#4292 C10) - #4308
Merged
Merged
Conversation
…4292 C10) A third chat subtype viewer, registered in corePlugins. It derives the conversation from the chat's message children (one row per ACP part: text, thinking, tool call, plan, system notice) and renders the live session state a supplied source holds in memory: the pending permission request, the turn, context usage and the session controls. The permission card offers only the once-only choices and a cancel. Gated by the AI chat Labs flag. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…, cover a bare tool_call part in the viewer Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… the ACP viewer in the pin guard Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s handling, no card for an ended session Review follow-ups: the card no longer shows the agent-supplied option name (only NodeSpace's own Allow once / Reject once), a rejected or throwing answer is shown and can be retried, focus moves to the card when it appears and off it when it is answered or leaves, no card renders for an ended session, and the browser tests drive it with real key events and test the answered guard and the disabled attribute independently. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mstomar125
force-pushed
the
issue-4292-c10-acp-viewer
branch
from
November 19, 2026 10:10
f30722a to
1920b8d
Compare
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.
Core item C10 of #4292: the third chat viewer, for
ai-chat-acp, developed against fixtures. No type, schema or wire change beyond the three review nits below; nothing underpackages/agent, daemon session code or session proto is touched.Base: this PR targets
main. C6 (#4304) has landed, so it is based on current main with no stacked dependency.What it adds
ai-chat-acp-node-viewer.svelte, registered as the third viewer (aiChatAcpNodePlugin). It derives the conversation from the chat's message children and renders one row per ACP part: user and reply text (existingChatMessage), thinking (collapseddetails), tool call (kind, title, status in words; updated in place), plan (Markdown fromcontent, open by default), system notice (stop reasons, permission answers).sessionprop (AcpSessionSourceintypes/acp-session.ts): pending permission request, turn running, context usage, error, and controls (send, stop, end, resume). With no source the viewer is a read-only view of the stored conversation; nothing here talks to a daemon.cancelled; anallow_always,reject_alwaysor unknown option kind is never shown. Native buttons, labelled group,role="alert"so it is announced, each choice named in words (not colour alone), answers once per request.tests/helpers/acp-session-fixture.svelte.ts(scripted session, four-option permission request).Review nits folded in from #4304: re-wrapped the schema comment,
part_kinddoc now says "absent for a whole message" (and that atool_callpart may carry notool_*fields), TS regenerated; the viewer renders a baretool_callpart ("Tool call", "Tool", "Waiting") with a fixture and test.Tests:
bun run quality:fixclean (eslint, design tokens, svelte-check, cargo fmt, clippy), run again after the follow-ups with no changes; full frontend (5789) and browser (219) suites green; types:check, shape:check, node-types:check and core/types nextest (3545) green earlier on the Rust diff (comment/doc only). New: 32 viewer tests, 9 util tests, 6 real-browser tests (focus on the card, Tab order and Enter/Space with real key events, focus off the page after an answer, the answered guard and the disabled attribute each proven alone), plugin registry updates. Mutation checks: 35 frontend mutants in all, every one killed after adding tests for the survivors (two survivors in the follow-up round: onAnswered focus hand-off and the per-request key).Low follow-ups noted, no change now: the card's alert re-reads when "Answer sent." appears (consider live region on that note only); the conversation is
role=listwith non-listitem children (as in the native viewer); no virtualisation for huge plans (as in the native viewer); the header still renders with the Labs flag off.Part of #4292 (does not close it).
🤖 Generated with Claude Code