molecule-core/canvas/src
Hongming Wang 18894bebe8 feat(canvas): Phase 5 — credit balance pill + low-balance banner
Adds the UI surface for the credit system to /orgs:
- CreditsPill next to each org row. Tone shifts from zinc → amber at
  10% of plan to red at zero.
- LowCreditsBanner appears under the pill for running orgs when the
  balance crosses thresholds: overage_used > 0 → "overage active",
  balance <= 0 → "out of credits, upgrade", trial tail → "trial almost
  out".
- Pure helpers extracted to lib/credits.ts so formatCredits, pillTone,
  and bannerKind are unit-tested without jsdom.

Backend List query now returns credits_balance / plan_monthly_credits
/ overage_used_credits / overage_cap_credits so no second round-trip
is needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 07:27:29 -07:00
..
__tests__ fix(canvas): replace unsafe-inline/unsafe-eval with nonce-based CSP (#450) 2026-04-16 20:35:27 +00:00
app feat(canvas): Phase 5 — credit balance pill + low-balance banner 2026-04-19 07:27:29 -07:00
components fix(canvas): degraded badge WCAG AA contrast — amber-400 → amber-300 (closes #885) 2026-04-18 12:05:38 -07:00
hooks initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
lib feat(canvas): Phase 5 — credit balance pill + low-balance banner 2026-04-19 07:27:29 -07:00
store fix(gate-6): merge main into fix/a11y-audit-902-905 — resolve 7 conflicts 2026-04-18 01:34:00 +00:00
stores initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
styles fix(canvas): C1/C2/C3/C5 dark-theme CSS and ReactFlow colorMode 2026-04-16 10:45:16 +00:00
types feat(canvas): audit trail visualization panel (issue #753) 2026-04-17 16:03:28 +00:00
middleware.ts fix(canvas): replace unsafe-inline/unsafe-eval with nonce-based CSP (#450) 2026-04-16 20:35:27 +00:00