Replace the catalog's fixed PendingTable node with a general Transactions node
that takes a status filter (all | pending | approved | denied, default all);
the agent picks the slice when composing a report and the client binds live
data via useReportData(). render_report's `pendingTable: boolean` param becomes
`transactions: <status>` (presence includes the table). The shared
TransactionsList component and the chat's showPendingApprovals flow are
unchanged — only the A2UI catalog node is generalized.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Post-gate cleanup on the A2UI re-architecture: type the op-builder test helpers
instead of `as any`, disable react/no-children-prop on the RendererProps
render-callback in the StatCard test, drop the manual useMemo in useReportSurface
(the React Compiler can't preserve it; downstream consumers guard on values), and
apply prettier.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The spec described the abandoned render_a2ui/mirror/injectA2UITool:true path.
Update its docblock + fixture to the render_report backend-tool flow
(injectA2UITool:false, ops detected from the tool result, canvas reads the
agent message stream). Still test.fixme — the aimock fixture isn't wired into
aimock-server.mjs and no headless green run is confirmed; the live path is
verified manually.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The injectA2UITool:true path stalled: it forced the reasoning agent (gpt-5.4)
to author the full A2UI component JSON inline via the injected tool's streamed
args, so RUN_FINISHED never fired and the surface hung at status:'building'.
Adopt the pattern both working a2ui-canvas apps use (pdf-analyst, genaiui
apartment-finder): injectA2UITool:false + an agent tool that returns
a2ui_operations, which the middleware detects and renders. Adapted to the
built-in TS agent + our bounded catalog:
- render_report: a BuiltInAgent backend tool (execute server-side) taking a
small selection {title,kpis,charts,pendingTable,summary}; a deterministic
op-builder expands it into A2UI v0.9 ops. The reasoning model emits only the
tiny selection, so generation is instant — no stall.
- ReportCanvas now reads the latest a2ui-surface activity ops from the agent
message stream (useReportSurface) and renders via A2UIProvider +
SurfaceMessageProcessor + A2UIRenderer with the banking catalog + live
useReportData. Deletes the legacy surface-bus + mirror-renderer relay.
- CanvasProvider derives active-surface from the stream + a local dismiss.
- wrapper: status-only a2ui-surface renderer (handoff pill); drop includeSchema.
Verified live: report prompt paints KPIs + charts on the canvas with live
figures, run completes in ~100ms, zero console errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Post-review cleanup: remove the write-only surfaceIdRef in ReportCanvas
(surfaceId is read from the bus snapshot at render) and switch renderers.tsx
from direct clsx to the app-wide cn helper.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
new LLMock({ fixtures }) stores options but never copies fixtures into the
server, so the mock served 0 fixtures and every agent LLM turn 404'd. Register
the loaded fixtures with server.addFixtures() and report the served count.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A fresh build of the Intelligence composite from current HEAD restricts memory
kind to {semantic, episodic, procedural} and rejects the legacy "operational"
kind the demo was written against (verified: operational -> HTTP 400, procedural
-> 201 against the freshly-built local composite). Migrate the over-limit
procedure write + agent prompts + inspector + unit test/e2e seed/fixture to the
project-scoped "procedural" kind so the demo works on a fresh local build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First real run of the e2e (browser was never installed) surfaced that both
tests assumed the chat was already open. The docked CopilotSidebar starts
closed, so getByRole('textbox') had nothing to fill. Open it via the 'Open chat'
launcher first, and target the input by its 'Type a message...' placeholder
(robust against the Memory tab's recall input). Selectors verified live against
the running app via Playwright.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pre-existing: `next build` failed type-check on chat-inbox.tsx's
`style={{ "--inbox-width" }}` (not allowed by React.CSSProperties without a
cast). Unrelated to Glass Engine; surfaced while running the build gate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The durable-memory demo depends on the Intelligence platform's recall_memory /
save_memory tools, which are served from `${apiUrl}/mcp` and attached to the
local BuiltInAgent run via MCP middleware ONLY when CopilotKitIntelligence is
constructed with `enableEnterpriseLearning: true` (gated in
attachIntelligenceEnterpriseLearning). The banking route never set the flag, so
in any real (non-aimock) run the memory tools never loaded: save_memory was a
no-op during teaching and recall_memory was absent, making the agent re-offer
workflow recording on every over-limit charge instead of recalling the learned
procedure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The teach-flow's multi-step tool sequencing is the weak spot for the mini model;
the non-mini gpt-5.4 follows the recall->offer->demonstrate->save routing far
more consistently. openai/gpt-5.4 is the alias already used across the repo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
My collapse fix branched on isRecording, but the render closure captures a stale
isRecording (false), so clicking 'Start recording' wrongly collapsed the card to
'Okay — not recording.'. Branch on the resolved `result` instead (fresh on
complete, like the save card): onDeny resolves 'declined' -> 'not recording';
onApprove resolves the directive -> 'Recording started'. Drops the now-unused
isRecording destructure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 'Record a workflow?' card appeared inconsistently because two intro prompt
lines still steered the agent the wrong way on an over-limit approve — 'review
... over-limit charges -> showPendingApprovals' and 'showApprovalFlow -> explain
how an over-limit charge gets cleared' — competing with the recall->offer block.
Scope both to browse/explain only and exclude them from the approve path, and
drop the agent temperature 0.3 -> 0 so it picks the same route every time.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Same lingering-button bug as the offer card: saveLearnedWorkflow and
awaitDashboardDemonstration only special-cased status 'inProgress', so after
clicking 'Save workflow' / 'I'm done' the card kept its button (confusing —
looked like nothing happened, though the save/respond went through). Add a
status 'complete' branch that collapses each to a static line, using the HITL
render's 'result' to show saved vs discarded / finished vs cancelled.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
On 'approve the over-limit charge' with no saved procedure, gpt-5.4-mini
sometimes called showApprovalFlow ('diagram of how to clear an over-limit
charge') or showPendingApprovals ('...including over-limit charges') instead of
recall_memory -> offerWorkflowRecording, so it never asked to record. Scope
those two tools to their real uses (explainer only when asked how it works;
queue only for reviewing pending) and explicitly exclude them from the
over-limit approve path. The approval-flow diagram stays as an informational
tool — just not a response to an approve request.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After 'Start recording', offerWorkflowRecording resolved a bare 'started', so
gpt-5.4-mini often just SAID awaitDashboardDemonstration's 'go ahead and I'll
watch' line (from its description) instead of CALLING it — leaving the offer
card frozen with the Start-recording button and a confusing text reply, even
though recording (the vignette) had begun.
- Resolve a directive result telling the agent to immediately call
awaitDashboardDemonstration and not reply in prose (mirrors the working
awaitDashboardDemonstration -> saveLearnedWorkflow beat).
- Collapse the offer card to a static line once resolved (status 'complete')
so the button can't linger or be re-clicked; the live 'Recording your
workflow' card takes over.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalizes the row-action dropdown fix: every shadcn overlay (Select,
DropdownMenu, Popover, Tooltip) portals to <body> at z-50 and renders behind
the CopilotKit chat sidebar (z-1200) when opened in-chat — the policy-code
Select in the exception form hit this too. One globals.css rule lifts every
Radix popper wrapper to z-1300 (the file's existing 'above the chat panel'
value), fixing the whole class instead of per-component patches.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 'More actions' menu portals to <body> at z-50, but the CopilotKit chat
sidebar is z-1200 — so the menu opened BEHIND the panel and was invisible
(clicking the three-dots appeared to do nothing). Lift this dropdown's content
to z-[1300] so it renders in front of the panel. Pairs with the earlier
pointer-events-auto fix; together the row's overflow menu works in-chat.
Verified: menu computed z-index is now 1300 vs panel 1200.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
showPendingApprovals is a display-only useComponent, which CopilotKit paints
pointer-events:none on the assistant message. The table is interactive
(Approve / Deny / File policy exception 'More actions' menu), so the inherited
none made every row action unclickable in the chat. Opt the card subtree back
into pointer events.
Verified live: the 'More actions' button's computed pointer-events flips
none -> auto with the fix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>