Skip to content

fix: 4 bugs from round-2 Chrome walkthrough (redirect loop, slug routing, seed CLIs, label-form roles) - #82

Merged
khoks merged 1 commit into
mainfrom
chore/round2-bugfixes-and-walkthrough-findings
May 12, 2026
Merged

khoks merged 1 commit into
mainfrom
chore/round2-bugfixes-and-walkthrough-findings

Conversation

@khoks

@khoks khoks commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

Round-2 Chrome walkthrough fixed 4 of the bugs filed in PR #81 and uncovered 2 more.

Story Fix shipped here Verified end-to-end in Chrome
STORY-066 destinationFor only routes to /recommended when role library recognizes the target_role ✓ no more redirect loop
STORY-067 getRecommendation matches by label, not just slug ✓ "Backend engineer" resolves
STORY-068 db:seed:tracks + db:seed:problems CLIs + root db:bootstrap aggregator ✓ 3 tracks + 182 problems seeded
STORY-069 (new) /session?track=<slug> resolves through getTrackIdBySlug ✓ /recommended cards link to real session

Newly filed (not fixed here)

  • STORY-070: Today's plan + Hint + Grade all 500/503 when ANTHROPIC_API_KEY is unset. Needs deterministic fallback mirroring STORY-053's onboarding fallback. Affects every no-API-key self-host install.

Walkthrough log (round 2)

What works now

  • Magic-link auth → onboarding (deterministic fallback) → /recommended → /session with real problem
  • STORY-042 paste-detect modal (coach-voice copy)
  • STORY-037 debug-problem panel (yellow callout + pre-bugged starter)
  • STORY-024 quiet hours settings (with TZ + 2-time pickers)
  • STORY-045 email digest settings (daily + weekly toggles + day-of-week picker)
  • STORY-026 GDPR "Your data" page (real counts, close-account flow)
  • STORY-036 tutor mode settings (Cloud/Local/Auto-fallback radios)

Still broken (existing STORY filings)

  • ❌ Run / Submit — STORY-065 (Piston cgroup v2 unavailable on Docker Desktop Windows)
  • ❌ Hint / Today's plan / Submit grading — STORY-070 (no LLM fallback)

Test plan

  • pnpm format:check clean
  • Manual Chrome walkthrough of every fixed path
  • CI typecheck + tests

🤖 Generated with Claude Code

… 069 seed CLIs + slug routing

Round-2 Chrome walkthrough fixes + 2 more STORY filings.

Fixes (verified end-to-end in Chrome):

- **STORY-066** — `destinationFor` now uses `getRecommendation` to check whether
  `target_role` actually maps to a known role before routing to /recommended.
  Unknown roles go straight to /dashboard. Breaks the infinite
  /dashboard ↔ /recommended 307 loop that hit every deterministic-onboarding
  user. New dep: `apps/web` → `@learnpro/profile`.

- **STORY-067** — `getRecommendation` matches against `label` as well as
  `slug`, both case-insensitive + trimmed. The deterministic onboarding
  fallback writes labels ("Backend engineer"); now those resolve to the
  `backend-engineer` slug's role.

- **STORY-068** — Two new bin scripts:
  - `pnpm --filter @learnpro/tracks db:seed:tracks` — loads python-fundamentals
    and typescript-fundamentals YAMLs into Postgres. Idempotent.
  - `pnpm --filter @learnpro/problems db:seed:problems` — loads all 182
    curated problem YAMLs (35 Py + 32 TS implement, 25 Py + 22 TS debug,
    38 Py + 30 TS comprehension). Idempotent. Requires tracks first.
  - Root `pnpm db:bootstrap` aggregates: migrate → seed → seed:concepts
    → seed:tracks → seed:problems. Single-command bootstrap for fresh
    self-host clones.

- **STORY-069** (filed + fixed) — `/session?track=<slug>` now resolves
  through new `getTrackIdBySlug(db, slug)` helper. Previously the route
  required UUID-form input and the /recommended cards built slug-form
  hrefs, so every "Start track" click bricked at "Pick a track."

Filed (not fixed in this PR):

- **STORY-070** — Today's plan + Hint + Grade all surface 500/503 when
  ANTHROPIC_API_KEY is unset. The deterministic-onboarding fallback path
  (STORY-053 AC #6) needs sibling fallbacks for these surfaces or the
  no-API-key self-host story is broken end-to-end.

Walkthrough verification (round 2):
- ✓ Onboarding → /recommended → click Python card → /session?track=python-fundamentals → real problem renders (Monaco editor + file tree + paste-detect + got-help toggle all wired)
- ✓ Settings pages: /settings/llm (tutor mode), /settings/notifications (quiet hours + email digest), /settings/data (GDPR summary + actions) — all render with coach-voice copy
- ✓ STORY-042 paste-detect modal fires on paste into Monaco, coach-voice copy
- ✓ STORY-037 debug-problem panel renders the yellow "this is a debug problem" callout + pre-bugged code
- ✗ Hint / Today's plan / Submit blocked by STORY-070 (no LLM fallback)
- ✗ Run / Submit also blocked by STORY-065 (Piston on Windows Docker Desktop)
@khoks
khoks merged commit 7145737 into main May 12, 2026
1 check passed
@khoks
khoks deleted the chore/round2-bugfixes-and-walkthrough-findings branch May 12, 2026 07:36
khoks added a commit that referenced this pull request May 14, 2026
The harness writes `.claude/scheduled_tasks.lock` to serialize scheduled-task
firings. It slipped into PR #82 via `git add -A`; remove from tracking and
add to .gitignore so it stops appearing in `git status`.

Also gitignore `.dev-logs/` — the per-component log directory created by
scripts/dev.sh on each run.
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.

1 participant