Skip to content

feat(lagekarte): place Bereitstellungsräume from the Organisation on the map - #991

Open
DeepDiver1975 wants to merge 1 commit into
mainfrom
feat/966-lagekarte-bereitstellungsraum
Open

DeepDiver1975 wants to merge 1 commit into
mainfrom
feat/966-lagekarte-bereitstellungsraum

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A Bereitstellungsraum recorded in the Organisation tab can now be placed on the Lagekarte, and the two stay one record. The map stores only where the Raum stands. Its name and details come from the Organisation node on every refresh, so a rename there renames the sign at once. A tap on its pin or sign, or the pencil beside it in the side list, opens the same CommandNodeDialog the Organisation uses, so the details are edited in one place. A dissolved Bereitstellungsraum leaves the map.

Fixes #966

What changed

  • Domain: CommandNode gets Position and LabelOffset. Incident.PlaceCommandNode accepts only a live Bereitstellung; any other kind is refused with "Nur ein Bereitstellungsraum steht auf der Lagekarte.". The ETB records when one is placed ("Bereitstellungsraum X auf der Lagekarte eingetragen") and when it is taken off ("… von der Lagekarte genommen"); a move writes nothing, as for units. Incident.MoveCommandNodeLabel moves the sign beside its pin and writes no ETB line. CommandNodeRepair keeps both fields when it repairs a node on reading.
  • Persistence: migration V46 adds command_nodes.position_lat, position_lon, label_dx and label_dy (REAL, as on force_units). They are declared in SchemaGuard.ExpectedColumns and saved and loaded by the repository. A garbled value from a hostile file costs only the mark.
  • Sync: new client-sent commands placeCommandNode and moveCommandNodeLabel, and the snapshot's command nodes carry position and offset. A host at 43 cannot read the new commands, so ProtocolVersion and MinimumProtocolVersion both rise to 44. The floor assertions of the 41–43 handshake tests are loosened from "≤ 40" to "≥ 40".
  • Lagekarte:
    • The side list gets a BEREITSTELLUNGSRÄUME group with place, edit, show and remove buttons for each Raum. With none, it says "Keine. Unter ORGANISATION einrichten.".
    • Taking a Raum off the map asks first ("Bereitstellungsraum von der Karte nehmen?"). The prompt is in the style of MapOverlaysViewModel.ConfirmRemove, built without depending on fix(lagekarte): confirm before taking a Fahrzeug off the map #984.
    • The Raum is placed by picking it and then tapping the map, the same flow as a unit, and is dragged like one.
  • Sign: TacticalSignControl.IsBereitstellungsraum draws the DV 102 Grundzeichen "Stelle, Einrichtung", a red circle, marked "BR", anchored and tied back to its pin by a Verbindungsstrich like the vehicle signs.

⚠️ Renumbering before merge

This PR takes migration V46 and protocol 44 with floor 44. PR #990 (#973) also takes V46 and protocol 44 with floor 44, and PR #988 takes protocol 44. Whichever of these lands first, this PR must be rebased and renumbered above it: the migration, SyncProtocol and its history entry, and the exact-value test in VersionHandshakeTests.

Please check

  • The "BR" circle sign. The CC0 set the vehicle signs are traced from has no Bereitstellungsraum sign, so I drew it as the Grundzeichen "Stelle, Einrichtung" with "BR" inside. Please check it against the DV 102 sheet; if the sign there differs, it is one method (DrawStelle).

Screenshots

Lagekarte at z16 on the installed FFB Kartenpaket (OSM, DGM5), Hydranten off for readability. Units and names are fictional.

Before (origin/main): a vehicle had to stand in for the Bereitstellungsraum.
Before

After: BR Süd from the Organisation, with its Standort and Rufname in the list; BR Nord is not placed yet.
After

