practice: the agent's data drawer — full transparency on every conclude card (round 17)
Owner ask (2026-10-06): reveal everything the agent filled in when writing the problem and concluding it, at the very bottom of the conclude card, collapsible, arriving collapsed. The fields, both calls: - problem: mode (recall/discrimination/composition), target proposition ids, statement, modelSolution (the last two ARE the visible card — the drawer shows the metadata only) - conclude: outcome, hint rung (R0–R5/null), miss class (cue/discrimination/execution/careless/structural/null), retest. Seams: problemInputForConclude (native-messages) walks the reveal's walk and folds the WHOLE problem-call input onto the conclude part (projectView join; same refused-pose law — an unacked pose folds nothing); ArtifactPartProps grows problemInput. Targets resolve to proposition NAMES at render (one lazy module-cached /api/graph fetch; failure degrades to raw ids — observability never breaks the card). The drawer: divider + chevron 'AGENT'S DATA' toggle (mono-caps eyebrow register), definition rows with mono values, 'untagged'/ 'none' honest empties, absent entirely when the calls filled nothing (the dismissal line, legacy bare records).
This commit is contained in:
@@ -137,6 +137,35 @@ describe("the practice transcript cards", () => {
|
||||
assert.match(html, /Pair them; each pair is even\./);
|
||||
});
|
||||
|
||||
it("ConcludeCard: THE AGENT'S DATA DRAWER (owner round 17) — arrives collapsed, opens to every field both calls filled", () => {
|
||||
const collapsed = renderToStaticMarkup(
|
||||
<ConcludeCard
|
||||
part={part({
|
||||
type: "tool-conclude",
|
||||
input: { outcome: "solvedWithHints", verdict: "v", rung: "R2", missClass: "cue", retest: true },
|
||||
problemInput: { mode: "discrimination", target: ["n_abc"] },
|
||||
reveal: "The solution.",
|
||||
})}
|
||||
/>,
|
||||
);
|
||||
assert.ok(collapsed.includes('data-testid="agents-data-toggle"'), "the toggle row");
|
||||
assert.ok(collapsed.includes("Agent"), "the label");
|
||||
assert.ok(!collapsed.includes('data-testid="agents-data"'), "arrives COLLAPSED — no rows in the markup");
|
||||
// The drawer is a client useState fold; the OPEN face is pinned by the
|
||||
// rows' data shape (view join) below — static render cannot toggle.
|
||||
});
|
||||
|
||||
it("ConcludeCard: no drawer when the calls filled nothing beyond the visible card", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<ConcludeCard part={part({ type: "tool-conclude", input: { outcome: "dismissed" } })} />,
|
||||
);
|
||||
assert.ok(!html.includes("agents-data"), "the dismissal line carries no drawer");
|
||||
const legacy = renderToStaticMarkup(
|
||||
<ConcludeCard part={part({ type: "tool-conclude", input: { outcome: "solved" }, reveal: "s" })} />,
|
||||
);
|
||||
assert.ok(!legacy.includes("agents-data"), "empty problemInput + bare outcome: nothing to reveal");
|
||||
});
|
||||
|
||||
it("ConcludeCard: the dismissal synthesis is one muted line — no reveal card", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<ConcludeCard part={part({ type: "tool-conclude", input: { outcome: "dismissed" } })} />,
|
||||
|
||||
Reference in New Issue
Block a user