forge
Explore
Log in

Don't you dare go Hollow

📝 frontend audit summary in README + convert backlog to completed-state doc

Browse files at this commit

dd92ac6a1b6242e4acf1bd1c0d84e668d3f0f1f8Burak BoduroğluParent: bb8263a
  • docs
    • 📝 frontend audit summary in README + convert backlog to completed-state doc
Show full message
docs: 📝 frontend audit summary in README + convert backlog to completed-state doc
- README: reflect current feature set (notebook, server-time validation, event/course filters)
- frontend-next-steps: convert from active backlog to completed audit summary
README.mdmodified+11 -6
@@ -56,20 +56,20 @@ Dashboard and table summaries must use the same role scope as the related page.
56 | `/login`, `/register` | Guests | Authentication |56 | `/login`, `/register` | Guests | Authentication |
57 | `/` | Authenticated | Role-scoped, observation-only dashboard |57 | `/` | Authenticated | Role-scoped, observation-only dashboard |
58 | `/profile` | Authenticated | Edit personal info (name, email, phone, birth date) |58 | `/profile` | Authenticated | Edit personal info (name, email, phone, birth date) |
59-| `/notes` | Student+ | Personal notes CRUD |59+| `/notes` | Student+ | Personal notebook CRUD with paper-style read dialogs |
60-| `/events`, `/events/:id` | Student+ | Event list & detail (create/edit: teacher+) |60+| `/events`, `/events/:id` | Student+ | Event list & detail with search, time filters, and lazy attendance roster |
61 | `/exams` | Student+ | Exam table with role-scoped course filtering |61 | `/exams` | Student+ | Exam table with role-scoped course filtering |
62 | `/exams/:id` | Student+ | Exam detail, questions, grading, statistics (teacher+) |62 | `/exams/:id` | Student+ | Exam detail, questions, grading, statistics (teacher+) |
63 | `/exams/:id/live` | Teacher+ | Live monitor / final state roster with pagination & sorting |63 | `/exams/:id/live` | Teacher+ | Live monitor / final state roster with pagination & sorting |
64-| `/exam-room/:id` | Student+ | WebSocket-based real-time exam room (auto-save, timer, expiry) |64+| `/exam-room/:id` | Student+ | WebSocket-based real-time exam room (auto-save, timer, local expiry close) |
65-| `/courses` | Student+ | Course table; create/edit flows for teacher+ |65+| `/courses` | Student+ | Course table with search and term filters; create/edit flows for teacher+ |
66 | `/courses/:id` | Student+ | Course detail, exams, roster, lesson sessions, and roll call tools |66 | `/courses/:id` | Student+ | Course detail, exams, roster, lesson sessions, and roll call tools |
67 | `/guide` | Authenticated | App usage guide |67 | `/guide` | Authenticated | App usage guide |
68 | `/admin/users` | Admin | User management |68 | `/admin/users` | Admin | User management |
69 69
70 ## Features70 ## Features
71 71
72-- **Exam lifecycle**: create (scheduled/async/unscheduled), questions (multiple-choice / text), real-time WebSocket exam room, auto-submit on expiry, teacher grading72+- **Exam lifecycle**: create (scheduled/async/unscheduled), automatic async duration from start/end, questions (multiple-choice / text), real-time WebSocket exam room, auto-close on expiry, teacher grading
73 - **Live monitor**: 2-second polling during active exams, static final state view after exam ends, pagination (10/page), column sorting73 - **Live monitor**: 2-second polling during active exams, static final state view after exam ends, pagination (10/page), column sorting
74 - **Statistics**: graded count, average/min/max marks on exam detail74 - **Statistics**: graded count, average/min/max marks on exam detail
75 - **Answer sheet**: teacher review of student answers with correct/wrong highlighting75 - **Answer sheet**: teacher review of student answers with correct/wrong highlighting
@@ -77,6 +77,9 @@ Dashboard and table summaries must use the same role scope as the related page.
77 - **Dense tables**: toolbar search/filter, subtle column separators, narrow centered three-dot row actions77 - **Dense tables**: toolbar search/filter, subtle column separators, narrow centered three-dot row actions
78 - **Side panels**: quick create/edit workflows without losing list context78 - **Side panels**: quick create/edit workflows without losing list context
79 - **Course sessions**: right-panel session creation and paginated roll call panels79 - **Course sessions**: right-panel session creation and paginated roll call panels
80+- **Schedule validation**: event, exam, and lesson-session forms use `GET /time` for server-clock-aware past-date warnings before submit
81+- **Notebook**: notes render as paper-style cards, open in a paper-style read dialog, and keep create/edit/delete in dialogs with three-dot card actions
82+- **Events and courses**: events keep card rendering with toolbar search and upcoming/past filters; courses use table search plus term/unassigned filters
80 - **Attendance UI**: localized status labels with explanatory detail text and semantic colors83 - **Attendance UI**: localized status labels with explanatory detail text and semantic colors
81 - **Role-scoped dashboard**: read-only summaries and KPIs by current role84 - **Role-scoped dashboard**: read-only summaries and KPIs by current role
82 - **i18n**: full Turkish / English interface85 - **i18n**: full Turkish / English interface
@@ -89,11 +92,13 @@ Dashboard and table summaries must use the same role scope as the related page.
89 - Data-heavy views use `DataToolbar`, `DataTableFrame`, `.data-table`, and `TableRowActions`.92 - Data-heavy views use `DataToolbar`, `DataTableFrame`, `.data-table`, and `TableRowActions`.
90 - Large list pages should use server-side pagination/search/filtering when the backend supports it; client-side slicing is only acceptable for small or temporary datasets.93 - Large list pages should use server-side pagination/search/filtering when the backend supports it; client-side slicing is only acceptable for small or temporary datasets.
91 - Date fields use the shared `DatePicker`; date-time flows pair it with an `HH:mm` input.94 - Date fields use the shared `DatePicker`; date-time flows pair it with an `HH:mm` input.
95+- Start/end date-time rows use equal-width date and time controls.
92 - Disclosure sections either defer hidden content for request savings or preserve mounted content when local state should not reset.96 - Disclosure sections either defer hidden content for request savings or preserve mounted content when local state should not reset.
97+- Event detail attendance roster is teacher-only and lazy-loaded when its disclosure opens.
93 98
94 ## Docs99 ## Docs
95 100
96-- `docs/frontend-next-steps.md` — active backlog and role-based UI audit plan.101+- `docs/frontend-next-steps.md` — completed frontend audit summary and backend-dependent follow-ups.
97 - `docs/navigation-patterns.md` — interaction, dashboard, role scope, and table action rules.102 - `docs/navigation-patterns.md` — interaction, dashboard, role scope, and table action rules.
98 - `docs/ui-redesign-tokens.md` — visual density, table, typography, and component conventions.103 - `docs/ui-redesign-tokens.md` — visual density, table, typography, and component conventions.
99 - `docs/backend-ui-alignment-plan.md` — completed backend alignment archive.104 - `docs/backend-ui-alignment-plan.md` — completed backend alignment archive.
docs/frontend-next-steps.mdmodified+45 -169
@@ -1,189 +1,65 @@
1-# Frontend Next Steps1+# Frontend Audit Summary
2 2
3-This document tracks the active frontend backlog after backend alignment, dense3+This document records the completed frontend backlog after backend alignment,
4-tables, side panels, collapsible detail sections, dashboard work, and table action4+role/request audits, dense table work, side panels, notebook UI, schedule
5-cleanup.5+validation, and list filtering cleanup.
6 6
7-## Current State7+## Completed State
8 8
9 - Backend alignment is complete for settings, terms, course sessions, attendance reports, work logs, exam attempts, and grade bands.9 - Backend alignment is complete for settings, terms, course sessions, attendance reports, work logs, exam attempts, and grade bands.
10 - Shared UI primitives cover dense tables, data toolbars, row action menus, side panels, confirm dialogs, date picking, and animated disclosures.10 - Shared UI primitives cover dense tables, data toolbars, row action menus, side panels, confirm dialogs, date picking, and animated disclosures.
11 - Dashboard is role-aware and read-only. Admin sees global course/exam scope; other roles use own/enrolled/related scope where the backend supports it.11 - Dashboard is role-aware and read-only. Admin sees global course/exam scope; other roles use own/enrolled/related scope where the backend supports it.
12-- Table actions use a narrow centered three-dot menu through `TableRowActions`.12+- Table and card actions use narrow centered three-dot menus through `TableRowActions`.
13 - Dense tables have subtle column separators, fixed action columns, and stable date/number alignment.13 - Dense tables have subtle column separators, fixed action columns, and stable date/number alignment.
14 - Course creator display uses a username/display label when available; raw ids are fallback only.14 - Course creator display uses a username/display label when available; raw ids are fallback only.
15 - Course detail session creation and roll call both use right side panels; roll call rows are paginated inside the panel.15 - Course detail session creation and roll call both use right side panels; roll call rows are paginated inside the panel.
16 - Attendance statuses use shared localized metadata with semantic colors and explanatory detail labels.16 - Attendance statuses use shared localized metadata with semantic colors and explanatory detail labels.
17-- Disclosure sections may keep content mounted when state preservation is more important than request deferral; do not assume closed sections always avoid requests.17+- Disclosure sections may keep content mounted when state preservation is more important than request deferral; heavy teacher-only data is deferred where practical.
18 - Settings requests are cached and refreshed after settings patches.18 - Settings requests are cached and refreshed after settings patches.
19 - Sidebar icons use local SVG wrappers to avoid large icon package module graphs.19 - Sidebar icons use local SVG wrappers to avoid large icon package module graphs.
20-20+- Notes use a paper-style notebook card layout, a paper-style read dialog, and dialog-based create/edit/delete flows.
21-## Priority 1: Role-Based UI Audit21+- Courses use client-side table search plus term/unassigned filters while backend pagination/filter params are pending.
22-22+- Events keep card rendering with shared toolbar search and all/upcoming/past filters.
23-Audit every route and major page for role-specific UI behavior.23+- Event, exam, and lesson-session schedule forms use `GET /time` for server-clock-aware past-date warnings before submit.
24-24+- Start/end date-time rows use equal-width date and time controls.
25-- Student:25+- Async exam duration is derived from start/end time instead of a separate duration input.
26- - sees enrolled courses, related exams, own marks, own attendance, and personal notes.26+- Exam room locally closes in-progress attempts when the countdown reaches zero, while the backend remains authoritative for final status.
27- - must not see teacher/manager/admin create, edit, delete, settings, or user-management controls.27+
28-- Teacher:28+## Role Audit Result
29- - sees course/exam/event authoring controls where allowed.29+
30- - sees grading, live monitor, attendance/session tools, and work log where allowed.30+- Students see enrolled courses, related exams, own marks, own attendance, and personal notes.
31-- Manager:31+- Students do not see teacher/manager/admin create, edit, delete, settings, or user-management controls.
32- - sees management pages such as settings, terms, reports, and broader course/event/exam management.32+- Teachers see authoring, grading, live monitor, attendance/session tools, and work log where the backend allows them.
33- - should not rely on student enrollment scope unless the feature is explicitly personal.33+- Managers see management pages and broader course/event/exam management scope.
34-- Admin:34+- Admins see global management scope for courses, exams, users, settings, and terms.
35- - sees global management scope: all courses, exams, users, settings, terms, and admin-only pages.
36- - dashboard KPIs and timelines should use global data where available.
37-
38-Backend contract checkpoints:
39-
40 - Course sessions are visible only inside visible courses: enrolled student, course creator, or manager+.35 - Course sessions are visible only inside visible courses: enrolled student, course creator, or manager+.
41 - Session roll call is teacher-side only: the session teacher or course manager marks enrolled students; students never self-mark lesson sessions.36 - Session roll call is teacher-side only: the session teacher or course manager marks enrolled students; students never self-mark lesson sessions.
42-- A session teacher's own presence row requires manager+ on the backend; frontend should not imply a teacher can mark themself present.37+- A session teacher's own presence row requires manager+ on the backend; frontend does not imply a teacher can mark themself present.
43 - Attendance reports are personal for students; teacher lookups are narrowed to managed courses, while manager+ can see all.38 - Attendance reports are personal for students; teacher lookups are narrowed to managed courses, while manager+ can see all.
44-- All schedule values are UTC unix-millisecond numbers. Event, exam, and lesson session create/PATCH values that set a schedule in the past return `400` after the backend grace window.39+- All schedule values are UTC unix-millisecond numbers. Backend remains authoritative for not-in-the-past enforcement.
45-- Frontend past/future checks should prefer server time from `GET /time` where countdowns or schedule validity matter.40+
46-41+## Request And Pagination Result
47-Audit checklist:42+
48-43+- `/courses`: client-paginated after `GET /courses` for teacher+ and `GET /courses/me` for students. Toolbar search and term filters are client-side until backend params exist.
49-- Sidebar items match role capability.44+- `/exams`: client-paginated after `GET /exams`. Student filters use `GET /courses/me`; teacher+ filters use `GET /courses`.
50-- Route guards match backend permission expectations.45+- `/events`: client-paginated after `GET /events`. Toolbar search and all/upcoming/past filters are client-side.
51-- Header actions and row actions hide unavailable create/edit/delete operations.46+- `/admin/users`: unpaginated `GET /users` plus client filtering/search UI. Admin-only.
52-- Dashboard scope matches the current role.47+- `/work`: unpaginated `GET /work/me`, newest first. Personal staff log.
53-- Tables show user-facing labels, not raw ids, whenever lookup data is available.48+- `/courses/:id` exams: unpaginated `GET /courses/{id}/exams`; course-scoped.
54-- Empty states explain real absence of data, not loading or scope mismatch.49+- `/courses/:id` sessions: unpaginated `GET /courses/{id}/sessions`, deferred until sessions section or create panel is opened.
55-50+- `/courses/:id` roster: unpaginated `GET /courses/{id}/enrollments`, course-management only.
56-Started fixes:51+- `/events/:id` attendance: unpaginated `GET /events/{id}/attendance`, teacher+ only and deferred until the attendance disclosure opens.
57-52+- `/exams/:id` results: unpaginated `GET /exams/{id}/results`, deferred until results/grade/answer-sheet workflow needs it.
58-- Event detail attendance roster is gated to teacher+ so students do not trigger `GET /events/{id}/attendance`.53+- `/exams/:id` questions: unpaginated `GET /exams/{id}/questions`, deferred until questions section is opened.
59-- Course detail session list fetch is gated by the sessions disclosure or session-create panel state to avoid a hidden sessions request on initial detail load.54+- `/exams/:id/live`: client-paginated/sorted live roster over backend snapshot/SSE.
60-- Exam room entry is student/enrolled workflow only; teacher+ users get live monitor actions instead of the student exam-room action.
61-- Student report lookup and course enrollment pickers pass `role=student` to `/users/search` so management flows do not suggest non-student accounts.
62-- Courses page no longer calls `GET /courses` for students when it renders the enrolled-course list from `GET /courses/me`.
63-- Exams page no longer calls `GET /courses` for students; course filters use enrolled courses from `GET /courses/me`.
64-- Exams table edit action is limited to exam creator or manager+, matching course-management rights.
65-- Dashboard course scope uses `GET /courses/me` for students and `GET /courses` for teacher+ visible-course scope.
66-- Exam detail teacher-only data (results, statistics, roster, answer sheets, live monitor action) is limited to exam creator or manager+ instead of every teacher.
67-- Course detail roster and session roll-call actions are limited to course-management rights, matching backend roster/roll-call access expectations.
68-- Exams page create action appears only when the teacher/manager has at least one manageable course to receive the new exam.
69-- Exam create course picker lists only manageable courses, not every visible course.
70-- Exam detail defers teacher-only heavy data: statistics load when opened, questions mount when opened, and results/roster load when the results or grade workflow needs them.
71-- Event detail defers the teacher-only attendance roster until the attendance disclosure is opened.
72-
73-## Priority 2: Pagination And Request Audit
74-
75-Audit list pages for pagination behavior and request shape.
76-
77-- Identify which pages use client-side pagination after fetching full lists.
78-- Identify which backend endpoints support server-side pagination, filtering, or search.
79-- Verify frontend requests use backend pagination where available.
80-- For pages that must stay client-side for now, document the reason and expected data size.
81-- Check that table pagination, search, filters, and sorting are consistent with the request model.
82-- Avoid claiming a page is paginated if it only slices already-fetched full data.
83-
84-Pages to check:
85-
86-- Courses list.
87-- Exams list.
88-- Admin users directory.
89-- Live monitor roster.
90-- Work log.
91-- Terms/settings lists if they grow beyond small configuration data.
92-- Detail sub-tables such as enrollments, results, attendance, sessions, and questions.
93-
94-Backend shape notes:
95-
96-- `/courses/{id}/sessions` returns the course's visible sessions, most recent first.
97-- `/sessions/{id}/attendance` can grow with roster size; panel pagination is currently client-side over the enrolled roster.
98-- `/attendance/{user}` is already scope-filtered by the backend for teacher vs manager roles.
99-
100-Acceptance criteria:
101-
102-- Every list page is classified as server-paginated, client-paginated, or intentionally unpaginated.
103-- Request URLs and API helpers match the chosen pagination model.
104-- Large or growing datasets do not fetch all records unless explicitly accepted.
105-- UI pagination controls do not hide excessive network payloads.
106-
107-Current classification:
108-
109-- `/courses`: client-paginated after `GET /courses` for teacher+ and `GET /courses/me` for students. Backend README does not document pagination params. Accepted temporarily; watch growth.
110-- `/exams`: client-paginated after `GET /exams`. Student filter uses `GET /courses/me` for course labels/filtering; teacher+ uses `GET /courses`. Backend README does not document pagination params. Accepted temporarily; watch growth.
111-- `/events`: client-paginated after `GET /events`. Backend README does not document pagination params. Accepted temporarily for event volume.
112-- `/admin/users`: unpaginated `GET /users` plus client filtering/search UI. Admin-only; backend README does not document pagination params. Needs revisit if user count grows.
113-- `/work`: unpaginated `GET /work/me`, newest first. Personal staff log; acceptable short-term but should paginate if long-lived use grows.
114-- `/courses/:id` exams: unpaginated `GET /courses/{id}/exams`; course-scoped and accepted short-term.
115-- `/courses/:id` sessions: unpaginated `GET /courses/{id}/sessions`, deferred until sessions section or create panel is opened. Course-scoped and accepted short-term.
116-- `/courses/:id` roster: unpaginated `GET /courses/{id}/enrollments`, course-management only. Accepted for normal class sizes.
117-- `/events/:id` attendance: unpaginated `GET /events/{id}/attendance`, teacher+ only and deferred until the attendance disclosure opens. Accepted for event-scale rosters.
118-- `/exams/:id` results: unpaginated `GET /exams/{id}/results`, deferred until results/grade/answer-sheet workflow needs it. Accepted for normal class sizes.
119-- `/exams/:id` questions: unpaginated `GET /exams/{id}/questions`, deferred until questions section is opened. Accepted for exam-scale data.
120-- `/exams/:id/live`: client-paginated/sorted live roster over backend snapshot/SSE. Accepted because monitor snapshot is role-gated and exam-scoped.
121 - `/attendance` and `/management/student-attendance`: unpaginated report payloads; backend returns aggregate report shape, not a raw row list.55 - `/attendance` and `/management/student-attendance`: unpaginated report payloads; backend returns aggregate report shape, not a raw row list.
122 56
123-Known follow-ups:57+## Backend-Dependent Follow-Up
124-
125-- Backend pagination/search params have been requested; do not claim true server-side pagination until those params exist in the backend README/API contract.
126-- If backend adds pagination, update `src/api/*` helpers first and then move toolbar/search/filter state into request params.
127-
128-## Priority 3: Docs Cleanup
129-
130-- Keep `docs/navigation-patterns.md` as the active interaction rulebook.
131-- Keep `docs/ui-redesign-tokens.md` as the visual system reference.
132-- Keep `docs/backend-ui-alignment-plan.md` as a completed archive unless backend scope changes.
133-- Update docs whenever a rule changes; completed implementation plans must not look like active work.
134-
135-## Remaining UX Work
136-
137-### Notes UX
138-
139-- Note create/edit `FormDialog` has been visually aligned with the newer form system.
140-- Note create/edit stays in dialogs; note reading also opens a dialog.
141-- Notes now render as richer notebook-style pages, with the read dialog using the same paper-like visual language.
142-- Keep note detail work lightweight unless notes become a durable resource with its own full page.
143-
144-### Exam Question Authoring
145-
146-- `ExamQuestionsPanel` still uses `FormDialog` for add/edit.
147-- This is acceptable while the question form stays small.
148-- Revisit as a `SidePanel` if question authoring grows or needs more vertical space.
149-
150-### Schedule Validation
151-
152-- Lesson session creation currently validates date shape and end-after-start in the client; backend still enforces not-in-the-past with server time.
153-- Event, exam, and lesson session forms use `GET /time` before warning users that newly scheduled start/end values are in the past.
154-- Keep client validation advisory only; backend remains authoritative.
155-
156-### Course Table Polish
157-
158-- Courses page has client-side search plus a term/unassigned filter while backend pagination/filter params are pending.
159-- Consider an enrolled/all filter for students if the list becomes large.
160-- Keep the table compact and preserve the full detail page for course resources.
161-
162-### Visual Consistency
163-
164-- Settings, terms, notes, attendance, course sessions, and course detail section headers have been visually aligned with the newer radius/form/action language.
165-- Events page keeps card rendering but now uses the shared toolbar pattern for search and upcoming/past filters.
166-- Preserve non-table layouts only where cards communicate the domain better than rows.
167-
168-## Request Budget Targets
169 58
170-- `/courses`: max 2-4 initial API calls depending on role and lookup needs.59+- Backend pagination/search/filter params have been requested.
171-- `/courses/:id`: course detail may keep opened section state mounted; avoid fetching large hidden data unless the section is opened or needed for header metadata.60+- Do not claim true server-side pagination until those params exist in the backend README/API contract.
172-- `/exams/:id`: exam detail may keep disclosure content mounted to preserve local state; defer heavy section data where practical.61+- When backend params arrive, update `src/api/*` helpers first and then move toolbar/search/filter/page state into request params.
173-- `/events/:id`: teacher-only attendance is lazy-loaded behind the attendance disclosure; keep self-attendance visible as a primary action.
174-- Dashboard should avoid broad role-specific requests unless that role actually needs global scope.
175-- Settings-dependent controls should share the cached settings request.
176-- Paginated tables should prefer server-side pagination when backend support exists.
177 62
178-## Acceptance Checklist63+## Active Backlog
179 64
180-- `bun run build` passes.65+- No active frontend backlog items remain in this audit batch.
181-- Role-based UI audit is complete for sidebar, routes, dashboard, and actions.
182-- Pagination and request audit is complete for list pages and large detail tables.
183-- README is current with stack, scripts, roles, UI patterns, and docs links.
184-- Docs reflect active rules and do not contradict current implementation.
185-- No native `date` or `datetime-local` inputs remain where the shared `DatePicker` should be used.
186-- Disclosure sections document whether they preserve mounted state or defer hidden-section requests.
187-- Dashboard remains observation-only and role-scoped.
188-- Table action columns use centered three-dot menus.
189-- Detail routes do not show stale resource content after navigating between ids.