41 lines
2.4 KiB
Markdown
41 lines
2.4 KiB
Markdown
# Issues Discovered - 2026-05-04
|
|
|
|
This document summarizes the issues found during the Playwright exploration session on 2026-05-04.
|
|
|
|
## 1. JSON Parse Error when adding Tutors to Courses
|
|
- **Location**: `frontend/src/routes/admin/courses/+page.svelte` (triggered by `api.admin.courses.addTutor`)
|
|
- **Symptoms**: Alert box shows `SyntaxError: Failed to execute 'json' on 'Response': Unexpected end of JSON input`.
|
|
- **Root Cause**: The backend `POST /api/admin/courses/:id/tutors` handler likely returns a `200 OK` with an empty body. The frontend `api.ts` wrapper attempts to call `.json()` on every response, which fails on empty bodies.
|
|
- **Evidence**: Network request #48 in Playwright session showed `status: 200` but `content-length: 0`.
|
|
|
|
## 2. Attendance Count Missing on Student Check-in Page
|
|
- **Location**: `frontend/src/routes/s/[code]/+page.svelte`
|
|
- **Symptoms**: The "Anwesende" count shows `0 / 11` even after a successful check-in or when other students are present.
|
|
- **Root Cause**: The `loadInfo` function fetches the data but never assigns `res.attendances` to the local `attendances` state variable.
|
|
- **Evidence**: `loadInfo` contains `const checkinAttendances = res.attendances ?? [];` but lacks `attendances = checkinAttendances;`.
|
|
|
|
## 3. Seat Map Empty in Live View
|
|
- **Location**: `frontend/src/routes/admin/live/[slotId]/+page.svelte`
|
|
- **Symptoms**: All seats show as "frei" in the tutor's live view, even when students are checked in and assigned to seats.
|
|
- **Root Cause**: The `SeatMap` component is instantiated without passing `assignments` or `students` props.
|
|
- **Evidence**: `<SeatMap variant="tutor" scale={0.78} />` is used without other props in the source code.
|
|
|
|
## 4. Room Editor Element Selection Broken
|
|
- **Location**: `frontend/src/lib/RoomCanvas.svelte`
|
|
- **Symptoms**: Clicking an element in the Room Layout Editor does not select it (sidebar continues to show "Element auswählen").
|
|
- **Root Cause**: In `handleMouseDown`, if `editable` is true, the function returns early without calling `onElementClick`.
|
|
- **Evidence**:
|
|
```typescript
|
|
function handleMouseDown(e: MouseEvent, el: LayoutElement) {
|
|
if (!editable) {
|
|
onElementClick?.(el);
|
|
return;
|
|
}
|
|
draggingId = el.id;
|
|
// ...
|
|
}
|
|
```
|
|
|
|
## 5. Potential UI/UX: Dashboard Slot Status
|
|
- **Observation**: Dashboard sometimes shows "Anwesenheit offen" but "Alle Slots 1" and "Abgeschlossene Slots 0". It's a bit confusing if there is only one slot ever. (Minor)
|