Skip to content

feat(lab2): course route with level navigation + MSW fixtures [2/4]#73488

Draft
stephenliang wants to merge 1 commit into
stephen/lab2-studio-oceans-pr1from
stephen/lab2-studio-oceans-pr2
Draft

feat(lab2): course route with level navigation + MSW fixtures [2/4]#73488
stephenliang wants to merge 1 commit into
stephen/lab2-studio-oceans-pr1from
stephen/lab2-studio-oceans-pr2

Conversation

@stephenliang

@stephenliang stephenliang commented Jun 25, 2026

Copy link
Copy Markdown
Member

Add /courses/:name/units/:u/lessons/:l/levels/:p route with permissive Zod schemas for script_structure and level_properties endpoints. Query-key cache reuse across in-lesson navigation. Position→activeId→levelId join (resolveCourseLevel), appName-keyed lab entrypoint resolver (fish→oceans, standalone_video→stub). Level navigation with prev/next links and live-region position indicator.

Lab2-studio-oceans tasks §3 (3.1–3.9). No Rails changes.

Stack: [1/4] #73487[2/4] ← this PR → [3/4] #73490 → [4/4] #73496

Links

  • Design: openspec/changes/lab2-studio-oceans/design.md (on proposal branch)

Testing story

  • Unit tests for resolveCourseLevel, getLabEntrypointByAppName, LevelNavigation
  • Integration test: in-lesson navigation reuses cache, shell not remounted
  • MSW fixtures for course-scoped endpoints
  • yarn typecheck + ./tools/hooks/pre-commit pass

Deployment notes

Standard merge-and-deploy. New route only activates when navigated to directly — no existing routes affected.

🤖 Generated with Claude Code

@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr1 branch from 8f5fa79 to cf4bfa1 Compare June 25, 2026 21:29
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr2 branch 2 times, most recently from 489b6dc to e6660cc Compare June 25, 2026 21:35
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr1 branch from cf4bfa1 to e2fe438 Compare June 25, 2026 21:35
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr2 branch from e6660cc to f8a31ad Compare June 25, 2026 21:58
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr1 branch 2 times, most recently from c53f1be to fe03c1f Compare June 25, 2026 23:54
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr2 branch from f8a31ad to 51feef7 Compare June 25, 2026 23:54
@stephenliang stephenliang force-pushed the stephen/lab2-studio-oceans-pr1 branch from a824702 to 5f9b09b Compare June 26, 2026 02:55
Add the /courses/:name/units/:u/lessons/:l/levels/:p route with:
- Permissive Zod schemas for script_structure and level_properties
  endpoints (passthrough for unknown serializer fields)
- Query key factory excluding levelPosition for in-lesson cache reuse
- Position→activeId→levelId join (resolveCourseLevel)
- AppName-keyed lab entrypoint resolver (fish→oceans, standalone_video→stub)
- Level navigation with prev/next links, live-region position indicator
- MSW fixtures captured from production for all 8 oceans levels
- Signed-out auth stub in enableMocks for standalone MSW mode
- A11y: aria-live position announcements, label-in-name buttons,
  correct heading hierarchy on fallback states

Lab2-studio-oceans tasks §3 (3.1–3.9).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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