Commits
Commits on
dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/lib/insight-run-report.tsClear filter2026-09-19
perf: ⚡ load only the active language's dictionary - split the en/tr dictionaries out of messages.ts into their own chunks; the boot awaits the stored locale before the first render - a locale switch waits for its dictionary before flipping, last request wins - preferences chunk drops from ~290 KB to ~83 KB; each session fetches one ~105 KB dictionary instead of both - tests register both dictionaries through a shared setup file - includes the new keys used by the fixes that followBurak Boduroğlu · 877419e
perf: ⚡ load only the active language's dictionary - split the en/tr dictionaries out of messages.ts into their own chunks; the boot awaits the stored locale before the first render - a locale switch waits for its dictionary before flipping, last request wins - preferences chunk drops from ~290 KB to ~83 KB; each session fetches one ~105 KB dictionary instead of both - tests register both dictionaries through a shared setup file - includes the new keys used by the fixes that follow
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.♻️ refactor(insights): one label map, one pending lineAhmet Kaan Gümüş · 2cb6c6b
♻️ refactor(insights): one label map, one pending line Two same-class residuals from the delta review: - The run status had two maps. The table's inline list used the app's dictionary (insights.status.*) while the report kept a private table — and they had ALREADY drifted: tr `running` read "Çalışıyor" in the dictionary and "Sürüyor" in the report. runReportStatusLabel now reads the dictionary, the table badge calls it, and there is one place a new status gets a label. An unknown status stays raw on both surfaces. - The pending-students expression was copied between the panel and the export. pendingStudentsLine(locale, model) builds the one line (count, names in the ledger's order, `—` where the roster cannot resolve a name) and both render it, so the export cannot drift from the screen. The em-dash case now has a test on the same line the panel shows. Gates: tsc clean; insight-run-report.test.tsx 11/11. Live: the ledger badge and the report's Durum both read "Tamamlandı", the student rows read "Kararlı".
🐛 fix(insights): the run report speaks Turkish, not the service's enumAhmet Kaan Gümüş · 0550b10
🐛 fix(insights): the run report speaks Turkish, not the service's enum Three flags from the batch verification, one commit: - The Güven column printed the raw confidence tier (exploratory / stable / none). It now reads the app's own dictionary (insights.confidence.*), the same labels the student drawer shows, in both the view and the Markdown; an unknown tier stays raw rather than being guessed at. - failed_modules are zeka pipeline stage names (discover_students / fetch / compute / store). They get labels with an honest fallback for a stage this build does not know, the same sweep applied to the runs table's own issue line, and the raw stage list stays in the technical disclosure. - The export counted the pending students while the panel named them. The export now carries the same list in the same order (`—` for a student the roster could not resolve), so the .md, the clipboard and the print sheet say what the screen says. Tests pin each: the panel and the export show Keşifsel/Kararlı and never the raw enum; a known stage reads Veri toplama while an unknown one keeps its technical name and the raw list survives in the JSON disclosure; the pending line names Ayça Şahin.
✨ feat(insights): a readable school report behind each run rowAhmet Kaan Gümüş · 9895664
✨ feat(insights): a readable school report behind each run row
The Analiz tab's run ledger was counters only — no row action, no route, and
nothing behind it. Each run row now opens a report of what that run produced,
built from the doors that exist: the ledger row (GET /insights/runs), the
school roster (/users/search?role=student) and one student at a time
(/insights/students/{id}). There is no school-level read door; the three
/insights/{summaries,segments,recommendations} routes are the bridge's WRITE
side, so the school picture is composed here and every number states how many
students it was computed over.
The report carries the run's own counters (date, status, processed/skipped/
failed, rows written, duration, budget, issue lines), module coverage with each
module's own limitation sentence, and every covered student's headline numbers
with a door into their existing analysis drawer (InsightDetail, reused). Where a
module measured nothing the report says so ("veri yok") instead of rendering a
blank panel, and a student that was never computed says that instead.
The same model renders the panel, the print sheet and the Markdown, so
Kopyala, İndir (.md) and Yazdır / PDF export exactly what is on screen —
print hides the app chrome through a body class and a document-only root.
The runs table's own copy also gains the two keys it referenced but never had
(insights.pendingStudents, insights.failedModules); the report's strings live in
their own lane-scoped module to keep one writer per file.