Repository navigation
feat(etb): file entries under an Einsatzabschnitt and filter by it - #992
Open
DeepDiver1975 wants to merge 2 commits into
Open
DeepDiver1975 wants to merge 2 commits into
DeepDiver1975 wants to merge 2 commits into
Conversation
An ETB entry can now be assigned to a live Abschnitt or Unterabschnitt: from a sticky chip strip in the entry line, or from an Abschnitt picker in the edit panel that also changes or removes it. A quick filter above the table shows one Abschnitt at a time and combines with "Nur Lagemeldungen" and "Systemmeldungen ausblenden". Filed rows carry a badge in the grid and the phone cards, and the PDF prints the Abschnitt above the entry text. The entry stores the Abschnitt by id (for the filter) and by the label it had when filed (for display), so it reads the same after a rename or a dissolve. App-written entries, Bereitstellungen, partner Einsatzleitungen and dissolved nodes are refused; every change writes a System line. Migration V46 adds etb_entries.section_id/section_name. A client may now send assignJournalEntrySection and addJournalEntry carries an optional sectionId, so ProtocolVersion and MinimumProtocolVersion rise to 44. Fixes #971 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…d trip Kills the surviving mutants of the diff mutation run on the ETB view model's Abschnitt strips and edit picker, covers a joined device filing and moving an entry through the host, and records why the remote session's AddJournalEntry is not mutated by the Sync project's run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Contributor
|
Warning Review limit reachedYou'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 9 minutes. View limit details
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ETB entries can now be filed under an Einsatzabschnitt and the ETB filtered by it.
ABSCHNITTstrip with one chip per live Abschnitt and Unterabschnitt, in the Organisation's order. Nothing is chosen at first. The strip is hidden while the incident has none, and it wraps on a phone. The choice is sticky: it stays lit for the next entry, and tapping it again clears it. Radio traffic from one Abschnitt comes in runs, and the lit chip sits right above the field, so the choice is always in view. VON stays non-sticky, because a leftover sender has no such sign.ABSCHNITTpicker (the sharedNodeChoicePicker, including "— nicht zugeordnet —") to set, change or remove the Abschnitt. SPEICHERN writes it. When the entry's Abschnitt has since been dissolved, the picker still shows it under its stored name.IsVisible.EtbSection. A sixth column would have squeezed every row for the few that carry one.How it is stored
As the issue asks, the Abschnitt is stored as a value on the entry.
EtbEntrygainsSectionIdandSectionName:SectionIdis what the filter matches, so a rename does not split the filter.SectionNameis theIncident.NodeLabelat the moment of assignment (e.g. "Süd / Tiefgarage"), so the entry still reads as it did after a rename or dissolve. A test pins this.Domain rules:
Incident.AddJournalEntrytakes an optionalsectionId.Incident.AssignJournalEntrySection(clock, op, entryId, Guid?)sets, changes or removes the Abschnitt. It writes a System line ("ETB-Eintrag 14:00 → Süd" / "…: Abschnitt aufgehoben (vorher Nord)") and is a no-op when nothing changes.Versions — rebase/renumber needed
etb_entries.section_idandsection_name, both nullable. Also added toSchemaGuard.ExpectedColumns.AddJournalEntryCommandgets a defaultedSectionId = null, so an older client's entry is simply filed nowhere.assignJournalEntrySectioncommand means a host at 43 cannot deserialize it, so the floor rises too.VersionHandshakeTestspins for 41–43 are loosened to floor ≤ protocol.The overlapping open PRs #988, #989 and #990 all branch from
main, and this PR is not stacked on any of them. Whichever lands first, this one has to be rebased afterwards:EtbViewModel/EtbView(feat(etb): hide Messwerte by default and export them in a Messungen PDF section #989's Messwerte filter inIsVisibleand the header; feat(etb): foldable notes on user-written entries #990's notes in the edit panel),EtbEntry(feat(etb): foldable notes on user-written entries #990's Notes),Migrations/SchemaGuard,SyncProtocol/VersionHandshakeTests.Screenshots
Before (
origin/main): no Abschnitt anywhere in the ETB.After: quick filter "Alle", badges on the filed rows, entry strip in the dock.
After: quick filter on "Süd".
After: edit panel with the Abschnitt picker, entry strip with "Nord" chosen (sticky).
Tests
EtbSectionAssignmentTests): add and assign rules, refused kinds, app-written entries refused, no-op, System line text, a rename or dissolve keeps the stored name, a text edit keeps the Abschnitt, closed incident,Rehydrate.SchemaReconciliationTestsgreen.addJournalEntrywithoutsectionIdfrom an old client;WorkspaceCollaborationTests.EtbSectionViewModelTests): strip contents, sticky choice and toggling it off, a dissolved Abschnitt leaving the strip, filter combinations with both checkboxes, a dissolved Abschnitt in the filter, edit picker set/change/remove, an assignment from elsewhere.EtbSectionStripTests): strips hidden without Abschnitte, a chip files the entry and the grid shows the badge, the quick filter narrows the grid, the edit picker is shown. WithRENDER_OUTset, it also writes the screenshots above.Evidence
make clean ci: every assembly passed exceptLageBuch.Sync.Hosting.Tests, where 59 tests failed with the known local "inotify instances (128)" limit. Rerun alone withDOTNET_hostBuilder__reloadConfigOnChange=false: 264/264 passed. The follow-up test commit's new tests were also run on their own: Domain 19/19, AppLogic 19/19, WorkspaceCollaboration 20/20.make format-check: clean.make codeql: 0 results on lines changed sinceorigin/main.make mutate SINCE=origin/main BREAK=80(score on changed lines):The remote session's
AddJournalEntrystatement carries aStryker disable once, because only Sync.Hosting.Tests drive it, as withAddChecklist. It is covered there by a new host/client round trip.Fixes #971
🤖 Generated with Claude Code