Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions docs/ux-overhaul/production-route-migration.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Production Route Migration

Phase 1 preserves route compatibility and establishes canonical role destinations without deleting deep links. Phase 2 begins the student `/learn` migration while keeping legacy student deep links available.
Phase 1 preserves route compatibility and establishes canonical role destinations without deleting deep links. Phase 2 begins the student `/learn` migration while keeping legacy student deep links available. Phase 3 adds canonical teacher `/teach` routes while preserving `/home` and workspace cohort deep links.

| Current route | Canonical route | Role | Redirect behavior | Guard behavior | Migration phase | Removal criteria | Deep-link risk |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `/home` | `/home` for teacher/admin, transitional for other roles | teacher, instructor, admin, super_admin-compatible | No redirect | `HomeSessionGuard`; child guards unchanged | Phase 1 | Only after all role dashboards have route-level replacements and analytics show low usage | High |
| `/home` | `/teach` for teacher/instructor; `/home` remains admin transitional | teacher, instructor, admin, super_admin-compatible | No redirect | `HomeSessionGuard`; child guards unchanged | Phase 3 teacher alias added | Remove teacher reliance only after `/teach` smoke tests and usage validation | High |
| `/teach` | `/teach` | teacher, instructor | No redirect; role landing now points here | `HomeSessionGuard`; child guards unchanged | Phase 3 | None planned | Low |
| `/teach/classes` | `/teach/classes` | teacher, instructor, org_admin | No redirect | `HomeSessionGuard` plus `RoleGuard` section roles | Phase 3 | None planned | Low |
| `/teach/classes/:id` | `/teach/classes/:id` | teacher, instructor, org_admin | No redirect | `HomeSessionGuard` plus `RoleGuard` section roles; frontend verifies route section is in authorized section list | Phase 3 | None planned | Low |
| `/teach/curriculum` | `/teach/curriculum` | teacher, instructor | No redirect | `HomeSessionGuard` plus `RoleGuard` teacher/instructor | Phase 3 | None planned | Low |
| `/teach/courses/:courseId/preview` | `/teach/courses/:courseId/preview` | teacher, instructor | No redirect | `HomeSessionGuard` plus `RoleGuard` teacher/instructor; preview uses course load only | Phase 3 | None planned | Low |
| `/teach/assignments` | `/teach/classes` class-first assignment entry | teacher, instructor, org_admin | No redirect; currently renders class list to choose assignment context | `HomeSessionGuard` plus `RoleGuard` section roles | Phase 3 | Replace only if global assignment API is added | Low |
| `/teach/learners/:learnerId` | `/teach/learners/:learnerId?sectionId=` | teacher, instructor, org_admin | No redirect | `HomeSessionGuard` plus `RoleGuard`; frontend requires section context and roster membership | Phase 3 | None planned | Low |
| `/learn` | `/learn` | student | Login routes students here after ready bootstrap | `HomeSessionGuard`; learner child routes unchanged | Phase 1 | None planned | Low |
| `/learn/products` | `/learn/products` visible as Courses, with course path links to `/learn/courses/:courseId` | student | No redirect | `HomeSessionGuard`; existing learner-product API still used | Phase 2 | Keep as transitional browse route until learner-product and course catalog surfaces are unified | Low |
| `/learn/courses/:courseId` | `/learn/courses/:courseId` | student | New canonical course overview; no redirect | `HomeSessionGuard`; course access remains enforced by backend endpoints and governed start behavior | Phase 2 | None planned; direct route should remain | Low |
Expand All @@ -18,7 +25,8 @@ Phase 1 preserves route compatibility and establishes canonical role destination
| `/home/admin/users` | `/home/admin/users` | admin | No redirect | Existing `RoleGuard` admin-only | Phase 1 | Dedicated Admin IA route exists and old path is aliased | High |
| `/home/admin/courses` | `/home/admin/courses` | admin | No redirect | Existing `RoleGuard` admin-only | Phase 1 | Dedicated Admin IA route exists and old path is aliased | High |
| `/home/admin/badges` | `/home/admin/badges` | admin | No redirect | Existing `RoleGuard` admin-only | Phase 1 | Dedicated Admin IA route exists and old path is aliased | High |
| `/home/sections` | `/home/sections` | teacher, instructor, org_admin | No redirect | Existing `RoleGuard` section roles | Phase 1 | Class/cohort IA aliases are implemented and smoke tested | High |
| `/home/sections` | `/teach/classes` | teacher, instructor, org_admin | No redirect | Existing `RoleGuard` section roles | Phase 3 alias added | Remove only after teacher bookmarks and smoke tests move to `/teach/classes` | High |
| `/home/sections/:id` | `/teach/classes/:id` | teacher, instructor, org_admin | No redirect | Existing `RoleGuard` section roles | Phase 3 alias added | Remove only after class detail deep links have compatibility redirects | High |
| `/home/courses` | `/home/courses` | teacher, instructor, student transitional | No redirect | Existing child route, no added guard | Phase 1 | Course library split is implemented and tested | Medium |
| `/home/programs` | `/home/programs` | teacher, instructor, student transitional | No redirect | Existing child route, no added guard | Phase 1 | Learning path route aliases are implemented and tested | Medium |
| `/home/certifications` | `/learn/certificates` for student-origin actions | student transitional | No redirect | Existing child route, no added guard | Phase 2 partial | Existing links aliased and achievements page redesigned | Medium |
Expand All @@ -28,8 +36,8 @@ Phase 1 preserves route compatibility and establishes canonical role destination
## Canonical Login Destinations

- `student`: `/learn`
- `teacher`: `/home`
- `instructor`: `/home`
- `teacher`: `/teach`
- `instructor`: `/teach`
- `content_admin`: `/workspace`
- `org_admin`: `/workspace/learners`
- `admin`: `/home`
Expand All @@ -43,3 +51,5 @@ Phase 1 preserves route compatibility and establishes canonical role destination
- Phase 2 updates student-origin actions from the legacy student dashboard to navigate into `/learn/**` while preserving `/home/**` deep links.
- Phase 2 adds `/learn/courses/:courseId` as the canonical student course overview and keeps `/learn/products` as a transitional browse route.
- No dedicated unit route was added because existing APIs do not expose unit-level student progress or direct-link authorization.
- Phase 3 adds canonical Teach routes without deleting `/home/sections`, `/home/sections/:id`, or `/workspace/learners/cohorts` compatibility routes.
- Teacher course preview intentionally avoids `/api/start-course`; it uses `/api/courses/{id}` only.
13 changes: 13 additions & 0 deletions docs/ux-overhaul/shared-component-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
| State panel | `frontend/src/app/components/echo-state-panel/` | Production active | Adds `permission` and `success` variants and real icon rendering. |
| Access denied | `frontend/src/app/pages/access-denied/` | Migrated | Uses shared permission state. |
| Icon registry | `frontend/src/app/shared/icon/icon.module.ts` | Extended | Adds `Lock` and `CheckCircle` paths. |
| Student curriculum | `frontend/src/app/components/student-curriculum/student-curriculum.component.ts` | Reused in teacher preview | Teacher course preview renders the same unit/lesson hierarchy in preview-only mode without starting learner progress. |
| Confirmation dialog | `frontend/src/app/components/echo-confirmation-dialog/` | Connected to teacher assignment creation | Class assignments require review confirmation before calling the existing section assignment API. |
| State panel/loading state | `frontend/src/app/components/echo-state-panel/`, `frontend/src/app/components/echo-loading-state/` | Connected to Teach routes | Teacher overview, classes, class detail, curriculum, course preview, and learner detail use shared loading/error/empty/permission states. |

## Added In Teacher Phase

| Component/screen | Path | Status | Notes |
| --- | --- | --- | --- |
| Teacher curriculum page | `frontend/src/app/pages/teacher-curriculum/teacher-curriculum.component.ts` | Production active | Course search and preview/assign entry over `/api/courses`. |
| Teacher course preview | `frontend/src/app/pages/teacher-curriculum/teacher-course-preview.component.ts` | Production active | Preview-only course hierarchy over `/api/courses/{id}`. |
| Teacher learner detail | `frontend/src/app/pages/teacher-learner-detail/teacher-learner-detail.component.ts` | Production active | Requires class `sectionId` context and roster verification. |

## Still Legacy

Expand All @@ -31,6 +42,8 @@
- Destructive actions still need page-by-page adoption of `EchoConfirmationDialogComponent`.
- Form controls, tables, filter controls, page-specific buttons, dashboard cards, and internal page layouts are still mixed Tailwind/SCSS implementations.
- Activity controls delegated to canvas, map, and storybook components still need full accessibility and responsive QA.
- Global teacher assignment list is still a class-first alias because no global assignment API was verified.
- Teacher feedback panels remain deferred because no feedback persistence endpoint was verified.

## Required Future Adoption

Expand Down
21 changes: 21 additions & 0 deletions docs/ux-overhaul/teacher-accessibility-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Teacher Accessibility Review

Date: 2026-07-12

## Addressed

- One visible `h1` per new teacher screen.
- Logical heading hierarchy for overview, class, curriculum, preview, and learner detail.
- Keyboard-accessible links, buttons, forms, and tab controls.
- Visible focus styles on custom teacher controls.
- Loading states use shared status semantics.
- Error and permission states use shared state panels.
- Assignment confirmation uses shared dialog with focus management.
- Required assignment/class fields have visible labels and inline errors.
- Progress values include text, not color-only bars.
- No essential row action is hover-only.
- Course preview clearly announces that no progress is recorded.

## Remaining Manual QA

Manual screen-reader and keyboard traversal should be performed in a running browser at 1440, 1280, 768, and 390 px once local frontend/backend infrastructure is available.
35 changes: 35 additions & 0 deletions docs/ux-overhaul/teacher-assignment-data-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Teacher Assignment Data Contract

Date: 2026-07-12

## Existing Assignment Model

| Field | Source | Supported in UI | Notes |
| --- | --- | --- | --- |
| Assignment ID | `AssignmentResponse.id` | Display/list only | UUID, not exposed as primary UI label. |
| Section/class target | URL section ID and `section_id` | Yes | Class-first workflow. |
| Target type | `target_type` | Yes | UI supports `course`, `unit`, and `lesson`; backend enum must accept the chosen value. |
| Target ID | `target_id` | Yes | Course picker is available for `course`; unit/lesson still require IDs because no picker endpoint was verified. |
| Due date | `due_at` | Yes | Uses `datetime-local`; backend receives ISO-like browser value through Angular binding. |
| Instructions | `instructions` | Yes | Preserved after recoverable failures. |
| Created by | `created_by` | Not shown | Internal teacher identifier not exposed. |
| Created at | `created_at` | Available | Used for ordering only when needed. |
| Assigned learners | Not in current assignment create response | No | Class assignment endpoint does not support individual learner selection. |
| Status/publishing state | Not exposed | No | UI does not invent draft/published states. |
| Completion/review state | Submission model exists separately | Limited | No teacher-facing per-learner completion endpoint verified. |
| Retry/reassignment | Not exposed | No | Not implemented. |
| Edit/delete/archive | No endpoint verified | No | UI does not show destructive assignment actions. |
| Notifications | No endpoint verified | No | UI does not claim notifications are sent. |

## Creation Behavior

The class detail assignment tab uses:

- Required target validation.
- Optional due date and instructions.
- Confirmation dialog before assignment creation.
- Duplicate-submit prevention while saving.
- Persistent inline error if creation fails.
- Success toast only after API confirmation.

Known limitation: the API creates section-wide assignments only; the UI states that individual learner selection is not supported by the current endpoint.
18 changes: 18 additions & 0 deletions docs/ux-overhaul/teacher-privacy-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Teacher Privacy Review

Date: 2026-07-12

## Decisions

- Canonical learner detail requires `sectionId` and verifies the learner appears in that section roster before showing profile context.
- Roster rows show learner name only when the authorized student list includes that profile.
- Emails, internal organization IDs, raw learner IDs, demographic data, and global learner search are not shown in teacher UI.
- Deep-link learner failures use neutral permission language and do not reveal whether a learner exists outside the teacher's authorized class context.
- Course preview does not call `startCourse()` and does not create teacher enrollment, learner enrollment, lesson sessions, or progress records.
- Unsupported discussion moderation is not exposed because thread/post APIs are not class-scoped or permission-scoped.

## Remaining Backend Privacy Gaps

- Section roster/enrollment/assignment APIs should verify the target section belongs to the active organization and the educator's authorized scope.
- Assignment listing should require an educator or authorized learner dependency.
- Thread/post APIs should require authentication and class/community scope before Teach moderation is exposed.
37 changes: 37 additions & 0 deletions docs/ux-overhaul/teacher-production-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Teacher Production Audit

Date: 2026-07-12

## Summary

The audited teacher/instructor production surface uses the existing FastAPI auth, organization-role, section, assignment, course, learner-progress, assessment, and discussion APIs. No backend files or database schema changes were required for this phase.

## Routes Audited

| Route | User goal | Role access | API dependencies | Current UX problems found | Privacy/accessibility/responsive risks | Migration recommendation |
| --- | --- | --- | --- | --- | --- | --- |
| `/home` | Teacher landing through role selector | `teacher`; now `instructor` compatible in role selector | `/api/courses`, `/api/users/students`, `/api/analytics/teacher-summary`, governance summary | Old dashboard mixed demo/governance/course-authoring language with teacher work | Progress rows are not class-scoped; dense legacy tables; demo copy | Canonical `/teach`; keep `/home` legacy |
| `/teach` | Teacher Teach overview | `teacher`, `instructor` through shell/bootstrap | Same as `/home` teacher view | New canonical route added | Must not imply unsupported review/feedback counts | Canonical Phase 3 route |
| `/home/sections` | List/create sections | `teacher`, `instructor`, `org_admin` | `/api/sections`, `/api/sections/{id}/analytics/summary` | Thin CRUD, exposed internal course version ID without explanation | No loading/error states; no responsive data-list | Keep as legacy alias; canonical `/teach/classes` |
| `/teach/classes` | List/create classes | `teacher`, `instructor`, `org_admin` | Same as `/home/sections` | New production class list | Course version ID is still technical due to backend contract | Canonical Phase 3 route |
| `/home/sections/:id` | Manage section assignments | `teacher`, `instructor`, `org_admin` | `/api/sections`, `/api/sections/{id}/roster`, `/api/sections/{id}/assignments`, `/api/sections/{id}/analytics/summary`, `/api/users/students`, `/api/courses` | Old page only created assignment by raw target ID | Roster endpoint returns no learner profile fields; section ownership check is incomplete in backend | Keep as legacy alias; canonical `/teach/classes/:id` |
| `/teach/classes/:id` | Class overview, roster, assignments, progress, discussion note | `teacher`, `instructor`, `org_admin` | Same as section detail | New production class detail | Frontend verifies selected section is in authorized section list; backend remains authoritative | Canonical Phase 3 route |
| `/teach/curriculum` | Browse curriculum for assignment | `teacher`, `instructor` | `/api/courses` | New route | Client-side search only; no standards/duration invented | Canonical Phase 3 route |
| `/teach/courses/:courseId/preview` | Preview learner course hierarchy | `teacher`, `instructor` | `/api/courses/{id}` | New route | Does not call `/api/start-course`; no progress is recorded | Canonical Phase 3 route |
| `/teach/assignments` | Assignment entry point | `teacher`, `instructor`, `org_admin` | `/api/sections`, section assignment APIs after class selection | New alias to class list | Global assignment list endpoint does not exist | Keep as class-first assignment entry |
| `/teach/learners/:learnerId?sectionId=` | Learner detail with class context | `teacher`, `instructor`, `org_admin` | `/api/sections`, `/api/sections/{id}/roster`, `/api/users/students` | New route | Requires section context and roster membership; no global learner profile exposure | Canonical Phase 3 scoped learner detail |
| `/workspace/learners/cohorts` | Legacy class alias under workspace | creator roles; cohort child uses section roles | `/api/sections` | Commercial/workspace mental model for teachers | Route name does not match teacher task | Preserve legacy alias, do not promote |
| `/home/courses` | Legacy mixed course catalog | unguarded child under authenticated home | student/teacher transitional | Student and teacher goals mixed | Possible wrong mental model | Teacher navigation now uses `/teach/curriculum` |
| `/home/assessments/:id` | Assessment detail/submission | authenticated child; submit requires student | `/api/assessments/{id}`, `/api/assessments/{id}/attempts` | Student-oriented submit flow | Teachers can view assessment questions but no review/feedback workflow | Use as assessment preview only; no teacher grading |
| `/workspace/review-center` | Content review center | creator roles | V2 review center APIs | Content/studio review, not student work review | Could confuse teacher feedback | Not exposed in Teach nav |
| `/threads`, `/posts` APIs | Discussion primitives | No route guards in audited backend modules | `/api/threads`, `/api/posts` | No class scope or moderation permission model | High privacy risk if exposed as teacher moderation | Document gap; do not expose class feed |

## Backend Authorization Risks Found

- `GET /api/sections/{id}/roster` requires a teacher/org/instructor org role, but does not verify the section belongs to that organization.
- `POST /api/sections/{id}/enrollments` has the same section-scope risk.
- `GET /api/sections/{id}/assignments` currently has no explicit role dependency.
- `GET /api/analytics/teacher-summary` supports `admin` and `teacher`, but not `instructor`.
- Thread/post endpoints are not authenticated or class-scoped in the audited files.

Frontend work keeps navigation and views scoped, but these backend risks remain documented gaps.
Loading
Loading