Daily review 2026-06-23 - #58
Draft
NghaReformer wants to merge 1 commit into
Draft
Conversation
Automated senior-review: 8 issues found (2 HIGH, 3 MEDIUM, 3 LOW). Key findings: hardcoded hex color constants in bank-reconciliation donut/SVG overlays, missing --orange theme token, non-i18n aria-labels (12 instances), tsx missing breaking i18n:check. Zero Svelte 5 rune violations. Five new SYSCOHADA playground proposals included.
|
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-23
Automated senior-review routine. Reviewed commit
65e5077.1. Bugs & Issues
1.1 Hardcoded Hex Colors — Theme Token Bypass
src/lib/playgrounds/bank-reconciliation/components/CategoryBreakdownDonut.svelte:30–40Severity: HIGH
CATEGORY_COLORSmaps nine categories to raw hex values (#6ea8fe,#22c55e,#f59e0b, etc.), bypassing the design-token system. If the theme changes or a second theme is added this chart will be visually inconsistent.Suggested fix: Expose these as CSS custom properties in
src/lib/theme/tokens.tsor map categories to existing semantic tokens (--green,--amber,--error,--accent) and read them fromgetComputedStyle.src/lib/playgrounds/bank-reconciliation/components/MatchingPairsOverlay.svelte:30–34Severity: HIGH
COLORmaps fourMatchTypevalues to hardcoded hex strings used as SVGstroke/fillattributes. Same token-bypass problem.Suggested fix: Read CSS custom properties via
getComputedStyle(document.documentElement).getPropertyValue('--green')at mount, or add dedicated match-type tokens to the theme.src/lib/components/playground/KpiStrip.svelte:76Severity: MEDIUM
--orangeis not emitted by the theme token system (the token is namedamber), so the hardcoded fallback fires on every page load.Suggested fix: Add
orangetosrc/lib/theme/tokens.tscolors, or change the usage tovar(--amber).src/lib/playgrounds/journal-entry/components/EntryHistory.svelte:400,src/routes/[lang]/chart-of-accounts/+page.svelte:423,458,src/routes/[lang]/learn/+page.svelte:202Severity: LOW
color: #fff;— raw white. Replace withvar(--text-primary).1.2 Dynamic Inline Styles (Runtime-Computed)
These are not static styling decisions and are technically unavoidable, but the CSS custom property pattern is cleaner:
MatchingPairsOverlay.sveltewidth:{w}px; height:{h}px--w:{w}px; --h:{h}pxin style attr + CSSwidth: var(--w)MatchingPairsOverlay.svelteanimation-delay: {i*60}msScenarioWalkthrough.sveltewidth: {progressPct}%--progress:{progressPct}%+width: var(--progress)ReconciliationFlow.svelte1.3
console.warnNot Gated Behind Dev Checksrc/lib/playgrounds/_registry.ts:14Severity: LOW
console.warn(...)runs in production. Wrap inif (import.meta.env.DEV).1.4 Accessibility —
aria-labelValues Not InternationalizedSeverity: MEDIUM
Twelve
aria-labelattributes are hardcoded in English. FR screen-reader users hear English labels.src/lib/components/Nav.svelte"Main navigation"src/lib/components/Nav.svelte"Toggle menu"src/lib/components/playground/PlaygroundTabs.svelte"Playground sections"src/lib/playgrounds/journal-entry/components/JournalEntryForm.svelte"Journal entry lines"src/lib/playgrounds/journal-entry/components/JournalEntryForm.svelte"Actions"src/lib/playgrounds/interest/components/ModeTabs.svelte"Interest mode"src/lib/playgrounds/bank-reconciliation/components/ReconciliationStatement.svelte"layout"(also misleading)src/lib/playgrounds/bank-reconciliation/components/LedgerPanel.svelte"Actions"src/lib/playgrounds/bank-reconciliation/components/BankStatementPanel.svelte"Actions"src/lib/playgrounds/bank-reconciliation/components/TransactionJournal.svelte"Transaction side"src/lib/playgrounds/cvp/components/ChartToolbar.svelte"Chart views"src/lib/playgrounds/cvp/components/InputPanel.svelte"CVP mode"Suggested fix: Add
aria.*keys tocommon.en.ts/common.fr.tsand use$t('common.aria.mainNav')etc.1.5
tsxNot Installed —npm run i18n:checkFailsSeverity: MEDIUM
npm run i18n:checkexits withsh: tsx: not found. TheTranslationKeyunion type cannot be regenerated, so i18n type safety degrades silently as namespaces evolve.Suggested fix:
npm install -D tsxand confirm in CI.Summary
--orangetoken, non-i18n aria-labels, tsx missing#fffcolors, dynamic inline styles, console.warnZero Svelte 5 rune violations. No
export let,$:,on:*,<slot>, or$app/storesfound. Server-only boundary clean. No unhandled async errors. No dead code detected.2. New Playground Ideas
Existing: Amortization, Bank Reconciliation, CVP, Interest, Journal Entry, TVM, Depreciation (static HTML).
2.1 VAT / TVA Computation Playground
EN: VAT Accounting Simulator | FR: Simulateur de comptabilité TVA
Target: Licence 2, practicing professional
Fixes confusion between collected VAT (liability, compte 4441) and deductible VAT (asset, compte 4451), and the TVA à décaisser netting. User enters purchases and sales with mixed OHADA VAT rates; playground builds the VAT ledger live and generates the monthly settlement journal entry.
Inputs: Line items (description, HT amount, VAT rate, buy/sell). Outputs: Collected/deductible totals, net payable/refundable, SYSCOHADA journal entries.
2.2 Fixed Asset Lifecycle Playground
EN: Fixed Asset Lifecycle Tracker | FR: Suivi du cycle de vie des immobilisations
Target: Licence 3, Master
Extends the static depreciation demo into the full SYSCOHADA lifecycle: acquire → depreciate → optionally revalue (comptes 1051, class 2) → dispose. Timeline scrubber drives a carrying-value chart and auto-generates the journal entry for each event, including gain/loss on disposal.
Inputs: Cost, date, useful life, depreciation method, optional revaluation, disposal price/date. Outputs: Year-by-year schedule, carrying value chart, per-event journal entries.
2.3 SYSCOHADA Ratio Analyser
EN: SYSCOHADA Ratio Analyser | FR: Analyseur de ratios SYSCOHADA
Target: Licence 3, Master, professional
Editable SYSCOHADA balance sheet + P&L cells. As values change, ratios update live: fonds de roulement, BFR, trésorerie nette, endettement, rentabilité économique. Traffic-light panel flags out-of-range ratios. Complements CVP's internal cost analysis with external financial statement reading — a core DESCOGEF exam topic.
Inputs: ~15–20 balance sheet / P&L lines. Outputs: 8–10 computed ratios with formulas, trend arrows, status indicators.
2.4 OHADA Payroll Simulator
EN: OHADA Payroll Simulator | FR: Simulateur de paie OHADA
Target: Licence 2/3, HR professional
Country selector (Cameroon, Côte d'Ivoire, Sénégal, Congo-B) drives CNPS/CNSS rates and IRPP bracket schedules. Computes gross → net with employer/employee charge decomposition and generates the full payroll journal entry using SYSCOHADA class-4 accounts. Fixes systematic confusion over which charges are employer-borne vs. employee-borne.
Inputs: Country, gross salary, allowances, headcount. Outputs: Pay slip breakdown, employer total cost, journal entry.
2.5 Foreign Currency Revaluation Playground
EN: Foreign Currency Revaluation | FR: Réévaluation des opérations en devises
Target: Master, international trade professional
Demonstrates the two-step SYSCOHADA treatment of foreign-currency transactions (compte 776/676): initial recognition at transaction-date rate, then year-end revaluation at closing rate. A rate sensitivity slider shows how exchange rate movements affect reported profit. Distinguishes from IAS 21 treatment — a frequent exam question.
Inputs: Transaction amount (USD/EUR/GBP), transaction-date rate, closing rate, transaction type. Outputs: Initial entry, revaluation entry, net position, gain/loss in FCFA.
Generated by Claude Code