Skip to content

Studio: an unreachable plotkeeper says so plainly, and Pre-flight says when it couldn't read issues #1046

Done

Description

@danielrispler

Parent

#1036

What to build

Root cause 2 of #1036: a failure is never drawn as a result, or in transport words.

  • Transport. When fetch itself rejects (plotkeeper is down), the page's one post function throws its existing CommandError with "plotkeeper is not reachable". An HTTP refusal keeps its own reason.
  • Notice line. The quieting lives in the notice line's showError, which every error-level log line reaches: while the top bar's connection line shows (retrying, or restarted with Reload), an unreachable error is not drawn. The page's failure reporter is unchanged, still logs the error, and every other error draws as today.
  • Pre-flight. The start phase's issues are one of loading, the list, or failed with its reason. A failure draws "Couldn't read the open issues: ", where the reason is the server's first line. The text box and Pick parts by hand show and work in every state.

Acceptance criteria

  • ui/tests/transport.test.mjs gains rows:
    • a stubbed fetch that rejects with a TypeError makes the call reject with CommandError("plotkeeper is not reachable");
    • an HTTP 500 with a reason keeps that reason.
  • ui/tests/notice.test.mjs gains rows:
    • an unreachable error while the connection line shows draws nothing;
    • the same error with no connection line draws;
    • another error draws in both cases.
  • ui/tests/map-pre-flight.test.mjs covers the failed state's words and that its inputs stay.
  • A new snap fixture beside mapPreFlight returns pre_flight_issues as __throw with a gh reason. It shows the failure line with that reason, not "No open issues.", and the text box and Pick parts by hand are present and enabled. It is a new fixture because a fixture answers each command one way, and mapPreFlight's own render (issues listed) stays.
  • npm run check passes, and the new fixture passes npm run snap locally.

Reading

Touches

  • Files: ui/transport.ts, ui/notice.ts, ui/map-pre-flight.ts, ui/tests/transport.test.mjs, ui/tests/notice.test.mjs, ui/tests/map-pre-flight.test.mjs, scripts/snap/fixtures-runs.ts, scripts/snap/fixtures.ts
  • Session: auto mode
  • Route: medium · effort medium — settled presentational states (a new message and a failed state over existing mechanisms), with the test shapes stated

Metadata

Metadata

Assignees

Labels

ready-for-agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions