Skip to content

feat(charges): current-period due date + overdue badge + paid toggle carry (THI-329)#224

Merged
thierryvm merged 2 commits into
mainfrom
feat/cc-charges-current-period
Jun 6, 2026
Merged

feat(charges): current-period due date + overdue badge + paid toggle carry (THI-329)#224
thierryvm merged 2 commits into
mainfrom
feat/cc-charges-current-period

Conversation

@thierryvm

Copy link
Copy Markdown
Owner

PR-B — Page charges : période courante + carry #221 (THI-329)

Epic « Factures cohérentes ». La page /app/charges reflète enfin la réalité du mois courant par facture, au lieu de rouler prématurément vers l'occurrence suivante. Branchée depuis main, indépendante de PR-A #223 (seul overlap au merge = bloc d'exports index.ts, trivial).

Le fix « juillet avant juin »

Domaine pur nouveau currentPeriodDueDate(charge, period, todayIso, isPaid) : ancre au mois courant (paid / overdue / dueThisMonth) et ne roule vers la vraie prochaine occurrence (upcoming) que si le mois courant n'est pas un mois de paiement. Remplace nextDueLabel (qui utilisait nextDueDateForCharge, lequel roulait en avant → affichait « juillet » pour une facture de juin). 13 tests.

Carry de #221 (trim rejeté retiré)

Toggle Payé (useOptimistic + togglePaymentAction existant), style payé (line-through), résumé « Payées ce mois : x/y · reste {montant} », redesign groupes (header Repeat + compteur, <ul> arrondi bordé, sous-total bas). Le trim dashboard (moreCount) n'est PAS carrié (rejeté @Thierry — un marqueur « à surveiller » viendra). Nouveau : badge par-ligne « En retard ».

a11y (dashboard-ux C1/H1 corrigés)

  • Badge « En retard » = blanc sur danger plein4.84:1 dans les 2 thèmes (--color-danger n'a pas d'override dark, donc text-danger y échouait).
  • Date reste neutre (plus de couleur seule = WCAG 1.4.1).
  • Sous-total groupe text-brand-700text-brand-text (overridé dark → AA les 2 thèmes).

Gouvernance

plan-reviewer 🟡→intégré (CR-1..4 + faits git vérifiés) · financial-formula-validator GO · i18n-auditor GO (parité 5 locales) · dashboard-ux C1/H1 corrigés · mobile-ios PASS_WITH_NOTES · 47 tests charges + suite complète (1444) + build verts.

⚠️ Dette a11y hors-scope (à tracker)

ProchainesFacturesCard.tsx (dashboard, sur main, non touché ici) a le même pattern bg-danger/10 text-danger (chip danger) + text-brand-700 (tone info) → même fail dark. À corriger dans une passe a11y dédiée.

Smoke @Thierry (preview, desktop + mobile)

/app/charges en juin : facture mensuelle payée → affiche juin payé (plus juillet) ; facture jour passé non payée → badge « En retard » ; toggle bascule l'état ; trimestriel hors-mois → prochaine date réelle. Vérifier badge lisible en dark mode + pas de chevauchement date/badge/montant sur iPhone SE.

🤖 Generated with Claude Code

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @thierryvm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ankora Ready Ready Preview, Comment Jun 6, 2026 10:04pm

@github-actions github-actions Bot added area:charges Charges management status:review-needed Ready for review type:feat New user-facing feature labels Jun 6, 2026
thierryvm added 2 commits June 7, 2026 00:03
…carry (THI-329)

Charges page now reflects the CURRENT month per bill instead of rolling past it.

DOMAIN: new pure currentPeriodDueDate(charge, period, todayIso, isPaid) anchors
to the current month (paid/overdue/dueThisMonth) and only rolls to the real next
occurrence (upcoming) when the month is not a payment month — fixes the page
showing 'juillet' for a June bill ('juillet avant juin'). 13 tests.

UI (carry of #221, trim dropped): Payé toggle (useOptimistic + togglePaymentAction),
paid line-through, 'Payées ce mois' summary, group redesign (Repeat + count,
rounded list, brand subtotal). New: per-row 'En retard' badge driven by
currentPeriodDueDate. nextDueLabel (nextDueDateForCharge, rolled forward) removed.

a11y (dashboard-ux C1/H1): overdue badge = white on solid danger (4.84:1 both
themes); date stays neutral (no color-only signal); group subtotal text-brand-700
-> text-brand-text (dark-overridden, AA both themes).

i18n: app.charges.{toastMarkedPaid,toastMarkedUnpaid,markPaidAria,unmarkPaidAria,
paidSummary,paidHint,statusOverdue} x5 locales. moreCount NOT carried.

plan-reviewer 🟡→integrated (CR-1..4) · financial-formula-validator GO ·
i18n-auditor GO · dashboard-ux C1/H1 fixed · mobile-ios PASS_WITH_NOTES.
Branched from main, independent of PR-A #223 (index.ts export = trivial merge).
@thierryvm thierryvm force-pushed the feat/cc-charges-current-period branch from e038499 to 8102a44 Compare June 6, 2026 22:04
@thierryvm thierryvm merged commit 2c0d8a6 into main Jun 6, 2026
9 checks passed
@thierryvm thierryvm deleted the feat/cc-charges-current-period branch June 6, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:charges Charges management status:review-needed Ready for review type:feat New user-facing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant