Commits
Commits on
dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/components/exams/answer-sheet-view.tsxClear filter2026-09-18
style: 🔎 no text below 11px except avatar initials - 75 uses of 8, 9 and 10px text (nav 'soon' chips, calendar month chips, chart ticks, heatmap labels, message badges, kbd hints) move to 11px - the 16px and 24px initial circles keep 10px so two letters still fit - 12px stays the aim; dense chips and calendar cells need a visual pass before going furtherBurak Boduroğlu · 41a3aba
style: 🔎 no text below 11px except avatar initials - 75 uses of 8, 9 and 10px text (nav 'soon' chips, calendar month chips, chart ticks, heatmap labels, message badges, kbd hints) move to 11px - the 16px and 24px initial circles keep 10px so two letters still fit - 12px stays the aim; dense chips and calendar cells need a visual pass before going further
fix: 🎨 colored text reaches WCAG AA contrast - measured in light mode on the #F7F7F7 page: brand as text 2.5:1, warning 2.0:1, success 3.1:1, destructive 4.2:1 (AA needs 4.5:1) - new text tokens primary/success/warning/info/destructive-text: darker in light mode, equal to the fills in dark mode; fills stay as they are - light primary text is --brand-ink, or for a custom palette color the darkest-needed step of its hue (accentTextLightness, tested across hues) - every text-{primary,success,warning,info,destructive} utility moves to its -text token (253 uses); opacity variants stay decorative - token doc records the ruleBurak Boduroğlu · 9f9eebf
fix: 🎨 colored text reaches WCAG AA contrast
- measured in light mode on the #F7F7F7 page: brand as text 2.5:1,
warning 2.0:1, success 3.1:1, destructive 4.2:1 (AA needs 4.5:1)
- new text tokens primary/success/warning/info/destructive-text: darker in
light mode, equal to the fills in dark mode; fills stay as they are
- light primary text is --brand-ink, or for a custom palette color the
darkest-needed step of its hue (accentTextLightness, tested across hues)
- every text-{primary,success,warning,info,destructive} utility moves to
its -text token (253 uses); opacity variants stay decorative
- token doc records the rule2026-09-15
fix: 🔄 keep tables on screen while their data refreshes - add lib/create-resource: accessor reads .latest, so a resource suspends only on its first load instead of on every refetch or source change - switch every createResource import to it; a row delete or save no longer swaps the table card for its skeleton or resets its page and search - solidjs-pitfalls skill documents the import ruleBurak Boduroğlu · 61b19be
fix: 🔄 keep tables on screen while their data refreshes - add lib/create-resource: accessor reads .latest, so a resource suspends only on its first load instead of on every refetch or source change - switch every createResource import to it; a row delete or save no longer swaps the table card for its skeleton or resets its page and search - solidjs-pitfalls skill documents the import rule
2026-08-02
fix: 🔗 align frontend with backend delta dd4f66d..f12af3a (phase 1) - appointments: reschedule/accept now sends the pinned proposal window {proposed_starts_at, proposed_ends_at}; guards null proposals and the api test asserts the body - types: Enrollment gains source (the class that pumped the row, or null); Limits.course gains max_class_{name_len,grade_len,members,courses,bytes} - settings: block new meal-slot names containing / \ ? # % (grandfather already-saved names); backend 409s still surface via formatApiError - meals: canteen balance/ledger reads are manager+ now — hide those sections and skip the fetch for plain teachers (self/parent/manager keep) - exams: self-review degrades to a friendly banner instead of erroring when the caller's latest sitting is still in progress (409)Burak Boduroğlu · 45cbc34
fix: 🔗 align frontend with backend delta dd4f66d..f12af3a (phase 1)
- appointments: reschedule/accept now sends the pinned proposal window
{proposed_starts_at, proposed_ends_at}; guards null proposals and the
api test asserts the body
- types: Enrollment gains source (the class that pumped the row, or null);
Limits.course gains max_class_{name_len,grade_len,members,courses,bytes}
- settings: block new meal-slot names containing / \ ? # % (grandfather
already-saved names); backend 409s still surface via formatApiError
- meals: canteen balance/ledger reads are manager+ now — hide those
sections and skip the fetch for plain teachers (self/parent/manager keep)
- exams: self-review degrades to a friendly banner instead of erroring
when the caller's latest sitting is still in progress (409)2026-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(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.🐛 fix(exams): keep the answer sheet up while switching sittingsAhmet Kaan Gümüş · 189c888
🐛 fix(exams): keep the answer sheet up while switching sittings Picking a previous attempt sent the data resource back to pending, so the Suspense boundary blanked the whole panel to the PageSpinner on every select — read as a full-page reload. Run the seq change inside a useTransition so the current sheet stays on screen while the next loads, dimming to opacity-60 for feedback.
🎨 style(exams): make the attempt picker a dropdownAhmet Kaan Gümüş · 2b5e1a3
🎨 style(exams): make the attempt picker a dropdown The per-attempt tabs wrapped into a long row once a student had many sittings. Swap them for a DropdownSelect: latest sitting auto-selected (the grade-of-record), options listed newest-first, each showing its mark. Scales to any number of attempts without breaking the layout.
✨ 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: ✨ complete homework and answer attachmentsBurak Boduroğlu · c563a97
feat: ✨ complete homework and answer attachments - add teacher homework submission detail view with text and file downloads - add roster submission file URL helper and homework API test coverage - add student answer image upload beside drawing in the exam room - add teacher answer image download from answer review - localize new homework and answer image actions
2026-07-22
feat: 🎬 draw-and-replay for question-pool photos, DPR-correct playbackAhmet Kaan Gümüş · 0fbb97c
feat: 🎬 draw-and-replay for question-pool photos, DPR-correct playback - ask/solution forms gain a draw option alongside the existing file input, not instead of it: photographing a textbook problem is still the common case, drawing is now just another way to fill the same photo field - both pool photo displays (question and solution) are now replayable the same way a student's answer drawing already was, via new getQuestionImageBlob/getSolutionImageBlob blobClient fetchers - the img/playback toggle used to live inline in answer-sheet-view's AnswerDrawing; pulled out to a shared ReplayableImage (its third call site) so the pool views reuse it instead of a copy, and DrawingPlayback moved from components/exams to components/ui since it's no longer exam-only - fixed a DPR mismatch in playback: an exported PNG bakes its pixel dimensions at the author's device-pixel-ratio, but the scene JSON only carried world (DPR-free) width/height, so replay on a viewer with a different ratio than the author rendered at half or double the correct size. DrawScene now carries the export's dpr, DrawCanvas stamps it when exporting, and a shared canvasPx() sizes both the export canvas and the playback canvas off the same number - hardened parseScene's bounds: the scene JSON is recovered from a user-uploaded PNG's tEXt chunk and its w/h/dpr size a canvas allocation on the viewer's machine, so all three are now range-checked (0 < w,h <= 16384, 0 < dpr <= 8) instead of just type-checked - regression tests for the bounds, canvasPx, and the new blob fetchers
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
style: 🎨 enforce design tokens, remove display serif, and refactor semantic status colorsBurak Boduroğlu · 5b5dcc6
style: 🎨 enforce design tokens, remove display serif, and refactor semantic status colors - remove Fraunces font from tailwind config and index.css to enforce DM Sans across data and admin pages - refactor Ask Celebi button in app-shell to use primary semantic token instead of hardcoded sky blue - update attendance and schedule status mappers to use theme semantic variables (success, destructive, warning, info) - replace hardcoded green/red/sky/rose/emerald classes in answer sheet, exam room WS, live monitor, and messages with semantic CSS tokens
2026-07-20
fix: ♻️ exam answer sheet in SidePanel, course names, correct/wrong iconsBurak Boduroğlu · fcfa59d
fix: ♻️ exam answer sheet in SidePanel, course names, correct/wrong icons - remove standalone exam-answer-sheet page and route - answer sheet opens in SidePanel (not inline top-of-page) with collapsible mark update card - handle 404 from getStudentAnswers → show "Başlamadı" badge instead of error, list all questions with null answers - correct answer: green IconCheck badge, wrong: red IconX badge, same 22×22px layout replacing "Doğru Seç" / "✗" text - exams-page: wait for courses() before fetching list, lazy-fetch missing course titles via getCourseById so course column always shows name
feat: ✨ live monitor overhaul, choice letters, image sizing fix - answer-sheet: choice letter (A/B/C) labels, ✗ badge for wrong answers - exam room: radio → letter-labeled choice buttons (A/B/C...) - question form / panel: fixed image height + full width + bg fallback - live monitor: displayStatus (no_attempts_left, exam-aware), finished_at - live monitor count cards: icons with semantic colors, 6-col grid - badge: min-w-28 whitespace-nowrap - i18n: shorter "no rights left" / "hak bitti" - exam-status: skip no_attempts_left when in_progressBurak Boduroğlu · f123ed2
feat: ✨ live monitor overhaul, choice letters, image sizing fix - answer-sheet: choice letter (A/B/C) labels, ✗ badge for wrong answers - exam room: radio → letter-labeled choice buttons (A/B/C...) - question form / panel: fixed image height + full width + bg fallback - live monitor: displayStatus (no_attempts_left, exam-aware), finished_at - live monitor count cards: icons with semantic colors, 6-col grid - badge: min-w-28 whitespace-nowrap - i18n: shorter "no rights left" / "hak bitti" - exam-status: skip no_attempts_left when in_progress
2026-07-19
fix: 🐛 nginx API whitelist, answer-sheet join, prefs clear; contract tests - nginx.conf: proxy whitelist gains sessions/work/pomodoro/attendance/ settings/subjects/terms — containerized frontend served index.html for those APIs; new nginx.conf.test.ts (bun test) guards the list - teacher answer sheet: join via tested lib/answer-sheet.ts and list every question, showing unanswered ones too (answers-only merge hid them) - admin user preferences: send "" (not null) to clear theme/language — backend keeps on null; body types now forbid null - live monitor: attemptLabel moved to lib/exam-labels.ts with a real unlimited-attempts guard (max_attempts 0 no longer renders "n / 0") - PATCH body types stop offering null-clears the backend ignores (session/event/course/note/work); only true set_or_clear fields stay nullable - course edit form gains maxlength hints matching backend limits - unit tests for answer-sheet join, exam weight, attempt label; tsconfig excludes src/**/*.test.ts from app typecheckAhmet Kaan Gümüş · 8aa8ff2
fix: 🐛 nginx API whitelist, answer-sheet join, prefs clear; contract tests - nginx.conf: proxy whitelist gains sessions/work/pomodoro/attendance/ settings/subjects/terms — containerized frontend served index.html for those APIs; new nginx.conf.test.ts (bun test) guards the list - teacher answer sheet: join via tested lib/answer-sheet.ts and list every question, showing unanswered ones too (answers-only merge hid them) - admin user preferences: send "" (not null) to clear theme/language — backend keeps on null; body types now forbid null - live monitor: attemptLabel moved to lib/exam-labels.ts with a real unlimited-attempts guard (max_attempts 0 no longer renders "n / 0") - PATCH body types stop offering null-clears the backend ignores (session/event/course/note/work); only true set_or_clear fields stay nullable - course edit form gains maxlength hints matching backend limits - unit tests for answer-sheet join, exam weight, attempt label; tsconfig excludes src/**/*.test.ts from app typecheck
refactor: 🔧 type hardening, date-picker locale, answer sheet merge, cleanupBurak Boduroğlu · e00544e
refactor: 🔧 type hardening, date-picker locale, answer sheet merge, cleanup - types: Exam/ExamAttempt/LiveMonitor fields required instead of optional, remove legacy weight variants (kind_weight, type_weight, exam_type_weight) - AttemptQuestion: split into AttemptQuestionResponse + mapped AttemptQuestion - StudentAnswer replaces GradedAnswer, matches backend shape exactly - getExamAttemptQuestions: adds exam field via map (backend omits it) - answer-sheet-view: fetch questions + answers, merge client-side for display - date-picker: locale-aware day headers via Intl, Portal for overlay, selected-day label, improved outside-click detection - createNow interval: 1000ms -> 30000ms (reduce polling) - exam-weight: remove legacy field fallbacks - live-monitor: pass maxAttempts from exam to attemptLabel - cleanup: delete getSessionById, getSubjectById, getTermById (unused)
2026-07-13
fix: 🐛 sync frontend with person-based API responsesBurak Boduroğlu · 64327d6
fix: 🐛 sync frontend with person-based API responses - update API types for PersonRef attendance, results, attempts, live monitor, and answer sheets - add person helpers for stable labels and ids across nested user responses - render attendance and exam result people from PersonRef instead of raw objects - use server time offset from /time for shared now calculations - filter dashboard exam counts and previews to enrolled courses for students