Skip to content

feat(aufgaben): set the time until the reminder directly - #988

Open
DeepDiver1975 wants to merge 2 commits into
mainfrom
feat/964-aufgaben-set-reminder-time
Open

DeepDiver1975 wants to merge 2 commits into
mainfrom
feat/964-aufgaben-set-reminder-time

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The time until an Aufgabe's reminder can now be typed straight into the edit panel. Before, it could only be moved with "+5 MIN": moving it by 30 minutes took six clicks, and it could not be shortened at all.

Fixes #964

What changed

  • Edit panel (TasksView.axaml): the TIMER (MIN) field now has a minutes box and a SETZEN button between the countdown and "+5 MIN", which stays. The box opens on the minutes left, rounded up. It is empty when the Aufgabe has no timer or the timer has run out. SETZEN or Enter in the box applies the time at once and keeps the panel open, as +5 MIN does. If the box was changed, SPEICHERN applies the time too, so a typed time is never lost when the panel closes. An empty or out-of-range value shows "Minuten bis zur Erinnerung eintragen (1 bis 1440)" in the panel's error line and changes nothing. I replaced the old comment that said the timer was deliberately not a field.
  • Domain: IncidentTask.WithTimer(minutesFromNow, now) and Incident.SetTaskTimer(taskId, minutes, clock). The due time becomes now + minutes, which can be shorter or longer than before, and an Aufgabe without a timer gets one. A done Aufgabe throws. Minutes outside 1..IncidentTask.MaxTimerMinutes (1440, one day) throw with a German message, which a joined client shows as the host's reason. The TIMER field used when creating an Aufgabe has no upper cap, so this cap is new and applies only to setting the time. Like ExtendTaskTimer, this writes no ETB line. The due alarm needs no reset: TasksViewModel drops a task from its announced set as soon as it is no longer overdue, so it sounds again when the new time is reached.
  • Sync: SetTaskTimerCommand(TaskId, Minutes) (setTaskTimer) sends minutes, not an absolute time, so the host stamps the due time with its own clock. It is wired through the [JsonDerivedType] allowlist, CommandApplier, IIncidentSession, LocalIncidentSession and RemoteIncidentSession.
  • Protocol 44: a client may now send a command a host at 43 does not know, so ProtocolVersion and MinimumProtocolVersion both rise to 44. LegacyProtocolVersion (1) stays below the floor. The pins for 41–43 in VersionHandshakeTests asserted a floor of 40, so they now only assert floor ≤ protocol, which is how the older "not the floor" pins are written. If another PR takes protocol 44 first, renumber this one above main before merging.
  • TaskRow.HasTimer is now observable and refreshed in Update, so "+5 MIN" turns on once SETZEN has given a timerless Aufgabe its first timer.

Screenshots

Before:

Before: Aufgabe bearbeiten

After (desktop, and the shared view at phone width):

After: Aufgabe bearbeiten

After: Aufgabe bearbeiten, phone

Tests

  • Domain: shorter, longer, overdue, no timer, done → throws, 0 / negative / above the cap → throws, the cap itself accepted, unknown id, closed incident.
  • Sync: serialization round trip, applier with the host clock, a negative minute count from a peer refused, protocol pin at 44/44.
  • WorkspaceCollaborationTests: a client sets 30 min and host and client both converge on the host's clock + 30.
  • VM (TaskEditingTests): prefill rounded up, empty prefill without a timer or when overdue, SETZEN shorter and longer, a timerless task gets one, validation message, SPEICHERN applies a typed time, SPEICHERN leaves an untouched box alone, invalid typed minutes keep the panel open, +5 MIN updates the box.
  • Acceptance: typing 30 + Enter in EditTimerBox sets the reminder ("noch 30:00") and keeps the panel open.

Evidence

  • make clean ci: 0 warnings, 0 errors, no Test Run Failed; every assembly passed (Acceptance 1133, AppLogic 3240, …).
  • make format-check: clean.
  • make codeql: 0 results on changed lines, 0 elsewhere.
  • make mutate SINCE=origin/main BREAK=80, changed lines: Domain 100 % (17/17), Sync 100 % (1/1), AppLogic 87.5 % (42/48). Domain first scored 76.5 %, so the second commit adds boundary and message tests.

🤖 Generated with Claude Code

The Aufgabe edit panel takes the minutes until the reminder in a box
next to "+5 MIN" and applies them with SETZEN (or Enter, or SPEICHERN
when the box was changed). The new time replaces the old one, shorter
or longer, and also gives a timer to an Aufgabe that had none. The box
opens on the minutes left, rounded up.

- Domain: IncidentTask.WithTimer and Incident.SetTaskTimer, 1 to 1440
  minutes counted from now; a done Aufgabe refuses.
- Sync: SetTaskTimerCommand carries minutes, so the host stamps the due
  time with its own clock. A host at 43 does not know the command, so
  ProtocolVersion and MinimumProtocolVersion both rise to 44.
- TaskRow.HasTimer follows the task, so +5 MIN turns on once SETZEN has
  given a task its first timer.

Fixes #964

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 17 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 2d7acf3.

Files selected for processing: 21

  • changelog.d/+aufgaben-set-reminder-time.added.md
  • src/LageBuch.App.Shared/Views/TasksView.axaml
  • src/LageBuch.AppLogic/LocalIncidentSession.cs
  • src/LageBuch.AppLogic/ViewModels/TasksViewModel.cs
  • src/LageBuch.AppLogic/ViewModels/ValidationMessages.cs
  • src/LageBuch.Domain/Incident.cs
  • src/LageBuch.Domain/Tasks/IncidentTask.cs
  • src/LageBuch.Sync/CommandApplier.cs
  • src/LageBuch.Sync/IIncidentSession.cs
  • src/LageBuch.Sync/RemoteIncidentSession.cs
  • src/LageBuch.Sync/SyncCommand.cs
  • src/LageBuch.Sync/SyncProtocol.cs
  • tests/LageBuch.Acceptance.Tests/TasksTabRenderTests.cs
  • tests/LageBuch.AppLogic.Tests/CoMessprotokollViewModelTests.cs
  • tests/LageBuch.AppLogic.Tests/LocalSessionTaskTests.cs
  • tests/LageBuch.AppLogic.Tests/TaskEditingTests.cs
  • tests/LageBuch.Domain.Tests/IncidentTaskAggregateTests.cs
  • tests/LageBuch.Sync.Hosting.Tests/WorkspaceCollaborationTests.cs
  • tests/LageBuch.Sync.Tests/CommandApplierTests.cs
  • tests/LageBuch.Sync.Tests/CommandSerializationTests.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

Kills the surviving mutants the diff mutation run found on the new
SetTaskTimer lines: the one-minute and cap boundaries, the exactly-due
prefill, and the German refusal messages a joined client reads.

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

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.

Aufgaben: allow entering the time until the reminder directly

1 participant