fix(pdf): render the pdf dispatch card (live browser-smoke gap)

The browser e2e check on the live dispatch session found the tool-pdf
part rendered NO card: the artifact renderer registry had no pdf entry
(the doc comment literally says "add your renderer here"), and the typed
TeacherUITools union + the chat.tsx job-part enumerations (poll cadence,
dispatch nudge, settle-sync) all missed the new tool kind.

- PdfJobCard in job-card.tsx: the research JobCard idiom, kind pdf —
  registered in artifacts/index.ts.
- ui-message.ts: pdf entry in TeacherUITools (fire-and-forget ack output).
- chat.tsx: two mechanical "tool-pdf" additions to the research/demo/visual
  enumerations — UI-stream file, flagged for review at merge (same
  treatment as the activity-dock type-forced entries).
- demos.test.tsx: live/settled dispatch-card renders + registry pin.
This commit is contained in:
amosblomqvist
2026-09-19 16:27:11 +03:00
parent 2780166904
commit dfe1a21989
5 changed files with 74 additions and 4 deletions
+11
View File
@@ -18,6 +18,17 @@ export function JobCard({ part }: ArtifactPartProps) {
return <DispatchCard toolCallId={part.toolCallId} kind="research" />;
}
/**
* The pdf dispatch box (sources v0) — the same async-protocol idiom as
* JobCard: the ack output drives a DispatchCard (live "PDF reader" status
* via the central jobs poll); the brief itself rides the steer message
* and renders under the PDF-complete badge in the transcript.
*/
export function PdfJobCard({ part }: ArtifactPartProps) {
if (part.state !== "output-available") return null;
return <DispatchCard toolCallId={part.toolCallId} kind="pdf" />;
}
/**
* The PDF reading brief (sources v0) — markdown body + the consulted-pages
* line. Exported: the steer card renders it under the PDF-complete badge,