forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to service/src/report/text.pyClear filter

2026-09-18

fix(report): label the Sube cells with class names, never raw idsAhmet Kaan Gümüş · 440bab7
fix(report): label the Sube cells with class names, never raw ids

The live school report printed `01a0b1a6-...` in every Sube cell: the
summaries carry class IDS and the document had nothing else to print. The
backend now sends the school's class list as a sibling key
(`classes: [{id, name}]`, `all_classes`), so the document prints the name a
manager recognizes.

- report package: `StaffBundle.class_names` (id -> display name) threaded
  through `load_staff_bundle` / `load_bundle`; `build._class_labels` maps the
  ids, and an unmapped id becomes `text.CLASS_LABEL_UNKNOWN`
  ("Adi bilinmeyen sube"), never the raw id. An absent map (older backend)
  uses the same label and still builds the document.
- identity vs label: the Sube x ders table still buckets by class IDENTITY
  (two classes whose label is the fallback cannot merge into one row) and
  sorts by the DISPLAY name; the overview's Sube count counts identities, so
  labelling never moves a number.
- handlers.report accepts `classes: [{id, name}]` (the backend's shape,
  preferred) and `class_names: {<id>: name}` as a fallback; a malformed list,
  or an entry with no usable id, is `bad_request`. The log line carries
  `sinif_adi_yok=<n>` so a missing or stale map is visible outside the
  document.
- capabilities: the pin flips -- the backend's constant (constant.rs:645),
  its dispatch and `POST /runs/{run_day}/report` all landed 2026-09-18, so
  `insight.report` joins BACKEND_CALLABLE_CAPABILITIES.
- docs: the label rule and the `classes` key in `## insight.report`,
  RAPORLAR.md rule 9 + limit 7, CIKTI-SOZLESMESI.md status line.
- tests: fixtures now carry class IDS plus a name map; they pin names over
  ids, name-order sorting, both payload shapes, the unmapped and the
  absent-map fallbacks, and the malformed-list refusal. Five of them fail
  pre-fix (stash probe).

2026-09-16

createMuhammet Ozdemir · 98b2423Browse files