feat(ui): planning sessions UI (Plan C) #5

Merged
mikakuns merged 9 commits from feat/planning-sessions-ui into main 2026-04-23 17:38:09 +00:00
Owner

Summary

Wires the planning-session feature into the UI (Plan C of the planning-sessions design).

  • TaskRowViewModel gains hierarchy flags (ParentTaskId, IsChild, IsPlanningParent, IsExpanded, PlanningBadge, IsDraft) and context-menu gates (CanOpenPlanningSession, CanResumeOrDiscardPlanning).
  • TasksIslandViewModel gets five [RelayCommand] methods (Open/Resume/Discard/Finalize/ToggleExpand) and a hierarchy-aware Regroup() that interleaves children after their planning parent when expanded.
  • WorkerClient adds five hub-method wrappers (StartPlanningSessionAsync, ResumePlanningSessionAsync, DiscardPlanningSessionAsync, FinalizePlanningSessionAsync, GetPendingDraftCountAsync) plus DTOs. Hub method names are string-based, so no build-time dependency on Plan B.
  • TaskRowView grows an indent column, chevron toggle, DRAFT/PLANNING badges, and italic/faded styling for drafts.
  • New UnfinishedPlanningModal (Resume / Finalize now / Discard / Cancel) triggers when the user right-clicks a Planning parent.
  • Delete-with-children now surfaces a friendly error dialog instead of bubbling a DbUpdateException.

Test plan

  • dotnet build for Worker / Ui / App — clean
  • 4 new TaskRowViewModelPlanningTests + 4 new TasksIslandViewModelPlanningTests — 8/8 pass
  • Pre-existing suite state preserved (73 pass / 86 pre-existing no such table: lists failures unchanged, predating Plan C)
  • End-to-end manual smoke (requires Plan B merged): create Manual task -> Open planning Session -> drafts appear under parent -> finalize -> drafts become Manual/Queued; right-click Planning task -> modal -> Resume/Finalize/Discard; delete parent with children -> friendly error.

Known followups (non-blocking, tracked in docs/open.md)

  • Border.badge.planned style defined but unreachable -- Planned status renders with the amber planning class. Either make TaskRowView swap Classes.planned when Status == Planned, or remove the unused style + brush.
  • Dead Instance statics on BoolToItalicConverter / BoolToDraftOpacityConverter.
  • Regroup() covers OverdueItems/OpenItems/CompletedItems correctly, but a Planning parent that lands in OverdueItems will be visually separated from its draft children (which go to OpenItems). Deterministic; spec is silent on this corner.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

## Summary Wires the planning-session feature into the UI (Plan C of the planning-sessions design). - `TaskRowViewModel` gains hierarchy flags (`ParentTaskId`, `IsChild`, `IsPlanningParent`, `IsExpanded`, `PlanningBadge`, `IsDraft`) and context-menu gates (`CanOpenPlanningSession`, `CanResumeOrDiscardPlanning`). - `TasksIslandViewModel` gets five `[RelayCommand]` methods (Open/Resume/Discard/Finalize/ToggleExpand) and a hierarchy-aware `Regroup()` that interleaves children after their planning parent when expanded. - `WorkerClient` adds five hub-method wrappers (`StartPlanningSessionAsync`, `ResumePlanningSessionAsync`, `DiscardPlanningSessionAsync`, `FinalizePlanningSessionAsync`, `GetPendingDraftCountAsync`) plus DTOs. Hub method names are string-based, so no build-time dependency on Plan B. - `TaskRowView` grows an indent column, chevron toggle, DRAFT/PLANNING badges, and italic/faded styling for drafts. - New `UnfinishedPlanningModal` (Resume / Finalize now / Discard / Cancel) triggers when the user right-clicks a Planning parent. - Delete-with-children now surfaces a friendly error dialog instead of bubbling a `DbUpdateException`. ## Test plan - [x] `dotnet build` for Worker / Ui / App — clean - [x] 4 new `TaskRowViewModelPlanningTests` + 4 new `TasksIslandViewModelPlanningTests` — 8/8 pass - [x] Pre-existing suite state preserved (73 pass / 86 pre-existing `no such table: lists` failures unchanged, predating Plan C) - [ ] End-to-end manual smoke (requires Plan B merged): create Manual task -> Open planning Session -> drafts appear under parent -> finalize -> drafts become Manual/Queued; right-click Planning task -> modal -> Resume/Finalize/Discard; delete parent with children -> friendly error. ## Known followups (non-blocking, tracked in docs/open.md) - `Border.badge.planned` style defined but unreachable -- Planned status renders with the amber `planning` class. Either make `TaskRowView` swap `Classes.planned` when `Status == Planned`, or remove the unused style + brush. - Dead `Instance` statics on `BoolToItalicConverter` / `BoolToDraftOpacityConverter`. - `Regroup()` covers `OverdueItems`/`OpenItems`/`CompletedItems` correctly, but a Planning parent that lands in `OverdueItems` will be visually separated from its draft children (which go to `OpenItems`). Deterministic; spec is silent on this corner. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
claude added 9 commits 2026-04-23 17:36:24 +00:00
Adds ParentTaskId, IsExpanded, IsChild, IsPlanningParent, IsDraft, and
PlanningBadge to TaskRowViewModel with property-changed notifications.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add IWorkerClient interface; WorkerClient implements it
- TasksIslandViewModel accepts IWorkerClient? and gains OpenPlanningSession,
  ResumePlanningSession, DiscardPlanningSession, FinalizePlanningSession,
  and ToggleExpand commands
- Regroup() is hierarchy-aware: children of collapsed planning parents are hidden
- InternalsVisibleTo ClaudeDo.Worker.Tests for Regroup()
- 4 new unit tests covering collapse/expand and guard logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mikakuns merged commit 993851009b into main 2026-04-23 17:38:09 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: releases/ClaudeDo#5