Daily review 2026-07-08 - #72
Draft
NghaReformer wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily Review — 2026-07-08
Automated codebase review for OhadaLearn (SvelteKit 2 + Svelte 5 runes).
Reviewer scope: Svelte 5 rules, theme-token compliance, i18n, server boundary, accessibility, dead code, performance.
1. Bugs & Issues
Summary
KpiStrip.svelte,ChartPanel.svelte, +18 moreCategoryBreakdownDonut.svelte,MatchingPairsOverlay.svelteFeedbackForm.svelte[slug]/+page.svelteCategoryBreakdownDonut.sveltePlaygroundCard.svelte,EntryHistory.svelte[lang]/+page.svelteplaygrounds.ts,PlaygroundTabs.sveltePlaygroundTabs.svelte1.1
--orangetoken does not exist — 20 call-sites silently fall back to#f59e0b(high)src/lib/theme/tokens.tsdefines no--orangeproperty; the theme uses--amber/--amber-glowinstead. Every use ofvar(--orange, #f59e0b)silently renders the hardcoded hex colour, breaking the theme contract.Affected files (non-exhaustive):
src/lib/components/playground/KpiStrip.svelte:76src/lib/playgrounds/amortization/components/ScheduleTable.svelte:240src/lib/playgrounds/amortization/components/ChartPanel.svelte:436, 493, 515, 529src/lib/playgrounds/bank-reconciliation/components/LedgerPanel.svelte:175src/lib/playgrounds/bank-reconciliation/components/VarianceScale.svelte:230, 260, 261Suggested fix: Either add
orangetoThemeTokens.colorsintokens.ts(mapping to#f59e0b), or replace everyvar(--orange, …)withvar(--amber). The amber token (#f5a623) is already defined and semantically equivalent. Prefer--ambersince the token already exists.1.2 Hardcoded hex colour maps in chart components (high)
Two components define private colour tables that bypass the design-token system entirely and cannot be recoloured by theme changes:
src/lib/playgrounds/bank-reconciliation/components/CategoryBreakdownDonut.svelte:30–40Nine hardcoded hex values for donut chart segments.
src/lib/playgrounds/bank-reconciliation/components/MatchingPairsOverlay.svelte:30–35Four hardcoded hex values for SVG match-line strokes.
Suggested fix: Map each semantic category to an existing CSS custom property (
var(--accent),var(--green),var(--amber),var(--error), etc.). For categories without a direct token mapping, add purpose-specific tokens totokens.tsso all colour decisions remain in one file.1.3
$lib/server/type imported into client component (medium)src/lib/components/feedback/FeedbackForm.svelte:7FeedbackTypeandFeedbackSeverityare simple string-union types. Althoughimport typeis erased at runtime, SvelteKit's Vite plugin enforces the$lib/server/boundary at the module graph level and may emit a build warning or error in certain modes. Shared types used in client components should not live behind the server boundary.Suggested fix: Move
FeedbackTypeandFeedbackSeveritytosrc/lib/types/feedback.ts. Update$lib/server/db/types.tsto re-import from there if needed.1.4
{#await nativeLoader}block missing{:catch}(medium)src/routes/[lang]/playgrounds/[slug]/+page.svelte:103–116No
{:catch}block. If the dynamic import throws (network failure, malformed module, missing export), Svelte propagates the rejection to the page-level error boundary, replacing the entire layout instead of showing an in-context message.Suggested fix: Add a
{:catch err}block with arole="alert"error panel and a new i18n keyplaygrounds.load_errorin both locale files.1.5 Inline
styleattribute for dynamic chart colour (medium)src/lib/playgrounds/bank-reconciliation/components/CategoryBreakdownDonut.svelte:120CLAUDE.md prohibits inline styles. This is a symptom of finding 1.2. Resolves once
seg.coloris replaced with adata-catattribute and CSS-variable-based colour rules.1.6 Hardcoded raw colour values in component CSS (medium)
src/lib/components/PlaygroundCard.svelte:45—rgba(0, 0, 0, 0.3)in box-shadow; replace withvar(--shadow-md).src/lib/playgrounds/journal-entry/components/EntryHistory.svelte:400—color: #fffon.btn-confirm; add a--text-on-errortoken totokens.tsand use it here.1.7 Generic text gradient on hero title (medium)
src/routes/[lang]/+page.svelte:128CLAUDE.md: "No generic gradients." Move the definition into a named token (
--hero-title-gradient) intokens.ts, or replace the gradient with a solid colour + accented<em>element.1.8 Emoji used as rendered icons (low)
CLAUDE.md: "No emoji icons."
src/lib/data/playgrounds.ts:18–70—iconfield uses 📐, 📊, 📒, 🏦, 📉, 🏧, 📈src/lib/components/playground/PlaygroundTabs.svelte:11–14— tab icons 📖, 🧮, 📋Both render directly in UI. Replace with inline SVGs consistent with
Nav.svelte/FeedbackLauncher.svelte.1.9 Hardcoded English string in
aria-label(low)src/lib/components/playground/PlaygroundTabs.svelte:18French-language users receive an English accessibility label. Replace with
aria-label={$t('shell.tabs.aria')}and add the key to both locale files.2. New Playground Ideas
Existing coverage: TVM, CVP, Journal Entry, Amortization (loan), Depreciation (fixed assets), Bank Reconciliation, Interest (simple/compound).
2.1 Financial Ratio Analysis — Analyse des ratios financiers
Target learner: Licence 3 / Master 1
Pedagogical objective: Students compute ratios mechanically without interpreting what they signal. This playground shows a SYSCOHADA-formatted balance sheet + income statement, computes 15+ ratios live, and shows colour-coded traffic-light feedback against OHADA-sector benchmarks.
Core interaction: Learner enters or adjusts balance-sheet / income-statement line items; ratios update live; out-of-range ratios are flagged with an interpretation of the implication.
MVPs:
Why it complements existing playgrounds: Journal Entry produces raw accounting data; this playground teaches what to do with it analytically. Pairs naturally with TVM for capital-structure decisions.
2.2 VAT / TVA Returns — Calculateur de déclaration TVA OHADA
Target learner: Licence 2 / practicing professional
Pedagogical objective: OHADA-zone VAT varies by member state. Students confuse TVA collectée with TVA déductible and make sign errors on net balances.
Core interaction: Learner enters a list of purchase/sale invoices with TVA rates (0%, 8.5%, 18%, exempt) and selects a country (Cameroon, CI, Sénégal). Playground computes TVA collectée, TVA déductible, net balance (payable or credit), and generates the SYSCOHADA journal entry (accounts 443/445).
MVPs:
Why it complements existing playgrounds: Bank Reconciliation and Journal Entry handle recording; TVA adds the tax-compliance dimension mandatory for any OHADA-zone accountant.
2.3 Inventory Valuation Methods — Méthodes de valorisation des stocks
Target learner: Licence 2
Pedagogical objective: SYSCOHADA permits FIFO and two variants of CMP (at each entry / end-of-period). Students confuse the variants and under-appreciate how the choice affects COGS and closing inventory, impacting profit.
Core interaction: Learner enters stock movements (date, in/out, qty, unit cost). Three side-by-side schedules update live — FIFO, CUMP à chaque entrée, CUMP de fin de période — with a delta strip showing the impact on closing stock value and COGS.
MVPs:
Why it complements existing playgrounds: The missing "Class 3 stocks" module to complement the Class 2 (Amortization, Depreciation) and Class 5 (Bank Reconciliation) playgrounds.
2.4 OHADA Payroll — Calcul de la fiche de paie (CNPS + IRPP)
Target learner: Licence 3 / Master / Practicing professional
Pedagogical objective: OHADA-zone payroll requires country-specific CNPS rates and progressive IRPP brackets. Most students cannot derive net salary from gross, leading to errors in payroll journal entries and social-charge declarations.
Core interaction: Learner inputs gross salary, country (Cameroon / CI / Sénégal), contract type, and allowances. Playground itemises deductions (CNPS employee/employer, IRPP, CAFAL), shows net salary, and generates the SYSCOHADA payroll journal entry (accounts 661, 4211, 4311, 4321, 4341…).
MVPs:
Why it complements existing playgrounds: Payroll is the highest-frequency periodic journal entry in practice; adds country-by-country compliance data not covered elsewhere.
2.5 Lease Accounting Comparison — Contrats de location : SYSCOHADA vs IFRS 16
Target learner: Master / Practicing professional
Pedagogical objective: SYSCOHADA's operating-vs-finance lease classification diverges from IFRS 16's right-of-use model. Professionals in dual-reporting environments must reconcile the two; this is a frequent source of errors in first-time IFRS adoption projects.
Core interaction: Learner inputs lease terms (payment, frequency, duration, implicit rate, asset fair value and economic life). Playground classifies under SYSCOHADA, generates the IFRS 16 ROU/liability schedule, and shows side-by-side P&L and balance-sheet impact plus reconciliation delta.
MVPs:
Why it complements existing playgrounds: Amortization handles asset depreciation; this adds the lease-liability side and a comparative IFRS angle absent from all current modules.
Report generated by automated daily review routine. No code was modified.
Generated by Claude Code