From 34e56d4d3dc3d0c20d4c794219136f96a4493d6a Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 22 Feb 2026 14:05:22 +0000 Subject: [PATCH] Add monthly spending cap lock, warnings, and cooldown contract --- Client/context-files/scenes.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Client/context-files/scenes.md b/Client/context-files/scenes.md index 0c0c2a3..f70a49b 100644 --- a/Client/context-files/scenes.md +++ b/Client/context-files/scenes.md @@ -126,6 +126,11 @@ This file defines scene scope and network data flow for the first client/server - money spent - origin points spent - `Download Report` action for full spending profile/metrics export +- Spending controls panel: + - set monthly spending cap (money and/or origin points, per policy) + - cap is lock-enforced once set and can be changed only once per month + - clear warnings/explanations shown before setting or changing cap + - show next eligible cap-change date/time - Legal links panel: - Terms of Service (TOS) - EULA @@ -459,6 +464,7 @@ Server -> Client (`MainMenuBootstrapResponse`): - Return account profile, linked OAuth providers, and player/account stats. - Process password change requests. - Return spending summary fields and detailed spending report export. +- Enforce monthly spending cap locks and cap-change cooldown windows. - Return legal document metadata and URLs. ### Data Exchange @@ -485,6 +491,13 @@ Server -> Client (`AccountOverviewResponse`): - `moneySpent` - `originPointsSpent` - `censoredByDefault` (`true`) +- `spendingCap`: + - `capEnabled` + - `moneyCapAmount` (optional) + - `originPointsCapAmount` (optional) + - `effectiveFromUtc` + - `nextCapChangeAllowedAtUtc` + - `lockReason` (when change is blocked) - `legalDocuments` (name + url) Client -> Server (`ChangePasswordRequest`): @@ -508,6 +521,20 @@ Server -> Client (`LinkOAuthResponse`): - `linkedProviders` - `errorCode` (if failed) +Client -> Server (`SpendingCapUpdateRequest`): +- `requestId` +- `moneyCapAmount` (optional) +- `originPointsCapAmount` (optional) +- `acceptWarning` (`true` required) + +Server -> Client (`SpendingCapUpdateResponse`): +- `requestId` +- `success` +- `spendingCap` +- `nextCapChangeAllowedAtUtc` +- `warningMessage` +- `errorCode` (if failed, including cooldown violation) + Client -> Server (`SpendingReportRequest`): - `requestId` - `format` (`csv`, `json`, `pdf`)