forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 7122d71744bea23bd00bcfe91b997c19fba1e4d6Filtered to src/api/client/client.tsClear filter

2026-07-28

fix(api): 🚫 sanitize unmapped error messages — no raw backend text leakBurak Boduroğlu · 7a1b27e
fix(api): 🚫 sanitize unmapped error messages — no raw backend text leak

- replace sentenceCase fallback with safe localized generic
- avoids exposing raw English/technical backend errors to users
- update tests to match new messages
fix: 🛡️ guard runtime errors, storage failures, and guest dashboard edge cases - catch TypeError (network/runtime/provider errors) in formatApiError with user-friendly messages instead of exposing raw JS error text - guard localStorage writes behind try/catch so blocked/full storage does not break preferences for the session - restructure DashboardPage so RouteGuard wraps content; add guest redirect testBurak Boduroğlu · 8b9f154
fix: 🛡️ guard runtime errors, storage failures, and guest dashboard edge cases
- catch TypeError (network/runtime/provider errors) in formatApiError with
  user-friendly messages instead of exposing raw JS error text
- guard localStorage writes behind try/catch so blocked/full storage does not
  break preferences for the session
- restructure DashboardPage so RouteGuard wraps content; add guest redirect test

2026-07-25

fix: 🔍 correct 21 defects the last 24h of commits shipped greenAhmet Kaan Gümüş · f9efbbc
fix: 🔍 correct 21 defects the last 24h of commits shipped green

Adversarial audit of 49f9928..ffb1d47: four verifiers found 15 defects the
317-test suite passed over, and a two-lens panel found 6 more in the fixes
themselves. Three of those commits claimed fixes they did not deliver.

- exam room: "saved" was still a lie. Acks were keyed on question_id alone,
  so a timed-out send's late frame settled the retry and the badge claimed
  Saved for a payload the server never took. Replaced with per-send FIFO
  plus an integer debt count per question: superseded/timed-out sends are
  disowned and their frames paid off before any live send settles. failAll
  now takes a required cause — an unattributed error frame keeps the debt
  (the socket stays open), only a real close clears it
- shell feed leaked across accounts: the provider outlived logout, so user B
  saw user A's inbox, badge and appointments until the refetch landed. The
  feed is now built inside a memo keyed on the user id, so a switch disposes
  it rather than relying on a mutate call
- appointments offered actions the backend rejects: book on in-progress
  slots (list filter used where the book guard applies), and a teacher lost
  reschedule permanently because the backend never clears proposed_* — action
  availability now derives from a standing proposal, in a tested pure gate
- every 403 and 404 message was dead: formatApiError returned the per-status
  generic before consulting the table, so entries added for the question bank
  never rendered. Table now wins; 8 appointment 409s and the refresh-from-bank
  400 localized against the backend's exact strings
- request deadline escaped as a raw DOMException because the body read sat
  outside its try, showing Turkish users an English abort message
- unread badge under-counted from a capped inbox page, the two shell badges
  disagreed, and dismiss-all could not clear a count above ten
- students and parents saw their own name on every calendar appointment
- question bank stranded the user on an empty page after deleting the last row
- tests: 317 -> 336, all new ones watched failing before they passed. One
  existing test asserted the ack bug as intended behaviour and was rewritten
- comments in create-ack-waiter claimed safety properties the code lacked;
  rewritten to describe actual behaviour

Known and accepted: shell events/exams fetch unpaged (~3.37MB/poll at 5000
rows) because the backend cannot express a schedule window. Follow-ups for
the backend: starts_after on /events and /exams, and a client seq echoed in
the exam ws saved/error frames to replace the debt heuristic with exact
identity.
fix: 🇹🇷 localize the settings duplicate-entry errorAhmet Kaan Gümüş · a8053b3
fix: 🇹🇷 localize the settings duplicate-entry error

- the backend now rejects two settings entries that are the same word
  apart from Turkish casing (İZİN vs izin); without a mapping a Turkish
  admin saw "İşlem tamamlanamadı: <raw English>"
- map both the exam_kinds and attendance_statuses strings, EN and TR,
  with a test pinning the exact backend wording

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
fix: 🗓️ stacked slot date/time cell + localized overlap errors - appointments: split the crammed one-line "date time – time" column into a stacked cell (date over clock range, mono + tabular-nums so digits align); drops the clipped end-time, narrows the column - add formatDate (date-only) helper - localize the three slot-overlap 409 messages (EN/TR) so they stop rendering half-Turkish/half-English; test the exact backend strings mapAhmet Kaan Gümüş · 8bba96b
fix: 🗓️ stacked slot date/time cell + localized overlap errors
- appointments: split the crammed one-line "date time – time" column
  into a stacked cell (date over clock range, mono + tabular-nums so
  digits align); drops the clipped end-time, narrows the column
- add formatDate (date-only) helper
- localize the three slot-overlap 409 messages (EN/TR) so they stop
  rendering half-Turkish/half-English; test the exact backend strings map

2026-07-23

fix: 🐛 keep the app alive when /users/me failsAhmet Kaan Gümüş · e4045cc
fix: 🐛 keep the app alive when /users/me fails

A non-401 failure on the bootstrap /users/me (e.g. a 429 once the API
rate limit trips) threw out of an unguarded resource and blanked the
whole tab with no way back but a fresh tab. Now the resource swallows
every non-401 error into an error signal and resolves immediately, so it
never re-throws during render nor suspends the shell. RouteGuard shows a
translated alert with a Try-again button, a root ErrorBoundary backstops
anything else, and a non-blocking background timer auto-retries after the
server's Retry-After so the tab self-heals once the window rolls over.
feat: ✨ add homework detail workflowsBurak Boduroğlu · b78d430
feat: ✨ add homework detail workflows

- add homework detail route with student text submission and file upload

- add teacher submission grading and ungrade flow with username display

- add parent homework report tab and localized homework status labels

- route homework rows to detail pages and localize topbar breadcrumbs

- handle Retry-After on temporary API failures

2026-07-22

fix: 🐛 PDF note import and API validation errorsBurak Boduroğlu · 9801748
fix: 🐛 PDF note import and API validation errors

- replace custom PDF text parsing with lazy-loaded Mozilla PDF.js

- keep note import save/read errors visible inside the side panel

- localize backend max-length validation messages app-wide

- add PDF import and API error formatter coverage
feat: 📎 client-side upload limits and shared error handling - extract formatBytes/maxUploadBytes into shared src/lib/upload-limits.ts - add client-side file size validation in exam room, question form, solution form, and ask-question dialog - add known API error messages for file upload, exam, event, and pomodoro errors - extract errorMessageFromPayload helper for client/form/blob endpoints with Pydantic validation detail support - add status-code handling for 409, 413, 422 - show max file size in question/solution upload UIBurak Boduroğlu · fed2a93
feat: 📎 client-side upload limits and shared error handling
- extract formatBytes/maxUploadBytes into shared src/lib/upload-limits.ts
- add client-side file size validation in exam room, question form, solution
  form, and ask-question dialog
- add known API error messages for file upload, exam, event, and pomodoro
  errors
- extract errorMessageFromPayload helper for client/form/blob endpoints
  with Pydantic validation detail support
- add status-code handling for 409, 413, 422
- show max file size in question/solution upload UI

2026-07-21

feat: ✨ exam room full screen, attempts display, and fresh data - update AppShell to hide sidebars and top header for /exam-room - keep max-width reset so questions take up more screen space - display used and remaining attempt counts on the exam detail page - add `cache` option to API client `RequestOptions` - bypass browser cache (`no-store`) for exam, attempt, and time endpoints to ensure fresh status and precise clock sync without stale data - add exam start date, end date, and duration to the detail metric cards grid - show contextual alert for submitted exams (prompt to retake using remaining attempts) - display attempt submission timestamp in the alert boxBurak Boduroğlu · bcc0f69
feat: ✨ exam room full screen, attempts display, and fresh data
- update AppShell to hide sidebars and top header for /exam-room
- keep max-width reset so questions take up more screen space
- display used and remaining attempt counts on the exam detail page
- add `cache` option to API client `RequestOptions`
- bypass browser cache (`no-store`) for exam, attempt, and time endpoints to ensure fresh status and precise clock sync without stale data
- add exam start date, end date, and duration to the detail metric cards grid
- show contextual alert for submitted exams (prompt to retake using remaining attempts)
- display attempt submission timestamp in the alert box
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