Repository navigation
Add per-Slack-user lesson completion tracking and refactor flowchart lessons (1–4) - #30
Merged
Merged
Conversation
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
node:sqlite, zero extra runtime dependencies) inhawk-learn.FlowchartPlayground) that visually demonstrates sequential execution, branching, looping, and function calls with FRC robotics scenarios (while keepingBlockPlaygrounduntouched for Lessons 28 & 32).Before & After Screenshots
Lesson Index & Completion Tracking
main)Lesson 1 — Programs are step-by-step
main)Lesson 2 — Making decisions
main)Lesson 3 — Doing things over and over
main)Lesson 4 — Reusable blocks (Functions)
main)Lesson Completion Tracking
server/progress-db.mjs): SQLite database in WAL mode withusersandlesson_completionstables stored inDATA_DIR(/data/progress.dbin production,.data/progress.dblocally).server.mjs):GET /api/progressandPOST /api/progress({ lessonSlug, completed }), authenticated via Hawk Suite proxy headers (x-hawk-slack-user,x-hawk-slack-team), with read-only Slack display name resolution..hawk/app.json,Dockerfile,docker-compose.dev.yml,scripts/deploy-check.mjs): Declares"data_dir": "/data", configures/datapermissions, and mounts a persistent volume in dev compose.site/src/lib/progress.tsx,App.tsx,AppSidebar.tsx,LessonIndex.tsx,LessonCard.tsx,LessonView.tsx): Overall & per-section completion counts, green checkmarks on completed lessons, and a Mark lesson complete toggle inLessonView.Flowchart Lessons Refactor (Lessons 1–4)
site/src/lib/flowchartEngine.ts): Step-by-step control-flow tracer fromSTARTtoENDwith live memory, local function scope, call stack, per-node error steps, synced Python 3.12 codegen, and automated challenge checks.site/src/components/FlowchartPlayground.tsx,FlowchartPlayground.css):IFdecision diamond with fork/merge connectors and full untaken-branch skipping,REPEATloop with curved loop-back arrow and pass counter, and live-animated side-by-side reusable function cards.+ YES/+ NObuttons, reorder, and delete) structured flowchart builder with Run / Pause / Back / Step / Clear run / 1×–2× speed / Start over / Peek at Python / Check.site/src/lib/flowchartPresets.ts,lessons/01–04/README.md): Autonomous coral scoring, battery brownout limiter & shooter range check, smooth motor ramp-up & flywheel spin-up loop, and reusable robot scoring/speed functions (with editable function body in Lesson 4).Testing
node --test server/test_progress.mjs(2/2 passing)node scripts/deploy-check.mjs --contract& env validationcd site && npm run lint && npm run build(0 lint errors, clean TypeScript + Vite build)server.mjswithHAWK_SUITE_TRUST_PROXY=true5/4/5/5→8/8/8/8→9/9/9/9across Clarity, Correctness, Ease of Understanding, and Appropriateness for 14–15yo FRC students.