Skip to content

Daily review 2026-06-17 - #53

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

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

Conversation

@NghaReformer

Copy link
Copy Markdown
Owner

Daily Review — 2026-06-17

Reviewer: Automated (Claude Sonnet 4.6)
Branch scanned: main (HEAD)
Files audited: 106 .svelte, ~107 .ts, 4 static HTML playgrounds
Commands run: grep audits (manual); npm run i18n:check skipped — tsx binary absent from node_modules (see §1 issue L-1)


1. Bugs & Issues

MEDIUM


M-1 · Hardcoded #fff hex colors (4 occurrences) — violates CLAUDE.md

All four are text-on-colored-background situations where the theme lacks a matching token. tokens.ts defines --accent, --error, etc. but no --text-on-accent or --text-on-error token, so devs fell back to a literal hex value.

# File Line Context
a src/routes/[lang]/learn/+page.svelte 202 .group-cta — text on var(--accent) CTA button
b src/routes/[lang]/chart-of-accounts/+page.svelte 423 .framework-btn.active — text on var(--accent) active pill
c src/routes/[lang]/chart-of-accounts/+page.svelte 458 .class-chip.active — text on var(--accent) class filter chip
d src/lib/playgrounds/journal-entry/components/EntryHistory.svelte 400 .btn-confirm — text on var(--error) destructive button

Suggested fix: Add textOnAccent and textOnError tokens to src/lib/theme/tokens.ts, then replace all four color: #fff with color: var(--text-on-accent) (a, b, c) and color: var(--text-on-error) (d).


M-2 · Missing --text-on-accent / --text-on-error design tokens

src/lib/theme/tokens.ts has no tokens for text rendered on accent or error backgrounds — the root cause of M-1. Without the token the linter cannot catch future violations.

Suggested fix: Define textOnAccent: '#ffffff' and textOnError: '#ffffff' in the colors section of tokens.ts.


LOW


L-1 · npm run i18n:check broken — tsx binary absent from node_modules

package.json lists "tsx": "^4.21.0" in devDependencies; both i18n:check and prebuild call it. Without npm install, the i18n parity gate is inoperative and npm run build fails.

  • package.json:13-14 — both scripts call tsx scripts/generate-i18n-types.ts

Suggested fix: Ensure npm install runs in all CI pipelines before any build step. Alternatively, commit the generated src/lib/i18n/types.ts so builds can succeed without the generator.


L-2 · Three separate $effect blocks in VarianceScale.svelte:54–60 for tweened values

Three single-statement effects that almost certainly fire in the same microtask. Merging them reduces subscription overhead and guarantees all three tweens start in the same frame.

Suggested fix:

$effect(() => {
  tiltTween.set(tiltTarget);
  bankTween.set(adjustedBank);
  booksTween.set(adjustedBooks);
});

L-3 · ScreenshotCapture.svelte:156 — file input relies on implicit label association only

<input type="file"> is inside a wrapping <label> with text in a following <span>. NVDA on Firefox and some mobile ATs announce this as "unlabelled file chooser" (WCAG 1.3.1).

Suggested fix: Add aria-label={$t('feedback.screenshot.upload')} directly to the <input>.


L-4 · cvp/exercises.ts:162 — double-cast as unknown as CVPExerciseParams

Bypasses TypeScript's structural type check entirely; runtime errors surface inside the solver rather than at the call site.

Suggested fix: Use a proper type guard or narrow the type upstream. If the cast is genuinely unavoidable, add a comment explaining why.


L-5 · Inconsistent ARIA role pairing in chart-of-accounts/+page.svelte

Class filter buttons (line 153) use role="tablist" while framework switcher buttons (line 134) use role="radiogroup" + role="radio". Both are exclusive-selection in-place filters — the same semantic pattern deserves the same ARIA treatment.

Suggested fix: Standardise both groups on role="radiogroup" + role="radio" + aria-checked.


2. Svelte 5 Runes Compliance

No violations found. All 106 .svelte files correctly use $props(), $state, $derived, $effect, onclick=, {@render children()}, and $app/state.


3. i18n Parity

Manual key-count audit (generator unavailable — see L-1):

Namespace EN FR Status
amortization 219 219
bank-reconciliation 193 193
common 64 64
cvp 217 217
feedback 53 53
interest 211 211
journal-entry 140 140
tvm 172 172

All namespaces in parity.


4. Server Boundary & Security

No server-only code found outside $lib/server/. Both API endpoints implement rate limiting, honeypot, input validation, and silent bot deflection. No findings.


5. New Playground Ideas

Existing: Journal Entry, TVM, Interest, Amortization, Bank Reconciliation, CVP, Depreciation (static).

A — SYSCOHADA Balance Sheet Builder / Constructeur de Bilan SYSCOHADA

Target: Licence 1/2 · Gap: Students confuse OHADA's 9-class plan with IFRS/PCG presentation — especially Class 1 and split Class 4 accounts. Interaction: Drag-and-drop 15–20 pre-populated account balances into the correct Bilan cells (Actif immobilisé / Actif circulant / Tréso-Actif; Capitaux propres / Dettes financières / Passif circulant / Tréso-Passif); totals update live, "Check" highlights misclassifications. Reuses: existing chart-of-accounts shared module + PlaygroundScenarios system. Natural sequel to Journal Entry.

B — VAT Return Calculator / Calculateur de Déclaration TVA (OHADA)

Target: Licence 2/3, professionals · Gap: Students cannot correctly split TVA collectée from TVA déductible or apply prorata rules; UEMOA (18 %) vs CEMAC (19.25 %) rates add confusion. Interaction: Enter purchase/sale lines with HT amount and rate; playground accumulates both sides and produces the monthly declaration (TVA à payer or crédit reportable) plus the Class 445x settlement journal entry. Fills a major gap — no current playground covers indirect taxation.

C — Financial Ratios Analyser / Analyseur de Ratios Financiers

Target: Licence 3 / Master · Gap: Students memorise formulas without interpreting signals for OHADA-zone credit/supplier contexts. Interaction: Edit a pre-populated Bilan + Compte de Résultat; a dashboard of 12 ratios (liquidity, solvency, profitability, activity) updates instantly. "What-if" sliders stress-test single variables. Capstone connecting Journal Entry → Bilan Builder → Ratio Analysis.

D — Overhead Cost Allocation / Imputation des Charges Indirectes

Target: Licence 2/3 · Gap: CVP uses direct costing; SYSCOHADA exams require full costing (coût complet) with allocation keys. Changing the key must visibly change unit cost and profit. Interaction: Define 2–3 cost centres, enter direct costs + indirect charge pool, choose allocation key (machine-hours / labour-hours / turnover %); see per-unit full cost, full-cost break-even, and direct-vs-full profit comparison side by side. Direct complement to CVP.

E — Payroll Journal Entry / Journal de Paie

Target: Licence 3, professionals · Gap: The multi-line payroll entry (gross salary → CNPS salarial + patronal, IRPP, net pay) is universally required but country-rate differences (Cameroon, Ivory Coast, Senegal) make it hard to practise. Interaction: Enter gross salary + country; see a step-by-step Bulletin de Paie, then verify the auto-generated multi-line journal entry (Classes 6/4/5) before the playground marks it complete. Extends the Journal Entry playground with the highest-frequency real-world entry type.


Report generated 2026-06-17. Next run: 2026-06-18.


Generated by Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FG13jvn4URoMTDGSUckbNC
@vercel

vercel Bot commented Jun 17, 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 17, 2026 11:12pm

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