Files
simtrace-analyser/tests
catarrh 87b6811adf Files view: surface fetch errors instead of "no operations" (v2.3.1)
- `API._fetch` never checked the HTTP status: an error body (e.g. the 404
  `{"error": "Session not found"}`) was returned as data, so the Files view
  rendered it as "No file operations recorded" — and, worse, that bad payload
  was cached per session id, which is why only re-opening the session (which
  resets the cache) appeared to fix it.  It now throws with the server's
  message for any non-OK response (all 13 `await API.*` call sites are inside
  try/catch) and marks the server unavailable only for a real network error
- `renderFileView` accepts a payload only when it carries a `timeline` array:
  a genuine `timeline_total === 0` keeps the empty state, anything else shows
  "Failed to load files: <reason>"; failures are not cached, so the next visit
  retries; a response that arrives after the user switched sessions is ignored
- tests: HTTP-error vs network-error behaviour of `_fetch` (network error is
  the only disconnected state), the valid/empty/error render paths and the
  retry-after-error, the stale-response guard
- v2.3.1; SW cache simtrace-analyser-v64
2026-10-17 21:04:03 +03:00
..