Commits
2026-09-17
feat: 🏫 follow the backend split between a catalog course and a şube×ders instance - a course row is now the catalog (title, kind, subjects, notes, club/etüt members); attaching it to a class mints the instance that actually carries enrollments, exams, homework, lesson sessions, roll call, ders_saati and the karne flag - new src/api/instances: /instances/me, one instance with its policy PATCH, and the enrollment, exam, homework, session and teacher routes that moved off /courses/{id} - new src/api/academic-years: year CRUD plus archive and the rollover that carries a year's şubeler over with promoted grades - new src/api/rag: thread CRUD, turns, the 202 ask receipt and the SSE url an EventSource takes; plus /ai/capabilities and the course-note reindex - drop the routes the backend no longer serves (/courses/{id}/{enrollments, exams,homework,sessions,teachers}, /classes/{id}/courses) and add the club/etüt membership tier at /courses/{id}/members - rename course to class_course on exams, homework, sessions and roll call; a class links an academic year, a dönem lives inside one, and an exam names the dönem it is filed in - new /instances/$id page holds what left the course page: exams, homework, sessions, roster and staffing, with ders_saati and counts_toward_karne saved optimistically from local signals - new /management/academic-years: years, sınıf-geçme pairs, archiving, and a rollover that reports how many şubeler and students it carried - karne tab on /marks with a dönem picker, the ders_saati-weighted average and the verdict; devamsızlık day counts and their limits on the attendance report - exam and homework creation pick a şube instead of a catalog course, through one shared instance-option loader; the exam form asks for the dönem - settings gain branş, excuse kinds, the per-dönem absence day limits and the school timezone; limits gain the rag tier - contract fixtures build the whole chain now: year → dönem → şube → attached course → instance → examBurak Boduroğlu · 211d704
feat: 🏫 follow the backend split between a catalog course and a şube×ders instance
- a course row is now the catalog (title, kind, subjects, notes, club/etüt
members); attaching it to a class mints the instance that actually carries
enrollments, exams, homework, lesson sessions, roll call, ders_saati and the
karne flag
- new src/api/instances: /instances/me, one instance with its policy PATCH, and
the enrollment, exam, homework, session and teacher routes that moved off
/courses/{id}
- new src/api/academic-years: year CRUD plus archive and the rollover that
carries a year's şubeler over with promoted grades
- new src/api/rag: thread CRUD, turns, the 202 ask receipt and the SSE url an
EventSource takes; plus /ai/capabilities and the course-note reindex
- drop the routes the backend no longer serves (/courses/{id}/{enrollments,
exams,homework,sessions,teachers}, /classes/{id}/courses) and add the
club/etüt membership tier at /courses/{id}/members
- rename course to class_course on exams, homework, sessions and roll call;
a class links an academic year, a dönem lives inside one, and an exam names
the dönem it is filed in
- new /instances/$id page holds what left the course page: exams, homework,
sessions, roster and staffing, with ders_saati and counts_toward_karne
saved optimistically from local signals
- new /management/academic-years: years, sınıf-geçme pairs, archiving, and a
rollover that reports how many şubeler and students it carried
- karne tab on /marks with a dönem picker, the ders_saati-weighted average and
the verdict; devamsızlık day counts and their limits on the attendance report
- exam and homework creation pick a şube instead of a catalog course, through
one shared instance-option loader; the exam form asks for the dönem
- settings gain branş, excuse kinds, the per-dönem absence day limits and the
school timezone; limits gain the rag tier
- contract fixtures build the whole chain now: year → dönem → şube → attached
course → instance → exam2026-07-25
fix: 🏦 stable choice ids, real bank paging, private-by-default templatesAhmet Kaan Gümüş · 88492c2
fix: 🏦 stable choice ids, real bank paging, private-by-default templates
- choices become {id, text} with server-minted stable ids; correct and
the student's selected answer name an id, never a position, and
option images key off the id
- fix: blanking a choice above the marked one silently moved the answer
key on graded exams — the form sent a pre-compaction index
- fix: removeChoice left correct pointing at the row that slid into the
deleted slot
- delete the download-then-reupload image restore in both panels and
drop src/lib/choice-compaction.ts: a PATCH now preserves images for
every choice whose id is unchanged, so the compensating transaction
has nothing to compensate for
- extract the choice-edit reducer to src/lib/choice-set.ts and property
test it with fast-check (devDependency, out of the bundle): text,
picture and correct-flag stay attached to a choice identity across
arbitrary edit sequences
- bank list is server-paged, newest first, with server-side text search
— it silently hid every template past the first 100 while still
reporting saves as successful
- search folds Turkish casing: q=istanbul now finds İSTANBUL, and one
shared table folds the needle and the column so they cannot drift
- templates are private by default with an explicit share step; the
confirm names the consequence, since publishing hands the answer key
to every teacher in the school and copies cannot be recalled
- source_bank splits into from_bank and banked_as, so a question added
from the bank no longer claims it was already saved to it
- bank page shows how many exam copies a template has, and a question
added from the bank can be refreshed from its template until the
first attempt starts
- no more silent first-item defaults: subject and target subject must
be picked, and an unavailable stored subject is shown, not swapped
- live contract suite (bun run test:contract) against a real backend,
skipped without CONTRACT_BASE_URL2026-07-24
feat: 🏦 school-wide question bank with two-way exam bridgesAhmet Kaan Gümüş · 0f9e79a
feat: 🏦 school-wide question bank with two-way exam bridges - mirror the backend bank contract: src/api/bank-questions (create/list/ read/update/delete, question + per-choice image upload/fetch/delete) with types, BANK_QUESTION_LIMITS, and full API tests - bridges in src/api/exams: postExamQuestionFromBank instantiates a template into an exam, postExamQuestionToBank saves an exam question back as a template; add the missing getExamChoiceImageBlob - /question-bank page, teacher+ guarded: subject and owner filters, side-panel create/edit, confirm delete, nav item - exam questions panel gains "Add from bank" (hidden once read-only, since from-bank mutates the exam) and a per-row "Save to bank" that stays available on finished exams — saving copies out, it never touches the exam - repeat saves confirm first and relabel to "save another copy": the copies are independent, editing one never changes the other - generalize question-form for both flows instead of forking it: widen initial to a structural type, pass image sources as props - fix: correct answer was sent as a pre-compaction index, so blanking a choice above it silently moved the answer key on graded exams; remap by row identity and block submit when the marked choice is blanked - fix: a PATCH carrying choices wipes every per-option image server-side and the exam path never restored them; one shared choice-compaction helper now re-uploads at post-compaction slots and names the options it could not carry over - fix: removeChoice left correct pointing at the row that slid into the deleted slot - read the question count off .latest so the new refetch paths cannot blank the panel - localize the bank 403/409 strings; EN/TR throughout
✨ feat(exams): student self-review of own graded examAhmet Kaan Gümüş · da6198f
✨ feat(exams): student self-review of own graded exam
Sync with backend: a per-exam teacher toggle `allow_review` (mirrors
`allow_rejoin` in the exam form) and a student-facing review of their own
paper + past attempts, shown in the "your result" tab once the exam is
marked and review is enabled.
- allow_review wired through Exam type, create/patch bodies, and the
exam-settings form (checkbox + tr/en strings).
- Four self-scoped API calls (/exams/{id}/review/questions|attempts|
attempts/{seq}/answers|.../image); AnswerSheetView gains a
mode:"grader"|"self" prop that swaps the API layer while reusing the
same render (seq picker, right/wrong, drawing playback).
- Fix: the ownResult tab was gated on !isScheduled(), which is never true
for a moded exam (isSittableExam is mode-based), so it never rendered.
Gate it on ownResult() instead — the result exists only after marking,
which is exactly the intended condition.
Browser-verified end to end: toggle on -> review renders questions +
answers + drawing playback (200s); toggle off -> mark shown, review
hidden, no stray calls; no console errors.✨ feat(exams): view a student's previous exam attemptsAhmet Kaan Gümüş · f7005de
✨ feat(exams): view a student's previous exam attempts The backend now keeps every sitting's answers, drawings, and mark instead of wiping on retake. Surface that in the grader's answer sheet: fetch the student's attempt list + mark history and, when there is more than one sitting, show an attempt picker (each tab labelled with its mark, the latest tagged current). Selecting an older sitting loads its answers and drawings read-only — grading still targets the current attempt. Four new read-only API wrappers hit the history endpoints; prior-attempt views reuse the existing answer-sheet + drawing-replay components.
2026-07-23
🔥 feat(exams): poll-only live monitor, drop the SSE pathAhmet Kaan Gümüş · 7963aad
🔥 feat(exams): poll-only live monitor, drop the SSE path The monitor opened an EventSource AND ran a 2s poll at once; both ticked at the same cadence, and the SSE half was killed on its first error and never retried — pure redundancy plus double backend load. Keep the 2s poll against GET /api/exams/:id/live as the sole feed. Removes the EventSource wiring + applyStreamEvent, deletes getExamLiveStreamUrl and its barrel export, and drops the two stream-URL tests.
2026-07-22
feat: 🎬 replay a student's answer drawing stroke-by-strokeAhmet Kaan Gümüş · 595aa7e
feat: 🎬 replay a student's answer drawing stroke-by-stroke
- teachers can play back a drawn exam answer in the grading answer
sheet, watching how the student built it instead of only seeing the
finished image
- no backend change: the drawing PNG already carries its editable stroke
JSON in a tEXt chunk, so pngBytesToScene recovers the strokes
client-side from the grader image that was already being served
- add a getStudentAnswerImage wrapper for
GET /exams/{examId}/attempts/{userId}/answers/{questionId}/image;
the route had no wrapper before, only a raw <img src>
- DrawingPlayback runs a requestAnimationFrame loop revealing points in
drawn order at a constant POINTS_PER_SECOND, with play/pause/restart;
pacing is order-only because the capture stores no timestamps
- pure sliceStrokes(strokes, revealCount) -> { full, partial } lives
beside strokesBounds and is unit-tested
- the static image stays the default view; playback is a reversible
toggle and falls back to the plain image when a PNG has no embedded
strokes
- eraser strokes replay through a two-layer composite (ink on a
transparent layer, then over white + paper) mirroring
canvasToImageBlob, so a fully-revealed frame matches the saved PNG
- EN/TR i18n keys for the playback controls2026-07-21
feat: 🎨 editable freehand drawings for notes and text examsAhmet Kaan Gümüş · 3758bf0
feat: 🎨 editable freehand drawings for notes and text exams - add a canvas drawing pad (pen, eraser, 5 colors, 3 widths, undo, clear) that saves a PNG with its stroke JSON embedded in a tEXt chunk, so a saved drawing displays as a normal image and reopens for editing - lib/png-meta embeds/extracts PNG text chunks (crc32); draw-stroke gains DrawScene + parseScene; drawing-file turns canvas+scene into a PNG File and parses stored bytes back to a scene (all pure, unit-tested) - reopened drawings rescale to the current pad (aspect preserved); when editing you can clear a drawing and save the blank to erase it - notes: draw new attachments and edit saved *.hzdraw.png ones in place (create-new-then-delete-old, no data loss); PNG/JPEG device export - teacher exam questions: draw or re-edit the question illustration - student text answers: draw the answer in the exam room, reopen to edit or remove; teacher sees it in the grading answer sheet - answer-image api wrappers + question-image blob fetch, answer_image on AttemptAnswer/StudentAnswer, EN/TR i18n keys - DrawCanvas is its own lazy chunk (~2.6KB gzip); main bundle unchanged
refactor: 🗃️ restructure API layer into domain folders and add vitest coverage - move 110+ flat API endpoints into domain-specific subdirectories (e.g., auth, courses, exams, notes, etc.) - add index.ts exports to each domain folder for clean namespace imports - update 70+ components and pages to use the new domain-based API import paths - add comprehensive vitest unit tests (~150 tests) for all API endpoints using fetch mocking - update AGENTS.md rulebook to mandate domain-based folder structure for future API additions - migrate existing bun:test test files in src/lib/ to vitest for consistencyBurak Boduroğlu · 6452b17
refactor: 🗃️ restructure API layer into domain folders and add vitest coverage - move 110+ flat API endpoints into domain-specific subdirectories (e.g., auth, courses, exams, notes, etc.) - add index.ts exports to each domain folder for clean namespace imports - update 70+ components and pages to use the new domain-based API import paths - add comprehensive vitest unit tests (~150 tests) for all API endpoints using fetch mocking - update AGENTS.md rulebook to mandate domain-based folder structure for future API additions - migrate existing bun:test test files in src/lib/ to vitest for consistency