feat(iter-14): rank promotion banner, WITH RECURSIVE date spine & FIRST_VALUE/LAST_VALUE levels - #28
Merged
Conversation
…ST_VALUE/LAST_VALUE levels - RankPromotionBanner: spring-animated toast when XP crosses rank thresholds - Level 76: date spine via WITH RECURSIVE + LEFT JOIN zero-fill (completeness check) - Level 77: fleet voyage bookends using FIRST_VALUE + LAST_VALUE with explicit window frame
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
martinl5
marked this pull request as ready for review
July 14, 2026 09:23
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.
Summary
WITH RECURSIVEdate spine + LEFT JOIN zero-fillFIRST_VALUE+LAST_VALUEwith the critical explicit window-frame gotcha[UI/UX Improvements]
RankPromotionBanner.tsx(new component, wired intoGameProvider.tsx):The career-rank ladder (Graduate Analyst → Senior Analyst → VP, Data & Analytics → Managing Director) has been reachable since iter-7, but crossing a threshold produced no feedback. This PR adds the missing signal.
×button and click-anywhere also close it.useReftracking previous rank name inGameProvider— fires only when rank name changes after the initial render (no spurious trigger on load).Implements the "gamification: rank tiers" rotation item.
[Game Design Tweaks]
Level 76 (Expert, difficulty 4) — "Monthly Revenue Completeness Check (WITH RECURSIVE)":
WITH RECURSIVElevel in the catalog — teaches iterative CTEs as a SQL primitivemonths(month)seeds at'2024-01', advances viaSTRFTIME('%Y-%m', DATE(month || '-01', '+1 month')), terminates at'2024-06'COALESCEzero-fill and status flagGROUP BYsilently hides zero-activity periods; date spines surface gaps explicitlyLevel 77 (Expert, difficulty 4) — "Fleet Voyage Bookends (FIRST_VALUE + LAST_VALUE)":
FIRST_VALUEandLAST_VALUEwith the window-frame gotcha:LAST_VALUEdefault frameRANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWreturns the current row's value, not the partition's last — requires explicitROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWINGvoyage_datacomputes all four window expressions together; outer query deduplicates withWHERE rn = 1first_origin ≠ last_origin(routing evolution visible); 5 show matching bookends (consistent homebase)[Database & Code Optimizations]
LevelUpModalhint map extended with entries for levels 76 and 77;nextHintKeysentinel extended to[…, 75, 76, 77]; fallback updated?? 75→?? 77MAX_LEVELauto-derives fromlevels[levels.length - 1].id(77) — no other touch pointsTest Results
npm ci— ✅ installed (pre-existing vulnerabilities, none introduced)npx tsc --noEmit— ✅ 0 errorsnpm test— ✅ 425 tests pass (up from 415 in iter-13; both new levels auto-picked up by determinism invariants suite)Generated by Claude Code