Commit Graph

7 Commits

Author SHA1 Message Date
Mika Kuns
eb7c1ebf69 style(ui): redesign task rows with checkboxes, inline add field, remove toolbar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 10:29:44 +02:00
Mika Kuns
981b8e4a3d fix(ui): make list and task rows fully hit-testable for clicks
Add Background="Transparent" and HorizontalAlignment="Stretch" to the
DataTemplate roots in MainWindow.axaml and TaskListView.axaml so that
DoubleTapped, PointerPressed and ContextFlyout fire reliably across the
entire row surface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:41:23 +02:00
Mika Kuns
7838f081dd refactor(ui): harden context menu event handling and simplify bindings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:16:09 +02:00
Mika Kuns
5d5a583af0 fix(ui): context menu operates on right-clicked item and gates new-task on list selection
- Add PointerPressed handlers on list/task item templates that set SelectedList/SelectedTask on right-click before the ContextFlyout opens
- Add CanAddTask guard and NotifyCanExecuteChangedFor on CurrentListId so Add Task menu item is disabled when no list is selected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:11:34 +02:00
Mika Kuns
3653dcad01 feat(ui): add context menus for lists and tasks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:07:14 +02:00
Mika Kuns
db5a447b12 feat(ui): open editor on double-click for lists and tasks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 14:57:20 +02:00
Mika Kuns
48e4aabeb1 feat(ui): wire avalonia desktop ui to data and worker
App: build a ServiceProvider in Program.cs (AppSettings, SqliteConnectionFactory,
all repositories, GitService, WorkerClient, all view-models), apply schema, then
hand control to Avalonia. App.OnFrameworkInitializationCompleted resolves
MainWindowViewModel from the container.

Ui:
- AppSettings POCO loaded from ~/.todo-app/ui.config.json (db path, hub url).
- WorkerClient wraps HubConnection with auto-reconnect, exposes IsConnected and
  ActiveTasks plus C# events for TaskStarted/Finished/Message/Updated and
  WorktreeUpdated; all inbound events are marshalled to the UI thread.
- ViewModels: MainWindow (lists CRUD via ListEditor dialog), TaskList (load by
  list, add/edit/delete, auto WakeQueue on agent+queued create), TaskItem
  (RunNow gated on connection + status), TaskDetail (description, result, live
  ndjson rolling buffer of 500 lines, worktree branch/diff with merge/keep/
  discard via GitService), StatusBar, ListEditor, TaskEditor.
- Views: 3-pane MainWindow (lists | tasks | detail) with GridSplitters, status
  bar, dialog windows for the editors. Status badges via StatusColorConverter.
- Markdown rendering, folder picker, delete-confirmation, settings dialog and
  scroll-to-bottom on the live log are intentionally TODO -- functional
  scaffold only.

Tests: also debounce the FIFO queue test (poll instead of Task.Delay(200)) so
the assertion isn't racy when the suite runs alongside the slower git tests.
38 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:01:03 +02:00