Skip to content

Mock server cannot produce a failed firing, so the error UI is unreachable in the demo #239

Description

@BenSeverson

Found while verifying #164.

The mock kiln (web_ui/mock-server/) has no way to represent a firing that failed:

  • every history record is hardcoded errorCode: 0 (router.ts:78, :88, :98)
  • the simulator never enters status: "error"
  • /api/v1/system always reports lastErrorCode: 0 and emergencyStop: false

So none of the error UI added in #235 — the dashboard error banner, the history detail cause, the Settings "Last Error" description, the emergency-stop guidance — is reachable in npm run dev, in the Vitest suite, or in the published demo at https://benseverson.github.io/bisque/. Verifying that PR required stubbing window.fetch in the browser by hand.

This is the same firmware/mock divergence class as #131, which has now come up five times (idle broadcast, delayMinutes, profileId omitted, profileId cleared on stop, and this).

What would fix it

Give the mock a way to reach a failed state, so the error path is exercisable:

  • a POST /api/v1/mock/fault (dev-only) or a scripted scenario that trips a fault mid-firing and leaves status: "error" with a non-zero lastErrorCode
  • at least one seeded history record with outcome: "error" and a real errorCode
  • emergencyStop: true reachable

The demo is the only way most people will ever see this UI, and right now it shows the happy path exclusively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2User-facing correctness (web UI, display, connectivity)bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions