From 3f5a474a8a922bf1da31586337c844a8869a6a13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?=
<80620802+burakboduroglu@users.noreply.github.com>
Date: Wed, 15 Jul 2026 06:55:24 +0300
Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20implement=20exam=20link=20c?=
=?UTF-8?q?omponent=20and=20enhance=20exam-related=20UI=20features?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/backend-ui-alignment-plan.md | 9 ++++--
src/api/types.ts | 4 +++
src/components/exams/exam-card.tsx | 6 ++--
src/components/exams/exam-form.tsx | 35 ++++++++++++++++++++--
src/components/exams/exam-link.tsx | 19 ++++++++++++
src/components/exams/exam-room-ws.tsx | 16 ++++++++++
src/components/marks/marks-report-view.tsx | 16 ++++++----
src/i18n/messages.ts | 12 ++++++++
src/pages/course-detail-page.tsx | 8 ++---
src/pages/dashboard-page.tsx | 8 ++---
src/pages/live-monitor-page.tsx | 30 +++++++++++++++----
11 files changed, 136 insertions(+), 27 deletions(-)
create mode 100644 src/components/exams/exam-link.tsx
diff --git a/docs/backend-ui-alignment-plan.md b/docs/backend-ui-alignment-plan.md
index f68e8cd..6355180 100644
--- a/docs/backend-ui-alignment-plan.md
+++ b/docs/backend-ui-alignment-plan.md
@@ -28,12 +28,16 @@ This plan covers the remaining backend features that need simple, low-complexity
- Run `bun run build` before every commit.
- Commit messages must follow repository rules and require explicit user approval.
+## Status
+
+- Commit 1 complete in UI: live monitor shows absent count/status, attempt usage, and left timestamp; exam room summary shows attempt usage and left timestamp.
+- Commit 2 complete in UI: report card types accept grade-band fields and marks show `mark / grade` when backend sends labels.
+- Commits 3-7 remain.
+
## Remaining Commit Order
| Commit | Scope | Priority |
| --- | --- | --- |
-| 1 | Live monitor + exam room attempt fields | High |
-| 2 | Marks grade-band labels | High |
| 3 | Settings management page | High |
| 4 | Terms API + course term select | Medium |
| 5 | Course sessions + roll call | Medium |
@@ -51,6 +55,7 @@ Expose backend attempt, no-show, and room-left fields without making the UI comp
- `LiveRosterEntry.status`: includes `absent`.
- `LiveRosterEntry.attempt`.
- `LiveRosterEntry.attempts_used`.
+- `LiveRosterEntry.max_attempts`.
- `LiveRosterEntry.left_at`.
- `LiveMonitor.counts.absent`.
- `ExamAttempt.attempt`.
diff --git a/src/api/types.ts b/src/api/types.ts
index b3d92f1..5cfb5cc 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -149,6 +149,7 @@ export type MarkEntry = {
type_weight?: number | null;
exam_type_weight?: number | null;
mark: number;
+ grade?: string | null;
graded_by: string;
};
@@ -156,12 +157,14 @@ export type CourseMarks = {
course: Course;
results: MarkEntry[];
average: number | null;
+ average_grade?: string | null;
};
export type MarksReport = {
user: string;
courses: CourseMarks[];
overall_average: number | null;
+ overall_grade?: string | null;
};
export type ExamStatistics = {
@@ -195,6 +198,7 @@ export type LiveRosterEntry = {
status: AttemptStatus | "not_started" | "absent";
attempt?: number | null;
attempts_used?: number | null;
+ max_attempts?: number | null;
deadline: number | null;
remaining_ms: number | null;
left_at?: number | null;
diff --git a/src/components/exams/exam-card.tsx b/src/components/exams/exam-card.tsx
index d5b73f4..5b10bce 100644
--- a/src/components/exams/exam-card.tsx
+++ b/src/components/exams/exam-card.tsx
@@ -1,7 +1,7 @@
import { Show } from "solid-js";
-import { Link } from "@tanstack/solid-router";
import type { Exam } from "@/api/types";
import { Badge } from "@/components/ui/badge";
+import { ExamLink } from "@/components/exams/exam-link";
import { cn } from "@/lib/cn";
import { examKindLabel } from "@/lib/exam-labels";
import { examWeight } from "@/lib/exam-weight";
@@ -52,7 +52,7 @@ export function ExamCard(props: { exam: Exam; courseTitle?: string; now?: number
};
return (
-
+
{error()}
}