SystemPage clearStorage: res.json() can throw after the delete landed; clearNotice never expires #53
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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,finallyresetsbusy/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:
clearNoticenever 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).