The recorder was a floating HUD overlay, which read as a different UI element
from the in-chat cards (e.g. "Save this workflow?"). Fold the live step feed
into the demonstration card itself: the `awaitDashboardDemonstration` card is
now titled "Recording your workflow" (with a REC pulse), keeps the
non-directional copy, and embeds a reactive `<RecordingSteps/>` child that
narrates each captured action inside the card. Removes the floating panel and
its CSS. Same card chrome as the other cards, so it reads consistently in the
conversation.
`RecordingSteps` subscribes to the recording context itself (not via the host
card's render closure), so it updates live as each step is logged without a
stale-closure dep.
Address review feedback on the banking self-learning "teach a workflow" loop
(PR #5266):
- Recorder HUD: a floating "Recording your workflow" panel narrates each officer
action live (Opened Dashboard -> Opened Transactions -> Opened Pending approval
-> Opened the exception form -> Filed the policy exception -> Approved the
charge), driven by logStep on the nav / tab / file-exception / approve call
sites. New recording-feed.tsx; steps + logStep added to recording-context.
- Non-directional demonstration: the await card is retitled "Show me how" and no
longer lists the steps ("go ahead and do it yourself now and I'll watch and
learn"); the agent's spoken handoff is likewise generic.
- Fix the "nothing happens after I'm done" stall: the model sometimes asked
"should I save this?" in prose instead of calling saveLearnedWorkflow, leaving
no Save card to click. The await tool-result is now directive (call
saveLearnedWorkflow; the card is how you ask), reinforced in the prompt.
- Harden the ending: after saving, the agent treats the demonstrated charge as
already cleared and waits, instead of re-running the freshly-saved procedure
on it.
Verified end-to-end in OSS dev (taught Google Ads, recalled AWS); lint + build
green.
Rework the banking demo's teach-a-workflow loop so the officer demonstrates the
over-limit unlock on the actual dashboard instead of an inline chat card, and so
the first over-limit approve request no longer shows an approval card that fails.
When asked to approve an over-limit charge it has no saved procedure for, the
agent now declines and offers to record (no approval card). The officer opens the
new Dashboard -> Transactions -> Pending approval view, files a policy exception
and approves the charge there; a waiting card holds the chat until they click
"I'm done". The agent then saves the procedure and applies it itself to a
different over-limit charge.
Move the teach/recall HITL tools (offerWorkflowRecording,
awaitDashboardDemonstration, saveLearnedWorkflow, openPolicyException,
finalizePolicyException, approveTransaction) and the agent data/permission
readables into the global CopilotContext. A route-scoped registration unmounts
when the officer navigates to the dashboard, which drops the in-progress card and
prevents the followUp from firing; global registration survives navigation and
renders on every route.
The demonstrated exception code is captured via the recording context and handed
to the Save step, so the saved procedure names the exact code used. The agent
prompt is updated for the decline+offer and dashboard handoff, and still never
spells out the unlock or names a justifying code.
Verified end-to-end in OSS dev (lint + build green, gate smoke 3/3): Beat 1 shows
no card, the dashboard demonstration clears the Google Ads charge, and recall
clears the AWS charge via the learned procedure.
examples/showcases/teach-mode/ was a stray, non-runnable folder under examples/showcases (which is for runnable showcases). Moved the cookbook (README), LEARNING-TRACK-PLAN, and verify-teachable-gate.sh into examples/showcases/banking/docs/teach-mode/, dropped the duplicate record-user-action.ts (the demo's real seam lives at src/lib/record-user-action.ts), and fixed internal references.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Continues the closed draft #5183 on top of the merged #5180. Adds: v2 Threads as a docked chat side panel + inbox; the self-learning teachable policy-exception gate (symptom-only over-limit gate, justifying-exception unlock, recipe withheld; OSS default, env-gated CopilotKitIntelligence); the Aurora design system; a reusable teach-mode cookbook (examples/showcases/teach-mode/); and a learning-track plan. 53 files, scoped to examples/showcases/{banking,teach-mode}.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>