Frontend additions in studio-v2:
- types.ts adds TimetableSolution, TimetableLesson, SolutionStatus,
CreateTimetableSolution mirroring the Go models.
- lib/stundenplan/api.ts adds solutionsApi with list/get/create/remove/
lessons. Solve trigger is POST /timetable/solutions — school-service
forwards to the solver-service over the Docker network.
- _components/plan/SolutionList: table of past solves with status
badges, hard/soft score, Anzeigen + Loeschen buttons, and a
'Neuen Plan generieren' trigger. Auto-polls every 4 s while any
solution is pending/running, clears the interval otherwise.
- _components/plan/PlanView: Mo–Fr × period weekly grid. Three
perspectives (Klasse / Lehrer / Raum) toggleable via test-id'd
buttons; selector below lists every unique resource with at least
one lesson. Cells colour-coded by tt_subject.color.
- _components/plan/PlanHub orchestrates list + view; default tab in
page.tsx switches from 'klassen' to 'plan'.
Tests:
- mockSchoolApi helper extracted to e2e/_helpers.ts so the spec file
stays under 500 LOC. Helper now also mocks /solutions GET/POST/DELETE
and /solutions/:id/lessons; solutions kept in a closure so POST
appears in the next GET.
- 8 new tests across two suites: SolutionList empty state, list
render, completed-vs-failed Anzeigen visibility, solve trigger;
PlanView placeholder when no selection, grid render, perspective
switching.
- Existing Klassen CRUD tests now click the Klassen tab first
(Plan is the new default landing tab).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 3 — initial UI for the timetable scheduler:
- app/stundenplan/page.tsx with tab navigation (Klassen / Lehrer /
Faecher / Raeume / Zeitraster / Stundentafel / Lehrauftraege /
Regeln) and a dev-mode JWT entry to authenticate against
school-service until full auth is wired up.
- app/stundenplan/_components/KlassenManager.tsx as the working
prototype for one entity (list / create / delete). Pattern can be
copied for the other 6 stammdaten + 15 constraint editors.
- lib/stundenplan/api.ts exposing typed clients for all 22 endpoints
(7 stammdaten + 15 constraint tables). Constraints use a factory
to keep the file tight.
- app/api/school/[...path]/route.ts proxies the browser through
Next.js to school-service so HTTPS studio-v2 can reach the plain
HTTP backend.
- Sidebar.tsx gains a Stundenplan entry with 26-language labels.
- docker-compose.yml exposes SCHOOL_SERVICE_URL to studio-v2 and
declares the school-service dependency.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>