fix(demo): recover safely after server disconnect
Draft
FL
13d ago+227+227+012345678901234567890123456789-17-17-01234567890123456789
Summary
- treat the inspector as disconnected until
/api/statereturns a successful, valid state payload - disable browser-action controls while disconnected while preserving an existing trace for export
- add an explicit Retry connection control that performs one GET and only re-enables actions after validation
- never replay a failed POST or browser mutation during recovery
Coverage
- initial offline load
- disconnect after live state, with the prior trace retained and exportable
- non-2xx and malformed-JSON retry responses
- successful reconnect with exactly one GET and no replayed POST
Validation
uv run ruff check .uv run pytest— 32 passednode --check jev_ultrafast/static/app.jsuv buildgit diff --check origin/main...HEAD
Prepared from upstream main at 1231850a0bf1a0c0341fe408ef1668dbbfdfac46. Open PRs #183 and #186 touch the demo UI but do not implement disconnected-state gating or GET-only recovery; this draft keeps that behavior independently reviewable.
Summary by cubic
Makes the browser demo inspector recover safely from server disconnects, so a failed action is never replayed and an existing trace stays exportable.
- The inspector is treated as disconnected until
/api/statereturns a valid state payload, so it no longer trusts malformed or non-2xx responses. - Browser-action controls are disabled while disconnected, but the current trace remains visible and exportable.
- Adds a Retry connection button that performs one GET and re-enables actions only after the state payload validates.
- Failed POSTs and browser mutations are never replayed during recovery.