Test evidence

  • make clean ci: every assembly passed — Acceptance 3237, AppLogic 1211, Persistence 858, Domain 1133, Sync 334, App 141, Documents 72, Osm 27. Sync.Hosting hit the known machine-wide "inotify instances (128)" limit (114 failures). Rerun alone with DOTNET_USE_POLLING_FILE_WATCHER=true: 264 of 264 passed.
  • After the mutation follow-up tests: targeted AppLogic Lagekarte 127 passed, Domain Bereitstellungsraum 13 passed.
  • make format-check: clean.
  • make codeql: 0 results on changed lines (one cs/useless-assignment-to-local in a test was fixed before push).
  • make mutate SINCE=origin/main BREAK=80, changed lines: Domain 100 % (19/19), Persistence 100 % (31/31), Sync 100 % (2/2), AppLogic 100 % (53/53).

🤖 Generated with Claude Code

…the map

A Bereitstellungsraum recorded in the Organisation tab can now be put on
the Lagekarte. The map stores only where it stands (CommandNode.Position
and LabelOffset); its name comes from the node on every refresh, so a
rename in the Organisation renames the sign, and a tap on the pin, the
sign or the pencil in the side list opens the Organisation's own
CommandNodeDialog for it. A dissolved node drops off the map.

- Domain: Incident.PlaceCommandNode / MoveCommandNodeLabel, only for a
  live Bereitstellung, with an ETB line on placing and removing.
- Persistence: migration V46 adds command_nodes.position_lat/lon and
  label_dx/dy, declared in SchemaGuard; repository and snapshot carry them.
- Sync: placeCommandNode and moveCommandNodeLabel; a host at 43 cannot
  read them, so ProtocolVersion and MinimumProtocolVersion rise to 44.
- Lagekarte: a BEREITSTELLUNGSRÄUME group in the side list (place, edit,
  show, remove with confirmation) and a red "Stelle" circle marked BR.

Fixes #966

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8d1296a and c4f145e.

Files selected for processing: 28

  • changelog.d/+lagekarte-bereitstellungsraum.added.md
  • src/LageBuch.App.Shared/Controls/TacticalSignControl.cs
  • src/LageBuch.App.Shared/Views/LagekarteView.axaml
  • src/LageBuch.AppLogic/LocalIncidentSession.cs
  • src/LageBuch.AppLogic/ViewModels/IncidentWorkspaceViewModel.cs
  • src/LageBuch.AppLogic/ViewModels/LagekarteViewModel.cs
  • src/LageBuch.Domain/Incident.cs
  • src/LageBuch.Domain/Leadership/CommandNode.cs
  • src/LageBuch.Domain/Leadership/CommandNodeRepair.cs
  • src/LageBuch.Persistence/IncidentRepository.cs
  • src/LageBuch.Persistence/Sqlite/Migrations.cs
  • src/LageBuch.Persistence/Sqlite/SchemaGuard.cs
  • src/LageBuch.Sync/CommandApplier.cs
  • src/LageBuch.Sync/IIncidentSession.cs
  • src/LageBuch.Sync/IncidentSnapshot.cs
  • src/LageBuch.Sync/RemoteIncidentSession.cs
  • src/LageBuch.Sync/SnapshotMapper.cs
  • src/LageBuch.Sync/SyncCommand.cs
  • src/LageBuch.Sync/SyncProtocol.cs
  • tests/LageBuch.Acceptance.Tests/LagekarteRenderTests.cs
  • tests/LageBuch.AppLogic.Tests/CoMessprotokollViewModelTests.cs
  • tests/LageBuch.AppLogic.Tests/LagekarteBereitstellungTests.cs
  • tests/LageBuch.Domain.Tests/BereitstellungsraumLagekarteTests.cs
  • tests/LageBuch.Persistence.Tests/LagekarteRoundTripTests.cs
  • tests/LageBuch.Persistence.Tests/MigrationsTests.cs
  • tests/LageBuch.Sync.Tests/CommandSerializationTests.cs
  • tests/LageBuch.Sync.Tests/LagekarteSyncTests.cs
  • tests/LageBuch.Sync.Tests/VersionHandshakeTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

Lagekarte: add a Bereitstellungsraum symbol linked to the Organisation tab

1 participant