A local-first multi-agent app development platform, built on PenguinHarness
Clearing error records names its range and takes what the panel showed
- Date: 2026-09-02
- Type: fix
- Scope:
server,web,docs - PR: #590
- Breaking: yes —
GET /usageno longer returnserrors.clearable, and aDELETE /usage/errorsmissing either date bound is refused with 400 instead of clearing the whole history
The cost center's Clear confirmation now names the range the way the picker does — "in the last 7 days", "in the last hour" — and spells out dates only for a custom range. Behind it, a clear now deletes exactly the rows the panel listed: the two trailing presets (last hour, last 24 hours) narrow the error table's reads and the clear alike to their instant window instead of to whole days, and an admin's clear takes the unattributed rows an admin's panel shows — login failures and process crashes with no Project — which a Project-scoped clear used to leave behind.
Details
GETandDELETE /api/projects/:projectId/usage/errorsacceptfromTs/toTs(both or neither, in order, like the dashboard); the dashboard's error statistics honour the pair too. Both bounds are inclusive. The clear additionally requiresfromandto(400 otherwise), as the panel already required them before offering the action — an open bound is the whole history rather than a filter.- The delete reaches exactly what the caller's reads reach: an admin's clear includes unattributed rows, a member's (whose reads never show them) never does.
UsageErrors.clearable, which counted the difference, is gone —totalis what a clear takes. - New strings
usage.errorsClearRangePreset/usage.errorsClearRangeCustomfeedusage.errorsClearScopeandusage.errorsClearScopeAgent, which now take the range as one phrase. - The Web App and server API docs describe the clear's reach.
Compatibility
GET /api/projects/:projectId/usageno longer returnserrors.clearable. Readerrors.total, which is now the count a clear takes. The Web App ships with the server, so a user has nothing to do; an API client readingclearableswitches tototal.DELETE /api/projects/:projectId/usage/errorsanswers 400 whenfromortois missing, where such a call used to clear the Project's whole error history. Send both bounds — the range the panel is showing.