feat(iter-4): Doubloon XP float, +XP modal badge, levels 60-61 (LEAD + window median)#8
Merged
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.
[UI/UX Improvements]
Doubloon XP reward float animation (
SQLPanel.tsx,globals.css)+N ⬡ XPbadge floats upward from the Run button with a gold glow (text-shadow) and cubic-bezier easing, then fades out over 1.6 s.@keyframes doubloonFloat+.doubloon-floatCSS class inglobals.css.doubloonAmtReact state cleared onanimationend— re-submissions always trigger a fresh animation.position: relativecontainer; float element positionedbottom: 110%so it emerges above the button."+N XP Earned" badge in LevelUpModal (
LevelUpModal.tsx)⬡ icon + "+N XP Earned") appears in the completion modal between the Career Level and Next Level Hint sections.scale: 0.75 → 1, delay 0.48 s,damping: 14, stiffness: 280).epochXpEarned()pure helper (file-scope) derives XP from the completed level — mirrors store thresholds without coupling to Zustand.Level count + breadcrumb updated (
GameProvider.tsx)/59→/61.59→61.[Game Design Tweaks]
Level 60 — Vessel Maintenance Window Planner (LEAD) (Expert, difficulty 4)
Teaches
LEAD()as the partner to last iteration'sLAG():LEAD(departure_date) OVER (PARTITION BY vessel_id ORDER BY departure_date) AS next_departureCAST(JULIANDAY(next_departure) - JULIANDAY(departure_date) AS INTEGER) AS idle_days; filterWHERE next_departure IS NOT NULLcargo_shipments+vesselsdataLevel 61 — Segment Balance Median (Window-Based) (Expert, difficulty 4)
Implements the canonical window-based median for SQLite dialects lacking
PERCENTILE_CONT:ROW_NUMBER() OVER (PARTITION BY c.segment ORDER BY a.balance) AS rn+COUNT(*) OVER (PARTITION BY c.segment) AS cntWHERE rn IN ((cnt+1)/2, (cnt+2)/2),GROUP BY segment,ROUND(AVG(balance), 2) AS median_balance[Database & Code Optimizations]
epochXp()helper inSQLPanel.tsx(file-scope pure function) — feeds doubloon animation;currentLeveladded touseCallbackdependency array (removes pre-existing missing-dep lint warning, reducing warning count from 12 → 11).epochXpEarned()helper inLevelUpModal.tsx(file-scope pure function) — single source of truth for XP display in modal; avoids importing from store.nextHintKeysentinel array updated:[10,20,30,40,50,57,59,61]; completion checkcurrentLevel < 59→< 61.Test Results
npm cinpx tsc --noEmitnpm run buildnpm run lintdb.ts no-explicit-any,SchemaViewer.tsx no-unused-expressions); warning count reduced 12 → 11 — 0 new errors introducedhttps://claude.ai/code/session_01UQzdvQs6ESPgDLrFKc3gtx
Generated by Claude Code