CE-WP-0006/0007: Capture view polish, workplans, and UX refinements

- Blob URL stability, scroll centre, strip-only visual guide
- Focus-gated linking, unlink clears overlay, field badge tooltips
- Capture layout (viewer centre), grey guide lines, Add field button
- Workplans CE-WP-0006 (done) and CE-WP-0007 (T01-T09 done, T10-T12 todo)
- Integration tests and viewer-url helpers
This commit is contained in:
2026-06-08 00:37:34 +02:00
parent d25b01f6d5
commit 2fd085b65e
26 changed files with 1767 additions and 356 deletions

View File

@@ -136,25 +136,24 @@ describe("CE-WP-0003-T08 — PRD scenario steps 5-9 end-to-end", () => {
);
});
await user.type(
screen.getByPlaceholderText(/Add a one-line comment/),
screen.getByTestId("inline-capture-commentary"),
"Overlay E2E evidence",
);
await user.click(screen.getByRole("button", { name: /Save evidence/ }));
await user.click(screen.getByTestId("inline-capture-save"));
await screen.findByText(/Overlay E2E evidence/);
// Step 5: navigate to forms via the top-bar.
await user.click(screen.getByRole("button", { name: "Forms" }));
await user.click(screen.getByRole("button", { name: "Capture" }));
// CE-WP-0005: route is now session-scoped.
expect(window.location.hash).toMatch(/^#\/s\/sess_[^/]+\/forms\/demo$/);
// Step 6: stage the evidence in the strip, then click the summary
// field to create the link.
// Step 6: focus summary, then click the strip card to link directly.
const summaryField = screen.getByLabelText("Summary of the matter");
await user.click(summaryField);
const stripCard = await screen.findByRole("button", {
name: /Overlay E2E evidence/,
});
await user.click(stripCard);
const summaryField = screen.getByLabelText("Summary of the matter");
await user.click(summaryField);
// Move focus elsewhere and back to re-fire focus on summary so that
// ActiveStateProvider triggers focus-target (the previous click that
@@ -170,8 +169,9 @@ describe("CE-WP-0003-T08 — PRD scenario steps 5-9 end-to-end", () => {
);
expect(fieldRow).not.toBeNull();
});
const activeChip = document.querySelector('[data-evidence-id][aria-current="true"]');
expect(activeChip).not.toBeNull();
const activeCard = document.querySelector('button[aria-current="true"]');
expect(activeCard).not.toBeNull();
expect(activeCard!.textContent).toMatch(/Overlay E2E evidence/);
// Step 9: SVG overlay renders 2 paths (field→card + card→highlight).
// HighlightRectBridge registers via the mocked getHighlightClientRects.