forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/api/__tests__/exams/exams.test.tsClear filter

2026-09-19

feat: ✨ share exams with sibling sections, stop empty-id subject reads - exam audience endpoints return the audience array the API sends (POST/DELETE answered as a single row / void before), tests updated - new "Paylaşılan şubeler" tab on exam detail: list the audience, share with a section teaching the same course in the same academic year, withdraw one - ExamQuestionsPanel takes a nullable courseId and skips the subjects read until it resolves; Solid fetched `/courses//subjects` on the empty string - a failed subjects read no longer throws into the pageBurak Boduroğlu · 4d56817
feat: ✨ share exams with sibling sections, stop empty-id subject reads
- exam audience endpoints return the audience array the API sends
  (POST/DELETE answered as a single row / void before), tests updated
- new "Paylaşılan şubeler" tab on exam detail: list the audience, share with
  a section teaching the same course in the same academic year, withdraw one
- ExamQuestionsPanel takes a nullable courseId and skips the subjects read
  until it resolves; Solid fetched `/courses//subjects` on the empty string
- a failed subjects read no longer throws into the page

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 → exam

2026-07-25

feat: 🔭 ask the shell feed for the next rows, not every rowAhmet Kaan Gümüş · 5d93c16
feat: 🔭 ask the shell feed for the next rows, not every row

The feed polls events and exams for the upcoming badge and the calendar
dot, and until now `limit` truncated the newest-created end — an event
scheduled for tomorrow could sit behind a hundred rows created after it.
So the feed asked for everything: ~3.37 MB a poll at 5000 rows apiece,
re-fetched on every right-nav tab open.

The backend now takes `ends_after`, which keeps the rows whose window has
not finished and flips the order to soonest-first, so a limit finally cuts
the right end. 50 per source is about the next month at a busy school and
roughly 15 KB.

Both consumers re-filter against the live clock and sort for themselves,
so the order flip reaches neither of them.
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_URL

2026-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

2026-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
chore: 🧪 migrate tests from bun:test to vitestBurak Boduroğlu · b0a9db1
chore: 🧪 migrate tests from bun:test to vitest

- replace bun:test imports with vitest in all 3 test files
- add vitest.config.ts with @ alias and test config
- add vitest dev dependency and test/watch npm scripts
- create src/api/__tests__/ directory for future API tests