Skip to content

feat(iter-13): keyboard shortcuts panel, interest accrual & SRM levels 74-75 - #27

Merged
martinl5 merged 1 commit into
mainfrom
lcb-evolution/keyboard-shortcuts-interest-srm
Jul 7, 2026
Merged

feat(iter-13): keyboard shortcuts panel, interest accrual & SRM levels 74-75#27
martinl5 merged 1 commit into
mainfrom
lcb-evolution/keyboard-shortcuts-interest-srm

Conversation

@martinl5

@martinl5 martinl5 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Navigator's Chart keyboard shortcuts panel? button and ? key open a floating maritime-themed shortcuts reference card listing all key bindings (Run ⌘↵, Submit ⇧⌘↵, toggle ?, close Esc) with gold <kbd> chips and a Compass icon
  • Level 74 — Active Loan Interest Accrual — simple-interest date arithmetic (JULIANDAY days / 365) on 12 active loans; teaches the MAS/IFRS 9 accrual formula used in regulatory loan-book reporting
  • Level 75 — A/B Test Sample-Ratio Mismatch (SRM) Check — three-CTE pattern (counts → total CROSS JOIN → deviation_pct + CASE srm_check); teaches the Experimentation platform guard mandated before any A/B result can be trusted

[UI/UX Improvements]

Added the "Navigator's Chart" floating shortcuts panel to SQLPanel.tsx:

  • HelpCircle icon button in the header (left of Run), toggles on click or ? key press
  • Suppresses ? when the Monaco editor textarea has focus (avoids intercepting SQL input)
  • Escape closes the panel
  • Gold-bordered floating card with Compass icon, four shortcut rows (⌘↵, ⇧⌘↵, ?, Esc), maritime footer note
  • Implements "Accessibility & DX: keyboard shortcuts" from the UI/UX rotation

[Game Design Tweaks]

Level 74 (Expert, difficulty 4) — Interest Accrual:

  • Formula: principal × (rate/100) × JULIANDAY_days / 365 computed inline — no CTE needed
  • 12 active loans ordered by accrued interest DESC; spans ~$87k (450k loan, 2018 start) → ~$1.1k (8k loan, 2024 start)
  • Pattern mirrors IFRS 9 ECL provisioning and Basel III RWA calculations at GIC, JPMorgan, DBS

Level 75 (Expert, difficulty 4) — A/B Test SRM Check:

  • Three-CTE chain: countstotalexpected (CROSS JOIN); outer query: deviation_pct + CASE srm_check
  • Balanced 50/50 data (10 per group) yields both groups PASS with 0.0% deviation — valid test, clean result
  • SRM guard mandated in Experimentation platforms at Booking.com, Airbnb, Netflix, Meta

[Database & Code Optimizations]

  • LevelUpModal hint map extended with entries for levels 74 and 75; nextHintKey sentinel extended […,73][…,73,74,75]; fallback ?? 73?? 75
  • MAX_LEVEL auto-derives from levels[levels.length-1].id (75) — no other touch points
  • No new DB tables, seed rows, or indexes — both levels use existing loans, customers, and customers.ab_test_group

Test Results

  • npm ci — ✅ installed (7 pre-existing vulnerabilities, none introduced)
  • npx tsc --noEmit — ✅ 0 errors
  • npm test — ✅ 415 tests pass (up from 395 in iter-12; both new levels auto-picked up by determinism invariants suite)

Generated by Claude Code

…s 74-75

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sqlwak Ready Ready Preview, Comment Jul 6, 2026 5:13pm

@martinl5
martinl5 marked this pull request as ready for review July 7, 2026 01:29
@martinl5
martinl5 merged commit cd651c4 into main Jul 7, 2026
3 checks passed
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