diff --git a/docs/frontend-next-steps.md b/docs/frontend-next-steps.md index 2ace9ed..00936a4 100644 --- a/docs/frontend-next-steps.md +++ b/docs/frontend-next-steps.md @@ -56,7 +56,35 @@ validation, and list filtering cleanup. ## Active Backlog -- Deferred product features (not started): exam `allow_rejoin` UI, manager work-log corrections, session edit (`PATCH`). +### Known Bugs / Contract Mismatches (P0) + +| # | Issue | Impact | Side | +|---|-------|--------|------| +| 1 | Course term read mismatch: BE `CourseResponse.term`, FE reads `term_id` | Term column/filter always shows "unassigned"; write body `term_id` is correct | FE type fix | +| 2 | `/marks` and `/attendance` open to all roles (nav + route) | Teachers see "Report card" / "My attendance" — product error; dashboard already correct | FE guard | +| 3 | No student-only guard (`RouteGuard` only has `minRole`) | Staff can reach personal student pages via direct URL | FE infrastructure | + +### Missing BE Endpoints (no FE helper/UI) + +| Endpoint | Purpose | Priority | +|---|---|---| +| `PATCH /sessions/{id}` | Edit course session | High | +| `GET /work/{user}` | Manager read another user's work log | High | +| `PATCH /work/entries/{id}` | Manager correct a closed stint | High | +| `DELETE /work/entries/{id}` | Manager delete a work entry | High | + +### Incomplete Product Features + +| Feature | API | UI | Notes | +|---|---|---|---| +| `allow_rejoin` | Type + body exist | No toggle; form always sends `true` | Deferred | +| Exam weight badge | BE exam DTO has no weight | Badge never shows; needs weight derived from settings kind map | Needs BE or FE-side resolution | +| Router `beforeLoad` | — | Missing on `/work`, `/live`, settings, terms; only client-side `RouteGuard` exists | Consistency | +| Exam room CTA | — | Visible to manager/admin on detail page; page itself blocks | Minor | + +### Backend-Dependent Follow-Up + +- Server-side search/filter params are still absent; hybrid full-fetch remains for client filters until the API adds them. ## UX polish batch (completed) diff --git a/docs/role-scope-matrix.md b/docs/role-scope-matrix.md index 5d5e577..06dc2e4 100644 --- a/docs/role-scope-matrix.md +++ b/docs/role-scope-matrix.md @@ -73,6 +73,51 @@ Backend README Auth kolonunda: Ancak kodda `*/me` endpoint'leri `CurrentUser` (rol kontrolü yok) ile çalışıyor, `RequireTeacher`/`RequireStudent` değil. README'de `student` yazıp kodda herkese açık olması tutarsız. Bu endpoint'ler ya `RequireStudent` ile korunmalı ya da mevcut davranış (herkese açık) README'e yansıtılmalı. +--- + +## Known Gaps (English — for backend team) + +### Contract Mismatches + +| # | Issue | BE field | FE field | Impact | +|---|-------|----------|----------|--------| +| 1 | Course term field name mismatch | `term` (string ID) | `term_id` (in FE type, write body is correct for POST/PATCH) | Term column and term filter on courses page almost always show "unassigned". The read response field is `term` but the FE type expects `term_id` | + +### Role Guard Gaps (FE) + +| # | Issue | Files | Priority | +|---|-------|-------|----------| +| 1 | `/marks` page has no student-only guard — any authenticated user can see it | `marks-page.tsx`, `router.tsx`, `side-nav.tsx` | HIGH | +| 2 | `/attendance` page has no student-only guard | `attendance-page.tsx`, `router.tsx`, `side-nav.tsx` | HIGH | +| 3 | `RouteGuard` only supports `minRole` (hierarchical: teacher→manager→admin); no `exactRole` or student-only mode exists | `route-guard.tsx` | MEDIUM | +| 4 | `/work`, `/live`, `/management/settings`, `/management/terms` have client-side `RouteGuard` but no router `beforeLoad` guard | `router.tsx` | LOW | + +### Missing BE → FE coverage + +| Endpoint | Purpose | Status | +|---|---|---| +| `PATCH /sessions/{id}` | Edit a course session | No helper, no UI | +| `GET /work/{user}` | Read another user's work log (manager+) | No helper, no UI | +| `PATCH /work/entries/{id}` | Correct a closed work stint (manager+) | No helper, no UI | +| `DELETE /work/entries/{id}` | Delete a work entry (manager+) | No helper, no UI | + +### Incomplete Features + +| Feature | Detail | +|---|---| +| `allow_rejoin` | Type + request body exist; form always sends `true`; no UI toggle | +| Exam weight badge | BE `ExamResponse` has no weight field; weight is derived from kind + settings. Badge never shows | +| Exam room CTA | Visible to managers/admins on exam detail page; the room page itself blocks non-students | + +### Pagination Status + +- All list endpoints accept `?limit=&offset=` and return `{ items, total, limit, offset }`. +- Main FE lists (courses, exams, events, notes, terms, work log, admin users) send real server page params. +- Nested lists (sessions, enrollments, attendance, exam results/questions) unwrap full `.items` — acceptable for school-scale data. +- Reports (`/marks/*`, `/attendance/*`) are not paged — aggregate report shapes. + +--- + ## Kullanılan Kısaltmalar - ✅ = erişim var