📝 sync docs with recent UI changes (attendance, roll call, disclosures)
Browse files at this commit533f4b2ccce8abeae5fe6303134d8f6ff73917c0Parent: 00278f7- docs
- 📝 sync docs with recent UI changes (attendance, roll call, disclosures)
5 changed files +65 -23
- AGENTS.md +14 -0
- README.md +4 -1
- docs/frontend-next-steps.md +32 -17
- docs/navigation-patterns.md +10 -2
- docs/ui-redesign-tokens.md +5 -3
AGENTS.mdmodified+14 -0
| @@ -65,6 +65,20 @@ Solid components run **once**, there is no re-render: | |||
| 65 | fallback), `refetch()` after mutations. | 65 | fallback), `refetch()` after mutations. |
| 66 | - One `<Suspense>` boundary per page, no spinner-cascades, fixed-height list rows. | 66 | - One `<Suspense>` boundary per page, no spinner-cascades, fixed-height list rows. |
| 67 | 67 | ||
| 68 | +## Project docs and current UI rules | ||
| 69 | + | ||
| 70 | +- Treat these docs as active project context before changing related areas: | ||
| 71 | + - `docs/frontend-next-steps.md` — active backlog, role/pagination/request audit notes. | ||
| 72 | + - `docs/navigation-patterns.md` — interaction rules, role scope, side-panel/full-page decisions. | ||
| 73 | + - `docs/ui-redesign-tokens.md` — visual density, radius, table, side-panel, and status UI conventions. | ||
| 74 | + - `docs/backend-ui-alignment-plan.md` — completed backend-alignment archive; do not treat it as active work unless backend scope changes. | ||
| 75 | +- Durable resources use full detail pages. Short create/edit/filter work uses `SidePanel`. Destructive actions use confirm dialogs. | ||
| 76 | +- Header create actions use compact icon+label buttons with consistent size and current radius. | ||
| 77 | +- Disclosure sections may either defer mounting for request savings or keep content mounted for state preservation; choose deliberately and avoid hidden heavy requests unless needed. | ||
| 78 | +- Date/time product forms use shared `DatePicker` plus a separate `HH:mm` input. Backend schedule fields are UTC unix-millisecond values and the backend rejects newly set past event/exam/session schedules with `400`; use `GET /time` for server-clock-aware checks when accuracy matters. | ||
| 79 | +- Lesson session roll call is teacher/manager workflow only. Students never self-mark lesson sessions; the session teacher or course manager marks enrolled students, and the session teacher's own presence row is manager-only per backend rules. | ||
| 80 | +- Attendance status UI uses shared localized metadata: label, short detail text, and semantic colors. | ||
| 81 | + | ||
| 68 | ## Containers | 82 | ## Containers |
| 69 | 83 | ||
| 70 | - We use **Podman**, not Docker. Never suggest, generate, or run `docker` / | 84 | - We use **Podman**, not Docker. Never suggest, generate, or run `docker` / |
README.mdmodified+4 -1
| @@ -63,6 +63,7 @@ Dashboard and table summaries must use the same role scope as the related page. | |||
| 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, expiry) | |
| 65 | | `/courses` | Student+ | Course table; create/edit flows for teacher+ | | 65 | | `/courses` | Student+ | Course table; create/edit flows for teacher+ | |
| 66 | +| `/courses/:id` | Student+ | Course detail, exams, roster, lesson sessions, and roll call tools | | ||
| 66 | | `/guide` | Authenticated | App usage guide | | 67 | | `/guide` | Authenticated | App usage guide | |
| 67 | | `/admin/users` | Admin | User management | | 68 | | `/admin/users` | Admin | User management | |
| 68 | 69 | ||
| @@ -75,6 +76,8 @@ Dashboard and table summaries must use the same role scope as the related page. | |||
| 75 | - **Profile editing**: update display name, email, phone, birth date | 76 | - **Profile editing**: update display name, email, phone, birth date |
| 76 | - **Dense tables**: toolbar search/filter, subtle column separators, narrow centered three-dot row actions | 77 | - **Dense tables**: toolbar search/filter, subtle column separators, narrow centered three-dot row actions |
| 77 | - **Side panels**: quick create/edit workflows without losing list context | 78 | - **Side panels**: quick create/edit workflows without losing list context |
| 79 | +- **Course sessions**: right-panel session creation and paginated roll call panels | ||
| 80 | +- **Attendance UI**: localized status labels with explanatory detail text and semantic colors | ||
| 78 | - **Role-scoped dashboard**: read-only summaries and KPIs by current role | 81 | - **Role-scoped dashboard**: read-only summaries and KPIs by current role |
| 79 | - **i18n**: full Turkish / English interface | 82 | - **i18n**: full Turkish / English interface |
| 80 | 83 | ||
| @@ -86,7 +89,7 @@ Dashboard and table summaries must use the same role scope as the related page. | |||
| 86 | - Data-heavy views use `DataToolbar`, `DataTableFrame`, `.data-table`, and `TableRowActions`. | 89 | - Data-heavy views use `DataToolbar`, `DataTableFrame`, `.data-table`, and `TableRowActions`. |
| 87 | - 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. | 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. |
| 88 | - Date fields use the shared `DatePicker`; date-time flows pair it with an `HH:mm` input. | 91 | - Date fields use the shared `DatePicker`; date-time flows pair it with an `HH:mm` input. |
| 89 | -- Closed disclosure sections should not mount or fetch hidden content. | 92 | +- Disclosure sections either defer hidden content for request savings or preserve mounted content when local state should not reset. |
| 90 | 93 | ||
| 91 | ## Docs | 94 | ## Docs |
| 92 | 95 | ||
docs/frontend-next-steps.mdmodified+32 -17
| @@ -12,7 +12,9 @@ cleanup. | |||
| 12 | - Table actions use a narrow centered three-dot menu through `TableRowActions`. | 12 | - Table actions use a narrow centered three-dot menu 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 | -- Closed disclosure sections do not mount their content, so hidden panels do not fetch data. | 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. | ||
| 17 | +- Disclosure sections may keep content mounted when state preservation is more important than request deferral; do not assume closed sections always avoid requests. | ||
| 16 | - Settings requests are cached and refreshed after settings patches. | 18 | - Settings requests are cached and refreshed after settings patches. |
| 17 | - 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. |
| 18 | 20 | ||
| @@ -33,6 +35,15 @@ Audit every route and major page for role-specific UI behavior. | |||
| 33 | - sees global management scope: all courses, exams, users, settings, terms, and admin-only pages. | 35 | - sees global management scope: all courses, exams, users, settings, terms, and admin-only pages. |
| 34 | - dashboard KPIs and timelines should use global data where available. | 36 | - dashboard KPIs and timelines should use global data where available. |
| 35 | 37 | ||
| 38 | +Backend contract checkpoints: | ||
| 39 | + | ||
| 40 | +- 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. | ||
| 42 | +- A session teacher's own presence row requires manager+ on the backend; frontend should 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. | ||
| 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. | ||
| 45 | +- Frontend past/future checks should prefer server time from `GET /time` where countdowns or schedule validity matter. | ||
| 46 | + | ||
| 36 | Audit checklist: | 47 | Audit checklist: |
| 37 | 48 | ||
| 38 | - Sidebar items match role capability. | 49 | - Sidebar items match role capability. |
| @@ -42,8 +53,6 @@ Audit checklist: | |||
| 42 | - Tables show user-facing labels, not raw ids, whenever lookup data is available. | 53 | - Tables show user-facing labels, not raw ids, whenever lookup data is available. |
| 43 | - Empty states explain real absence of data, not loading or scope mismatch. | 54 | - Empty states explain real absence of data, not loading or scope mismatch. |
| 44 | 55 | ||
| 45 | -## Priority 2: README Update | ||
| 46 | - | ||
| 47 | ## Priority 2: Pagination And Request Audit | 56 | ## Priority 2: Pagination And Request Audit |
| 48 | 57 | ||
| 49 | Audit list pages for pagination behavior and request shape. | 58 | Audit list pages for pagination behavior and request shape. |
| @@ -65,6 +74,12 @@ Pages to check: | |||
| 65 | - Terms/settings lists if they grow beyond small configuration data. | 74 | - Terms/settings lists if they grow beyond small configuration data. |
| 66 | - Detail sub-tables such as enrollments, results, attendance, sessions, and questions. | 75 | - Detail sub-tables such as enrollments, results, attendance, sessions, and questions. |
| 67 | 76 | ||
| 77 | +Backend shape notes: | ||
| 78 | + | ||
| 79 | +- `/courses/{id}/sessions` returns the course's visible sessions, most recent first. | ||
| 80 | +- `/sessions/{id}/attendance` can grow with roster size; panel pagination is currently client-side over the enrolled roster. | ||
| 81 | +- `/attendance/{user}` is already scope-filtered by the backend for teacher vs manager roles. | ||
| 82 | + | ||
| 68 | Acceptance criteria: | 83 | Acceptance criteria: |
| 69 | 84 | ||
| 70 | - Every list page is classified as server-paginated, client-paginated, or intentionally unpaginated. | 85 | - Every list page is classified as server-paginated, client-paginated, or intentionally unpaginated. |
| @@ -72,15 +87,7 @@ Acceptance criteria: | |||
| 72 | - Large or growing datasets do not fetch all records unless explicitly accepted. | 87 | - Large or growing datasets do not fetch all records unless explicitly accepted. |
| 73 | - UI pagination controls do not hide excessive network payloads. | 88 | - UI pagination controls do not hide excessive network payloads. |
| 74 | 89 | ||
| 75 | -## Priority 3: README Update | 90 | +## Priority 3: Docs Cleanup |
| 76 | - | ||
| 77 | -- Update stack, scripts, and local setup notes. | ||
| 78 | -- Document role hierarchy and UI scope rules. | ||
| 79 | -- Document dashboard behavior and table action standards. | ||
| 80 | -- Link the active docs under `docs/`. | ||
| 81 | -- Keep build verification as `bun run build`. | ||
| 82 | - | ||
| 83 | -## Priority 4: Docs Cleanup | ||
| 84 | 91 | ||
| 85 | - Keep `docs/navigation-patterns.md` as the active interaction rulebook. | 92 | - Keep `docs/navigation-patterns.md` as the active interaction rulebook. |
| 86 | - Keep `docs/ui-redesign-tokens.md` as the visual system reference. | 93 | - Keep `docs/ui-redesign-tokens.md` as the visual system reference. |
| @@ -91,7 +98,8 @@ Acceptance criteria: | |||
| 91 | 98 | ||
| 92 | ### Notes UX | 99 | ### Notes UX |
| 93 | 100 | ||
| 94 | -- Replace note create/edit `FormDialog` with a `SidePanel` or a richer notebook writing layout. | 101 | +- Note create/edit `FormDialog` has been visually aligned with the newer form system. |
| 102 | +- Decide whether note create/edit should remain a modal, move to `SidePanel`, or become a richer notebook writing layout. | ||
| 95 | - Decide whether the notes page should stay card-based or become a more structured notebook view. | 103 | - Decide whether the notes page should stay card-based or become a more structured notebook view. |
| 96 | - Keep note detail work lightweight unless notes become a durable resource with its own full page. | 104 | - Keep note detail work lightweight unless notes become a durable resource with its own full page. |
| 97 | 105 | ||
| @@ -107,6 +115,12 @@ Acceptance criteria: | |||
| 107 | - Consider wrapping attendance in `SectionDisclosure` so the attendance list fetches only when opened. | 115 | - Consider wrapping attendance in `SectionDisclosure` so the attendance list fetches only when opened. |
| 108 | - Keep self-attendance visible if it remains a primary action. | 116 | - Keep self-attendance visible if it remains a primary action. |
| 109 | 117 | ||
| 118 | +### Schedule Validation | ||
| 119 | + | ||
| 120 | +- Lesson session creation currently validates date shape and end-after-start in the client; backend still enforces not-in-the-past with server time. | ||
| 121 | +- Consider adding a shared server-time helper around `GET /time` before warning users that event/exam/session schedule values are in the past. | ||
| 122 | +- Keep client validation advisory only; backend remains authoritative. | ||
| 123 | + | ||
| 110 | ### Course Table Polish | 124 | ### Course Table Polish |
| 111 | 125 | ||
| 112 | - Add a term filter to the courses page. | 126 | - Add a term filter to the courses page. |
| @@ -115,14 +129,15 @@ Acceptance criteria: | |||
| 115 | 129 | ||
| 116 | ### Visual Consistency | 130 | ### Visual Consistency |
| 117 | 131 | ||
| 118 | -- Decide how far to extend the table/toolbar pattern to `events-page`, `notes-page`, `terms-page`, and `settings-page`. | 132 | +- Settings, terms, notes, attendance, course sessions, and course detail section headers have been visually aligned with the newer radius/form/action language. |
| 133 | +- Decide how far to extend the table/toolbar pattern to `events-page` and remaining card-based views. | ||
| 119 | - Preserve non-table layouts only where cards communicate the domain better than rows. | 134 | - Preserve non-table layouts only where cards communicate the domain better than rows. |
| 120 | 135 | ||
| 121 | ## Request Budget Targets | 136 | ## Request Budget Targets |
| 122 | 137 | ||
| 123 | - `/courses`: max 2-4 initial API calls depending on role and lookup needs. | 138 | - `/courses`: max 2-4 initial API calls depending on role and lookup needs. |
| 124 | -- `/courses/:id`: initial detail data only; closed sections should make zero extra requests. | 139 | +- `/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. |
| 125 | -- `/exams/:id`: initial exam data only plus role-required summary data; closed sections should make zero extra requests. | 140 | +- `/exams/:id`: exam detail may keep disclosure content mounted to preserve local state; defer heavy section data where practical. |
| 126 | - `/events/:id`: consider lazy-loading attendance if the route feels heavy. | 141 | - `/events/:id`: consider lazy-loading attendance if the route feels heavy. |
| 127 | - Dashboard should avoid broad role-specific requests unless that role actually needs global scope. | 142 | - Dashboard should avoid broad role-specific requests unless that role actually needs global scope. |
| 128 | - Settings-dependent controls should share the cached settings request. | 143 | - Settings-dependent controls should share the cached settings request. |
| @@ -136,7 +151,7 @@ Acceptance criteria: | |||
| 136 | - README is current with stack, scripts, roles, UI patterns, and docs links. | 151 | - README is current with stack, scripts, roles, UI patterns, and docs links. |
| 137 | - Docs reflect active rules and do not contradict current implementation. | 152 | - Docs reflect active rules and do not contradict current implementation. |
| 138 | - No native `date` or `datetime-local` inputs remain where the shared `DatePicker` should be used. | 153 | - No native `date` or `datetime-local` inputs remain where the shared `DatePicker` should be used. |
| 139 | -- Closed disclosure sections do not trigger network requests. | 154 | +- Disclosure sections document whether they preserve mounted state or defer hidden-section requests. |
| 140 | - Dashboard remains observation-only and role-scoped. | 155 | - Dashboard remains observation-only and role-scoped. |
| 141 | - Table action columns use centered three-dot menus. | 156 | - Table action columns use centered three-dot menus. |
| 142 | - Detail routes do not show stale resource content after navigating between ids. | 157 | - Detail routes do not show stale resource content after navigating between ids. |
docs/navigation-patterns.mdmodified+10 -2
| @@ -15,6 +15,12 @@ Role scope rules: | |||
| 15 | - Student sees own/enrolled/related data only. | 15 | - Student sees own/enrolled/related data only. |
| 16 | - If lookup data is available, show usernames or display names instead of raw ids. Raw ids are fallback only. | 16 | - If lookup data is available, show usernames or display names instead of raw ids. Raw ids are fallback only. |
| 17 | 17 | ||
| 18 | +Lesson session rules: | ||
| 19 | + | ||
| 20 | +- Students can see sessions only through visible/enrolled courses. | ||
| 21 | +- Lesson roll call is never student self-service; it belongs in teacher/manager workflows. | ||
| 22 | +- The session teacher or course manager can mark enrolled students; the teacher's own presence row is manager-only per backend rules. | ||
| 23 | + | ||
| 18 | Admin pages are action-oriented. Lists should use shared toolbar and table primitives, compact rows, sticky headers, fixed status/action columns, and pagination. | 24 | Admin pages are action-oriented. Lists should use shared toolbar and table primitives, compact rows, sticky headers, fixed status/action columns, and pagination. |
| 19 | 25 | ||
| 20 | Pagination and request rules: | 26 | Pagination and request rules: |
| @@ -34,11 +40,13 @@ Table action rules: | |||
| 34 | 40 | ||
| 35 | Delete or destructive confirmation stays in a confirm dialog, not a side panel. | 41 | Delete or destructive confirmation stays in a confirm dialog, not a side panel. |
| 36 | 42 | ||
| 37 | -Header create actions should use a consistent compact button shape: icon plus label, `size="sm"`, and `rounded-sm`. | 43 | +Header create actions should use a consistent compact button shape: icon plus label, `size="sm"`, equal min-width, and the current app radius (`rounded-lg` in course detail headers). |
| 38 | 44 | ||
| 39 | Date picking should use the shared `DatePicker` plus a separate `HH:mm` input when time is needed. Avoid native `date` and `datetime-local` controls in product forms. | 45 | Date picking should use the shared `DatePicker` plus a separate `HH:mm` input when time is needed. Avoid native `date` and `datetime-local` controls in product forms. |
| 40 | 46 | ||
| 41 | -Animated disclosure sections must not mount their children while closed. Closed sections should not start API requests. | 47 | +Schedule validation should remember that event, exam, and lesson session times are UTC unix-millisecond values and the backend rejects newly set past schedule values with `400`. Use `GET /time` for server-clock-aware checks when accuracy matters. |
| 48 | + | ||
| 49 | +Animated disclosure sections may either defer mounting for request savings or keep content mounted for state preservation. Choose deliberately per section and avoid hidden heavy requests unless preserving state is required. | ||
| 42 | 50 | ||
| 43 | Detail routes must avoid showing stale resource data after navigating between ids. If a resource id does not match the current route param, show a loading state instead of old content. | 51 | Detail routes must avoid showing stale resource data after navigating between ids. If a resource id does not match the current route param, show a loading state instead of old content. |
| 44 | 52 | ||
docs/ui-redesign-tokens.mdmodified+5 -3
| @@ -18,7 +18,7 @@ Light palette is defined in `src/index.css` as `--ui-*` variables: | |||
| 18 | - `--ui-text-1`: `#101414` | 18 | - `--ui-text-1`: `#101414` |
| 19 | - `--ui-text-2`: `#4b5555` | 19 | - `--ui-text-2`: `#4b5555` |
| 20 | - `--ui-text-3`: `#788181` | 20 | - `--ui-text-3`: `#788181` |
| 21 | -- `--ui-accent`: `#2563eb` | 21 | +- `--ui-accent`: ice-blue / teal-blue (`204 86% 48%` in HSL tokens) |
| 22 | - semantic colors: success, warning, danger, info, each with muted pair | 22 | - semantic colors: success, warning, danger, info, each with muted pair |
| 23 | 23 | ||
| 24 | Dark palette mirrors same token names with dark surfaces and brighter semantic | 24 | Dark palette mirrors same token names with dark surfaces and brighter semantic |
| @@ -60,7 +60,7 @@ Density defaults: | |||
| 60 | - sidebar group/header row: 32px | 60 | - sidebar group/header row: 32px |
| 61 | - table header/cell row: 36px | 61 | - table header/cell row: 36px |
| 62 | - card padding: 16px | 62 | - card padding: 16px |
| 63 | -- radius: 6px | 63 | +- radius: 12px base token (`0.75rem`), with `rounded-lg`/`rounded-xl` used for modern form and card surfaces |
| 64 | - table numerals/IDs use tabular mono | 64 | - table numerals/IDs use tabular mono |
| 65 | - table action column: narrow, centered, three-dot trigger | 65 | - table action column: narrow, centered, three-dot trigger |
| 66 | - table column separators: subtle border between cells, no heavy gridlines | 66 | - table column separators: subtle border between cells, no heavy gridlines |
| @@ -85,10 +85,12 @@ Implemented: | |||
| 85 | - Row-level table actions should use `TableRowActions`; avoid inline action button clusters in table rows. | 85 | - Row-level table actions should use `TableRowActions`; avoid inline action button clusters in table rows. |
| 86 | - Quick create/edit flows should use `SidePanel`; destructive actions stay in confirm dialogs. | 86 | - Quick create/edit flows should use `SidePanel`; destructive actions stay in confirm dialogs. |
| 87 | - Durable resources keep full detail pages with breadcrumbs. | 87 | - Durable resources keep full detail pages with breadcrumbs. |
| 88 | -- Large detail sections can use `SectionDisclosure`, but closed sections must not mount children or fetch data. | 88 | +- Large detail sections can use `SectionDisclosure`; choose deferred mounting for request savings or mounted content for state preservation. |
| 89 | - Product date inputs should use the shared `DatePicker`; date-time flows should pair it with a compact `HH:mm` input. | 89 | - Product date inputs should use the shared `DatePicker`; date-time flows should pair it with a compact `HH:mm` input. |
| 90 | - Sidebar icons are local SVG wrappers to keep development builds small and avoid large icon package module graphs. | 90 | - Sidebar icons are local SVG wrappers to keep development builds small and avoid large icon package module graphs. |
| 91 | - User-facing tables should prefer usernames/display names over raw ids; show raw ids only as fallback or in explicit id columns. | 91 | - User-facing tables should prefer usernames/display names over raw ids; show raw ids only as fallback or in explicit id columns. |
| 92 | +- Header actions use compact icon + label buttons with equal min-width; related sections should use matching badge labels and button sizing. | ||
| 93 | +- Attendance status UI uses shared metadata: localized label, short detail text, and semantic color classes. | ||
| 92 | 94 | ||
| 93 | Static wireframe: | 95 | Static wireframe: |
| 94 | 96 | ||