forge
Explore
Log in

Don't you dare go Hollow

📝 add known gaps, contract mismatches, and incomplete features to audit docs

Browse files at this commit

28c8d36235c0fb721873b33510169afb4d2a846fBurak BoduroğluParent: 3095fe1
  • docs
    • 📝 add known gaps, contract mismatches, and incomplete features to audit docs
Show full message
docs: 📝 add known gaps, contract mismatches, and incomplete features to audit docs
- frontend-next-steps: P0 bugs, missing BE endpoints, incomplete features sections
- role-scope-matrix: English gaps section for backend team
docs/frontend-next-steps.mdmodified+29 -1
@@ -56,7 +56,35 @@ validation, and list filtering cleanup.
56 56
57 ## Active Backlog57 ## Active Backlog
58 58
59-- Deferred product features (not started): exam `allow_rejoin` UI, manager work-log corrections, session edit (`PATCH`).59+### Known Bugs / Contract Mismatches (P0)
60+
61+| # | Issue | Impact | Side |
62+|---|-------|--------|------|
63+| 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 |
64+| 2 | `/marks` and `/attendance` open to all roles (nav + route) | Teachers see "Report card" / "My attendance" — product error; dashboard already correct | FE guard |
65+| 3 | No student-only guard (`RouteGuard` only has `minRole`) | Staff can reach personal student pages via direct URL | FE infrastructure |
66+
67+### Missing BE Endpoints (no FE helper/UI)
68+
69+| Endpoint | Purpose | Priority |
70+|---|---|---|
71+| `PATCH /sessions/{id}` | Edit course session | High |
72+| `GET /work/{user}` | Manager read another user's work log | High |
73+| `PATCH /work/entries/{id}` | Manager correct a closed stint | High |
74+| `DELETE /work/entries/{id}` | Manager delete a work entry | High |
75+
76+### Incomplete Product Features
77+
78+| Feature | API | UI | Notes |
79+|---|---|---|---|
80+| `allow_rejoin` | Type + body exist | No toggle; form always sends `true` | Deferred |
81+| 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 |
82+| Router `beforeLoad` | — | Missing on `/work`, `/live`, settings, terms; only client-side `RouteGuard` exists | Consistency |
83+| Exam room CTA | — | Visible to manager/admin on detail page; page itself blocks | Minor |
84+
85+### Backend-Dependent Follow-Up
86+
87+- Server-side search/filter params are still absent; hybrid full-fetch remains for client filters until the API adds them.
60 88
61 ## UX polish batch (completed)89 ## UX polish batch (completed)
62 90
docs/role-scope-matrix.mdmodified+45 -0
@@ -73,6 +73,51 @@ Backend README Auth kolonunda:
73 73
74 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ı.74 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ı.
75 75
76+---
77+
78+## Known Gaps (English — for backend team)
79+
80+### Contract Mismatches
81+
82+| # | Issue | BE field | FE field | Impact |
83+|---|-------|----------|----------|--------|
84+| 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` |
85+
86+### Role Guard Gaps (FE)
87+
88+| # | Issue | Files | Priority |
89+|---|-------|-------|----------|
90+| 1 | `/marks` page has no student-only guard — any authenticated user can see it | `marks-page.tsx`, `router.tsx`, `side-nav.tsx` | HIGH |
91+| 2 | `/attendance` page has no student-only guard | `attendance-page.tsx`, `router.tsx`, `side-nav.tsx` | HIGH |
92+| 3 | `RouteGuard` only supports `minRole` (hierarchical: teacher→manager→admin); no `exactRole` or student-only mode exists | `route-guard.tsx` | MEDIUM |
93+| 4 | `/work`, `/live`, `/management/settings`, `/management/terms` have client-side `RouteGuard` but no router `beforeLoad` guard | `router.tsx` | LOW |
94+
95+### Missing BE → FE coverage
96+
97+| Endpoint | Purpose | Status |
98+|---|---|---|
99+| `PATCH /sessions/{id}` | Edit a course session | No helper, no UI |
100+| `GET /work/{user}` | Read another user's work log (manager+) | No helper, no UI |
101+| `PATCH /work/entries/{id}` | Correct a closed work stint (manager+) | No helper, no UI |
102+| `DELETE /work/entries/{id}` | Delete a work entry (manager+) | No helper, no UI |
103+
104+### Incomplete Features
105+
106+| Feature | Detail |
107+|---|---|
108+| `allow_rejoin` | Type + request body exist; form always sends `true`; no UI toggle |
109+| Exam weight badge | BE `ExamResponse` has no weight field; weight is derived from kind + settings. Badge never shows |
110+| Exam room CTA | Visible to managers/admins on exam detail page; the room page itself blocks non-students |
111+
112+### Pagination Status
113+
114+- All list endpoints accept `?limit=&offset=` and return `{ items, total, limit, offset }`.
115+- Main FE lists (courses, exams, events, notes, terms, work log, admin users) send real server page params.
116+- Nested lists (sessions, enrollments, attendance, exam results/questions) unwrap full `.items` — acceptable for school-scale data.
117+- Reports (`/marks/*`, `/attendance/*`) are not paged — aggregate report shapes.
118+
119+---
120+
76 ## Kullanılan Kısaltmalar121 ## Kullanılan Kısaltmalar
77 122
78 - ✅ = erişim var123 - ✅ = erişim var