Skip to content

feat(pricing): interactive credit budget and traceable cost scenarios - #12

Open
vitormattos wants to merge 3 commits into
mainfrom
feat/pricing-usage-credit-sliders
Open

vitormattos wants to merge 3 commits into
mainfrom
feat/pricing-usage-credit-sliders

Conversation

@vitormattos

@vitormattos vitormattos commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Scope

Follow-up to #11 after its merge. Keep the private analyst workbench as the sole interface; do not expand or rewrite the already-merged PR.

  • Add horizontal sliders plus editable numeric inputs for subscription price, discount, volume, support/setup hours and resource quantities.
  • Calculate a provisional credit budget from completed signer-document obligations, active users, GB-month, API calls and TSA documents. Update the visible consumption, balance, overage and per-resource breakdown instantly while dragging; use the authenticated server for monetary results and a throttled refresh to respect API limits.
  • Read financial research coefficients through a separate analyst-only endpoint; leave /v1/economic-metadata free of financial values. Allow explicit, bounded per-simulation overrides without editing the private source matrix; return parameter provenance and include overrides in the deterministic trace.
  • Show labor hours × hourly cost separately from the estimated selling-price floor, including payment fee, effective taxes, default risk and target margin. Provide immediately visible monthly and annual sample amounts, clearly marked as unapproved hypotheses.
  • Preserve Cloud/Managed/on-premise separation. The credit weights are fictional research examples, not operational billing/metering rules.

Verification

  • PHPUnit: 128 tests, 467 assertions (clean checkout with vendor and vendor-bin dependencies mounted).
  • PHPStan, PHP CS Fixer, PHP lint, OpenAPI and JS syntax: passed locally.
  • Browser E2E on the private poland preview: 100 → 120 → 140 credits under resource/factor sliders, server parity, Managed labor 16 × R$90 = R$1,440 and override 16 × R$250 = R$4,000, selling-price formula, and no mobile horizontal overflow; passed.
  • Signed commits with DCO; no squash. CI on this PR is authoritative for GitHub merge readiness.

Explicit limitations

Economic figures, credit conversion weights and candidate package prices in the preview are fictional and are not validated commercial tariffs. No WooCommerce activation, charging, wallet, entitlement ledger or public pricing endpoint is added. Real costs, technical load measurements and the legal billing unit require separate approval before publication.

Local review screenshots are available in the private preview workspace; no customer data or credentials are included in the repository.

Responsive 4K workspace

  • The existing internal UI now uses a wide three-area grid on large displays (contract models, editable consumption/parameters, and financial results). At intermediate desktop widths, inputs and a sticky, independently scrollable results panel sit side by side; tablet/mobile layouts remain stacked. Results can be scrolled by keyboard, and the empty state is visible before a first calculation.
  • Before/after at 3840 × 2160: content width 1,220 → 3,500 CSS pixels; first financial result top position 3,086 → 451 CSS pixels. Total page height in the tested Cloud scenario 5,025 → 2,367 pixels.
  • Browser checks: 320, 390, 768, 1,280, 1,440, 1,600, 1,920, 2,560 and 3,840 pixel viewports, plus exact 1,499/1,500, 2,399/2,400 and 2,999/3,000 breakpoint boundaries. No document-level horizontal overflow; Cloud and Managed conditional controls remain operable. Keyboard scrolling within the results panel and dark theme verified.
  • No billing, formula, API, dependency or credential changes in the incremental responsive commit. Local checks: PHP lint, coding style, PHPStan, PHPUnit (128 tests, 467 assertions), OpenAPI, JS syntax and browser QA passed.

…enarios

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…c scenarios

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos requested a review from a team as a code owner November 10, 2026 22:44
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
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