Skip to content

CO-Messung: editable headers, compact rows, layout fixes - #138

Merged
DeepDiver1975 merged 18 commits into
mainfrom
feat/co-messprotokoll
Aug 27, 2026
Merged

CO-Messung: editable headers, compact rows, layout fixes#138
DeepDiver1975 merged 18 commits into
mainfrom
feat/co-messprotokoll

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fixed the CO-Messung matrix rendering as one solid block (missing cell borders/spacing), the editor sidebar getting squeezed/clipped off-screen on wide buildings, and cell text being invisible (silently clamped by the global Button style's fixed Height).
  • Added editable apartment column headers, persisted and synced per building (mirrors the existing floor-description pattern, incl. a new SQLite migration).
  • Defaulted 3-per-floor buildings to "Links/Mitte/Rechts" instead of generic "Whg. N" labels — still user-editable per column.
  • Compacted row height (auto-sized to content) so typical buildings fit without scrolling.
  • Redesigned cells from solid traffic-light fills to a "door-mark" card (dark tile + colored stripe/outline + a slash/X/circled-X status glyph, mirroring the real search-marking convention crews already use), with the CO reading in monospace.
  • Fixed three follow-up alignment bugs found by testing edge cases: long custom headers overflowing their column, the FluentTheme's default focus/hover chrome popping a full box on header inputs, and cells with "Kein Messwert" + the key icon growing wider than their column and breaking row-to-row alignment.

Screenshots

Matrix — mixed statuses, editable Links/Mitte/Rechts headers, aligned grid:
CO-Messung matrix

10-column building with the editor sidebar open (horizontal scroll):
Editor open

Test plan

  • dotnet test tests/LageBuch.Domain.Tests — 206 passed
  • dotnet test tests/LageBuch.AppLogic.Tests — 285 passed
  • dotnet test tests/LageBuch.Sync.Tests — 51 passed
  • dotnet test tests/LageBuch.Persistence.Tests — 88 passed
  • dotnet test tests/LageBuch.Documents.Tests — 24 passed
  • LageBuch.Acceptance.Tests — 86 total, same 7 pre-existing unrelated failures/1 skip as baseline (no regressions)
  • Verified visually via the headless Skia render harness

🤖 Generated with Claude Code

https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF

DeepDiver1975 and others added 17 commits August 25, 2026 16:23
…bels

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…ditor

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…cells

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…surement

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…t fixes

- Give each matrix cell a real border/spacing instead of touching
  same-colored rectangles, and restore horizontal scrolling on the matrix
  ScrollViewer.
- Move the editor sidebar ahead of the matrix in DockPanel order so its
  fixed 320px width is reserved before the matrix greedily claims space.
- Override the global Button style's fixed Height on matrix cells, which
  was silently clamping cell content to 36px and rendering all cell text
  outside its clip region.
- Let cells auto-size to content (Height="NaN") instead of a fixed 180px,
  so more floors fit without scrolling.
- Add editable apartment column headers, persisted per building via a new
  SetApartmentLabel command/migration (V16), synced the same way as floor
  descriptions.
- Default 3-per-floor buildings to "Links/Mitte/Rechts" instead of generic
  "Whg. N" labels; still user-editable per column.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Traffic-light-style solid fills read as generic and hid the cell text
behind a fixed-height clamp from the global Button style. Redesign each
cell around the search-marking convention crews already use on doors: a
dark card with a colored accent stripe/outline plus a small glyph (slash
= in progress, X = cleared, circled X = victim found), CO reading in
monospace, key icon as a corner badge. Same status colors, now doubled
with a shape cue.

Widened cell/header MinWidth (120 -> 136) and added a guaranteed margin
before the key icon; the previous width let "Kein Messwert" and the key
glyph crowd together with no gap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
The header TextBox only had MinWidth, so a long custom apartment label
(user-editable since the last change) grew past its 136px column and
overlapped the next header, breaking alignment with the cells below.
Fix to a hard Width so it always matches the cell column and clips
overflow instead of stretching.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
FluentTheme's TextBox control theme styles Border#PART_BorderElement
directly on :focus/:pointerover (background, border brush, and a 4-sided
BorderThemeThicknessFocused), completely bypassing the plain Background/
BorderThickness set on the control -- so every header looked like a quiet
underline until you actually clicked into one, at which point it popped
a full rounded box in the theme's default accent color. Confirmed by
dumping the resolved PART_BorderElement properties at runtime.

An earlier attempt to fix this by overriding the same-named resources via
TextBox.Resources did not take (the resource resolved correctly via
TryFindResource but wasn't the value the template style actually applied
at render time) -- an instance-scoped TextBox.Styles targeting the same
:focus//:pointerover selectors with direct Setters does.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Cell Border only had MinWidth, so a cell whose content didn't fit --
in practice, "Kein Messwert" plus the key icon -- grew past it (146px
vs. the 136px baseline). UniformGrid then stretches every cell in that
row to match the widest one, but rows without that combination stayed
at 136px, so column boundaries drifted between floors instead of lining
up. Same class of bug as the earlier header-overflow fix.

Pin both the cell and header to a fixed 148px (confirmed via the actual
rendered bounds to be enough for glyph + "Kein Messwert" + key icon with
no truncation) so every row's columns land in the same place.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuNeLrn1nJc7sGw78tEcEF
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
CoMessprotokollViewModel never subscribed to IIncidentSession.Changed
like its sibling view models (Forces, Roles, ...), so it went stale
whenever the domain mutated outside its own Add/Remove-building
commands (e.g. remote sync). Also updates acceptance tests whose
hardcoded tab count/index assumed 9 tabs before CO-MESSUNG was
inserted at index 6, shifting Dateien/Links down by one.

Fixes the CI Test-step failure on PR #138.

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 merged commit 955862d into main Aug 27, 2026
2 checks passed
@DeepDiver1975
DeepDiver1975 deleted the feat/co-messprotokoll branch August 27, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant