You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(usage): drop inline workspace attachment, tighten window and chart edges
Removes the workspace attachment from admin organization creation, on the
maintainer's call. Three review rounds went into its failure semantics, and the
conclusion each time was that it cannot be made honest inline: it runs its own
transaction under a lock order that exists to avoid deadlocking against invitation
acceptance, so it could only ever be best-effort after the organization committed.
This codebase already solves the problem properly. `AdminMemberOperationView`
tracks workspace moves with `pending | processing | dead_letter | applied` and
per-workspace retry, and the enterprise-owner-claim path creates the workspace and
the organization in one transaction and enqueues an outbox event for the rest.
Provisioning belongs on one of those, not inline in a create call that also
relocates the owner's billing payer as a side effect. The endpoint is back to
creating an organization and its owner membership, and the contract says why.
The rest are edges found in review:
- A zero bucket rendered as a 3px colored bar. `chartPlotBand` clamps drawn
geometry off the axis rule, but applied to zero it floored every densified empty
day at the band — the opposite of what densifying zeros is for.
- `preset=custom` without both dates fell back to the raw period, bypassing the
unbounded-period bound added last round. It now recurses through `current-period`
so there is one rule rather than two copies.
- `Date.parse` accepts `2026-02-30` and rolls it forward, so a February request
silently returned a window starting March 2. Dates now round-trip.
- `?limit=` coerced to `0` and answered 400 instead of using the declared default.
- The period picker bound to the raw URL preset, so a partial custom deep link read
"Custom range" over current-period data — and suppressed the allowance that was
exactly comparable to it.
- The CSV rendered a sub-credit charge as the string "0 credits", losing it, and
left the column unsummable. Export rows now carry unrounded credits and the CSV
writes a bare number.
Also regenerates the docs manifest, which CI flagged for the new docs page.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/platform/enterprise/usage-tracking.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ The **BYOK** tab groups this usage by provider and reports **tokens** rather tha
102
102
103
103
## Exporting
104
104
105
-
**Export** downloads the events behind the current period and filters as a CSV with columns `Date, Source, Description, Workflow, Credits`.
105
+
**Export** downloads the events behind the current period and filters as a CSV with columns `Date, Source, Description, Workflow, Credits`. Credits are exported as plain numbers so the column can be summed, and carry decimals — an individual event often costs a fraction of a credit.
106
106
107
107
**All events** opens the full ledger — every credit-consuming event, newest first, with its own filters and export.
0 commit comments