Commits
Commits on
078b459691672e7fa5486c42cc6dbdfd08054cf5Filtered to src/lib/answer-sheet.test.tsClear filter2026-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-21
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
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