When PORT=0, the backend now writes its actual bound port to
data/test/.port. test-env.sh reads that file when TT_TEST_PORT=0
so all targets (test-up, test-reset, test-down) resolve the real URL.
test-up waits for .port to appear before the health-check loop.
Instead of applying a per-element heuristic (skip if value ≤ 50), identify
pixel-scale rooms at the row level with WHERE EXISTS, then convert all
elements unconditionally. Eliminates the risk of mixed-scale elements within
the same room.
- Makefile: add SHELL := /bin/bash so test-env.sh pipefail works in CI
- RoomCanvas: fix onElementClick firing on drag start (now fires on mouseup
for click-in-place only); fix Props type to accept null; guard grid pattern
against snapStep=0 (invalid SVG); remove unsafe null cast
- live/[slotId]: fix studentNamesBySeat $derived wrapping a function instead
of a value — reactivity was broken, map never updated
- s/[code]: block clicks on occupied seats before hitting the backend;
pass occupiedSeatIds to confirmed-view RoomCanvas; clear errorMsg on retry
- rooms/+page: replace alert() in deleteRoom with inline errorMsg state
- rooms/[roomId]: replace deprecated .substr with .slice
- courses.rs: assign_tutor uses fetch_optional → 404 on unknown tutor_id
instead of propagating RowNotFound as 500
- rooms.rs: delete_room returns 404 when room does not exist; replace
fract() != 0.0 float check with epsilon-based validation
- auth_routes.rs: refresh endpoint re-checks is_active so deactivated tutors
cannot obtain new access tokens; fix test INSERT to include is_active
- tutors.rs: wrap delete_tutor reference checks and DELETE in a transaction
- attendance.rs: replace #[allow(clippy::type_complexity)] with type alias
- migrations/003: document > 50 heuristic precondition
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- migration 003: apply pixel→grid transform per-element (CASE WHEN > 50)
instead of per-row, preventing double-conversion of mixed-scale rooms;
skip empty arrays via json_array_length guard to avoid NULL assignment
- attendance.rs: log layout JSON parse errors instead of silently
swallowing them with .ok()
- tutors.rs: check rows_affected() in set_tutor_active and return 404
for non-existent IDs; remap FK constraint errors on delete to 409
so concurrent inserts between conflict-check and DELETE don't surface
as 500
Frontend:
- live/[slotId]: expose polling failures to the tutor via error banner
instead of only console.error
- s/[code]: split checkin into two try/catch blocks so a successful
POST followed by a failed reload doesn't report failure to the student;
fix dead '409' string detection to match actual server error 'seat taken'
- rooms/[roomId]: remove duplicate onMount fetch; add .catch() to $effect
- tutors: expose loadTutors failures via error banner, not just console
- rooms: fix bare catch in createRoom (captures error, shows message);
add try/catch to onMount rooms load
CI:
- sync cargo audit --ignore RUSTSEC-2023-0071 with Makefile; the advisory
is in rsa which sqlx-mysql retains in the lock file even when the mysql
feature is disabled — aws_lc_rs correctly removes it from the active tree