Skip to content

staging: match wallet plan limits to pricing cards - #987

Merged
think-back merged 5 commits into
stagingfrom
feat/staging-subscription-plan-limits
Aug 30, 2026
Merged

staging: match wallet plan limits to pricing cards#987
think-back merged 5 commits into
stagingfrom
feat/staging-subscription-plan-limits

Conversation

@think-back

Copy link
Copy Markdown
Collaborator

Summary

  • Render plan-card 5-hour and 7-day caps in one compact lavender ALL MODELS panel.
  • Keep values data-driven from window_5h_amount and window_week_amount and formatted as USD.
  • Add localized short-term cap copy across all eight console locales.
  • Leave current-plan monthly, 5-hour, and 7-day UsageWindowMeter layout unchanged.

Validation

  • bun test src/features/wallet/components/subscription-plans-card.test.tsx (81 pass)
  • bun test src/features/wallet/components/recharge-form-card.test.tsx (9 pass)
  • bun run i18n:sync (all locales missingCount 0)
  • bun run typecheck (exit 0)
  • bun x eslint on touched files (exit 0)
  • git diff --check (exit 0)

The full repository lint still reports pre-existing errors outside this change. The local dev compiler rebuilt successfully; the connected browser kept an empty React root, so interactive screenshot verification remains an environment limitation.

Keep the current subscription card aligned with the backend plan matrix by surfacing 5h and 7d usage windows through the self-subscription response and wallet normalization path.

Constraint: staging already serves the new plan matrix, and the UI must not invent short-window limits locally.
Rejected: static plan-specific markup | it would drift from the API and duplicate data.
Confidence: high
Scope-risk: moderate
Directive: keep window_5h and window_7d mirrored through controller, type, and normalization layers.
Tested: go test ./model -run 'TestMigrateStandardSubscriptionPlanLimits(UpdatesDuplicateStandardRows|RestoresExistingRows|UsesPersistedQuotaUnit|RecognizesStagingTestPrefix)|TestStandardSubscriptionPlanLimitsMatchProductContract' -count=1; go test ./controller -run 'TestGetSubscriptionPlansExposesConfiguredUsageLimitsAndShortWindowFields|TestGetSubscriptionPlansAnnotatesTierRankAndRelation' -count=1; bun test src/features/wallet/components/subscription-plans-card.test.tsx
Not-tested: full web build and live staging smoke
Keep the live usage meters untouched while making plan-card limits compact and data-driven.\n\nConstraint: console copy must remain localized across all supported languages\nRejected: adding the website Tools Credits block | wallet plan data does not expose that entitlement\nConfidence: high\nScope-risk: narrow\nDirective: keep current-plan progress meters on their existing UsageWindowMeter path\nTested: spec self-review; git diff --check\nNot-tested: implementation and UI tests pending spec review
Lock the approved pricing-card alignment into a test-first implementation sequence.\n\nConstraint: preserve live usage meters and backend contracts\nRejected: broad wallet-card refactor | the change is limited to the summary boundary\nConfidence: high\nScope-risk: narrow\nDirective: implement through the focused PlanLimitSummary path\nTested: plan self-review; placeholder scan; git diff --check\nNot-tested: implementation and UI tests pending
Present short-window caps in one localized pricing-style panel while preserving live usage meters.\n\nConstraint: all user-visible console copy must exist in all eight locales\nRejected: adding a Tools Credits section | wallet plan data has no matching entitlement\nConfidence: high\nScope-risk: narrow\nDirective: keep current-plan UsageWindowMeter layout unchanged\nTested: focused Bun test (81 pass); recharge tests (9 pass); i18n sync; typecheck; touched-file ESLint; JSON key audit; git diff --check\nNot-tested: production deployment and interactive browser screenshot because the local dev browser kept an empty React root
Resolve staging drift while preserving the approved compact wallet limit summary.\n\nConstraint: target staging has advanced and its current-plan meter order is canonical\nRejected: reverting staging's newer current-plan layout | it would regress the target branch\nConfidence: high\nScope-risk: moderate\nDirective: keep plan-card summary changes isolated from live usage-meter behavior\nTested: merged wallet tests (81 pass); recharge tests (9 pass); typecheck; touched-file ESLint; git diff --check\nNot-tested: interactive browser screenshot because local dev browser kept an empty React root
@think-back
think-back merged commit 99a9f24 into staging Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant