Commits
2026-09-18
feat: 📄 generate the school report document from the run drawerAhmet Kaan Gümüş · ea53ad2
feat: 📄 generate the school report document from the run drawer
The run report drawer could copy, export Markdown and print what the page
had already read, but the school-level document the AI service writes had
no control. `Okul raporu (HTML)` now POSTs the run day's own
`/insights/runs/{run_day}/report` door, reads the stored document back and
then hands it over as a same-origin `<a download>` — so a generation that
answered `200` but stored nothing surfaces as "belge okunamadı" instead of
an empty download.
- `src/api/insights/`: `insightRunReportUrl`/`insightRunReportPath`,
`postInsightRunReport` and `getInsightRunReport`, following the podcast
audio-door shape; the path is spelled once for both doors.
- Failure copy: `503` says the report service is unavailable, a coded `409`
shows the server's own sentence, a read-back `409 report_missing` says the
document could not be read back — never an invented diagnosis.
- The control exists for manager+ only, the role the door accepts.
- Tests: the door URLs at the API layer, and in the drawer the exact POST
target, the in-flight disabled state, the anchor's href/download name, and
each of the three failure classes.fix: 🔌 close the last gaps against the live API contract - PodcastJobArtifacts matches the live JobArtifacts: drop audio_ids, script_id and script_ids, and duration_secs and format are nullable - add getInsightsPending (GET /insights/pending), with a testBurak Boduroğlu · e6e9aad
fix: 🔌 close the last gaps against the live API contract - PodcastJobArtifacts matches the live JobArtifacts: drop audio_ids, script_id and script_ids, and duration_secs and format are nullable - add getInsightsPending (GET /insights/pending), with a test
2026-09-17
feat: 🧠 wire the new insights and podcast backend doorsBurak Boduroğlu · ce4dc54
feat: 🧠 wire the new insights and podcast backend doors - new src/api/insights: /insights/me, one student's insight, the detached per-student recompute, the manager-only run ledger and the school-wide refresh; both writes answer 202 with a receipt, never the computed rows - new src/api/podcast: submit a course note for narration, poll the job, read a finished job's artifacts, cancel one, and the same-origin audio URL an <audio src> takes - types for ZEKA's read: the nightly summary with its four module members left unread, the teacher-facing attention list, recommendation cards, the segment profile with its contrast against the student's own level, and one run ledger row - neither domain is a licence module, so both are gated by AI capability alone: the detached writes answer 503 when no service serves them and queue nothing, and the podcast formats past duz_okuma need the service's LLM key - contract fixtures cover both doors in a world with and without an AI service: the reads answer their DTO either way, the writes may refuse with 503 but may not 500 or mint a receipt they did not queue Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>