feat(admin): per-user finance panel — balances, benefits, risk, ledger #230

Merged
developer merged 1 commits from feature/e7-financial-panel into development 2026-07-10 03:03:46 +00:00
Owner

First slice of the admin / reports / catalog work.

Per-user finance panel

The /_gm user card gains a Finance panel showing an account's full payments picture:

  • chip balances per funding segment (direct / vk / telegram);
  • benefits per origin — hint wallet, no-ads until / forever;
  • the recorded refund risk (abuse flag + the floor-0 chip loss);
  • the append-only ledger history, newest first (kind, source, origin, chip delta, order, provider, snapshot).

Backed by a new payments.AccountStatement(accountID) read — straight from the materialized
balances/benefits + account_risk + the ledger, uncached (an admin, rare view). Read-only;
no writes, no wire/edge changes (server-rendered console templates only).

Plan

Folds the agreed decisions into PLAN.md (E7 rewritten: archived = the existing product.active;
grant raw + by-product refusing chips/tournament; delete-if-clean else archive; full-order refund;
the PR stack) and moves the tournament-entry storage design to the tournament stage.

Tests

  • TestAccountStatement (payments): a funded pack → chip segment + fund row; an admin grant →
    benefit + admin_grant row; ledger newest-first; clean account = no risk.
  • TestConsoleFinancePanel (console render): the card shows the balances, benefits and ledger.
  • Full backend unit + integration green; build/vet/gofmt clean.
First slice of the admin / reports / catalog work. ## Per-user finance panel The `/_gm` user card gains a **Finance** panel showing an account's full payments picture: - **chip balances** per funding segment (direct / vk / telegram); - **benefits** per origin — hint wallet, no-ads until / forever; - the recorded **refund risk** (abuse flag + the floor-0 chip loss); - the append-only **ledger** history, newest first (kind, source, origin, chip delta, order, provider, snapshot). Backed by a new `payments.AccountStatement(accountID)` read — straight from the materialized balances/benefits + `account_risk` + the ledger, **uncached** (an admin, rare view). Read-only; no writes, no wire/edge changes (server-rendered console templates only). ## Plan Folds the agreed decisions into `PLAN.md` (E7 rewritten: archived = the existing `product.active`; grant raw + by-product refusing chips/tournament; delete-if-clean else archive; full-order refund; the PR stack) and moves the tournament-entry storage design to the tournament stage. ## Tests - `TestAccountStatement` (payments): a funded pack → chip segment + fund row; an admin grant → benefit + admin_grant row; ledger newest-first; clean account = no risk. - `TestConsoleFinancePanel` (console render): the card shows the balances, benefits and ledger. - Full backend unit + integration green; build/vet/gofmt clean.
developer added 1 commit 2026-07-10 02:56:11 +00:00
feat(admin): per-user finance panel — balances, benefits, risk, ledger
CI / changes (pull_request) Successful in 4s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 28s
CI / ui (pull_request) Has been skipped
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m46s
e089a0a997
The /_gm user card gains a Finance panel: an account's chip balances per
funding segment, benefits per origin (hints, no-ads until/forever), the
recorded refund risk (abuse flag + floor-0 loss), and the append-only ledger
history newest-first. Backed by a new payments.AccountStatement read straight
from the materialized tables + the ledger (uncached — an admin, rare view).

Folds the agreed admin / reports / catalog plan into PLAN.md (the PR stack:
this panel, then the catalog editor, admin grant, refund + ledger export) and
moves the tournament-entry storage design to the tournament stage.
owner approved these changes 2026-07-10 03:03:36 +00:00
developer merged commit aabb32081e into development 2026-07-10 03:03:46 +00:00
developer deleted branch feature/e7-financial-panel 2026-07-10 03:03:46 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#230