Skip to content

Daily review 2026-06-25 - #60

Draft
NghaReformer wants to merge 1 commit into
mainfrom
daily-review/2026-06-25
Draft

Daily review 2026-06-25#60
NghaReformer wants to merge 1 commit into
mainfrom
daily-review/2026-06-25

Conversation

@NghaReformer

Copy link
Copy Markdown
Owner

Daily Review — 2026-06-25

Reviewer: Automated (senior frontend + SYSCOHADA domain)
Branch: daily-review/2026-06-25
Codebase head: main


1. Bugs & Issues

BUG-01 · HIGH · Theme tokens --orange, --blue, --red never defined — hardcoded fallbacks always fire

Files: 27 occurrences across 7 components

  • src/lib/components/playground/KpiStrip.svelte:76
  • src/lib/playgrounds/amortization/components/ScheduleTable.svelte:240,246,259
  • src/lib/playgrounds/amortization/components/InputsPanel.svelte:604–605
  • src/lib/playgrounds/amortization/components/ChartPanel.svelte:436,444,493,501,515,529,533
  • src/lib/playgrounds/bank-reconciliation/components/LedgerPanel.svelte:175
  • src/lib/playgrounds/bank-reconciliation/components/VarianceScale.svelte:230,260,261,331,335,370

css-generator.ts emits --amber, --green, --error — but never --orange, --blue, or --red. Every var(--orange, #f59e0b), var(--blue, #3b82f6), and var(--red, #ef4444) permanently resolves to its hardcoded fallback, fully bypassing the theme system. Any future theme variant (light mode, high-contrast) cannot override these colours.

Suggested fix: Add three aliases to css-generator.ts:

--orange: ${c.amber};
--blue: ${c.accentDim};
--red: ${c.error};

Alternatively, normalise all references in the seven components to use --amber, --accent-dim, and --error respectively.


BUG-02 · MEDIUM · color: #fff hardcoded in three files

Files:

  • src/routes/[lang]/chart-of-accounts/+page.svelte:423.framework-btn.active
  • src/routes/[lang]/chart-of-accounts/+page.svelte:458.class-chip.active
  • src/routes/[lang]/learn/+page.svelte:202.group-cta
  • src/lib/playgrounds/journal-entry/components/EntryHistory.svelte:400.btn-confirm

#fff is not defined in ThemeTokens and has no CSS variable alias. If the theme ever uses a dark accent requiring dark text, these will fail silently. Suggested fix: Add --text-on-accent token or use var(--text-primary).


BUG-03 · MEDIUM · SVG chart colour maps use raw hex literals outside the theme system

Files:

  • src/lib/playgrounds/bank-reconciliation/components/CategoryBreakdownDonut.svelte:31–39
  • src/lib/playgrounds/bank-reconciliation/components/MatchingPairsOverlay.svelte:31–34

Nine category colours and four match-type colours are hardcoded TypeScript hex literals injected directly into SVG stroke/fill attributes. The values diverge from the design palette (purple #a855f7, cyan #06b6d4, pink #ec4899) with no design-system grounding. Suggested fix: Extract to src/lib/theme/chart-colors.ts with documentation explaining the SVG attribute constraint.


BUG-04 · MEDIUM · rehype-sanitize permits style attribute on <span> in rendered learn content

File: src/lib/content/markdown.ts:25

The KaTeX schema extension adds 'style' to every <span>. Any content file can inject arbitrary CSS via <span style="..."> that passes sanitization — a CSS injection vector. Suggested fix: Remove the blanket 'style' allowance; test whether KaTeX output survives (may require a targeted property whitelist).


BUG-05 · LOW · console.error left in client bundle

File: src/lib/components/feedback/ScreenshotCapture.svelte:97

A bare console.error('Tab capture failed:', err) leaks stack traces to end users' DevTools in production. The error is already surfaced via the error state variable and role="alert". Suggested fix: Remove the console.error line.


BUG-06 · LOW · File input accessible name order bug in ScreenshotCapture

File: src/lib/components/feedback/ScreenshotCapture.svelte:155–157

<input> appears before its <span> label text inside <label>. Screen readers announce the browser-default "Choose File" instead of the $t('feedback.screenshot.upload') string. Suggested fix: Swap DOM order so <span> precedes <input>.


BUG-07 · LOW · --green fallback hex diverges from actual token value

Files: ReconciliationStatement.svelte:275,292,293 · VarianceScale.svelte:223,252

var(--green, #22c55e) — token is #34d399, fallback is #22c55e (different shade). No live bug, but if --green is ever removed the fallback silently switches colour. Suggested fix: Align fallback to #34d399.


2. New Playground Ideas

Existing (excluded): Journal Entry, TVM, CVP, Amortization, Bank Reconciliation, Interest, Depreciation (legacy HTML).


IDEA-01 · Financial Statement Builder (Préparateur d'états financiers)

Target: Licence 3, Master, practitioner
Gap: Students close journal entries correctly but cannot map the trial balance to SYSCOHADA Bilan / Compte de Résultat lines.
Interaction: Drag-and-drop trial balance accounts into OHADA statement line items; playground validates placement against SYSCOHADA class boundaries.
I/O: Trial balance → Draft Bilan + Compte de Résultat, balancing check, mis-classification highlights.
Complement: Picks up exactly where the Journal Entry playground stops.


IDEA-02 · Inventory Valuation — CMUP vs. FIFO (Valorisation des stocks)

Target: Licence 2, Licence 3
Gap: SYSCOHADA mandates CMUP; students confuse periodic vs. continuous recalculation and cannot compare results with FIFO.
Interaction: Enter purchase/sale sequence; playground renders FIFO and CMUP ledger cards side by side; price slider shows how a late price shock propagates differently in each method.
I/O: Purchase/sale rows → perpetual inventory card (both methods), COGS, ending inventory, OHADA journal entry.
Complement: No existing playground covers inventory valuation.


IDEA-03 · VAT Computation — TEG (Calcul de la TVA)

Target: Licence 2, Licence 3, practitioner
Gap: Students confuse tax-inclusive vs. tax-exclusive prices and miss OHADA deductibility timing rules.
Interaction: Enter purchases and sales with rates; toggle HT/TTC mode; OHADA-zone rate dropdown (18% CEMAC, 18% UEMOA); playground shows TVA collectée, déductible, net balance and generates SYSCOHADA entries (comptes 4431, 4452).
I/O: Purchase/sale lines → TVA dashboard, journal entries, monthly ledger.
Complement: None of the six native playgrounds touch indirect tax.


IDEA-04 · Partnership Profit Distribution (Répartition des bénéfices SARL/SA)

Target: Licence 3, Master
Gap: Students memorise the OHADA allocation waterfall but cannot compute it for non-round numbers or partial-year scenarios.
Interaction: Enter net profit, capital, reserves, proposed dividends; playground walks the mandatory waterfall (statutory reserve 5% until 10% of capital → optional reserve → dividends → retained earnings) showing each constraint tripping.
I/O: Financial inputs → Allocation table, AGM resolution text, SYSCOHADA journal entries (compte 120 → 111, 113, 457).
Complement: Terminal step after the Financial Statement Builder; tested at Master and DESCOGEF level.


IDEA-05 · Effective Interest Rate & Loan Comparison — TEG (Taux Effectif Global)

Target: Licence 2, Licence 3, practitioner
Gap: Students mistake nominal rate for true cost; TEG disclosure is legally mandatory under CEMAC/UEMOA credit regulations.
Interaction: Enter up to 3 loan offers (principal, rate, term, fees, insurance); playground computes TEG via actuarial IRR method (reusing src/lib/finance/irr.ts), renders a cost-waterfall chart (interest vs. fees vs. insurance), ranks offers by TEG and total cost.
I/O: Loan offer parameters → TEG per offer, cost breakdown, ranked comparison, amortization schedule for winner.
Complement: Amortization handles one loan; this handles the selection decision with mandatory OHADA regulatory framing.


Full report: reports/daily/2026-06-25.md


Generated by Claude Code

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ohadalearn Ready Ready Preview, Comment Jun 25, 2026 11:10pm

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.

2 participants