From 3ee58aa685593786be14a73be18573430ac96a60 Mon Sep 17 00:00:00 2001 From: coreci Date: Sun, 27 Sep 2026 02:10:39 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix(P04):=20milestone=20review=20P0=20fixes?= =?UTF-8?q?=20=E2=80=94=20drawer=20rendering,=20demo=20guard,=20borders,?= =?UTF-8?q?=20fixture,=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ---ci--- phase: 4 milestone: v0.1 status: execute persona: ci-lead-developer task: T-4.1 requirements: covered: [REQ-52, REQ-53, REQ-54, REQ-55, REQ-56, REQ-57, REQ-58, REQ-59, REQ-60, REQ-61] ---/ci--- P0-1: formatDialValue preserves separators — per-claim renders Per-Claim (was Per+Claim in every drawer); unit tests added. P0-2: Start research disabled without a question (direct /choose nav and hard refresh can no longer create empty-question runs); guard test added. P0-3: --color-hairline token added to @theme — border-hairline utility now compiles (21 surfaces were rendering near-black borders); verified in production CSS. P0-4: flagship citation URL switched from a real arXiv abs link (which resolved to an unrelated finance paper) to the example.org fixture domain, honoring the fixture header's promise; tests updated. P0-5: root README screens table rewritten — all 5 routes with real descriptions (was claiming /run/[id] is a placeholder); frontend README route list + scope note updated. --- README.md | 4 ++- frontend/README.md | 6 ++-- frontend/src/app/globals.css | 1 + frontend/src/components/choose-view.test.tsx | 22 ++++++++++++ frontend/src/components/methodology-card.tsx | 8 ++++- frontend/src/components/reading-room.test.tsx | 4 +-- frontend/src/lib/api/mock/mock-client.test.ts | 2 +- frontend/src/lib/api/mock/scripted-run.ts | 6 ++-- frontend/src/lib/dials.test.ts | 35 +++++++++++++++++++ frontend/src/lib/dials.ts | 15 +++++--- 10 files changed, 88 insertions(+), 15 deletions(-) create mode 100644 frontend/src/lib/dials.test.ts diff --git a/README.md b/README.md index f3b2fef..da9be12 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ Three clicks from cold start to initiated research. |---|---| | `/ask` | One question box + one optional context box. Nothing else competing for attention. | | `/choose` | All 8 locked methodology cards — mock ETA, cost estimate, why-recommended, and the 12 methodology dials behind each card's Advanced drawer. | -| `/run/[id]` | Placeholder — Plan & Run ships in phase 2. | +| `/run/[id]` | Plan & Run: approve the research plan (sub-questions, source universe, outline), watch the live trace stream, pause/resume or cancel. | +| `/run/[id]/report` | Reading Room: the report with page-anchored citations — hover or focus any `[n]` marker for the exact quoted passage — plus the citation ledger and Markdown/JSON exports. | +| `/library` | v2 preview: project graph and task inbox mockups rendered from fixture data. | All data flows through a typed `ApiClient` interface backed by `MockApiClient` — the same components will talk to the FastAPI backend via the OpenAPI-generated client in the MVP milestone, with zero rewrites. diff --git a/frontend/README.md b/frontend/README.md index 3ec3f6c..499420b 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -61,7 +61,7 @@ The happy path: ``` src/ - app/ App Router routes (ask, choose, run/[id], run/[id]/report) + app/ App Router routes (ask, choose, run/[id], run/[id]/report, library) components/ UI components (server by default, client where interactive) lib/ Domain types, ApiClient boundary, mock data, stores test/ Test harness setup @@ -71,5 +71,5 @@ Prototype scope note: ETAs, cost estimates, and the scripted run are realistic fixture data — not live research. The trace stream replays a deterministic Deep Report run with pause/resume/cancel controls; the Reading Room's report, ledger, and exports are generated from the same -fixture. The v2 surface mockups (project graph, task inbox) ship in the -next phase. \ No newline at end of file +fixture. The `/library` project graph and task inbox are v2 preview +mockups behind the same ApiClient boundary. \ No newline at end of file diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 4d97c74..065d95b 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -50,6 +50,7 @@ --color-ink-soft: #4a4945; /* secondary text */ --color-ink-faint: #8a8880; /* muted metadata */ --color-line: #e5e2da; /* hairline borders */ + --color-hairline: #e5e2da; /* border-hairline utility */ --color-accent: #1e5c3f; /* deep green — primary action */ --color-accent-strong: #164732; /* hover / pressed */ diff --git a/frontend/src/components/choose-view.test.tsx b/frontend/src/components/choose-view.test.tsx index 0fe962f..069e6b6 100644 --- a/frontend/src/components/choose-view.test.tsx +++ b/frontend/src/components/choose-view.test.tsx @@ -116,4 +116,26 @@ describe("ChooseView", () => { expect(runRoute).toMatch(/^\/run\/run-[a-z0-9]+$/); }); }); + + it("empty-question guard: Start research disabled without a question (P1-2 fix)", async () => { + const methodologies = await loadFixtures(); + const deepReport = methodologies.find((m) => m.slug === "deep-report"); + if (!deepReport) throw new Error("fixture missing deep-report"); + + // Direct /choose navigation or a hard refresh: no carried question. + setAskState({ question: "" }); + render( + , + ); + + const start = screen.getByRole("button", { name: "Start research" }); + expect(start).toBeDisabled(); + expect(start).toHaveAttribute("aria-disabled", "true"); + + // Whitespace-only questions are equally blocked. + render( + , + ); + expect(screen.getAllByRole("button", { name: "Start research" })[0]).toBeDisabled(); + }); }); \ No newline at end of file diff --git a/frontend/src/components/methodology-card.tsx b/frontend/src/components/methodology-card.tsx index e893770..51d9e23 100644 --- a/frontend/src/components/methodology-card.tsx +++ b/frontend/src/components/methodology-card.tsx @@ -128,7 +128,13 @@ export function MethodologyCard({