Skip to content

feat(lagemeldung): offer the "::" Textbausteine in the free-text fields - #985

Open
DeepDiver1975 wants to merge 1 commit into
mainfrom
feat/962-lagemeldung-textbausteine
Open

DeepDiver1975 wants to merge 1 commit into
mainfrom
feat/962-lagemeldung-textbausteine

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The :: Textbausteine now work in the Lagemeldung, as they do in the ETB and the Aufgaben.

What changed and why

  • SituationReportsView.axaml: Lage, Durchgeführte Maßnahmen, Eingesetzte Einheiten and Nachforderungen get b:SnippetCompletion.Snippets="{Binding TextSnippets}", which is the same attached behaviour the ETB composer uses.
  • SituationReportsViewModel takes an optional IReadOnlyList<TextSnippet> textSnippets (defaults to empty, like callSigns/addresses) and exposes it as TextSnippets.
  • IncidentWorkspaceViewModel passes Etb.TextSnippets. A sent Lagemeldung becomes an ETB entry, so the fields offer the snippets ticked für ETB. This reuses the ETB's ForEtb list directly instead of filtering a second time, and it needs no new Stammdaten flag.
  • Stammdaten refresh works as it does for the ETB. Both lists are built in the same workspace rebuild from the same MasterDataSet, so they cannot differ.
  • Enter and LostFocus: the Lagemeldung has no Enter-submit, so while the list is open, Enter belongs to SnippetCompletion (its tunnel handler marks it handled). The expansion sets TextBox.Text, the two-way binding updates the VM property, and FunkspruchPreview follows it. Leaving the field writes the draft through the existing LostFocus commit. An expansion that pushes a field past its 600-character cap shows the existing German Error. It is not thrown.

Not covered: Meldender (ReporterBox) and Einsatzstelle (LocationBox) are AutoCompleteBoxes with their own suggestion lists. SnippetCompletion attaches to a TextBox only, so those two fields are unchanged. A comment in the view says so.

Screenshots

Typing Schuppen, ::fu into Lage (fictional data):

Before After
Before: no list After: the Textbausteine list above the Lage field

Tests

  • SituationReportsViewModelTests.The_lage_fields_offer_the_textbausteine_they_are_given_and_none_without
  • IncidentWorkspaceViewModelTests.The_lagemeldung_offers_the_textbausteine_ticked_for_the_etb checks that only the ForEtb snippets are offered, the same list as Etb.TextSnippets.
  • SituationReportSnippetTests (headless, typed keys):
    • each of the four fields offers the ETB Textbausteine on ::fu, and not the Aufgaben-only one;
    • Enter expands the snippet, closes the list, keeps focus, leaves the report unsent and adds no ETB entry;
    • the expanded text is in the Funkspruch preview, and after Tab it is in the stored draft.

All of them failed before the change for the expected reason: a missing property, or no list offered.

Evidence (local)

  • make clean ci: every assembly reports Test Run Successful, 0 warnings and 0 errors (Acceptance 1138/1138, AppLogic 3229/3229).
  • make format-check: clean.
  • make codeql: 0 results on changed lines, 0 elsewhere.
  • make mutate PROJECT=AppLogic SINCE=origin/main: 100 % on changed lines (2 of 2 mutants killed).

Fixes #962

🤖 Generated with Claude Code

Lage, Maßnahmen, Einheiten and Nachforderungen now take the same
SnippetCompletion behaviour as the ETB composer. A sent Lagemeldung becomes
an ETB entry, so the fields offer the ETB's list: the workspace hands
SituationReportsViewModel the Etb view model's ForEtb-filtered TextSnippets,
built at the same moment from the same Stammdaten.

Meldender and Einsatzstelle are AutoCompleteBoxes; SnippetCompletion attaches
to a TextBox only, so they stay as they are.

Fixes #962

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 24 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 ebf9cd4.

Files selected for processing: 7

  • changelog.d/+lagemeldung-textbausteine.added.md
  • src/LageBuch.App.Shared/Views/SituationReportsView.axaml
  • src/LageBuch.AppLogic/ViewModels/IncidentWorkspaceViewModel.cs
  • src/LageBuch.AppLogic/ViewModels/SituationReportsViewModel.cs
  • tests/LageBuch.Acceptance.Tests/SituationReportSnippetTests.cs
  • tests/LageBuch.AppLogic.Tests/IncidentWorkspaceViewModelTests.cs
  • tests/LageBuch.AppLogic.Tests/SituationReportsViewModelTests.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.

Lagemeldung: support the "::" text shortcuts in all fields

1 participant