Daily review 2026-06-26 - #61
Draft
NghaReformer wants to merge 1 commit into
Draft
Conversation
|
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-06-26
1. Bugs & Issues
HIGH — Missing
--orangeCSS variable in theme tokensFile:
src/lib/theme/tokens.ts+ 20+ component filesThe theme token set defines
amber(→--amber), but over 20 components referencevar(--orange, #f59e0b). The CSS generator never emits--orange, so every usage always falls through to the hardcoded fallback#f59e0b. A theme change toamberhas no effect on these components.Affected files (sample):
KpiStrip.svelte:76,amortization/ChartPanel.svelte:436,bank-reconciliation/VarianceScale.svelte:230,ReconciliationFlow.svelte:278.Fix: Add
orangetoThemeTokens.colorsintokens.ts, regenerate CSS; or replace allvar(--orange, …)usages withvar(--amber).HIGH — Hardcoded hex colors in
CATEGORY_COLORSandCOLORmapsFiles:
bank-reconciliation/CategoryBreakdownDonut.svelte:30–40— 9 hardcoded hex valuesbank-reconciliation/MatchingPairsOverlay.svelte:30–35— 4 hardcoded hex valuesThese bypass the theme system entirely.
CategoryBreakdownDonutalso uses an inlinestyle="background: {seg.color}"at line 120.Fix: Move colour sets to
tokens.ts(or adataColorssub-object), emit as CSS custom properties. Replacestyle="background: {seg.color}"withstyle="--swatch: {seg.color}"and.legend-swatch { background: var(--swatch) }.HIGH — Hardcoded English string
"items"in donut SVGFile:
src/lib/playgrounds/bank-reconciliation/components/CategoryBreakdownDonut.svelte:105Raw English literal never routed through i18n. French users see English text.
Fix: Add
centerLabelprop; pass$t('br.donut.items')at the call site; add EN/FR keys; runnpm run i18n:check.HIGH —
NumberFieldformats with hardcoded'en-US'localeFile:
src/lib/components/playground/NumberField.svelte:30French-locale users see
1,234.56instead of1 234,56.NumberFieldis used in every playground.Fix: Import
formatNumberfrom$lib/format, pass$locale$, replace the rawtoLocaleStringcall.HIGH — Empty
aria-labelledbytarget on direction radio groupFile:
src/lib/playgrounds/bank-reconciliation/components/TransactionJournal.svelte:183–184The referenced element contains only
, so screen readers announce a blank label for the inflow/outflow toggle.Fix: Remove
aria-labelledby; addaria-label={directionLabel}directly on theradiogroupdiv with an i18n'd prop.MEDIUM — Emoji icons in playground data (banned by CLAUDE.md)
File:
src/lib/data/playgrounds.ts:18,27,36,44,53,61,69All 7 playground entries use emoji in the
iconfield (📐 📊 📒 🏦 📉 🏧 📈). CLAUDE.md explicitly prohibits emoji icons. These render inPlaygroundCardand the playground header.Also:
src/routes/[lang]/+page.svelte:13–16— feature section uses Unicode dingbats❖ ⭐ ⚖ ♡as icons.Fix: Replace emoji with inline SVG icons or a named icon key resolved by an
<Icon>component.MEDIUM — Stale/mismatched fallback hex values in CSS
var()callsFiles:
bank-reconciliation/ReconciliationFlow.svelte:137—var(--accent, #6ea8fe)but theme accent is#7c7fffbank-reconciliation/ReconciliationStatement.svelte:275,292,293—var(--green, #16a34a)but theme green is#34d399bank-reconciliation/VarianceScale.svelte:122,126—var(--accent, #6ea8fe)same mismatchProduces wrong colours in pre-hydration flash, print, and no-JS environments.
Fix: Update fallbacks to match current
defaultThemevalues intokens.ts.MEDIUM — Inline style for honeypot field (banned by CLAUDE.md)
File:
src/lib/components/WaitlistForm.svelte:55Fix: Replace with a
.honeypotCSS class in the component<style>block.MEDIUM — SVG
<defs>IDs are document-global and will conflict if component rendered twiceFiles:
bank-reconciliation/VarianceScale.svelte:120,125,129(IDsbrBeam,brPivot,brGlow) andbank-reconciliation/MatchingPairsOverlay.svelte:92(IDbrMatchGlow).Duplicate IDs cause the first definition to apply to all later instances silently.
Fix: Generate a per-instance prefix (
crypto.randomUUID().slice(0, 8)in$state) and interpolate it into eachid=andurl(#…)reference.LOW —
new Date()in module scope causes SSR/hydration year mismatchFile:
src/lib/components/Footer.svelte:6Runs at SSR time. Cross-year deploys or differing server timezones produce a hydration mismatch warning.
Fix: Compute server-side in
+layout.tsand pass as a prop, or use$effectfor client-only initialisation.LOW — Interest playground default dates computed at module parse time
File:
src/lib/playgrounds/interest/Playground.svelte:27–30startDate/endDatedefaults callnew Date()at component definition time. A long-lived SPA session retains the original startup dates until a full page reload.Fix: Move into a factory function called at
$stateinitialisation.Summary: 0 Svelte 4 syntax violations · 0 server-boundary leaks · 0 circular imports · 0 TypeScript errors. Primary themes: (1)
--orangetoken gap breaks 20+ components' theme-system connection; (2) scattered hardcoded hex in data-colour maps; (3) one EN-only string in the bank-reconciliation donut; (4) locale bug inNumberField.2. New Playground Ideas
Verified existing playgrounds (none of these duplicate them):
tvm,cvp,journal-entry,amortization,depreciation,bank-reconciliation,interest.1. Financial Ratio Dashboard / Tableau de Bord des Ratios Financiers
Target: Licence 3, Master 1, practicing accountants
Pedagogical objective: Students compute individual ratios in isolation but rarely see how SYSCOHADA's FR/BFR/TN triangle governs solvency as a system. This playground fixes that mental model.
Core interaction: Learner inputs a simplified SYSCOHADA balance sheet and income statement. The playground computes FR, BFR, TN plus 8–10 standard ratios; all animate as inputs change. A traffic-light panel highlights ratios outside industry norms. What-if slider: "increase trade receivables 10% — how does BFR move?"
MVP inputs/outputs: Balance sheet line items, revenue, EBITDA, interest charges → FR/BFR/TN waterfall; ratio panel with thresholds; one-sentence contextual insight per outlier ratio.
Complements existing: Upstream of Bank Reconciliation (both address cash/liquidity); downstream of Journal Entry (which generates the balance sheet inputs).
2. Inventory Valuation: FIFO vs CMP / Évaluation des Stocks FIFO vs CMP
Target: Licence 2
Pedagogical objective: SYSCOHADA mandates FIFO or CMP (LIFO is prohibited). Students consistently mis-calculate the running CMP after a new purchase lot. This playground makes the recalculation transparent at every step.
Core interaction: Learner adds purchase and issue transactions chronologically. Two parallel stock cards (FIFO / CMP) update live. Each row highlights which lot was consumed under FIFO and shows the CMP formula step-by-step. A summary compares COGS and ending inventory under each method.
MVP inputs/outputs: Opening stock, purchase lots (qty × unit price), issue quantities → dual FIFO/CMP stock cards; COGS comparison; ending inventory; gross-margin impact.
Complements existing: Feeds directly into Journal Entry — the ending inventory figure is a 31xx debit entry in SYSCOHADA.
3. Foreign Currency Transactions / Opérations en Devises SYSCOHADA
Target: Licence 3, Master, import/export professionals
Pedagogical objective: SYSCOHADA accounts 176, 476, 477 follow recognition rules that differ from IFRS. Students book exchange differences in the wrong period or direction, especially the year-end adjusting entry versus the settlement entry.
Core interaction: Learner records a foreign-currency invoice. The playground advances the timeline (transaction date → year-end → settlement date); the learner enters the rate at each point and the system auto-generates the three journal entries for accounts 47x with a sign-convention explanation at each step.
MVP inputs/outputs: Functional currency (XAF/XOF/GNF…), foreign currency (EUR/USD), amounts at three rates → three SYSCOHADA journal entries; net exchange gain/loss; provision vs. actual comparison.
Complements existing: Extends Journal Entry into multi-period scenarios; introduces accounts not covered by Depreciation or Amortization.
4. Payroll & Social Charges / Bulletin de Paie et Charges Sociales
Target: Licence 2–3, HR/accounting professionals
Pedagogical objective: Students can compute net pay but cannot reconstruct the composite journal entry (debit 661/645, credit 421/431/432/433). Different OHADA states use different social-charge rates (CNPS Cameroon vs. CNSS Côte d'Ivoire); the playground exposes this variability explicitly.
Core interaction: Learner enters gross salary and selects a country-specific regime (configurable rate table). A live payslip appears alongside the exact SYSCOHADA journal entry for the pay period. A second tab shows employer total labour cost vs. employee net.
MVP inputs/outputs: Gross salary, employee category, country preset (Cameroon / Côte d'Ivoire / Senegal / generic) → annotated payslip; 66x/421/43x journal entry; employer total-cost breakdown.
Complements existing: Bridges Journal Entry mechanics with an OHADA-specific workflow absent from all existing playgrounds.
5. Cash Flow Statement Builder (Indirect Method) / Tableau des Flux de Trésorerie — Méthode Indirecte
Target: Master 1–2, CPA/DSCG candidates, professionals
Pedagogical objective: SYSCOHADA mandates the indirect method. Students who can read a P&L cannot reconcile net income to operating cash flow — particularly when non-cash items (depreciation, provisions) and working-capital changes (Δ clients, Δ fournisseurs, Δ stocks) interact. Sign-convention errors are the most common exam mistake.
Core interaction: Learner receives a simplified income statement and two-period balance sheet. They drag-and-drop line items into the correct TFT section (operating/investing/financing) and choose the adjustment sign. A running total updates live and a "balance check" confirms the statement ties to opening/closing cash. Wrong placements trigger a one-sentence SYSCOHADA rule explanation.
MVP inputs/outputs: Net income, depreciation, WC account changes, capex, financing flows → three-section TFT; cash reconciliation; per-item feedback on sign errors.
Complements existing: Sits above Journal Entry and Bank Reconciliation in the learning journey — it consumes the outputs of those playgrounds as source data.
Report generated by automated daily review · 2026-06-26
Generated by Claude Code