You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CO-Messung: UG usually have different layouts than OG/EG #265
as of today UGs have the same structure (number of units) as the EG/OG. This does not match the reality.
in reality there are much more smaller units in an OG and can be wildly laid out.
Each unit mush have a free text field to define the identity of a UG unit (number, name of owner ...)
This requires creative thinking on how to implement this.
Maybe a simple list per UG with id -> ppm + key + status
UX/UI analysis: UG layouts vs. EG/OG in CO-Messprotokoll
How it works today (and why UG breaks it)
CoMessprotokollView is a strict matrix: one shared row of column headers (ApartmentColumns), and one row per floor (MatrixRows), UG through OG, all sharing those same columns. The uniformity comes from a single field, Building.ApartmentsPerFloor (src/LageBuch.Domain/CoMeasurement/Building.cs:16), applied to every floor when the grid is built (CoMessprotokollViewModel.cs:257-274). There is no per-floor unit count and no per-floor labels — SetApartmentLabel only takes a Building + apartment number, not a floor (CoMessprotokollViewModel.cs:296, Incident.cs:878-1040).
Blunt read: the column header is already a lie for ordinary floors, UG just makes it obvious. "Column 3" is not an identity, it's an array index. Renaming column 3 to "Müller" relabels apartment 3 on every floor of the building, EG through the top OG, not just the one you're looking at. Regular buildings get away with this because floors genuinely tend to stack 1:1 (Whg. 3 really is above Whg. 3). Basements never stack that way — Kellerabteile, Technikräume, Garagen, Hausanschlussraum don't correspond 1:1 to the flats above them, there are usually more small units than apartments, and they need free-text identity (owner name / Kellerabteil number), not a shared column index. The issue is really exposing a modeling bug that was always there, not a UG-specific quirk.
Options
A. Bolt a free-form list onto UG floors only (the issue's own suggestion — id / ppm / key / status), keep the matrix for EG/OG.
Cheapest to build: reuse Dwelling as-is, just render UG floor rows as cards instead of grid cells. But it puts two different interaction models on one screen — a spatial grid above meaning "this cell is a specific place," and a plain list below meaning "these are arbitrary entries with no positional meaning." Users have to switch mental models mid-scroll, and the add/remove affordance for list rows won't look anything like the fixed grid controls above it. It reads exactly like what it is: a patch, not a fix. Ships fast, looks bolted-on forever.
B. Fix the model: make unit count and unit labels per-floor everywhere, keep one visual language. ApartmentsPerFloor becomes a per-floor override (default inherited, overridable per FloorOrdinal, same pattern already used for FloorDescriptions, Building.cs:18); ApartmentLabels becomes keyed by (FloorOrdinal, ApartmentNumber) instead of apartment number alone. Visually nothing changes — still the same colored tiles, same glyph/ppm/key layout — a UG row just renders fewer (or more) tiles, each with its own free-text label instead of a shared header cell. Drop the shared header row entirely (it's semantically bankrupt once column counts diverge, and today it's the only place Label is actually rendered — the tile itself never shows it, CoMessprotokollViewModel.cs:65-74 vs the XAML tile at CoMessprotokollView.axaml:242-260 — so put the label on the tile itself while you're in there, header or not).
This is real work, not a coat of paint: Incident.AddCoBuilding/UpdateCoBuildingStructure (Incident.cs:878-931) eagerly materializes one Dwelling per (floor, apartment) off the single count and needs a per-floor count instead; the sync DTO (IncidentSnapshot.cs:143) and SQLite schema (Migrations.cs) both encode the building-wide ApartmentsPerFloor/label shape and need a migration. But it's bounded — Dwelling itself already keys on (BuildingId, FloorOrdinal, ApartmentNumber), so nothing about the storage shape has to change, only how the count/labels are declared. And "columns line up vertically across floors" was never real information once floor layouts genuinely differ — you lose nothing by admitting that.
C. Replace the matrix everywhere with a free-form per-floor list.
Rejected. This throws away the one thing the grid is actually good for — glance-and-color-block search-progress across a whole regular building — to fix a case the issue itself says is the exception (EG/OG "usually" match). Don't redesign the common case around the edge case.
D. A real floor-plan editor (irregular room shapes, drawn layout).
Rejected, harder than either A or B, and it's the wrong tool: this is a door-to-door search/CO tracker used under time pressure, not CAD. Nobody is going to draw a floor plan mid-incident.
Recommendation
Do B. A is a real option only if there's a hard deadline this week and B can follow later — but be aware A is user-visible debt the moment it ships (two UI languages on one screen), and every UG floor built under A will need re-entry once B lands since it's a different shape. If schedule allows it, skip A and go straight to B — it's more files touched, not more design risk, and it fixes a labeling bug that already exists on ordinary floors today.
Not implementing either option here — this was requested as analysis, not a change. Happy to scope out B in more detail (data model diff, migration shape, view changes) if you want to move on it.
PR A — bolt-on free-form list for UG floors (id/ppm/key/status), matrix kept for EG/OG
PR B — per-floor unit counts + per-floor free-text labels, shared header row dropped, label shown on tile
Build/test both (full solution test suite green on each: Domain, AppLogic, Sync, Persistence, Documents, Acceptance/render tests, incl. new tests for both options and a SQLite migration test for pre-CO-Messung: UG usually have different layouts than OG/EG #265 label data)
Push and post PR links
PR A — free-form UG unit list
Reuses Dwelling as-is per the earlier analysis. UG floors (FloorOrdinal < 0) render as a variable-length card list instead of the fixed EG/OG grid, with add/remove per unit (Incident.AddUndergroundUnit/RemoveUndergroundUnit, independent of ApartmentsPerFloor). The editor sidebar's free-text field doubles as a unit's identity for UG. Also fixed a related bug along the way: CoMeasurementLabels.DwellingLocation no longer lets a custom OG column label leak onto a same-numbered UG unit, and the PDF export now lists UG units individually so ones beyond ApartmentsPerFloor aren't silently dropped from the printed protocol.
PR B — per-floor counts and labels everywhere
The deeper fix: every floor (EG/OG and UG alike) now owns its own Wohnungen count (Building.ApartmentCounts, per-floor override of the default ApartmentsPerFloor) and its own unit labels (ApartmentLabels now keyed by floor+apartment, not apartment number alone). Incident.SetApartmentCount grows/trims one floor's Dwellings without touching any other floor. The shared apartment-column header is gone entirely — each tile shows its own label (editable via the sidebar), and each floor row gets its own count control. PDF export now lists each floor's units individually since column counts vary per floor. SQLite gains an apartment_counts column (schema V20); a pre-#265apartment_labels payload (keyed by apartment number alone) is migrated to apply across every floor that existed when it was saved, so existing custom labels survive the upgrade.
One branch, two stacked-then-unstacked commits. This sandbox only lets me git add/commit/push-to-the-branch-already-assigned-to-this-run — creating a second branch was blocked (requires interactive approval I can't grant here). So both options live as commits on claude/issue-265-20260907-2107: commit 4c2e98a is Option A, then d1e2a90 reverts it back to a clean baseline, then 8dc52b6 is Option B. Each "Create a PR" link above points at the right commit SHA so each PR's Files changed tab shows exactly one option's diff — but PR B's Commits tab will show 3 commits (add A, revert A, add B) instead of a clean single-commit history, since GitHub can't hide the intermediate ones. Content is correct either way; history is just not tidy. If that's not acceptable, the cleanest fix is to open a real second branch yourself (e.g. git branch option-b 8dc52b6 && git push) and I'm happy to help squash from there.
Commits are unsigned. AGENTS.md's documented workaround (git commit with the sandbox disabled) didn't produce a gpgsig here either — verified with git cat-file commit HEAD. Something about this environment's signing setup didn't come through; flagging so it doesn't look overlooked.
No screenshots attached. AGENTS.md asks for before/after PNGs via gh --attach, but this flow doesn't have gh PR-creation/attach access (only push), and most non-git shell commands in this sandbox required approval I couldn't grant non-interactively. I did verify both UIs render correctly via the existing headless Skia acceptance-test harness (new passing tests: CoMessprotokoll_UndergroundList_RendersFreeFormUnits for A, CoMessprotokoll_PerFloorApartmentCount_RendersIndependently for B) — that's real rendering verification, just not a PNG in this comment.
A and B are alternatives, not additive — per the original analysis, shipping both would be contradictory (they solve the same problem differently). Pick one; I'd lean toward B per the earlier recommendation, but A is the cheaper/faster option if there's schedule pressure.
Activity
DeepDiver1975 commentedon Sep 7, 2026
@claude analyse and come up with options we have from an UX/UI perspective - be blunt
claude commentedon Sep 7, 2026
Claude finished @DeepDiver1975's task in 2m 29s —— View job
UX/UI analysis: UG layouts vs. EG/OG in CO-Messprotokoll
How it works today (and why UG breaks it)
CoMessprotokollViewis a strict matrix: one shared row of column headers (ApartmentColumns), and one row per floor (MatrixRows), UG through OG, all sharing those same columns. The uniformity comes from a single field,Building.ApartmentsPerFloor(src/LageBuch.Domain/CoMeasurement/Building.cs:16), applied to every floor when the grid is built (CoMessprotokollViewModel.cs:257-274). There is no per-floor unit count and no per-floor labels —SetApartmentLabelonly takes aBuilding+ apartment number, not a floor (CoMessprotokollViewModel.cs:296,Incident.cs:878-1040).Blunt read: the column header is already a lie for ordinary floors, UG just makes it obvious. "Column 3" is not an identity, it's an array index. Renaming column 3 to "Müller" relabels apartment 3 on every floor of the building, EG through the top OG, not just the one you're looking at. Regular buildings get away with this because floors genuinely tend to stack 1:1 (Whg. 3 really is above Whg. 3). Basements never stack that way — Kellerabteile, Technikräume, Garagen, Hausanschlussraum don't correspond 1:1 to the flats above them, there are usually more small units than apartments, and they need free-text identity (owner name / Kellerabteil number), not a shared column index. The issue is really exposing a modeling bug that was always there, not a UG-specific quirk.
Options
A. Bolt a free-form list onto UG floors only (the issue's own suggestion — id / ppm / key / status), keep the matrix for EG/OG.
Cheapest to build: reuse
Dwellingas-is, just render UG floor rows as cards instead of grid cells. But it puts two different interaction models on one screen — a spatial grid above meaning "this cell is a specific place," and a plain list below meaning "these are arbitrary entries with no positional meaning." Users have to switch mental models mid-scroll, and the add/remove affordance for list rows won't look anything like the fixed grid controls above it. It reads exactly like what it is: a patch, not a fix. Ships fast, looks bolted-on forever.B. Fix the model: make unit count and unit labels per-floor everywhere, keep one visual language.
ApartmentsPerFloorbecomes a per-floor override (default inherited, overridable perFloorOrdinal, same pattern already used forFloorDescriptions,Building.cs:18);ApartmentLabelsbecomes keyed by(FloorOrdinal, ApartmentNumber)instead of apartment number alone. Visually nothing changes — still the same colored tiles, same glyph/ppm/key layout — a UG row just renders fewer (or more) tiles, each with its own free-text label instead of a shared header cell. Drop the shared header row entirely (it's semantically bankrupt once column counts diverge, and today it's the only placeLabelis actually rendered — the tile itself never shows it,CoMessprotokollViewModel.cs:65-74vs the XAML tile atCoMessprotokollView.axaml:242-260— so put the label on the tile itself while you're in there, header or not).This is real work, not a coat of paint:
Incident.AddCoBuilding/UpdateCoBuildingStructure(Incident.cs:878-931) eagerly materializes oneDwellingper(floor, apartment)off the single count and needs a per-floor count instead; the sync DTO (IncidentSnapshot.cs:143) and SQLite schema (Migrations.cs) both encode the building-wideApartmentsPerFloor/label shape and need a migration. But it's bounded —Dwellingitself already keys on(BuildingId, FloorOrdinal, ApartmentNumber), so nothing about the storage shape has to change, only how the count/labels are declared. And "columns line up vertically across floors" was never real information once floor layouts genuinely differ — you lose nothing by admitting that.C. Replace the matrix everywhere with a free-form per-floor list.
Rejected. This throws away the one thing the grid is actually good for — glance-and-color-block search-progress across a whole regular building — to fix a case the issue itself says is the exception (EG/OG "usually" match). Don't redesign the common case around the edge case.
D. A real floor-plan editor (irregular room shapes, drawn layout).
Rejected, harder than either A or B, and it's the wrong tool: this is a door-to-door search/CO tracker used under time pressure, not CAD. Nobody is going to draw a floor plan mid-incident.
Recommendation
Do B. A is a real option only if there's a hard deadline this week and B can follow later — but be aware A is user-visible debt the moment it ships (two UI languages on one screen), and every UG floor built under A will need re-entry once B lands since it's a different shape. If schedule allows it, skip A and go straight to B — it's more files touched, not more design risk, and it fixes a labeling bug that already exists on ordinary floors today.
Not implementing either option here — this was requested as analysis, not a change. Happy to scope out B in more detail (data model diff, migration shape, view changes) if you want to move on it.
DeepDiver1975 commentedon Sep 7, 2026
@claude implement A and B in two dedicated PRs
claude commentedon Sep 7, 2026
Claude finished @DeepDiver1975's task in 37m 42s —— View job •
claude/issue-265-20260907-2107• Create PR ➔Done
CoMessprotokollView/ViewModel,Building,Incident,Dwelling, sync DTO/commands, SQLite persistence,CoMessprotokollSection(PDF)PR A — free-form UG unit list
Reuses
Dwellingas-is per the earlier analysis. UG floors (FloorOrdinal < 0) render as a variable-length card list instead of the fixed EG/OG grid, with add/remove per unit (Incident.AddUndergroundUnit/RemoveUndergroundUnit, independent ofApartmentsPerFloor). The editor sidebar's free-text field doubles as a unit's identity for UG. Also fixed a related bug along the way:CoMeasurementLabels.DwellingLocationno longer lets a custom OG column label leak onto a same-numbered UG unit, and the PDF export now lists UG units individually so ones beyondApartmentsPerFlooraren't silently dropped from the printed protocol.PR B — per-floor counts and labels everywhere
The deeper fix: every floor (EG/OG and UG alike) now owns its own Wohnungen count (
Building.ApartmentCounts, per-floor override of the defaultApartmentsPerFloor) and its own unit labels (ApartmentLabelsnow keyed by floor+apartment, not apartment number alone).Incident.SetApartmentCountgrows/trims one floor'sDwellings without touching any other floor. The shared apartment-column header is gone entirely — each tile shows its own label (editable via the sidebar), and each floor row gets its own count control. PDF export now lists each floor's units individually since column counts vary per floor. SQLite gains anapartment_countscolumn (schema V20); a pre-#265apartment_labelspayload (keyed by apartment number alone) is migrated to apply across every floor that existed when it was saved, so existing custom labels survive the upgrade.Create a PR
Caveats worth knowing before merging either
git add/commit/push-to-the-branch-already-assigned-to-this-run — creating a second branch was blocked (requires interactive approval I can't grant here). So both options live as commits onclaude/issue-265-20260907-2107: commit4c2e98ais Option A, thend1e2a90reverts it back to a clean baseline, then8dc52b6is Option B. Each "Create a PR" link above points at the right commit SHA so each PR's Files changed tab shows exactly one option's diff — but PR B's Commits tab will show 3 commits (add A, revert A, add B) instead of a clean single-commit history, since GitHub can't hide the intermediate ones. Content is correct either way; history is just not tidy. If that's not acceptable, the cleanest fix is to open a real second branch yourself (e.g.git branch option-b 8dc52b6 && git push) and I'm happy to help squash from there.git commitwith the sandbox disabled) didn't produce agpgsighere either — verified withgit cat-file commit HEAD. Something about this environment's signing setup didn't come through; flagging so it doesn't look overlooked.gh --attach, but this flow doesn't haveghPR-creation/attach access (only push), and most non-git shell commands in this sandbox required approval I couldn't grant non-interactively. I did verify both UIs render correctly via the existing headless Skia acceptance-test harness (new passing tests:CoMessprotokoll_UndergroundList_RendersFreeFormUnitsfor A,CoMessprotokoll_PerFloorApartmentCount_RendersIndependentlyfor B) — that's real rendering verification, just not a PNG in this comment.Revert "feat(comessung): free-form unit list for Untergeschoss floors…
feat(comessung): per-floor unit counts and labels (Option B)
feat(co-messung): floor bands, full-width rows, summary and status fi…
feat(comessung): per-floor unit counts and labels (Option B) (#268)
DeepDiver1975 commentedon Sep 8, 2026
fixed in #268
feat(co-messung): color-code ppm danger severity, warn on implausible…
fix(co-messung): Wohnungen entfernen fragt, welche — statt stumm von …