Skip to content

aufgaben: edit capability missing #246

Closed

Description

@DeepDiver1975

Version

main

Platform

Linux

Steps to reproduce

  1. create a task
  2. see a typo or want to change the assignee of a task
  3. doomed

Expected behaviour

allow to change fields:

  • wichtigkeit
  • dringlichkeit
  • zugeteilt (better name: Zugeteilt an)
  • aufgabe
  • add 5min to timer

Actual behaviour

all readonly

Screenshots / files

No response

Activity

  1. DeepDiver1975 commented on Sep 6, 2026

    @DeepDiver1975
    ContributorAuthor

    @claude analyse and propose a solution

  2. claude commented on Sep 6, 2026

    @claude

    Claude finished @DeepDiver1975's task in 1m 44s —— View job


    Analysis: Aufgaben (tasks) editing

    Todo list

    • Gather context: understand Aufgaben (tasks) view/model architecture
    • Understand the request: which fields need to become editable
    • Assess complexity and propose a solution
    • Report findings/plan in this comment

    Root cause

    TasksView.axaml renders every AUFGABEN column as read-only:

    • WICHTIGKEIT, DRINGL., TIMER, AUFGABE are DataGridTemplateColumns with IsReadOnly="True" and plain TextBlocks (src/LageBuch.App.Shared/Views/TasksView.axaml:95-134).
    • ZUGETEILT is a DataGridTextColumn also marked IsReadOnly="True" (line 123).
    • Only the checkbox (IsDone) is two-way bound.

    There's also no domain support for editing: Incident.AddTask (src/LageBuch.Domain/Incident.cs:825) and Incident.SetTaskCompleted (line 857) are the only mutators — there's no "update task fields" or "extend due time" method, and no sync command for either.

    Proposed solution

    Follow the existing Forces tab pattern (ForcesViewModel/ForcesView.axaml), which already does inline, always-editable DataGrid rows gated by IsEnabled="{Binding !IsReadOnly}", pushing changes back through a callback into the session on each change:

    1. Domain (IncidentTask.cs / Incident.cs)

      • Add IncidentTask.With(text, assignee, importance, urgency) wither.
      • Add Incident.UpdateTask(Guid taskId, string text, string? assignee, TaskImportance importance, TaskUrgency urgency, ...), validated like AddTask (enum range checks, text length/non-empty).
      • Add Incident.ExtendTaskTimer(Guid taskId, int minutes) for the "+5 min" action, extending DueAt (needs a decision on behavior when DueAt == DateTimeOffset.MaxValue, i.e. a task created with no timer — likely disable the button in that case).
    2. Sync surface

      • New UpdateTaskCommand / ExtendTaskTimerCommand records in SyncCommand.cs (with [JsonDerivedType] entries), handled in CommandApplier.cs.
      • New IIncidentSession.UpdateTask(...) / ExtendTaskTimer(...) methods, implemented in LocalIncidentSession (mutate + save) and RemoteIncidentSession (send command).
      • No SQLite migration needed — Text/Assignee/Importance/Urgency/DueAt are already persisted columns; editing just changes values already round-tripped through Rehydrate.
    3. ViewModel (TaskRow in TasksViewModel.cs)

      • Turn Text, Assignee, Importance, Urgency into [ObservableProperty]s with partial void On...Changed handlers that push through the session (mirroring TaskRow.OnIsDoneChanged / ForceUnitRow's _onEdited/_onStrengthEdited).
      • Add an ExtendTimerCommand (+5 min button per row).
    4. View (TasksView.axaml)

      • Replace the static TextBlocks for WICHTIGKEIT/DRINGLICHKEIT with the same ComboBox used in the input dock / TaskDialogView.
      • Replace ZUGETEILT's read-only text column with an AutoCompleteBox (same AssigneeOptions).
      • Make AUFGABE an editable TextBox.
      • Add a small "+5" button next to the TIMER column, disabled once a task has no active due time or is completed.
      • Drop the grid's blanket IsReadOnly="{Binding IsReadOnly}" in favor of per-control IsEnabled="{Binding !IsReadOnly}", as Forces does.

    Open design question worth confirming before implementing

    Incident.AddTask is documented as deliberately silent — "tasks are work management, not the operational log" (Incident.cs:818-824), unlike EditRolePhone/UpdateForceUnit, which log a correction line to the ETB. I'd default edits to stay silent too (consistent with AddTask/RenameFile), but since this issue is explicitly about correcting task data (typos, reassignment), it's worth confirming whether a silent correction is acceptable or whether an audit trail is wanted here.

    Complexity assessment

    This touches 7 files across 4 layers (domain, sync commands/applier, both IIncidentSession implementations, ViewModel, view) plus new tests (domain, CommandApplier round-trip, ViewModel) and a screenshot per this repo's PR requirements (AGENTS.md) — a complex change, not a one-file fix. Given the trigger comment asked for analysis rather than a straight implementation, I've stopped at the design here. Let me know if you'd like me to go ahead and implement it (and to confirm the silent-vs-logged question above) and I'll open a PR.

  3. DeepDiver1975 commented on Sep 6, 2026

    @DeepDiver1975
    ContributorAuthor

    @claude open pr

  4. claude commented on Sep 6, 2026

    @claude

    Claude finished @DeepDiver1975's task in 10m 6s —— View job • claude/issue-246-20260906-2137 • Create PR ➔


    Done — implementation pushed, build/test verification not possible in this sandbox

    Implemented edit capability for Aufgaben (tasks), following the design from the earlier analysis comment (Forces-tab pattern: inline always-editable DataGrid rows).

    Todo list

    • Gather context / re-confirm architecture
    • Domain: IncidentTask.WithDetails(...)/WithExtendedTimer(...) + Incident.UpdateTask(...) + Incident.ExtendTaskTimer(...) (silent, matching AddTask's "tasks aren't ETB events" precedent)
    • Sync: UpdateTaskCommand / ExtendTaskTimerCommand (no operator on the wire, silent) + CommandApplier handling
    • IIncidentSession.UpdateTask/ExtendTaskTimer implemented in LocalIncidentSession and RemoteIncidentSession
    • ViewModel: TaskRow.Text/Assignee/Importance/Urgency are now [ObservableProperty]s that write through on change (mirrors ForceRow); added ExtendTimerCommand (+5 min, disabled once done or for a task created without a timer)
    • View: WICHTIG/DRINGL. are now ComboBoxes, ZUGETEILT an AutoCompleteBox, AUFGABE an editable TextBox, TIMER gets a "+5" button
    • Tests: domain (IncidentTaskAggregateTests), sync (CommandApplierTests, CommandSerializationTests, WorkspaceCollaborationTests host↔client round trip), session (LocalSessionTaskTests), ViewModel (TasksViewModelTests)
    • Build & run tests — blocked: dotnet build/dotnet test (and even dotnet --version, python3) require approval in this sandboxed job and there's no one to approve it non-interactively. I reviewed every diff by hand instead (signatures, tag balancing in the .axaml, unused-variable checks against this repo's TreatWarningsAsErrors/AnalysisMode=All), but this is not a substitute for an actual compile+test run.
    • Screenshots — blocked for the same reason: the render harness (WorkspaceRenderHelper/TasksTabRenderTests) needs dotnet test to run.
    • Commit, push

    If you can grant this job's tooling dotnet build/dotnet test permissions (or point me at how to update --allowedTools), I can come back and run the suite plus capture the required before/after screenshots per AGENTS.md. Otherwise, please run dotnet test locally before merging — happy to fix anything that surfaces.

    Design note carried over from the analysis: edits stay silent (no ETB line), consistent with AddTask/RenameFile; only a KeyNotFoundException/ArgumentException on bad input, same as the existing task mutators.

  5. DeepDiver1975 commented on Sep 11, 2026

    @DeepDiver1975
    ContributorAuthor

    Reopened — closed by accident. PR #309 (the v0.5.0 changelog prep) described #255 as "closes #246" in its body, and GitHub took that as a closing keyword on merge. #255 is still open and deferred to 0.5.1; this bug is not fixed yet.

  6. added 4 commits that reference this issue on Sep 18, 2026
    899b965
    27f60eb
    09627ef
    c7effdc
  7. DeepDiver1975 commented on Oct 1, 2026

    @DeepDiver1975
    ContributorAuthor

    Planning note: this stays in v0.8, but as its own item rather than a child of the keyboard epic #545. It is a field bug in its own right.

    • feat(lists): row keys in grids and lists — Enter/F2, Del with confirm, Space #543's Enter/F2 on Aufgaben calls this edit, so it should land early in the milestone.
    • Editing a task crosses the wire as a new SyncCommand; today only addTask and setTaskCompleted exist (src/LageBuch.Sync/SyncCommand.cs:41-42). A peer at the floor cannot handle a new command, so this has to raise MinimumProtocolVersion (currently 4, see AGENTS.md, Sync protocol version). Every device in a fleet then needs the update, which belongs in the release notes.
  8. added 2 commits that reference this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions