SystemPage clearStorage: res.json() can throw after the delete landed; clearNotice never expires #53

Open
opened 2026-08-21 23:21:21 +02:00 by julian · 0 comments
Owner

Follow-ups (b) and (c) from the approving review on #46.

b. const { removed } = await res.json() (packages/shell/src/pages/SystemPage.svelte:215) can throw on a truncated response. The delete has already landed at that point, finally resets busy/confirming, and the operator sees no notice and no error — the invisible-outcome case the surrounding code exists to prevent. Fix: await res.json().catch(() => null) with a "cleared, count unavailable" fallback notice.

c. Minor: clearNotice never expires — it sits until the next clear. Fine on a diagnostics page; consider tying it to the row or ageing it out.

Source: #46 (comment) and the review body's follow-up (c).

Follow-ups (b) and (c) from the approving review on #46. **b.** `const { removed } = await res.json()` (`packages/shell/src/pages/SystemPage.svelte:215`) can throw on a truncated response. The delete has already landed at that point, `finally` resets `busy`/`confirming`, and the operator sees no notice and no error — the invisible-outcome case the surrounding code exists to prevent. Fix: `await res.json().catch(() => null)` with a "cleared, count unavailable" fallback notice. **c.** Minor: `clearNotice` never expires — it sits until the next clear. Fine on a diagnostics page; consider tying it to the row or ageing it out. Source: https://git.imhof.cloud/OpsDeck/core/pulls/46#issuecomment-1033 and the review body's follow-up (c).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OpsDeck/core#53
No description provided.