fix(chat,examples-chat): interrupt panel visual pass — one source of truth, clean reason text, theme-aware#293
Merged
Merged
Conversation
…truth, clean reason text, theme-aware - Remove inline <chat-interrupt> primitive from the chat composition. The docked <chat-interrupt-panel> in the demo shell is the canonical action surface; the primitive is still exported via public-api for downstream consumers who want to render it themselves. - Replace raw JSON envelope dump with a human-readable reason. The panel now reads `value.reason` when it's a string, plain string values, or falls back to a pretty-printed JSON dump only as a last resort. - Use the existing chat tokens throughout the panel (--ngaf-chat-surface, --ngaf-chat-text, --ngaf-chat-text-muted, --ngaf-chat-separator, --ngaf-chat-warning-text) so the panel respects light/dark themes instead of being dark-only. - Refresh button hierarchy: Accept primary (filled), Edit/Respond secondary (bordered), Ignore tertiary (muted text). New --primary/--secondary/--tertiary BEM modifiers. - Demo-shell layout: clear the input + subagents strip via bottom: calc(80px + var(--demo-shell-interrupt-offset, 0px)); bump z-index to 999 (under search palette); drop the dark hardcoded bg. - Fix: hydrate pending interrupts from history on thread reload. The stream-manager bridge now projects tasks[i].interrupts from the latest checkpoint onto interrupt$ / interrupts$ when refreshHistory runs, so reloading a paused thread re-renders the interrupt panel instead of silently letting the user send a message into a BadRequestError. - Update smoke checklist with the new acceptance criteria.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Visual + UX pass on the agent-interrupt surface, plus a hydration bug fix surfaced during the smoke walk.
Fixes
<chat-interrupt>primitive from inside<chat>. The docked<chat-interrupt-panel>(rendered by the demo-shell) is now the only place the interrupt UI shows. Thechat-interruptprimitive remains a public-api export for consumers who want to render it themselves.{"type":"approval_request","reason":"..."}). It pulls outvalue.reasonwhen it's a string, accepts plain string values, and only falls back to a pretty JSON dump as a last resort. Title also normalized to "Agent paused" (matching the primitive's vocabulary).--ngaf-chat-surface,--ngaf-chat-text,--ngaf-chat-text-muted,--ngaf-chat-separator,--ngaf-chat-warning-text. Light/dark themes both render correctly.bottom: calc(80px + var(--demo-shell-interrupt-offset, 0px)), withz-index: 999(below the search palette at 1000), and drops the hardcoded dark bg — the panel itself owns its surface color via tokens.--primary/--secondary/--tertiaryBEM modifiers.refreshHistoryin the langgraph stream-manager bridge didn't projecttasks[i].interruptsfrom the latest checkpoint ontointerrupt$/interrupts$. So reloading a paused thread silently lost the pending-interrupt signal, and the next user message hit aBadRequestError. NewhydrateInterruptsFromHistoryhelper fixes that.Smoke checklist
Updated
examples/chat/smoke/CHECKLIST.mdInterrupts section to cover all six items above.Test plan
npx vitest run --root libs/chat— 640 tests pass across 85 filesnpx vitest run --root libs/langgraph— 144 tests pass across 10 filesnpx nx build chat— cleannpx nx lint chat— cleannpx nx build examples-chat-angular— cleannpm run generate-api-docs— clean