Research steers: the wave-1 'view full research' affordance — collapsed <details> carries the full brief
The Research-complete one-liner is now a native <details> disclosure: collapsed it reads exactly as before (Research · complete · N sources); one click expands the full persisted brief + source links via ResearchBriefCard. No fetch, no state, no protocol change — the data-subagent-artifact part in the record is the single source of truth, which is what made this affordance 'feasible later' back in wave 1. The brief still never clutters the transcript by default; the teacher's wake turn remains the primary channel for weaving it into the lesson. Test updated: the brief + sources now assert PRESENT inside the details (and collapsed — no open attribute) instead of absent from the DOM. Gates: typecheck, 279/279 tests, lint, build — all green.
This commit is contained in:
@@ -342,7 +342,7 @@ describe("steer card rendering (the delivered artifact)", () => {
|
||||
assert.ok(!html.includes("Looking at the render"), "model-facing notes never render");
|
||||
});
|
||||
|
||||
it("renders a quiet Research-complete badge — the full brief stays out of the transcript (but persisted)", () => {
|
||||
it("renders a quiet Research-complete one-liner whose collapsed <details> carries the full brief", () => {
|
||||
const steer = buildSubagentSteer(
|
||||
{ id: "jr", kind: "research", toolCallId: "cr" },
|
||||
{
|
||||
@@ -357,8 +357,14 @@ describe("steer card rendering (the delivered artifact)", () => {
|
||||
assert.match(html, /Research/);
|
||||
assert.match(html, /complete/);
|
||||
assert.match(html, /2 sources/);
|
||||
assert.ok(!html.includes("founded the Academy"), "the long brief never renders inline");
|
||||
assert.ok(!html.includes("britannica"), "source links stay out too — the wake turn cites them");
|
||||
assert.match(html, /view brief/, "the expansion affordance is offered");
|
||||
// the one-liner is a native <details> — collapsed by default, so the
|
||||
// brief + sources ride in the DOM but never clutter the transcript
|
||||
// until the learner opens them (the wave-1 "view full research" ask)
|
||||
assert.match(html, /<details[^>]*data-testid="research-complete-badge"/, "a real disclosure");
|
||||
assert.ok(!/<details[^>]*open/.test(html), "collapsed by default — no `open` attribute");
|
||||
assert.ok(html.includes("founded the Academy"), "the persisted brief rides inside the details");
|
||||
assert.ok(html.includes("britannica.com/plato"), "source links ride inside the details");
|
||||
});
|
||||
|
||||
it("renders the visual failure note with no svg when the build FAILED", () => {
|
||||
|
||||
Reference in New Issue
Block a user