Read the credit series and the unread notification count #5

Merged
geusebio merged 2 commits from feature/credit-read into main 2026-08-14 20:59:25 +00:00
Owner

Two reads the tray needs and nothing consumed yet. Server halves: the credit endpoint has been live since the toggle work; the notification count is new in the platform repo's PR.

Credit — balance plus the recent hourly debits. Burn and runway are derived here rather than sent, because the platform states facts and the projection is the client's to make. Both answer honestly when there is nothing to project: no metered usage and an exhausted balance are different from a runway of infinity, and a client that conflates them draws one. A positive row in the debit series is a credit filed under the wrong type, and counting it would flatter the rate.

Notifications — the unread count and the newest few. The web UI carries this as a badge on every page; a resident client is where it earns its keep, being the surface a person has open when a deploy they started finishes badly.

go build, go vet, go test ./... clean; client coverage up to 86.9%.

Two reads the tray needs and nothing consumed yet. Server halves: the credit endpoint has been live since the toggle work; the notification count is new in the platform repo's PR. **`Credit`** — balance plus the recent hourly debits. Burn and runway are *derived here* rather than sent, because the platform states facts and the projection is the client's to make. Both answer honestly when there is nothing to project: no metered usage and an exhausted balance are different from a runway of infinity, and a client that conflates them draws one. A positive row in the debit series is a credit filed under the wrong type, and counting it would flatter the rate. **`Notifications`** — the unread count and the newest few. The web UI carries this as a badge on every page; a resident client is where it earns its keep, being the surface a person has open when a deploy they started finishes badly. `go build`, `go vet`, `go test ./...` clean; client coverage up to 86.9%.
The endpoint has been there since the toggle work landed; nothing consumed
it. The tray wants it per organization — funds and burn rate on the row its
applications hang under — and `sc` will want the same numbers eventually.

Burn and runway are derived here rather than sent: the platform states facts,
and the projection is the client's to make. Both answer honestly when there
is nothing to project — no metered usage and an exhausted balance are
different from a runway of infinity, and a client that conflates them draws
one. A positive row in the debit series is a credit filed under the wrong
type, and counting it would flatter the rate.
Read the unread notification count and a preview
All checks were successful
CI / build (pull_request) Successful in 1m33s
37c962a7b5
The web UI carries this as a badge on every page. A resident client is where
the same signal earns its keep — it is the surface a person has open when a
deploy they started finishes badly — so the tray wants the number, and a
handful of entries so the number is not bare.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
Grey.ooo/someones.computer_scclient!5
No description provided.