fix(captures): after a failed Wayback lookup the panel still reports that no lookup was made#1525

openedSep 20, 2026byMMatt Donovan

Defect: when a Wayback lookup fails, the header chip says not looked up yet, the footer says zero snapshots, and the body prints the raw Node error.

What: Three statements on one panel disagree about the lookup state, and the error text carries no cause and no next step. #889 covers the footer count only; this is the chip and the body. Where: src/renderer/components/captures/waybackPanelModel.ts:211 Reproduce: Offline, select a Capture, open the Wayback tab, trigger a lookup.

Found by the automated UI and UX pass on 2026-09-20 (docs/plans/2026-09-19-ui-ux-pass.md, branch t3code/beta-release-path-prep). Filed on its own because the pass is a report and carries no code change; the fix belongs to whoever takes the ticket.

Note

Claude responding on behalf of Matt.

This was generated by AI during triage.

Agent Brief

Category: bug Summary: After a failed Wayback lookup, the Wayback panel says the lookup failed everywhere it states the lookup's status, and tells the investigator what to do next.

Triage confirmed the defect from the code on 2026-10-05. When a lookup fails, the panel heading still says no lookup was made, and the body prints the raw error text.

Current and desired behavior, acceptance criteria, verification and scope

Current (origin/main 43906e63, not run): WaybackPanel.tsx calls summaryLine({ ..., hasResult: !!result }), which returns "Not looked up yet" when there is no result, including after an error. The error body (data-testid="wayback-error") renders lookup.error.message.

Desired

  • summaryLine takes the failed state and returns a short "Lookup failed" style line instead of "Not looked up yet".
  • The error body says the Wayback Machine could not be reached or answered with an error, and to check the connection and try again with the existing lookup action. The raw error is logged, not shown.

Acceptance criteria

  • With the lookup query in its error state, the summary line no longer reads "Not looked up yet".
  • The error body contains no raw Node or fetch error text, and names a next step.
  • Before any lookup, and after a successful one, the summary line is unchanged.
  • tests/renderer/waybackPanelModel.test.ts covers the new summaryLine state.

Verification: pnpm test tests/renderer/waybackPanelModel.test.ts, then pnpm preflight on Node 20.

Starting files: src/renderer/components/captures/waybackPanelModel.ts (summaryLine), src/renderer/components/captures/WaybackPanel.tsx.

Evidence-affecting: no. Display of a lookup's status; pinning Wayback references is untouched.

Out of scope: the footer's snapshot count before a lookup, which is #889.