Compare commits

..
1 Commits
Author SHA1 Message Date
mika kuns 9f64ba5058 fix(ui): Mission Control oeffnen, wenn ein Handler-Run per MCP startet oder ein Handoff eintrifft
Changelog / changelog (push) Successful in 2s
Release / release (push) Successful in 41s
2026-09-02 22:04:33 +02:00
152 changed files with 876 additions and 6933 deletions
-176
View File
@@ -1,181 +1,5 @@
# Changelog # Changelog
## v2.15.0 — 2026-09-11
### Features
- Stash-Option fuer uncommittete Aenderungen im Ziel-Tree (251b70ce)
### Documentation
- update for v2.14.0 (8e2d37e6)
## v2.14.0 — 2026-09-10
### Features
- Listen und Ordner in einer gemischten Sidebar-Reihenfolge (bfb1c652)
- confirm before closing a running ConPTY session (eb623714)
- worker-menu Shutdown ends worker + app after confirm (1bdf2027)
- chain a normal parent's children on WaitingForChildren (d2648f96)
- localize WorkConsole, DescriptionStepsCard and the ROADBLOCK label (8e6f0d16)
- surface depends_on blocking in status chip, chain label, and detail pane (4cf601e4)
- Worker-Menü "Update Claude CLI" führt claude update aus (dbee4a0d)
- triage model picker (opus/fable) in the merge helper start modal (1177463a)
- collapsible folders for the list sidebar (25c9a619)
- list_folders table plus lists.folder_id (13e860f0)
### Fixes
- Import broadcastet TaskUpdated fuer neue Tasks (1770b677)
- ConnectedClientTracker in den externen MCP-Container teilen (3d09323e)
- de.json-Konsistenz-Pass und restliche harte EN-Strings (d6696c33)
- force English git output for locale-fragile stderr matches (5ecf6f75)
- make diff-stat parsing locale-safe and dedupe the two parsers (29ea18c4)
- report failed paste/drop in the interactive terminal (0cec0a77)
- surface worker connect/restart failures instead of no-opting (b4b62254)
- validate PowerUse window, explain effort and Prime Claude in Settings (951c2fe9)
- start_list_handler ehrlich machen, wenn keine App verbunden ist (451c0184)
- warn and block save when a list's working dir isn't a git repo (3348736e)
- show a banner when a ConPTY session dies after startup (256bea5f)
- merge duplicate top-level "checks" block in en/de.json (741f66fe)
- translate max_turns failure text to English (0fcfe7c5)
- route WeekReportService permission-mode through PermissionModeResolver (1c768529)
- report startup port conflicts instead of crashing silently (c9d4823f)
### Documentation
- record list folders in the Data and Ui CLAUDE.md (5477ae53)
- update for v2.13.6 (ec1e60be)
## v2.13.6 — 2026-09-07
### Features
- Home-Ordner als Sitzungsziel in Mission Control (f231f08a)
- Einfuegen und Datei-Drop im interaktiven Terminal (23491d3b)
- Cheat-Sheet-Fenster im Hilfe-Menue (0db9fade)
- PowerUse-Einstellungen nach Settings -> Ausfuehrung verschieben (7c7c33d6)
### Documentation
- update for v2.13.5 (c7392e08)
## v2.13.5 — 2026-09-03
### Fixes
- Version im About-Dialog aus der FileVersion lesen (cccfe2ec)
### Refactoring
- "Nach Updates suchen" ins Hilfe-Menue verschieben (c16c7b97)
### Documentation
- update for v2.13.4 (a8ec5507)
## v2.13.4 — 2026-09-03
### Fixes
- interaktive Session ohne Arbeitsverzeichnis im User-Verzeichnis starten (f70503d0)
### Documentation
- update for v2.13.3 (9360cd2f)
## v2.13.3 — 2026-09-03
### Fixes
- raise SignalR MaximumParallelInvocationsPerClient (e64d5705)
### Documentation
- update for v2.13.2 (fc25ee45)
## v2.13.2 — 2026-09-03
### Features
- Handler-Run per Knopf abbrechen (bd5aa265)
### Fixes
- strip CLAUDE_CODE_CHILD_SESSION/CLAUDECODE before every ConPTY launch (51ee5050)
- Dequeue-X auf blockierten Queue-Zeilen anzeigen und Kette konsistent halten (df3e7ba0)
- report and gate ListSettingsModal load failures instead of swallowing them (a1b20d9f)
- move ScrollViewer padding to inner content in modal bodies (e0c6b670)
- Mission Control oeffnen, wenn ein Handler-Run per MCP startet oder ein Handoff eintrifft (b05b6fba)
### Performance
- show list settings modal before its seven-round-trip load finishes (f24654df)
### Documentation
- remove stale session-skills empty-state entry (2bd48ea1)
- update for v2.13.1 (eb3aee41)
- update for v2.13.0 (2b873322)
## v2.13.1 — 2026-09-02
### Fixes
- Mission Control oeffnen, wenn ein Handler-Run per MCP startet oder ein Handoff eintrifft (9f64ba50)
## v2.13.0 — 2026-09-02
### Features
- Handler-Session vor dem Usage-Limit warnen und Handoff bis zum Reset zurueckhalten (fe818651)
- start_list_handler MCP-Tool startet einen List-Handler-Run wie der Button (c2166a0d)
- Handler-Session nach Usage-Limit-Reset automatisch neu starten (016b9203)
- PowerUse-Zeitfenster + Handoff-Schwellwert als Settings (69898be5)
- PowerUse-Toggle im Usage-Monitor, Opt-in pro Liste (19375254)
- PowerUse-Addendum an die Handler-Prompts, Cap aus den Settings (453d61ca)
- PowerUse-Flags und konfigurierbares Handoff-Budget (3cf9628f)
- depends_on als Menge statt Einzelfeld (c25732cf)
- surface the handoff round budget in the merge-helper handoff brief (81a5fc5d)
- add ExpectsNoDiff flag for verification/audit tasks (0b506f52)
- add dependency audit and diff-review threshold to list-handler prompts (9e805646)
- add "move to list" to the task row context menu (80fe188a)
- notes get their own list, a day log and an Enter chain (0f04b796)
- add_note MCP tool with a per-day agent cap (ae0c7d37)
### Fixes
- carry ExpectsNoDiff into the relocated merge MCP tools (4ee1d05f)
- stop Ui.Tests order-dependent flakiness on shared Loc.Current (dc1e67d0)
- add failureReason field to batch_get_tasks (91220177)
- make locale-parity test able to detect a malformed locale file (4c78a5d6)
- don't leave an orphaned list behind on cancel (56bc1651)
- stop treating git worktrees and submodules as repos (b6e5876b)
- fix Bandel ticket sync and reactivate the integration (30d0611b)
- Shift+Enter in the capture box, not just in the note rows (f6405804)
- let Shift+Enter break the line, and clear the leftovers around the editor (b90c5855)
- auto-bootstrap commit-less repos before creating worktrees (e0748ba3)
- bootstrap commit-less repos and survive missing git identity (de44196b)
### Performance
- switch to workstation GC to cut idle memory (c347e4fc)
### Refactoring
- share StubWorkerClient between Ui.Tests and Worker.Tests (9f90e75a)
- remove the stale-worker banner (6be62f02)
### Documentation
- Handler-Prompt praezisieren (Wave-Plan, Task-Split, review_task-Aufruf) (20b3b4ce)
- Test-Scoping fuer Implementer-Tasks, PowerUse in den Explore-Notes (416997d7)
- plan for multi-dependency depends_on relation table (84d955df)
- empty-repo hardening notes + verification item (cf093e31)
- spec + plan for empty-repo (unborn HEAD) hardening (fea8236e)
- update for v2.12.0 (1d6cd49b)
## v2.12.0 — 2026-08-28 ## v2.12.0 — 2026-08-28
### Features ### Features
+1 -1
View File
@@ -121,7 +121,7 @@ per call and `Register` clamps to min 1, so 0 can never mean "unbounded"). Past
`wait`/`merge` request is silently coerced to its `_final` counterpart — check the result's `wait`/`merge` request is silently coerced to its `_final` counterpart — check the result's
`coerced` flag — and any handoff after a `merge_final` round throws. `coerced` flag — and any handoff after a `merge_final` round throws.
**PowerUse.** When `AppSettingsEntity.PowerUseEnabled` (Settings → Execution) **and** the **PowerUse.** When `AppSettingsEntity.PowerUseEnabled` (toggled on the usage monitor) **and** the
list's own `ListConfigEntity.PowerUseAllowed` are both set, `InteractiveLaunchSpecService. list's own `ListConfigEntity.PowerUseAllowed` are both set, `InteractiveLaunchSpecService.
ComposeHandlerPromptAsync` appends `PromptKind.PowerUseAddendum` to whichever handler prompt the ComposeHandlerPromptAsync` appends `PromptKind.PowerUseAddendum` to whichever handler prompt the
phase resolved to. The addendum is written as an *override* of the base prompt's interactive rules phase resolved to. The addendum is written as an *override* of the base prompt's interactive rules
-8
View File
@@ -98,7 +98,6 @@ Daily prep: `GetDailyPrepCandidates`, `SetMyDay`.
| `TaskWaitMcpTools` | `WaitForTaskChange` | | `TaskWaitMcpTools` | `WaitForTaskChange` |
| `QueueStateMcpTools` | `GetQueueState` | | `QueueStateMcpTools` | `GetQueueState` |
| `AttachmentMcpTools` | `AddTaskAttachment`, `ListTaskAttachments`, `RemoveTaskAttachment` | | `AttachmentMcpTools` | `AddTaskAttachment`, `ListTaskAttachments`, `RemoveTaskAttachment` |
| `ListHandlerMcpTools` | `StartListHandler` |
## Per-tool behaviour worth knowing ## Per-tool behaviour worth knowing
@@ -236,13 +235,6 @@ task already outside those two (unknown ids reported as status `"NotFound"`, als
**`AttachmentMcpTools`** — re-attaching the same `fileName` overwrites. Add/remove refuse on a **`AttachmentMcpTools`** — re-attaching the same `fileName` overwrites. Add/remove refuse on a
`Running` task. `Running` task.
**`StartListHandler`** — the worker only broadcasts `ListHandlerStartRequested`; the connected
ClaudeDo App does the actual work (creates the handler task, opens the triage ConPTY tile). Before
broadcasting it checks `ConnectedClientTracker` (a `WorkerHub.OnConnectedAsync`/`OnDisconnectedAsync`-driven
singleton count) — with zero connected clients the broadcast would reach nobody, so the tool
returns `Requested: false` plus a `Reason` instead of claiming success. Does not queue or retry the
request for a later connect.
**`GetDailyPrepCandidates`** — Idle, non-blocked tasks in a git repo **not** excluded by **`GetDailyPrepCandidates`** — Idle, non-blocked tasks in a git repo **not** excluded by
`AppSettings.ReportExcludedPaths` and not already `IsMyDay`, plus the current Idle MyDay tasks `AppSettings.ReportExcludedPaths` and not already `IsMyDay`, plus the current Idle MyDay tasks
and `maxTasks` (= `DailyPrepMaxTasks`). Repo-exclusion logic lives in the `DailyPrepFilter` and `maxTasks` (= `DailyPrepMaxTasks`). Repo-exclusion logic lives in the `DailyPrepFilter`
+2 -3
View File
@@ -254,7 +254,6 @@ degrades instead of throwing. Worker config: `usage_poll_interval_active_seconds
`usage_poll_interval_idle_seconds`. `usage_poll_interval_idle_seconds`.
The gate percentages are editable in **two** places that both write the same `app_settings` row: The gate percentages are editable in **two** places that both write the same `app_settings` row:
Settings → Execution (typed) and the usage-monitor gauges (dragged). The throttle stages are Settings → General (typed) and the usage-monitor gauges (dragged). The throttle stages are
gauge-only — `SettingsModalViewModel` therefore carries them load→save verbatim so saving Settings gauge-only — `SettingsModalViewModel` therefore carries them load→save verbatim so saving Settings
can't reset a dragged value. PowerUse (switch, time window, handoff %) used to be usage-monitor-only can't reset a dragged value.
and is now typed on the same Settings tab, so it needs no such round-trip.
+3 -1
View File
@@ -15,7 +15,9 @@ Checkliste lebt in `docs/verification-handoff.md`.
- **Planning-aktiver Parent zeigt weiter „Idle":** Parent in `planning_phase=active` hat `Status=Idle` (korrekt im Modell), aber `TaskRowViewModel.StatusLabel` (Zeile 132) kennt nur `HasInteractiveSession`/`IsParked` als Overrides — der `PlanningBadge` ersetzt den Chip nicht sichtbar → liest sich wie ein normaler Idle-Task. Wunsch: klarer „Planning/Draft aktiv"-Zustand, der Idle überschreibt. (Kinder zeigen korrekt „Draft".) - **Planning-aktiver Parent zeigt weiter „Idle":** Parent in `planning_phase=active` hat `Status=Idle` (korrekt im Modell), aber `TaskRowViewModel.StatusLabel` (Zeile 132) kennt nur `HasInteractiveSession`/`IsParked` als Overrides — der `PlanningBadge` ersetzt den Chip nicht sichtbar → liest sich wie ein normaler Idle-Task. Wunsch: klarer „Planning/Draft aktiv"-Zustand, der Idle überschreibt. (Kinder zeigen korrekt „Draft".)
- **Blocked-by-Kette nicht sichtbar:** Nach Finalize ist die sequentielle Kette korrekt gesetzt (child[i] blocked-by child[i-1]), aber die UI stellt Reihenfolge/Abhängigkeit nicht dar — es gibt nur den „waiting"-Chip. Wunsch: Kette visualisieren (z.B. „wartet auf <Vorgänger>"). - **Blocked-by-Kette nicht sichtbar:** Nach Finalize ist die sequentielle Kette korrekt gesetzt (child[i] blocked-by child[i-1]), aber die UI stellt Reihenfolge/Abhängigkeit nicht dar — es gibt nur den „waiting"-Chip. Wunsch: Kette visualisieren (z.B. „wartet auf <Vorgänger>").
- **Modal-Bodies unten abgeschnitten — gefixt, Sichtprüfung offen** (Ursache 2026-09-02 verifiziert: `ScrollViewer.Padding` zählt in Avalonia 12 nicht zum Extent; Fix ist das Padding auf ein `Margin` des inneren Inhalts umzuziehen). Betraf `AboutModalView`, `MergeHelperSelectionModal`, `MergeModalView`, `RepoImportModalView`, `WorktreesOverviewModalView` — alle fünf umgestellt. `ListSettingsModalView`, `LogVisualizerView` und `WorkConsole` hatten zu diesem Zeitpunkt bereits kein ScrollViewer-Padding mehr. - **Dequeue-„X" fehlt auf wartenden (blockierten) Kettengliedern:** `CanRemoveFromQueue = IsQueued || HasQueuedSubtasks` (TaskRowViewModel.cs:99), `IsQueued` verlangt leeres `blocked_by`. Ein gequeuetes, aber blockiertes Kind (`IsWaiting`) bekommt daher kein Remove-from-queue-X — nur Parent + erstes (entsperrtes) Kind.
- **Session-Skills-Tab hat keinen Empty-State:** Bei 0 installierten Skills zeigt der Skills-Tab (Settings) nur eine nackte leere Fläche unter der Install-Zeile — kein erklärender Hinweis (z.B. „Noch keine Skills installiert — GitHub-URL oben einfügen"). Im `sessionSkillsTab`-Locale-Namespace (en.json:674) gibt es keinen `empty`-Key.
- **Modal-Bodies sind unten abgeschnitten** (Sichtprüfung 2026-08-06, beobachtet in den Listen-Settings: der Hinweistext unter „Verify command" ist mitten in der Zeile vom Footer weggeschnitten und lässt sich nicht herunterscrollen; laut Mika „fast überall" in den Settings-Modals). Gemeinsames Muster: `<ScrollViewer Padding="20,16">` als Modal-Body — in `ListSettingsModalView:36`, `MergeModalView:33`, `WorktreesOverviewModalView:131`, `AboutModalView:20`, `MergeHelperSelectionModal:47`, `RepoImportModalView:45`, `LogVisualizerView:45` sowie `WorkConsole:295/395`. **Vermutete** Ursache (nicht verifiziert): das untere `Padding` des ScrollViewers zählt nicht zum scrollbaren Extent, die letzten Pixel sind also unerreichbar. Erst am echten Fall nachmessen, dann ggf. einheitlich das Padding vom ScrollViewer auf ein `Margin` des inneren Inhalts umziehen.
- **Usage-Monitor-Modal: Analyse-Tabellen ausbaufähig** (Sichtprüfung 2026-08-06; Gauges, Info-Bänder, Presets/Custom-Range und Refresh-Button sind in Ordnung). Models-Tab: die Spaltenköpfe „OTHER CACHE" und „SHARE" kollidieren zu `OTHER CACHISHARE`; `claude-haiku-4-5-20251001` läuft in die IN-Spalte; alle Zahlen linksbündig und ohne Tausendertrenner (`506830708`). Tasks-Tab: Task-Titel wird ohne Ellipse hart an der LIST-Spalte abgeschnitten, der LIST-Text ebenfalls; MODEL ist bei Runs von vor der `task_runs.model`-Spalte leer (besser „—"). Wunsch: Zahlen rechtsbündig + `#,##0` (oder k/M), Spaltenbreiten/Truncation fixen. - **Usage-Monitor-Modal: Analyse-Tabellen ausbaufähig** (Sichtprüfung 2026-08-06; Gauges, Info-Bänder, Presets/Custom-Range und Refresh-Button sind in Ordnung). Models-Tab: die Spaltenköpfe „OTHER CACHE" und „SHARE" kollidieren zu `OTHER CACHISHARE`; `claude-haiku-4-5-20251001` läuft in die IN-Spalte; alle Zahlen linksbündig und ohne Tausendertrenner (`506830708`). Tasks-Tab: Task-Titel wird ohne Ellipse hart an der LIST-Spalte abgeschnitten, der LIST-Text ebenfalls; MODEL ist bei Runs von vor der `task_runs.model`-Spalte leer (besser „—"). Wunsch: Zahlen rechtsbündig + `#,##0` (oder k/M), Spaltenbreiten/Truncation fixen.
- **Conflict-Resolver: mehrere Konfliktdateien schlecht erkennbar:** Beim 2-Datei-Konflikt schwer zu sehen, dass zwei Dateien betroffen sind (File-Switcher/Anzahl zu unauffällig). Prominentere Datei-Liste / „x von y Dateien". - **Conflict-Resolver: mehrere Konfliktdateien schlecht erkennbar:** Beim 2-Datei-Konflikt schwer zu sehen, dass zwei Dateien betroffen sind (File-Switcher/Anzahl zu unauffällig). Prominentere Datei-Liste / „x von y Dateien".
- **Attachments: erster Drag&Drop der Session schlug einmalig fehl („An error occurred"):** Beim allerersten Drop-to-attach einer UI-Session zeigte die `DropStatus`-Zeile inline einen generischen Fehler und es wurde nichts persistiert (kein File, keine DB-Row); alle folgenden Drops derselben Session + der „Add file…"-Picker + Remove funktionierten fehlerfrei. Nicht reproduzierbar nach dem ersten Mal. Kandidaten: transiente SQLite-Contention (der UI-Prozess schreibt `todo.db` direkt via `new TaskAttachmentRepository`, während der Worker dieselbe DB hält) ODER ein Fehler im Drop-Stream-Pfad (`IStorageFile.OpenReadAsync` im Code-Behind, außerhalb des `try` in `AddFilesAsync`). Falls es erneut auftritt: `AddFilesAsync`/`OnDrop` mit robusterem Error-Logging versehen. - **Attachments: erster Drag&Drop der Session schlug einmalig fehl („An error occurred"):** Beim allerersten Drop-to-attach einer UI-Session zeigte die `DropStatus`-Zeile inline einen generischen Fehler und es wurde nichts persistiert (kein File, keine DB-Row); alle folgenden Drops derselben Session + der „Add file…"-Picker + Remove funktionierten fehlerfrei. Nicht reproduzierbar nach dem ersten Mal. Kandidaten: transiente SQLite-Contention (der UI-Prozess schreibt `todo.db` direkt via `new TaskAttachmentRepository`, während der Worker dieselbe DB hält) ODER ein Fehler im Drop-Stream-Pfad (`IStorageFile.OpenReadAsync` im Code-Behind, außerhalb des `try` in `AddFilesAsync`). Falls es erneut auftritt: `AddFilesAsync`/`OnDrop` mit robusterem Error-Logging versehen.
+4 -8
View File
@@ -12,9 +12,7 @@ Shared data layer: models, repositories, SQLite infrastructure, and git operatio
- `InteractiveSessionId` = the claude session id an embedded ConPTY interactive task session runs under, persisted by `InteractiveLaunchSpecService` before launch so a closed/aborted session can be resumed → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md). - `InteractiveSessionId` = the claude session id an embedded ConPTY interactive task session runs under, persisted by `InteractiveLaunchSpecService` before launch so a closed/aborted session can be resumed → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md).
- `Number` (INTEGER NOT NULL, unique index `idx_tasks_number`) — a global, monotonically increasing display alias for tasks. **Never reused**: deleting a task leaves a gap in numbering, ensuring that a task number that appears in a log or report always points to the same task (if it exists). Allocated by `TaskNumberAllocator.AddWithNumberAsync` on every insert via a persistent counter (`app_settings.next_task_number`). **Why not `MAX(number) + 1`:** deleting the highest-numbered task would free its number for reuse, breaking the immutability guarantee. The allocator uses an `UPDATE…RETURNING` statement to claim numbers atomically, retrying up to 5 times if a uniqueness collision occurs (the counter advances on each attempt, so retries always allocate fresh numbers). The one-time backfill for pre-existing rows lived in the `AddTaskNumbers` migration, squashed away 2026-08-26. - `Number` (INTEGER NOT NULL, unique index `idx_tasks_number`) — a global, monotonically increasing display alias for tasks. **Never reused**: deleting a task leaves a gap in numbering, ensuring that a task number that appears in a log or report always points to the same task (if it exists). Allocated by `TaskNumberAllocator.AddWithNumberAsync` on every insert via a persistent counter (`app_settings.next_task_number`). **Why not `MAX(number) + 1`:** deleting the highest-numbered task would free its number for reuse, breaking the immutability guarantee. The allocator uses an `UPDATE…RETURNING` statement to claim numbers atomically, retrying up to 5 times if a uniqueness collision occurs (the counter advances on each attempt, so retries always allocate fresh numbers). The one-time backfill for pre-existing rows lived in the `AddTaskNumbers` migration, squashed away 2026-08-26.
- Legacy status values `Manual`/`Planning`/`Planned`/`Draft`/`Waiting` were retired. The backfill migration was squashed away (2026-08-26) — a database still holding those values can't be upgraded, see Schema below. - Legacy status values `Manual`/`Planning`/`Planned`/`Draft`/`Waiting` were retired. The backfill migration was squashed away (2026-08-26) — a database still holding those values can't be upgraded, see Schema below.
- **ListEntity** — Id, Name, WorkingDir, DefaultCommitType, CreatedAt, IsManual (reminder list — tasks created here default to `IsManual`), Icon, FolderId - **ListEntity** — Id, Name, WorkingDir, DefaultCommitType, CreatedAt, IsManual (reminder list — tasks created here default to `IsManual`)
- `FolderId` (`folder_id`, nullable FK → `list_folders.id`, `ON DELETE SET NULL`) — the sidebar folder the list sits in; null = top level. Written only by the UI (`ListsIslandViewModel` drag/context menu), never by MCP.
- **ListFolderEntity** — Id, Name, Icon, SortOrder, IsCollapsed, CreatedAt → `list_folders`. A pure sidebar grouping: no tasks, no config, no working dir, **one level** (folders never nest). Deliberately its own table rather than a flag on `lists`, so every caller that enumerates lists (MCP `list_task_lists`, "move to list", the queue picker, repo import) needs no folder filtering. Folder CRUD lives on `ListRepository`.
- **ListConfigEntity** — ListId (PK, 1:1), Model, SystemPrompt, AgentPath, MaxTurns, SessionSkills, VerifyCommand, PermissionMode, TicketProjectId (all nullable). `VerifyCommand` is an optional post-merge gate; null/blank = no gate → [review-merge](../../docs/explore-notes/review-merge.md). `PermissionMode` is null = inherit the global default; resolution order task → list → global lives in `EffectiveRunConfigResolver`. `TicketProjectId` (`ticket_project_id`) links the list to a project in the external ticket system; null = not linked → `ClaudeDo.Worker/CLAUDE.md` Tickets section. - **ListConfigEntity** — ListId (PK, 1:1), Model, SystemPrompt, AgentPath, MaxTurns, SessionSkills, VerifyCommand, PermissionMode, TicketProjectId (all nullable). `VerifyCommand` is an optional post-merge gate; null/blank = no gate → [review-merge](../../docs/explore-notes/review-merge.md). `PermissionMode` is null = inherit the global default; resolution order task → list → global lives in `EffectiveRunConfigResolver`. `TicketProjectId` (`ticket_project_id`) links the list to a project in the external ticket system; null = not linked → `ClaudeDo.Worker/CLAUDE.md` Tickets section.
- ⚠️ `ListRepository.SetConfigAsync` copies the entity **verbatim**, so every writer must carry the fields it doesn't own (`SessionSkills`, `PermissionMode`, `TicketProjectId`) or they silently reset. `UpdateListConfigDto.TicketProjectId` is tri-state (`null` = keep stored) for exactly that reason — only the list-settings modal sends an explicit value. This bit `PermissionMode` for real: its update-branch copy was missing from `SetConfigAsync` until `f0a3a186`, so a list's permission-mode override only ever stuck on the list's *first* save, never on a later one. - ⚠️ `ListRepository.SetConfigAsync` copies the entity **verbatim**, so every writer must carry the fields it doesn't own (`SessionSkills`, `PermissionMode`, `TicketProjectId`) or they silently reset. `UpdateListConfigDto.TicketProjectId` is tri-state (`null` = keep stored) for exactly that reason — only the list-settings modal sends an explicit value. This bit `PermissionMode` for real: its update-branch copy was missing from `SetConfigAsync` until `f0a3a186`, so a list's permission-mode override only ever stuck on the list's *first* save, never on a later one.
- **WorktreeEntity** — TaskId (PK, 1:1), Path, BranchName, BaseCommit, HeadCommit, DiffStat, MergeCommit (nullable — SHA of the merge commit this branch produced; the only thing making `revert_merge` possible without searching `git log`), State (`Active|Merged|Discarded|Kept`) - **WorktreeEntity** — TaskId (PK, 1:1), Path, BranchName, BaseCommit, HeadCommit, DiffStat, MergeCommit (nullable — SHA of the merge commit this branch produced; the only thing making `revert_merge` possible without searching `git log`), State (`Active|Merged|Discarded|Kept`)
@@ -41,10 +39,10 @@ Beyond the basics it carries:
| `ReportExcludedPaths` | `report_excluded_paths` | null | JSON array of excluded path prefixes. | | `ReportExcludedPaths` | `report_excluded_paths` | null | JSON array of excluded path prefixes. |
| `StandupWeekday` | `standup_weekday` | Wednesday | int `DayOfWeek`. | | `StandupWeekday` | `standup_weekday` | Wednesday | int `DayOfWeek`. |
| `NextTaskNumber` | `next_task_number` | 1 | Persistent counter for `TaskEntity.Number` allocation. Incremented atomically in `TaskNumberAllocator.AddWithNumberAsync` on every task insert. **Monotonic only:** the counter itself advances across all tasks (no per-list numbering), and it never resets. A deleted task leaves a gap. | | `NextTaskNumber` | `next_task_number` | 1 | Persistent counter for `TaskEntity.Number` allocation. Incremented atomically in `TaskNumberAllocator.AddWithNumberAsync` on every task insert. **Monotonic only:** the counter itself advances across all tasks (no per-list numbering), and it never resets. A deleted task leaves a gap. |
| `PowerUseEnabled` | `power_use_enabled` | false | PowerUse master switch, toggled in **Settings → Execution**. ⚠️ Never sufficient alone — a handler run is in PowerUse only when `list_config.power_use_allowed` is also set. | | `PowerUseEnabled` | `power_use_enabled` | false | PowerUse master switch, toggled on the **usage monitor** (not Settings). ⚠️ Never sufficient alone — a handler run is in PowerUse only when `list_config.power_use_allowed` is also set. |
| `ListHandlerMaxHandoffs` | `list_handler_max_handoffs` | 4 | Cap on a list-handler run's wait↔merge handoff chain (`HandoffRoundTracker`). 4 = two merge rounds. Independent of PowerUse — applies to interactive runs too. Clamped to min 1 in `WorkerHub.UpdateAppSettings` and again in `Register`, because 0 would remove the only bound on a runaway chain. | | `ListHandlerMaxHandoffs` | `list_handler_max_handoffs` | 4 | Cap on a list-handler run's wait↔merge handoff chain (`HandoffRoundTracker`). 4 = two merge rounds. Independent of PowerUse — applies to interactive runs too. Clamped to min 1 in `WorkerHub.UpdateAppSettings` and again in `Register`, because 0 would remove the only bound on a runaway chain. |
| `PowerUseWindowStart` / `PowerUseWindowEnd` | `power_use_window_*` | null | Optional local-time window (`HH:mm`) narrowing when PowerUse applies. Both null (or only one set) = round the clock, i.e. byte-identical to the pre-window behaviour; end before start wraps over midnight. Semantics live in the pure `PowerUseWindow`; checked in `InteractiveLaunchSpecService.ComposeHandlerPromptAsync` **per phase** at prompt-build time, so a chain handing off past the end time drops the addendum from there on. Unparseable input is stored as null, not rejected. | | `PowerUseWindowStart` / `PowerUseWindowEnd` | `power_use_window_*` | null | Optional local-time window (`HH:mm`) narrowing when PowerUse applies. Both null (or only one set) = round the clock, i.e. byte-identical to the pre-window behaviour; end before start wraps over midnight. Semantics live in the pure `PowerUseWindow`; checked in `InteractiveLaunchSpecService.ComposeHandlerPromptAsync` **per phase** at prompt-build time, so a chain handing off past the end time drops the addendum from there on. Unparseable input is stored as null, not rejected. |
| `PowerUseHandoffPct` | `power_use_handoff_pct` | 95 | 5h-usage percentage at which a PowerUse handler session should hand off. Clamped 50..99. Typed in Settings → Execution; the consumer is the handoff prompt. | | `PowerUseHandoffPct` | `power_use_handoff_pct` | 95 | 5h-usage percentage at which a PowerUse handler session should hand off. Clamped 50..99. Stored + shown on the usage monitor; the consumer is the handoff prompt. |
All four usage percentages are clamped 0..100 by `AppSettingsRepository.UpdateAsync`. All four usage percentages are clamped 0..100 by `AppSettingsRepository.UpdateAsync`.
Gate/throttle semantics → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md). Gate/throttle semantics → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md).
@@ -67,8 +65,7 @@ All use EF Core LINQ via `ClaudeDoDbContext`. The atomic `Queued → Running` cl
Worker's `QueuePicker` (`FromSqlRaw`), **not** here. Worker's `QueuePicker` (`FromSqlRaw`), **not** here.
- **TaskRepository** — CRUD, planning helpers (`CreateChildAsync`, `SetPlanningStartedAsync`, `DiscardPlanningAsync`, `UpdateChildAsync`), `UpdateAgentSettingsAsync`. ⚠️ Status-mutation primitives (`MarkRunningAsync`/`MarkDoneAsync`/`MarkFailedAsync`/`FlipAllRunningToFailedAsync`) are **`internal`** — only the Worker's `TaskStateService` may call them. `CreateChildAsync` produces children with `Status=Idle, PlanningPhase=None`. **Task-number allocation:** `AddAsync` (line 20) and `CreateChildAsync` (line 276) are the two sole task-creation paths; both call `TaskNumberAllocator.AddWithNumberAsync` to allocate a number atomically during the same transaction as the insert. Every other creation path (UI, MCP `add_task`, `batch_add_tasks`, Online Inbox sync, merge-helper handler tasks, planning children) routes through one of these two. - **TaskRepository** — CRUD, planning helpers (`CreateChildAsync`, `SetPlanningStartedAsync`, `DiscardPlanningAsync`, `UpdateChildAsync`), `UpdateAgentSettingsAsync`. ⚠️ Status-mutation primitives (`MarkRunningAsync`/`MarkDoneAsync`/`MarkFailedAsync`/`FlipAllRunningToFailedAsync`) are **`internal`** — only the Worker's `TaskStateService` may call them. `CreateChildAsync` produces children with `Status=Idle, PlanningPhase=None`. **Task-number allocation:** `AddAsync` (line 20) and `CreateChildAsync` (line 276) are the two sole task-creation paths; both call `TaskNumberAllocator.AddWithNumberAsync` to allocate a number atomically during the same transaction as the insert. Every other creation path (UI, MCP `add_task`, `batch_add_tasks`, Online Inbox sync, merge-helper handler tasks, planning children) routes through one of these two.
- **ListRepository** — CRUD, `GetConfigAsync`/`SetConfigAsync` (upsert)/`DeleteConfigAsync` for `list_config`, plus the `list_folders` set: `GetFoldersAsync`, `AddFolderAsync` (appends), `RenameFolderAsync`, `DeleteFolderAsync` (folder only — the FK releases its lists), `SetFolderCollapsedAsync`, `SetListFolderAsync`. The folder writers are `ExecuteUpdate` patches, not entity `Update()`s, so a rename can't reset `SortOrder`/`IsCollapsed` the way `SetConfigAsync`'s verbatim copy resets forgotten columns. - **ListRepository** — CRUD, `GetConfigAsync`/`SetConfigAsync` (upsert)/`DeleteConfigAsync` for `list_config`
- ⚠️ **`lists.sort_order` and `list_folders.sort_order` share one number space** — the sidebar interleaves folders and top-level lists in a single order, so `ReorderSidebarAsync` numbers the whole visual sequence (each folder followed by its children) across both tables, and `AddAsync`/`AddFolderAsync` append via `MAX(sort_order)+1` over **both**. Never renumber one table on its own.
- **WorktreeRepository** — CRUD, `UpdateHeadAsync`, `SetStateAsync`, `SetMergedAsync` (atomically sets State=Merged **and** stamps MergeCommit in one update — the only writer of MergeCommit) - **WorktreeRepository** — CRUD, `UpdateHeadAsync`, `SetStateAsync`, `SetMergedAsync` (atomically sets State=Merged **and** stamps MergeCommit in one update — the only writer of MergeCommit)
- **TaskAttachmentRepository** — `AddAsync`, `UpdateAsync`, `GetAsync(taskId, fileName)`, `ListByTaskIdAsync`, `DeleteAsync(taskId, fileName)`. Bulk delete-per-task is the `ON DELETE CASCADE` on `task_attachments`, not a repository method. - **TaskAttachmentRepository** — `AddAsync`, `UpdateAsync`, `GetAsync(taskId, fileName)`, `ListByTaskIdAsync`, `DeleteAsync(taskId, fileName)`. Bulk delete-per-task is the `ON DELETE CASCADE` on `task_attachments`, not a repository method.
- **DailyNoteRepository**, **WeekReportRepository**, **TaskRunRepository**, **SubtaskRepository**, **AppSettingsRepository** - **DailyNoteRepository**, **WeekReportRepository**, **TaskRunRepository**, **SubtaskRepository**, **AppSettingsRepository**
@@ -119,7 +116,6 @@ Tables (one per line so parallel migrations don't collide on the same line):
- `week_reports` - `week_reports`
- `task_attachments` - `task_attachments`
- `task_dependencies` - `task_dependencies`
- `list_folders`
Managed by EF Core migrations in `Migrations/`. **The 40 incremental migrations were squashed into Managed by EF Core migrations in `Migrations/`. **The 40 incremental migrations were squashed into
a single `20260826094154_InitialCreate` on 2026-08-26** — the schema history is git history now, a single `20260826094154_InitialCreate` on 2026-08-26** — the schema history is git history now,
-1
View File
@@ -43,7 +43,6 @@ public class ClaudeDoDbContext : DbContext
public DbSet<TaskEntity> Tasks => Set<TaskEntity>(); public DbSet<TaskEntity> Tasks => Set<TaskEntity>();
public DbSet<TaskDependencyEntity> TaskDependencies => Set<TaskDependencyEntity>(); public DbSet<TaskDependencyEntity> TaskDependencies => Set<TaskDependencyEntity>();
public DbSet<ListEntity> Lists => Set<ListEntity>(); public DbSet<ListEntity> Lists => Set<ListEntity>();
public DbSet<ListFolderEntity> ListFolders => Set<ListFolderEntity>();
public DbSet<ListConfigEntity> ListConfigs => Set<ListConfigEntity>(); public DbSet<ListConfigEntity> ListConfigs => Set<ListConfigEntity>();
public DbSet<WorktreeEntity> Worktrees => Set<WorktreeEntity>(); public DbSet<WorktreeEntity> Worktrees => Set<WorktreeEntity>();
public DbSet<TaskRunEntity> TaskRuns => Set<TaskRunEntity>(); public DbSet<TaskRunEntity> TaskRuns => Set<TaskRunEntity>();
@@ -20,17 +20,8 @@ public class ListEntityConfiguration : IEntityTypeConfiguration<ListEntity>
builder.Property(l => l.IsManual).HasColumnName("is_manual").IsRequired().HasDefaultValue(false); builder.Property(l => l.IsManual).HasColumnName("is_manual").IsRequired().HasDefaultValue(false);
builder.Property(l => l.FindingsTracked).HasColumnName("findings_tracked").IsRequired().HasDefaultValue(false); builder.Property(l => l.FindingsTracked).HasColumnName("findings_tracked").IsRequired().HasDefaultValue(false);
builder.Property(l => l.Icon).HasColumnName("icon"); builder.Property(l => l.Icon).HasColumnName("icon");
builder.Property(l => l.FolderId).HasColumnName("folder_id");
builder.HasIndex(l => l.SortOrder).HasDatabaseName("idx_lists_sort"); builder.HasIndex(l => l.SortOrder).HasDatabaseName("idx_lists_sort");
builder.HasIndex(l => l.FolderId).HasDatabaseName("idx_lists_folder");
// No navigation property on either side: nothing needs the graph, and a nav would have to
// be Include'd (or silently come back empty) in every list query.
builder.HasOne<ListFolderEntity>()
.WithMany()
.HasForeignKey(l => l.FolderId)
.OnDelete(DeleteBehavior.SetNull);
builder.HasOne(l => l.Config) builder.HasOne(l => l.Config)
.WithOne(c => c.List) .WithOne(c => c.List)
@@ -1,23 +0,0 @@
using ClaudeDo.Data.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace ClaudeDo.Data.Configuration;
public class ListFolderEntityConfiguration : IEntityTypeConfiguration<ListFolderEntity>
{
public void Configure(EntityTypeBuilder<ListFolderEntity> builder)
{
builder.ToTable("list_folders");
builder.HasKey(f => f.Id);
builder.Property(f => f.Id).HasColumnName("id");
builder.Property(f => f.Name).HasColumnName("name").IsRequired();
builder.Property(f => f.CreatedAt).HasColumnName("created_at").IsRequired();
builder.Property(f => f.Icon).HasColumnName("icon");
builder.Property(f => f.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
builder.Property(f => f.IsCollapsed).HasColumnName("is_collapsed").IsRequired().HasDefaultValue(false);
builder.HasIndex(f => f.SortOrder).HasDatabaseName("idx_list_folders_sort");
}
}
+3 -16
View File
@@ -424,22 +424,14 @@ public sealed class GitService
return File.Exists(Path.Combine(gitDir, "MERGE_HEAD")); return File.Exists(Path.Combine(gitDir, "MERGE_HEAD"));
} }
/// <param name="autostash">Stash the target working tree's uncommitted changes before the
/// merge and restore them after it. Git owns the bookkeeping: on a conflict the stash stays
/// pending and is re-applied by `merge --continue`/`--abort`, so a conflicted merge left in
/// the tree doesn't lose it. A restore that itself conflicts leaves the stash in
/// `git stash list` rather than dropping it.</param>
public async Task<(int ExitCode, string Stderr)> MergeNoFfAsync( public async Task<(int ExitCode, string Stderr)> MergeNoFfAsync(
string repoDir, string sourceBranch, string message, CancellationToken ct = default, string repoDir, string sourceBranch, string message, CancellationToken ct = default)
bool autostash = false)
{ {
// diff3 conflict style writes the merge base (|||||||) into conflict markers so the // diff3 conflict style writes the merge base (|||||||) into conflict markers so the
// in-app resolver can show a true three-way view. It only enriches conflicted hunks; // in-app resolver can show a true three-way view. It only enriches conflicted hunks;
// clean merges are unaffected. // clean merges are unaffected.
string[] args = autostash var (exitCode, _, stderr) = await RunGitAsync(repoDir,
? ["-c", "merge.conflictStyle=diff3", "merge", "--no-ff", "--autostash", "-m", message, sourceBranch] ["-c", "merge.conflictStyle=diff3", "merge", "--no-ff", "-m", message, sourceBranch], ct);
: ["-c", "merge.conflictStyle=diff3", "merge", "--no-ff", "-m", message, sourceBranch];
var (exitCode, _, stderr) = await RunGitAsync(repoDir, args, ct);
return (exitCode, stderr); return (exitCode, stderr);
} }
@@ -712,11 +704,6 @@ public sealed class GitService
// (mktree "input format error") and would prepend to stdin commit messages. // (mktree "input format error") and would prepend to stdin commit messages.
StandardInputEncoding = stdinData is not null ? new UTF8Encoding(false) : null, StandardInputEncoding = stdinData is not null ? new UTF8Encoding(false) : null,
}; };
// Force English stderr/stdout so the English-only substring matches below
// (e.g. "ambiguous argument 'HEAD'", "tell me who you are") work regardless
// of the OS locale git for Windows picks up.
psi.Environment["LC_ALL"] = "C";
psi.Environment["LANGUAGE"] = "C";
psi.ArgumentList.Add("-C"); psi.ArgumentList.Add("-C");
psi.ArgumentList.Add(workDir); psi.ArgumentList.Add(workDir);
foreach (var a in args) psi.ArgumentList.Add(a); foreach (var a in args) psi.ArgumentList.Add(a);
File diff suppressed because it is too large Load Diff
@@ -1,74 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ClaudeDo.Data.Migrations
{
/// <inheritdoc />
public partial class AddListFolders : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "folder_id",
table: "lists",
type: "TEXT",
nullable: true);
migrationBuilder.CreateTable(
name: "list_folders",
columns: table => new
{
id = table.Column<string>(type: "TEXT", nullable: false),
name = table.Column<string>(type: "TEXT", nullable: false),
created_at = table.Column<DateTime>(type: "TEXT", nullable: false),
icon = table.Column<string>(type: "TEXT", nullable: true),
sort_order = table.Column<int>(type: "INTEGER", nullable: false, defaultValue: 0),
is_collapsed = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false)
},
constraints: table =>
{
table.PrimaryKey("PK_list_folders", x => x.id);
});
migrationBuilder.CreateIndex(
name: "idx_lists_folder",
table: "lists",
column: "folder_id");
migrationBuilder.CreateIndex(
name: "idx_list_folders_sort",
table: "list_folders",
column: "sort_order");
migrationBuilder.AddForeignKey(
name: "FK_lists_list_folders_folder_id",
table: "lists",
column: "folder_id",
principalTable: "list_folders",
principalColumn: "id",
onDelete: ReferentialAction.SetNull);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_lists_list_folders_folder_id",
table: "lists");
migrationBuilder.DropTable(
name: "list_folders");
migrationBuilder.DropIndex(
name: "idx_lists_folder",
table: "lists");
migrationBuilder.DropColumn(
name: "folder_id",
table: "lists");
}
}
}
@@ -324,10 +324,6 @@ namespace ClaudeDo.Data.Migrations
.HasDefaultValue(false) .HasDefaultValue(false)
.HasColumnName("findings_tracked"); .HasColumnName("findings_tracked");
b.Property<string>("FolderId")
.HasColumnType("TEXT")
.HasColumnName("folder_id");
b.Property<string>("Icon") b.Property<string>("Icon")
.HasColumnType("TEXT") .HasColumnType("TEXT")
.HasColumnName("icon"); .HasColumnName("icon");
@@ -355,54 +351,12 @@ namespace ClaudeDo.Data.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("FolderId")
.HasDatabaseName("idx_lists_folder");
b.HasIndex("SortOrder") b.HasIndex("SortOrder")
.HasDatabaseName("idx_lists_sort"); .HasDatabaseName("idx_lists_sort");
b.ToTable("lists", (string)null); b.ToTable("lists", (string)null);
}); });
modelBuilder.Entity("ClaudeDo.Data.Models.ListFolderEntity", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT")
.HasColumnName("id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasColumnName("created_at");
b.Property<string>("Icon")
.HasColumnType("TEXT")
.HasColumnName("icon");
b.Property<bool>("IsCollapsed")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false)
.HasColumnName("is_collapsed");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasColumnName("name");
b.Property<int>("SortOrder")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0)
.HasColumnName("sort_order");
b.HasKey("Id");
b.HasIndex("SortOrder")
.HasDatabaseName("idx_list_folders_sort");
b.ToTable("list_folders", (string)null);
});
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b => modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@@ -980,14 +934,6 @@ namespace ClaudeDo.Data.Migrations
b.Navigation("List"); b.Navigation("List");
}); });
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
{
b.HasOne("ClaudeDo.Data.Models.ListFolderEntity", null)
.WithMany()
.HasForeignKey("FolderId")
.OnDelete(DeleteBehavior.SetNull);
});
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b => modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
{ {
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task") b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
@@ -62,7 +62,8 @@ public sealed class AppSettingsEntity
public bool AutoContinueOnUsageLimit { get; set; } public bool AutoContinueOnUsageLimit { get; set; }
// Master switch for PowerUse: list-handler runs go unattended (never ask the user) and harvest // Master switch for PowerUse: list-handler runs go unattended (never ask the user) and harvest
// new work when a round would otherwise starve. Toggled in Settings → Execution. Off by default, // new work when a round would otherwise starve. Toggled from the usage monitor, because it is a
// deliberate "spend the remaining window" decision rather than a normal default. Off by default,
// and on its own it changes nothing — a run is only in PowerUse when the LIST also opted in via // and on its own it changes nothing — a run is only in PowerUse when the LIST also opted in via
// ListConfigEntity.PowerUseAllowed, so leaving this on cannot make an unrelated list's handler // ListConfigEntity.PowerUseAllowed, so leaving this on cannot make an unrelated list's handler
// run unattended. Composition lives in InteractiveLaunchSpecService. // run unattended. Composition lives in InteractiveLaunchSpecService.
-3
View File
@@ -16,9 +16,6 @@ public sealed class ListEntity
public bool FindingsTracked { get; set; } public bool FindingsTracked { get; set; }
// Icon key into the UI's icon library (e.g. "Star"); null = the default folder icon. // Icon key into the UI's icon library (e.g. "Star"); null = the default folder icon.
public string? Icon { get; set; } public string? Icon { get; set; }
// Sidebar folder this list sits in (ListFolderEntity.Id); null = top level. ON DELETE SET NULL,
// so deleting a folder moves its lists back to the top level instead of deleting them.
public string? FolderId { get; set; }
// Navigation properties // Navigation properties
public ListConfigEntity? Config { get; set; } public ListConfigEntity? Config { get; set; }
@@ -1,20 +0,0 @@
namespace ClaudeDo.Data.Models;
/// <summary>
/// A sidebar folder grouping user lists. Deliberately its own table rather than a flag on
/// <see cref="ListEntity"/>: every place that enumerates lists (MCP list_task_lists, "move to
/// list", the queue picker, repo import) would otherwise have to filter folders out.
/// One level only — a folder holds lists, never other folders.
/// </summary>
public sealed class ListFolderEntity
{
public required string Id { get; init; }
public required string Name { get; set; }
public required DateTime CreatedAt { get; init; }
// Icon key into the UI's icon library, same set as ListEntity.Icon; null = default folder icon.
public string? Icon { get; set; }
public int SortOrder { get; set; }
// Sidebar expand/collapse state. Lives here rather than in ui.config.json because the row is
// already being read for the folder itself.
public bool IsCollapsed { get; set; }
}
@@ -17,20 +17,10 @@ public sealed class ListRepository
public async Task AddAsync(ListEntity entity, CancellationToken ct = default) public async Task AddAsync(ListEntity entity, CancellationToken ct = default)
{ {
NormalizeWorkingDir(entity); NormalizeWorkingDir(entity);
if (entity.SortOrder == 0) entity.SortOrder = await NextSortOrderAsync(ct);
_context.Lists.Add(entity); _context.Lists.Add(entity);
await _context.SaveChangesAsync(ct); await _context.SaveChangesAsync(ct);
} }
/// <summary>One past the highest <c>sort_order</c> in use — across <b>both</b> tables, because
/// the sidebar interleaves folders and top-level lists in a single order sequence.</summary>
private async Task<int> NextSortOrderAsync(CancellationToken ct = default)
{
var maxList = await _context.Lists.MaxAsync(l => (int?)l.SortOrder, ct) ?? -1;
var maxFolder = await _context.ListFolders.MaxAsync(f => (int?)f.SortOrder, ct) ?? -1;
return Math.Max(maxList, maxFolder) + 1;
}
public async Task UpdateAsync(ListEntity entity, CancellationToken ct = default) public async Task UpdateAsync(ListEntity entity, CancellationToken ct = default)
{ {
NormalizeWorkingDir(entity); NormalizeWorkingDir(entity);
@@ -66,83 +56,18 @@ public sealed class ListRepository
return await _context.Lists.OrderBy(l => l.SortOrder).ThenBy(l => l.CreatedAt).ToListAsync(ct); return await _context.Lists.OrderBy(l => l.SortOrder).ThenBy(l => l.CreatedAt).ToListAsync(ct);
} }
/// <summary> public async Task ReorderAsync(IReadOnlyList<string> orderedListIds, CancellationToken ct = default)
/// Writes the sidebar's visual order as one sequence spanning both tables: folders and lists
/// share the <c>sort_order</c> number space, which is what lets a top-level list sit between
/// two folders. A folder's own children follow it in the sequence, so ordering folders by
/// <c>sort_order</c> and lists by <c>sort_order</c> independently still reproduces the sidebar.
/// </summary>
public async Task ReorderSidebarAsync(IReadOnlyList<(string Id, bool IsFolder)> ordered, CancellationToken ct = default)
{ {
var listIds = ordered.Where(o => !o.IsFolder).Select(o => o.Id).ToHashSet(); var idSet = orderedListIds.ToHashSet();
var folderIds = ordered.Where(o => o.IsFolder).Select(o => o.Id).ToHashSet(); var entities = await _context.Lists.Where(l => idSet.Contains(l.Id)).ToListAsync(ct);
var lists = await _context.Lists.Where(l => listIds.Contains(l.Id)).ToListAsync(ct); for (int i = 0; i < orderedListIds.Count; i++)
var folders = await _context.ListFolders.Where(f => folderIds.Contains(f.Id)).ToListAsync(ct);
for (int i = 0; i < ordered.Count; i++)
{ {
var (id, isFolder) = ordered[i]; var e = entities.FirstOrDefault(x => x.Id == orderedListIds[i]);
if (isFolder) if (e is not null) e.SortOrder = i;
{
if (folders.FirstOrDefault(f => f.Id == id) is { } folder) folder.SortOrder = i;
}
else if (lists.FirstOrDefault(l => l.Id == id) is { } list) list.SortOrder = i;
} }
await _context.SaveChangesAsync(ct); await _context.SaveChangesAsync(ct);
} }
// ---- Sidebar folders (list_folders) ----
// Folders live here rather than in their own repository because they exist only as a grouping
// of these lists — every caller that touches one already holds a ListRepository.
public async Task<List<ListFolderEntity>> GetFoldersAsync(CancellationToken ct = default)
{
return await _context.ListFolders
.OrderBy(f => f.SortOrder).ThenBy(f => f.CreatedAt)
.ToListAsync(ct);
}
public async Task AddFolderAsync(ListFolderEntity folder, CancellationToken ct = default)
{
folder.SortOrder = await NextSortOrderAsync(ct);
_context.ListFolders.Add(folder);
await _context.SaveChangesAsync(ct);
}
/// <summary>Patches just the two editable fields — a whole-entity Update would need
/// <c>CreatedAt</c>/<c>SortOrder</c>/<c>IsCollapsed</c> carried along and silently reset
/// whichever the caller forgot (see the SetConfigAsync note in CLAUDE.md).</summary>
public async Task RenameFolderAsync(string folderId, string name, string? icon, CancellationToken ct = default)
{
await _context.ListFolders
.Where(f => f.Id == folderId)
.ExecuteUpdateAsync(s => s
.SetProperty(f => f.Name, name)
.SetProperty(f => f.Icon, icon), ct);
}
/// <summary>Deletes the folder only — its lists survive and fall back to the top level via
/// the ON DELETE SET NULL on <c>lists.folder_id</c>.</summary>
public async Task DeleteFolderAsync(string folderId, CancellationToken ct = default)
{
await _context.ListFolders.Where(f => f.Id == folderId).ExecuteDeleteAsync(ct);
}
public async Task SetFolderCollapsedAsync(string folderId, bool collapsed, CancellationToken ct = default)
{
await _context.ListFolders
.Where(f => f.Id == folderId)
.ExecuteUpdateAsync(s => s.SetProperty(f => f.IsCollapsed, collapsed), ct);
}
/// <summary>Moves a list into <paramref name="folderId"/>, or back to the top level when null.</summary>
public async Task SetListFolderAsync(string listId, string? folderId, CancellationToken ct = default)
{
await _context.Lists
.Where(l => l.Id == listId)
.ExecuteUpdateAsync(s => s.SetProperty(l => l.FolderId, folderId), ct);
}
public async Task<ListConfigEntity?> GetConfigAsync(string listId, CancellationToken ct = default) public async Task<ListConfigEntity?> GetConfigAsync(string listId, CancellationToken ct = default)
{ {
return await _context.ListConfigs.FirstOrDefaultAsync(c => c.ListId == listId, ct); return await _context.ListConfigs.FirstOrDefaultAsync(c => c.ListId == listId, ct);
+4 -7
View File
@@ -37,12 +37,13 @@ public record AppSettingsDto(
int UsageThrottleSevenDaySoftPct = 50, int UsageThrottleSevenDaySoftPct = 50,
int UsageThrottleSevenDayHardPct = 65, int UsageThrottleSevenDayHardPct = 65,
bool AutoContinueOnUsageLimit = false, bool AutoContinueOnUsageLimit = false,
// PowerUse master switch — Settings → Execution. Only takes effect for a list that also set // PowerUse master switch — toggled on the usage monitor, not typed in Settings. Only takes
// PowerUseAllowed. // effect for a list that also set PowerUseAllowed.
bool PowerUseEnabled = false, bool PowerUseEnabled = false,
int ListHandlerMaxHandoffs = 4, int ListHandlerMaxHandoffs = 4,
// PowerUse time window (`HH:mm`, local, null = round the clock) + the 5h-usage percentage at // PowerUse time window (`HH:mm`, local, null = round the clock) + the 5h-usage percentage at
// which a PowerUse handler session should hand off. Same Settings tab. // which a PowerUse handler session should hand off. Also usage-monitor-owned, so Settings has
// to round-trip them too.
string? PowerUseWindowStart = null, string? PowerUseWindowStart = null,
string? PowerUseWindowEnd = null, string? PowerUseWindowEnd = null,
int PowerUseHandoffPct = 95); int PowerUseHandoffPct = 95);
@@ -216,10 +217,6 @@ public sealed record LaunchSpec(
IReadOnlyList<string> Args, IReadOnlyList<string> Args,
IReadOnlyDictionary<string, string> Env); IReadOnlyDictionary<string, string> Env);
// A handler round's still-open (Queued/Running) task, for the Mission Control "abandon run"
// action -- confirms with a count, then cancels each one before closing the pane.
public record HandlerOpenTaskDto(string Id, string Title);
public record TicketSettingsDto(string? ApiBaseUrl, bool TokenSet); public record TicketSettingsDto(string? ApiBaseUrl, bool TokenSet);
public record TicketConnectionDto(bool Ok, string? UserName, IReadOnlyList<string> Scopes, string? Error); public record TicketConnectionDto(bool Ok, string? UserName, IReadOnlyList<string> Scopes, string? Error);
public record TicketProjectDto(int Id, string Title, string DepartmentName); public record TicketProjectDto(int Id, string Title, string DepartmentName);
@@ -1,6 +1,5 @@
using System.Text.Json; using System.Text.Json;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -24,12 +23,11 @@ public sealed class ClaudeAuthCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var lookup = await _lookup.ResolveAsync(ctx, ct); var lookup = await _lookup.ResolveAsync(ctx, ct);
if (lookup.Resolved is null) if (lookup.Resolved is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title", return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title",
loc?["checks.claudeAuth.notFound"] ?? "The claude CLI was not found — login could not be checked."); "The claude CLI was not found — login could not be checked.");
} }
var (fileName, arguments) = ProcessCommand.For(lookup.Resolved, "auth", "status", "--json"); var (fileName, arguments) = ProcessCommand.For(lookup.Resolved, "auth", "status", "--json");
@@ -38,19 +36,19 @@ public sealed class ClaudeAuthCheck : IEnvironmentCheck
if (exitCode != 0) if (exitCode != 0)
{ {
return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title", return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title",
loc?["checks.claudeAuth.undetermined"] ?? "Login status could not be determined.", output); "Login status could not be determined.", output);
} }
var loggedIn = TryParseLoggedIn(output); var loggedIn = TryParseLoggedIn(output);
if (loggedIn is null) if (loggedIn is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title", return CheckResult.Unknown(Id, Severity, "checks.claudeAuth.title",
loc?["checks.claudeAuth.undetermined"] ?? "Login status could not be determined.", output); "Login status could not be determined.", output);
} }
return loggedIn.Value return loggedIn.Value
? CheckResult.Ok(Id, Severity, "checks.claudeAuth.title", loc?["checks.claudeAuth.loggedIn"] ?? "Logged in.") ? CheckResult.Ok(Id, Severity, "checks.claudeAuth.title", "Logged in.")
: CheckResult.Fail(Id, Severity, "checks.claudeAuth.title", loc?["checks.claudeAuth.notLoggedIn"] ?? "Not logged in.", "checks.claudeAuth.hint"); : CheckResult.Fail(Id, Severity, "checks.claudeAuth.title", "Not logged in.", "checks.claudeAuth.hint");
} }
private static bool? TryParseLoggedIn(string output) private static bool? TryParseLoggedIn(string output)
@@ -1,7 +1,6 @@
using System.IO; using System.IO;
using ClaudeDo.Data.Environment; using ClaudeDo.Data.Environment;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -22,21 +21,20 @@ public sealed class ClaudeCliCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var lookup = await _lookup.ResolveAsync(ctx, ct); var lookup = await _lookup.ResolveAsync(ctx, ct);
if (lookup.Resolved is null) if (lookup.Resolved is null)
{ {
var searched = string.Join(", ", SearchedLocations()); var searched = string.Join(", ", SearchedLocations());
return CheckResult.Fail(Id, Severity, "checks.claudeCli.title", return CheckResult.Fail(Id, Severity, "checks.claudeCli.title",
loc?.Get("checks.claudeCli.notFound", ctx.ClaudeBin, searched) ?? $"'{ctx.ClaudeBin}' was not found on PATH. Searched: {searched}.", $"'{ctx.ClaudeBin}' was not found on PATH. Searched: {searched}.",
"checks.claudeCli.hint"); "checks.claudeCli.hint");
} }
if (lookup.ExitCode != 0) if (lookup.ExitCode != 0)
{ {
return CheckResult.Fail(Id, Severity, "checks.claudeCli.title", return CheckResult.Fail(Id, Severity, "checks.claudeCli.title",
loc?.Get("checks.claudeCli.exitCode", lookup.Resolved.Path, lookup.ExitCode) ?? $"'{lookup.Resolved.Path}' exited with code {lookup.ExitCode}.", $"'{lookup.Resolved.Path}' exited with code {lookup.ExitCode}.",
"checks.claudeCli.hint", detail: lookup.Output); "checks.claudeCli.hint", detail: lookup.Output);
} }
@@ -44,8 +42,7 @@ public sealed class ClaudeCliCheck : IEnvironmentCheck
var detail = lookup.Resolved.IsShim var detail = lookup.Resolved.IsShim
? "Resolved via a shim (.cmd/.bat/.ps1), not a native .exe." ? "Resolved via a shim (.cmd/.bat/.ps1), not a native .exe."
: null; : null;
return CheckResult.Ok(Id, Severity, "checks.claudeCli.title", return CheckResult.Ok(Id, Severity, "checks.claudeCli.title", $"{lookup.Resolved.Path} — {version}", detail);
loc?.Get("checks.claudeCli.resolvedFormat", lookup.Resolved.Path, version) ?? $"{lookup.Resolved.Path} — {version}", detail);
} }
private IEnumerable<string> SearchedLocations() private IEnumerable<string> SearchedLocations()
@@ -1,5 +1,4 @@
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -28,29 +27,28 @@ public sealed class ClaudeVersionCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var lookup = await _lookup.ResolveAsync(ctx, ct); var lookup = await _lookup.ResolveAsync(ctx, ct);
if (lookup.Resolved is null) if (lookup.Resolved is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.claudeVersion.title", return CheckResult.Unknown(Id, Severity, "checks.claudeVersion.title",
loc?["checks.claudeVersion.notFound"] ?? "The claude CLI was not found — version could not be checked."); "The claude CLI was not found — version could not be checked.");
} }
if (lookup.ExitCode != 0 || lookup.ParsedVersion is null) if (lookup.ExitCode != 0 || lookup.ParsedVersion is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.claudeVersion.title", return CheckResult.Unknown(Id, Severity, "checks.claudeVersion.title",
loc?.Get("checks.claudeVersion.parseFailed", lookup.Output.Trim()) ?? $"Could not parse a version from '{lookup.Output.Trim()}'."); $"Could not parse a version from '{lookup.Output.Trim()}'.");
} }
if (lookup.ParsedVersion < MinimumVersion) if (lookup.ParsedVersion < MinimumVersion)
{ {
return CheckResult.Fail(Id, Severity, "checks.claudeVersion.title", return CheckResult.Fail(Id, Severity, "checks.claudeVersion.title",
loc?.Get("checks.claudeVersion.tooOld", lookup.ParsedVersion, MinimumVersion) ?? $"claude {lookup.ParsedVersion} is older than the required {MinimumVersion}.", $"claude {lookup.ParsedVersion} is older than the required {MinimumVersion}.",
"checks.claudeVersion.hint"); "checks.claudeVersion.hint");
} }
return CheckResult.Ok(Id, Severity, "checks.claudeVersion.title", return CheckResult.Ok(Id, Severity, "checks.claudeVersion.title",
loc?.Get("checks.claudeVersion.ok", lookup.ParsedVersion, MinimumVersion) ?? $"claude {lookup.ParsedVersion} meets the minimum ({MinimumVersion})."); $"claude {lookup.ParsedVersion} meets the minimum ({MinimumVersion}).");
} }
} }
+3 -8
View File
@@ -2,7 +2,6 @@ using System.Text.RegularExpressions;
using ClaudeDo.Data.Environment; using ClaudeDo.Data.Environment;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Core.Interfaces; using ClaudeDo.Installer.Core.Interfaces;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -28,12 +27,10 @@ public sealed class GitCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var resolved = ExecutableResolver.Resolve("git", _pathOverride, _pathExtOverride); var resolved = ExecutableResolver.Resolve("git", _pathOverride, _pathExtOverride);
if (resolved is null) if (resolved is null)
{ {
return CheckResult.Fail(Id, Severity, "checks.git.title", return CheckResult.Fail(Id, Severity, "checks.git.title", "git was not found on PATH.",
loc?["checks.git.notFound"] ?? "git was not found on PATH.",
"checks.git.hint", "https://git-scm.com/downloads"); "checks.git.hint", "https://git-scm.com/downloads");
} }
@@ -42,13 +39,11 @@ public sealed class GitCheck : IEnvironmentCheck
if (exitCode != 0) if (exitCode != 0)
{ {
return CheckResult.Fail(Id, Severity, "checks.git.title", return CheckResult.Fail(Id, Severity, "checks.git.title", $"'{resolved.Path}' exited with code {exitCode}.",
loc?.Get("checks.git.exitCode", resolved.Path, exitCode) ?? $"'{resolved.Path}' exited with code {exitCode}.",
"checks.git.hint", "https://git-scm.com/downloads", output); "checks.git.hint", "https://git-scm.com/downloads", output);
} }
var version = VersionPattern.Match(output) is { Success: true } match ? match.Value : output.Trim(); var version = VersionPattern.Match(output) is { Success: true } match ? match.Value : output.Trim();
return CheckResult.Ok(Id, Severity, "checks.git.title", return CheckResult.Ok(Id, Severity, "checks.git.title", $"{resolved.Path} — {version}");
loc?.Get("checks.git.resolvedFormat", resolved.Path, version) ?? $"{resolved.Path} — {version}");
} }
} }
@@ -1,7 +1,6 @@
using ClaudeDo.Data.Environment; using ClaudeDo.Data.Environment;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Core.Interfaces; using ClaudeDo.Installer.Core.Interfaces;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -26,12 +25,10 @@ public sealed class GitIdentityCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var resolved = ExecutableResolver.Resolve("git", _pathOverride, _pathExtOverride); var resolved = ExecutableResolver.Resolve("git", _pathOverride, _pathExtOverride);
if (resolved is null) if (resolved is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.gitIdentity.title", return CheckResult.Unknown(Id, Severity, "checks.gitIdentity.title", "git was not found — identity could not be checked.");
loc?["checks.gitIdentity.notFound"] ?? "git was not found — identity could not be checked.");
} }
var name = await ReadConfigAsync(resolved, "user.name", ct); var name = await ReadConfigAsync(resolved, "user.name", ct);
@@ -51,8 +48,7 @@ public sealed class GitIdentityCheck : IEnvironmentCheck
_ => "user.email", _ => "user.email",
}; };
return CheckResult.Fail(Id, Severity, "checks.gitIdentity.title", return CheckResult.Fail(Id, Severity, "checks.gitIdentity.title", $"Missing git identity: {missing}.", "checks.gitIdentity.hint");
loc?.Get("checks.gitIdentity.missing", missing) ?? $"Missing git identity: {missing}.", "checks.gitIdentity.hint");
} }
private async Task<string> ReadConfigAsync(ResolvedExecutable resolved, string key, CancellationToken ct) private async Task<string> ReadConfigAsync(ResolvedExecutable resolved, string key, CancellationToken ct)
@@ -1,6 +1,5 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -29,12 +28,11 @@ public sealed class PermissionModeAutoCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var lookup = await _lookup.ResolveAsync(ctx, ct); var lookup = await _lookup.ResolveAsync(ctx, ct);
if (lookup.Resolved is null) if (lookup.Resolved is null)
{ {
return CheckResult.Unknown(Id, Severity, "checks.permissionModeAuto.title", return CheckResult.Unknown(Id, Severity, "checks.permissionModeAuto.title",
loc?["checks.permissionModeAuto.notFound"] ?? "The claude CLI was not found — permission-mode support could not be checked."); "The claude CLI was not found — permission-mode support could not be checked.");
} }
var (fileName, arguments) = ProcessCommand.For(lookup.Resolved, "--help"); var (fileName, arguments) = ProcessCommand.For(lookup.Resolved, "--help");
@@ -43,17 +41,17 @@ public sealed class PermissionModeAutoCheck : IEnvironmentCheck
if (exitCode != 0 || string.IsNullOrWhiteSpace(output)) if (exitCode != 0 || string.IsNullOrWhiteSpace(output))
{ {
return CheckResult.Unknown(Id, Severity, "checks.permissionModeAuto.title", return CheckResult.Unknown(Id, Severity, "checks.permissionModeAuto.title",
loc?["checks.permissionModeAuto.undetermined"] ?? "Could not determine whether --permission-mode auto is supported."); "Could not determine whether --permission-mode auto is supported.");
} }
if (AutoIsListed(output)) if (AutoIsListed(output))
{ {
return CheckResult.Ok(Id, Severity, "checks.permissionModeAuto.title", return CheckResult.Ok(Id, Severity, "checks.permissionModeAuto.title",
loc?["checks.permissionModeAuto.ok"] ?? "--permission-mode auto is recognized by this CLI."); "--permission-mode auto is recognized by this CLI.");
} }
return CheckResult.Fail(Id, Severity, "checks.permissionModeAuto.title", return CheckResult.Fail(Id, Severity, "checks.permissionModeAuto.title",
loc?["checks.permissionModeAuto.notListed"] ?? "This claude CLI version does not list 'auto' as a --permission-mode choice.", "This claude CLI version does not list 'auto' as a --permission-mode choice.",
"checks.permissionModeAuto.hint"); "checks.permissionModeAuto.hint");
} }
+3 -9
View File
@@ -2,7 +2,6 @@ using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using ClaudeDo.Installer.Checks.Interfaces; using ClaudeDo.Installer.Checks.Interfaces;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -20,7 +19,6 @@ public sealed class PortCheck : IEnvironmentCheck
public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public async Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
var ports = new (string Label, int Port)[] var ports = new (string Label, int Port)[]
{ {
("SignalR", ctx.SignalRPort), ("SignalR", ctx.SignalRPort),
@@ -41,9 +39,7 @@ public sealed class PortCheck : IEnvironmentCheck
continue; continue;
} }
blocked.Add(owner is null blocked.Add(owner is null ? $"{label} port {port} is in use." : $"{label} port {port} is in use by '{owner}'.");
? loc?.Get("checks.ports.inUse", label, port) ?? $"{label} port {port} is in use."
: loc?.Get("checks.ports.inUseBy", label, port, owner) ?? $"{label} port {port} is in use by '{owner}'.");
} }
if (blocked.Count > 0) if (blocked.Count > 0)
@@ -53,12 +49,10 @@ public sealed class PortCheck : IEnvironmentCheck
if (ownWorker.Count > 0) if (ownWorker.Count > 0)
{ {
var ownWorkerList = string.Join(", ", ownWorker); return CheckResult.Ok(Id, Severity, "checks.ports.title", $"In use by the running ClaudeDo Worker: {string.Join(", ", ownWorker)}.");
return CheckResult.Ok(Id, Severity, "checks.ports.title",
loc?.Get("checks.ports.inUseByOwnWorker", ownWorkerList) ?? $"In use by the running ClaudeDo Worker: {ownWorkerList}.");
} }
return CheckResult.Ok(Id, Severity, "checks.ports.title", loc?["checks.ports.available"] ?? "Ports are available."); return CheckResult.Ok(Id, Severity, "checks.ports.title", "Ports are available.");
} }
private static bool IsFree(int port) private static bool IsFree(int port)
@@ -1,7 +1,6 @@
using System.IO; using System.IO;
using ClaudeDo.Data; using ClaudeDo.Data;
using ClaudeDo.Installer.Core; using ClaudeDo.Installer.Core;
using ClaudeDo.Installer.Localization;
namespace ClaudeDo.Installer.Checks; namespace ClaudeDo.Installer.Checks;
@@ -15,19 +14,17 @@ public sealed class WriteAccessCheck : IEnvironmentCheck
public Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct) public Task<CheckResult> RunAsync(InstallContext ctx, CancellationToken ct)
{ {
var loc = TrExtension.Localizer;
foreach (var target in new[] { ctx.InstallDirectory, Paths.AppDataRoot() }) foreach (var target in new[] { ctx.InstallDirectory, Paths.AppDataRoot() })
{ {
var error = TryWrite(target); var error = TryWrite(target);
if (error is not null) if (error is not null)
{ {
return Task.FromResult(CheckResult.Fail(Id, Severity, "checks.writeAccess.title", return Task.FromResult(CheckResult.Fail(Id, Severity, "checks.writeAccess.title",
loc?.Get("checks.writeAccess.cannotWrite", target, error) ?? $"Cannot write to '{target}': {error}", "checks.writeAccess.hint")); $"Cannot write to '{target}': {error}", "checks.writeAccess.hint"));
} }
} }
return Task.FromResult(CheckResult.Ok(Id, Severity, "checks.writeAccess.title", return Task.FromResult(CheckResult.Ok(Id, Severity, "checks.writeAccess.title", "Install directory and data directory are writable."));
loc?["checks.writeAccess.writable"] ?? "Install directory and data directory are writable."));
} }
private static string? TryWrite(string path) private static string? TryWrite(string path)
+72 -136
View File
@@ -11,7 +11,6 @@
"categoryGeneral": "Allgemein", "categoryGeneral": "Allgemein",
"categoryExecution": "Ausführung", "categoryExecution": "Ausführung",
"categoryPrime": "Prime Claude", "categoryPrime": "Prime Claude",
"categoryPrimeHint": "Geplante Claude-Läufe: Ping, My Day füllen oder ein eigener Prompt, zu festen Zeiten.",
"categoryWorktrees": "Worktrees", "categoryWorktrees": "Worktrees",
"categoryFiles": "Dateien & Prompts", "categoryFiles": "Dateien & Prompts",
"categorySkills": "Session Skills", "categorySkills": "Session Skills",
@@ -28,7 +27,6 @@
"model": "Modell", "model": "Modell",
"maxTurns": "Max. Durchläufe", "maxTurns": "Max. Durchläufe",
"effort": "Effort", "effort": "Effort",
"effortHint": "Denkaufwand, den das Modell anwendet. Höher kostet mehr und denkt tiefer.",
"modelPresets": "Vorgaben pro Modell", "modelPresets": "Vorgaben pro Modell",
"modelPresetsHint": "Effort und Durchlauf-Budget, mit denen eine Sitzung unter diesem Modell läuft. Overrides auf Listen- und Aufgabenebene gewinnen weiterhin.", "modelPresetsHint": "Effort und Durchlauf-Budget, mit denen eine Sitzung unter diesem Modell läuft. Overrides auf Listen- und Aufgabenebene gewinnen weiterhin.",
"maxTurnsCeiling": "Max. Durchläufe – Obergrenze", "maxTurnsCeiling": "Max. Durchläufe – Obergrenze",
@@ -38,23 +36,15 @@
"maxParallelExecutions": "Max. parallele Ausführungen", "maxParallelExecutions": "Max. parallele Ausführungen",
"maxParallelExecutionsHint": "Wie viele Aufgaben aus der Warteschlange der Worker gleichzeitig ausführt.", "maxParallelExecutionsHint": "Wie viele Aufgaben aus der Warteschlange der Worker gleichzeitig ausführt.",
"usageGateHeading": "Usage-Limit-Stopp", "usageGateHeading": "Usage-Limit-Stopp",
"usageGateHint": "Ab dieser Auslastung holt die Warteschlange keine neuen Aufgaben mehr; laufende Aufgaben laufen zu Ende. 0 schaltet den Stopp ab.", "usageGateHint": "Ab dieser Auslastung holt die Queue keine neuen Tasks mehr; laufende Tasks laufen zu Ende. 0 schaltet den Stopp ab.",
"usageGateFiveHourPct": "5-Stunden-Fenster (%)", "usageGateFiveHourPct": "5-Stunden-Fenster (%)",
"usageGateSevenDayPct": "7-Tage-Fenster (%)", "usageGateSevenDayPct": "7-Tage-Fenster (%)",
"autoContinueOnUsageLimit": "Nach Limit-Reset fortsetzen", "autoContinueOnUsageLimit": "Nach Limit-Reset fortsetzen",
"autoContinueOnUsageLimitHint": "Ist ein Run am Nutzungslimit abgebrochen, wird er nach Ablauf des 5-Stunden-Fensters automatisch fortgesetzt. Weckt außerdem die pausierte Warteschlange genau zum Reset-Zeitpunkt statt erst beim nächsten Backstop-Check.", "autoContinueOnUsageLimitHint": "Ist ein Run am Nutzungslimit abgebrochen, wird er nach Ablauf des 5-Stunden-Fensters automatisch fortgesetzt. Weckt außerdem die pausierte Queue genau zum Reset-Zeitpunkt statt erst beim nächsten Backstop-Check.",
"listHandlerMaxHandoffs": "Handoff-Budget des List-Handlers", "listHandlerMaxHandoffs": "Handoff-Budget des List-Handlers",
"listHandlerMaxHandoffsHint": "Wie viele Wait/Merge-Handoffs ein „Let Claude handle it\"-Run verketten darf. 4 entspricht zwei Merge-Runden. Für Läufe, die stundenlang durchlaufen sollen, höher setzen; der Wert begrenzt eine entlaufene Kette und darf daher nicht 0 sein.", "listHandlerMaxHandoffsHint": "Wie viele Wait/Merge-Handoffs ein „Let Claude handle it\"-Run verketten darf. 4 entspricht zwei Merge-Runden. Für Läufe, die stundenlang durchlaufen sollen, höher setzen; der Wert begrenzt eine entlaufene Kette und darf daher nicht 0 sein.",
"powerUseHeading": "PowerUse",
"powerUse": "PowerUse aktivieren",
"powerUseHint": "Das restliche Fenster ausnutzen: ein List-Handler-Run fragt nichts, löst Konflikte selbst, sammelt neue Arbeit und handoffet weiter, solange sein Budget reicht. Wirkt nur auf Listen, die PowerUse in ihren Listen-Einstellungen erlaubt haben.",
"powerUseWindow": "Nur zwischen",
"powerUseWindowPlaceholder": "HH:mm",
"powerUseHandoffPct": "Übergabe bei (% von 5h)",
"powerUseWindowHint": "Beide Zeiten leer = rund um die Uhr. Das Fenster wird bei jedem Start einer Handler-Phase geprüft — eine Kette, die über das Ende hinausläuft, macht ohne PowerUse weiter.",
"powerUseWindowInvalid": "PowerUse-Zeiten müssen im Format HH:mm sein oder leer bleiben.",
"throttleStagesHeading": "Throttle-Stufen", "throttleStagesHeading": "Throttle-Stufen",
"throttleStagesHint": "Die Parallelität wird vor dem harten Limit-Stopp begrenzt: soft auf 2 Slots, hard auf 1. Eingestellt wird das durch Ziehen der Marker an den Gauges im Usage-Monitor. Der Monitor schließt diese Einstellungen — vorher speichern, wenn du etwas geändert hast.", "throttleStagesHint": "Die Parallelität wird vor dem harten Gate begrenzt: soft auf 2 Slots, hard auf 1. Eingestellt wird das durch Ziehen der Marker an den Gauges im Usage-Monitor. Der Monitor schließt diese Einstellungen — vorher speichern, wenn du etwas geändert hast.",
"throttleStagesValues": "5h: soft {0}% / hard {1}% · 7d: soft {2}% / hard {3}%", "throttleStagesValues": "5h: soft {0}% / hard {1}% · 7d: soft {2}% / hard {3}%",
"openUsageMonitor": "Usage-Monitor öffnen...", "openUsageMonitor": "Usage-Monitor öffnen...",
"reportExcludedPaths": "Bericht: ausgeschlossene Pfade (einer pro Zeile)", "reportExcludedPaths": "Bericht: ausgeschlossene Pfade (einer pro Zeile)",
@@ -236,13 +226,12 @@
"reasonIsPlanningParent": "Teil eines Plans", "reasonIsPlanningParent": "Teil eines Plans",
"reasonIsChildTask": "Teilaufgaben haben keine eigene Planungssitzung", "reasonIsChildTask": "Teilaufgaben haben keine eigene Planungssitzung",
"reasonPlanAlreadyFinalized": "Plan ist bereits finalisiert", "reasonPlanAlreadyFinalized": "Plan ist bereits finalisiert",
"reasonNoWorktree": "Kein Worktree für diese Aufgabe", "reasonNoWorktree": "Kein Worktree für diesen Task",
"cancel": "Abbrechen", "cancel": "Abbrechen",
"removeFromQueueTip": "Aus Warteschlange entfernen", "removeFromQueueTip": "Aus Warteschlange entfernen",
"toggleSubtasksTip": "Unteraufgaben ein-/ausklappen", "toggleSubtasksTip": "Unteraufgaben ein-/ausklappen",
"agentSuggestedTip": "Vom Agenten vorgeschlagen", "agentSuggestedTip": "Vom Agenten vorgeschlagen",
"interactiveChipTip": "Interaktive Sitzung offen — klicken, um im Mission Control dorthin zu springen", "interactiveChipTip": "Interaktive Sitzung offen — klicken, um im Mission Control dorthin zu springen",
"waitingOnTip": "Wartet auf {0}",
"scheduleTitle": "Aufgabe planen", "scheduleTitle": "Aufgabe planen",
"scheduleWhen": "WANN", "scheduleWhen": "WANN",
"scheduleConfirm": "Planen", "scheduleConfirm": "Planen",
@@ -264,24 +253,21 @@
"contextOpenFindings": "Findings-Ordner öffnen", "contextOpenFindings": "Findings-Ordner öffnen",
"contextImportTickets": "Aus Ticketsystem aktualisieren", "contextImportTickets": "Aus Ticketsystem aktualisieren",
"contextSettings": "Einstellungen…", "contextSettings": "Einstellungen…",
"contextFolderSettings": "Ordner-Einstellungen…",
"contextRemoveFromFolder": "Aus Ordner herausnehmen",
"newList": "Neue Liste", "newList": "Neue Liste",
"addReposTip": "Repos als Listen hinzufügen", "addReposTip": "Repos als Listen hinzufügen",
"noRepoBannerText": "Noch kein Repo verknüpft. ClaudeDo führt Aufgaben in einem Git-Repo aus.", "noRepoBannerText": "Noch kein Repo verknüpft. ClaudeDo führt Tasks in einem Git-Repo aus.",
"noRepoBannerButton": "Repo importieren", "noRepoBannerButton": "Repo importieren",
"importTicketsResult": "{0} Tickets geprüft, {1} neue Tasks." "importTicketsResult": "{0} Tickets geprüft, {1} neue Tasks."
}, },
"details": { "details": {
"deleteTaskTip": "Aufgabe löschen", "deleteTaskTip": "Aufgabe löschen",
"killSessionTip": "Laufende Sitzung hart beenden", "killSessionTip": "Laufende Sitzung beenden",
"sendToQueue": "In Warteschlange einreihen", "sendToQueue": "In Warteschlange einreihen",
"sendToQueueTip": "Diese Aufgabe in die Warteschlange einreihen, damit Claude sie beim nächsten Lauf übernimmt", "sendToQueueTip": "Diese Aufgabe in die Warteschlange einreihen, damit Claude sie beim nächsten Lauf übernimmt",
"copyTaskIdTip": "Aufgaben-ID kopieren", "copyTaskIdTip": "Aufgaben-ID kopieren",
"starTip": "Favorit", "starTip": "Favorit",
"agentSettingsTip": "Agent-Einstellungen", "agentSettingsTip": "Agent-Einstellungen",
"agentSettingsHeading": "Agent-Einstellungen (Überschreibungen)", "agentSettingsHeading": "Agent-Einstellungen (Überschreibungen)",
"waitingOnPrefix": "Wartet auf",
"copyFormattedTip": "Titel, Beschreibung und offene Schritte kopieren", "copyFormattedTip": "Titel, Beschreibung und offene Schritte kopieren",
"toggleEditPreviewTip": "Bearbeiten/Vorschau umschalten", "toggleEditPreviewTip": "Bearbeiten/Vorschau umschalten",
"planDay": "Tag planen", "planDay": "Tag planen",
@@ -307,36 +293,7 @@
"steps": "Schritte", "steps": "Schritte",
"files": "Dateien" "files": "Dateien"
}, },
"emptyState": "Wähle eine Aufgabe aus, um Details zu sehen", "emptyState": "Wähle eine Aufgabe aus, um Details zu sehen"
"roadblockLabel": "ROADBLOCK",
"stepsCard": {
"preview": "Vorschau",
"edit": "Bearbeiten",
"addStepPlaceholder": "Schritt hinzufügen…"
},
"workConsole": {
"continue": "Fortsetzen",
"resetAndRetry": "Zurücksetzen & erneut versuchen",
"tabOutput": "Ausgabe",
"tabGit": "Git",
"tabSession": "Sitzung",
"outcomeLabel": "ERGEBNIS",
"reviewLabel": "REVIEW",
"mergeLabel": "MERGE",
"targetBranch": "Zielbranch",
"openDiff": "Diff öffnen",
"worktree": "Worktree",
"reviewCombinedDiff": "Kombinierten Diff prüfen",
"openDiffHint": "Diff öffnen, um Mergen freizuschalten",
"approveMerge": "Genehmigen & Mergen",
"park": "Parken",
"parkTip": "Zurückstellen — zurück auf Leerlauf, Worktree bleibt erhalten",
"cancel": "Abbrechen",
"resetDiscardBranch": "Zurücksetzen (Branch verwerfen)…",
"submitForReviewHint": "Von Hand daran gearbeitet? Den Worktree zum Review einreichen, um ihn zu mergen.",
"submitForReview": "Zum Review einreichen",
"outcomesLabel": "ERGEBNISSE"
}
}, },
"agent": { "agent": {
"openWorktreeTip": "Worktree im Datei-Explorer öffnen — benötigt einen aktiven Worktree", "openWorktreeTip": "Worktree im Datei-Explorer öffnen — benötigt einen aktiven Worktree",
@@ -375,17 +332,13 @@
"failed": "Fehlgeschlagen", "failed": "Fehlgeschlagen",
"roadblock": "Blockade gemeldet", "roadblock": "Blockade gemeldet",
"openSession": "Sitzung öffnen", "openSession": "Sitzung öffnen",
"homeFolder": "Home (Schnellsitzung)",
"browseForFolder": "Ordner wählen…", "browseForFolder": "Ordner wählen…",
"focusMode": "Fokus", "focusMode": "Fokus",
"overviewMode": "Übersicht", "overviewMode": "Übersicht",
"closeSession": "Sitzung hart beenden", "closeSession": "Sitzung beenden",
"closeSessionConfirm": "Laufende Sitzung beenden? Der Claude-Prozess wird abgebrochen.",
"conptyLaunchFailed": "Interaktive Sitzung konnte nicht geöffnet werden: {0}", "conptyLaunchFailed": "Interaktive Sitzung konnte nicht geöffnet werden: {0}",
"conptyStarting": "Sitzung wird gestartet…", "conptyStarting": "Sitzung wird gestartet…",
"conptyExited": "Sitzung beendet (Code {0}).",
"usageWarningNotDelivered": "Die Listen-Handler-Sitzung konnte nicht vor dem Usage-Limit gewarnt werden.", "usageWarningNotDelivered": "Die Listen-Handler-Sitzung konnte nicht vor dem Usage-Limit gewarnt werden.",
"terminalSendFailed": "Konnte nicht an die Terminal-Sitzung gesendet werden.",
"mergeHelperTitle": "Merge-Helfer", "mergeHelperTitle": "Merge-Helfer",
"mergeHelperHandoffTitleSuffix": " (Übergabe)", "mergeHelperHandoffTitleSuffix": " (Übergabe)",
"mergeHelperTaskTitle": "Listen-Handler: {0}", "mergeHelperTaskTitle": "Listen-Handler: {0}",
@@ -401,10 +354,6 @@
"enqueueAlreadyOpen": "Kann nicht in die Warteschlange gestellt werden — dieser Task hat eine offene interaktive Sitzung.", "enqueueAlreadyOpen": "Kann nicht in die Warteschlange gestellt werden — dieser Task hat eine offene interaktive Sitzung.",
"enqueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}", "enqueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}",
"queueRefreshFailed": "Warteschlange konnte nicht aktualisiert werden: {0}", "queueRefreshFailed": "Warteschlange konnte nicht aktualisiert werden: {0}",
"abandonRun": "Lauf abbrechen",
"abandonRunTip": "Die noch offenen Tasks dieses Laufs abbrechen und die Sitzung schließen",
"abandonRunConfirm": "{0} offene Aufgabe(n) abbrechen und diese Sitzung schließen? Aufgaben im Review oder bereits erledigt bleiben unangetastet.",
"abandonRunFailed": "Offene Tasks konnten nicht abgebrochen werden: {0}",
"question": { "question": {
"title": "Claude fragt nach", "title": "Claude fragt nach",
"placeholder": "Antwort eingeben…", "placeholder": "Antwort eingeben…",
@@ -438,18 +387,11 @@
"body": "ClaudeDo kann den Hintergrund-Worker nicht erreichen. Normalerweise wird er bei der Anmeldung automatisch gestartet. Du kannst ihn jetzt starten oder neu installieren, falls das Problem bestehen bleibt.", "body": "ClaudeDo kann den Hintergrund-Worker nicht erreichen. Normalerweise wird er bei der Anmeldung automatisch gestartet. Du kannst ihn jetzt starten oder neu installieren, falls das Problem bestehen bleibt.",
"dismiss": "Ausblenden", "dismiss": "Ausblenden",
"rerunInstaller": "Installer erneut ausführen", "rerunInstaller": "Installer erneut ausführen",
"startWorker": "Worker starten", "startWorker": "Worker starten"
"workerNotFound": "Worker-Programm nicht gefunden. Installation prüfen.",
"installerNotFound": "Installer nicht gefunden. Installation prüfen.",
"startFailed": "Start fehlgeschlagen: {0}"
}, },
"listSettings": { "listSettings": {
"title": "LISTENEINSTELLUNGEN", "title": "LISTENEINSTELLUNGEN",
"folderTitle": "ORDNER",
"deleteList": "Liste löschen", "deleteList": "Liste löschen",
"deleteFolder": "Ordner löschen",
"createAsFolder": "Stattdessen einen Ordner anlegen",
"createAsFolderHint": "Ein Ordner gruppiert nur Listen in der Seitenleiste — er enthält keine Aufgaben und führt nichts aus. Listen per Drag-and-Drop hineinziehen.",
"sectionGeneral": "ALLGEMEIN", "sectionGeneral": "ALLGEMEIN",
"name": "Name", "name": "Name",
"workingDirectory": "Arbeitsverzeichnis", "workingDirectory": "Arbeitsverzeichnis",
@@ -461,7 +403,7 @@
"findingsTracked": "Findings-Ordner .claudedo einchecken", "findingsTracked": "Findings-Ordner .claudedo einchecken",
"findingsTrackedHint": "Aus: der Ordner bleibt über .git/info/exclude aus git heraus. An: Findings reisen mit dem Repo.", "findingsTrackedHint": "Aus: der Ordner bleibt über .git/info/exclude aus git heraus. An: Findings reisen mit dem Repo.",
"powerUseAllowed": "PowerUse für diese Liste erlauben", "powerUseAllowed": "PowerUse für diese Liste erlauben",
"powerUseAllowedHint": "Erlaubt einem List-Handler-Run auf dieser Liste, unbeaufsichtigt zu laufen, sobald PowerUse in Einstellungen → Ausführung eingeschaltet ist: er fragt nichts, löst Konflikte selbst und sammelt neue Arbeit. Beide Schalter sind nötig — ein global aktives PowerUse ändert an einer Liste ohne Opt-in also nichts.", "powerUseAllowedHint": "Erlaubt einem List-Handler-Run auf dieser Liste, unbeaufsichtigt zu laufen, sobald PowerUse im Usage-Monitor eingeschaltet ist: er fragt nichts, löst Konflikte selbst und sammelt neue Arbeit. Beide Schalter sind nötig — ein global aktives PowerUse ändert an einer Liste ohne Opt-in also nichts.",
"sectionIcon": "ICON", "sectionIcon": "ICON",
"icon": "Listen-Icon", "icon": "Listen-Icon",
"iconHint": "Wird in der Seitenleiste neben dem Listennamen angezeigt.", "iconHint": "Wird in der Seitenleiste neben dem Listennamen angezeigt.",
@@ -481,8 +423,7 @@
"targetBranch": "Ziel-Branch", "targetBranch": "Ziel-Branch",
"removeWorktree": "Worktree nach dem Mergen entfernen", "removeWorktree": "Worktree nach dem Mergen entfernen",
"commitMessage": "Commit-Nachricht", "commitMessage": "Commit-Nachricht",
"conflictedFiles": "Konfliktdateien:", "conflictedFiles": "Konfliktdateien:"
"stashAndMerge": "Änderungen stashen und mergen"
}, },
"diff": { "diff": {
"title": "DIFF", "title": "DIFF",
@@ -538,8 +479,6 @@
"windowTitle": "Claude machen lassen", "windowTitle": "Claude machen lassen",
"scopeList": "Liste: {0}", "scopeList": "Liste: {0}",
"scopeReview": "Alle Listen — Tasks im Review", "scopeReview": "Alle Listen — Tasks im Review",
"modelLabel": "Modell",
"modelTip": "Modell für die Triage-Session (Dedupe & Verfeinern). Spätere Merge-Phasen laufen immer auf Opus.",
"confirm": "Claude machen lassen", "confirm": "Claude machen lassen",
"cancel": "Abbrechen", "cancel": "Abbrechen",
"selectAll": "Alle auswählen", "selectAll": "Alle auswählen",
@@ -567,27 +506,27 @@
"regenerate": "Neu erstellen", "regenerate": "Neu erstellen",
"emptyStateHint": "Noch kein Bericht für diesen Zeitraum. Klicke auf „Erstellen“." "emptyStateHint": "Noch kein Bericht für diesen Zeitraum. Klicke auf „Erstellen“."
}, },
"cheatSheets": {
"title": "CHEAT SHEETS",
"windowTitle": "Cheat Sheets",
"pin": "Anpinnen",
"pinTooltip": "Fenster über den anderen halten",
"missing": "Cheat Sheet {0} nicht gefunden."
},
"usageMonitor": { "usageMonitor": {
"title": "USAGE MONITOR", "title": "USAGE MONITOR",
"windowTitle": "Usage Monitor", "windowTitle": "Usage Monitor",
"noGauges": "Noch keine Nutzungslimits gemeldet.", "noGauges": "Noch keine Nutzungslimits gemeldet.",
"refreshHint": "Jetzt aktualisieren — Abruf alle 5 Min., während ein Task läuft, sonst alle 15 Min.", "powerUse": "PowerUse",
"powerUseHint": "Das restliche Fenster ausnutzen: ein List-Handler-Run fragt nichts, löst Konflikte selbst, sammelt neue Arbeit und handoffet weiter, solange sein Budget reicht. Wirkt nur auf Listen, die PowerUse in ihren Listen-Einstellungen erlaubt haben.",
"powerUseWindow": "Nur zwischen",
"powerUseWindowPlaceholder": "HH:mm",
"powerUseHandoffPct": "Übergabe bei (% von 5h)",
"powerUseWindowHint": "Beide Zeiten leer = rund um die Uhr. Das Fenster wird bei jedem Start einer Handler-Phase geprüft — eine Kette, die über das Ende hinausläuft, macht ohne PowerUse weiter.",
"refresh": "Jetzt aktualisieren",
"refreshHint": "Abruf alle 5 Min., während ein Task läuft, sonst alle 15 Min.",
"staleFormat": "Werte veraltet (Stand {0})", "staleFormat": "Werte veraltet (Stand {0})",
"staleGateHint": "Der Limit-Stopp greift in diesem Zustand nicht.", "staleGateHint": "Das Gate greift in diesem Zustand nicht.",
"gateBlockedFormat": "Warteschlange pausiert — {0}", "gateBlockedFormat": "Warteschlange pausiert — {0}",
"throttleFormat": "Warteschlange gedrosselt: {0}/{1} Slots ({2})", "throttleFormat": "Warteschlange gedrosselt: {0}/{1} Slots ({2})",
"resetIn": "Reset in {0} ({1})", "resetIn": "Reset in {0} ({1})",
"dragHint": "Marker ziehen oder Wert unten eintragen.", "dragHint": "Marker ziehen oder Wert unten eintragen.",
"legendSoft": "Soft · 2 Slots", "legendSoft": "Soft · 2 Slots",
"legendHard": "Hard · 1 Slot", "legendHard": "Hard · 1 Slot",
"legendGate": "Limit-Stopp · Pause", "legendGate": "Gate · Pause",
"gaugeSession": "Session (5 Std.)", "gaugeSession": "Session (5 Std.)",
"gaugeWeeklyAll": "Woche (alle Modelle)", "gaugeWeeklyAll": "Woche (alle Modelle)",
"gaugeWeeklyScopedFormat": "Woche ({0})", "gaugeWeeklyScopedFormat": "Woche ({0})",
@@ -607,7 +546,7 @@
"columnOtherOut": "ÜBRIGES OUT", "columnOtherOut": "ÜBRIGES OUT",
"columnOtherCache": "ÜBRIGES CACHE", "columnOtherCache": "ÜBRIGES CACHE",
"columnShare": "ANTEIL", "columnShare": "ANTEIL",
"columnTask": "AUFGABE", "columnTask": "TASK",
"columnList": "LISTE", "columnList": "LISTE",
"columnModelShort": "MODELL", "columnModelShort": "MODELL",
"columnRuns": "RUNS", "columnRuns": "RUNS",
@@ -711,61 +650,35 @@
"checks": { "checks": {
"git": { "git": {
"title": "Git", "title": "Git",
"hint": "Installiere Git von https://git-scm.com/downloads und starte den Installer neu.", "hint": "Installiere Git und stelle sicher, dass es im PATH liegt."
"notFound": "git wurde nicht im PATH gefunden.",
"exitCode": "'{0}' wurde mit Exitcode {1} beendet.",
"resolvedFormat": "{0} — {1}"
}, },
"gitIdentity": { "gitIdentity": {
"title": "Git-Identität", "title": "Git-Identität",
"hint": "Führe aus: git config --global user.name \"Dein Name\" und git config --global user.email \"du@example.com\"", "hint": "Lege deine Git-Identität fest: git config --global user.name \"...\" und user.email \"...\"."
"notFound": "git wurde nicht gefunden — Identität konnte nicht geprüft werden.",
"missing": "Fehlende Git-Identität: {0}."
}, },
"ports": { "ports": {
"title": "Ports", "title": "Ports",
"hint": "Ändere die SignalR-/MCP-Ports auf der Dienste-Seite, oder beende den blockierenden Prozess.", "hint": "Gib den Port frei oder ändere ihn nach der Installation auf der Worker-Seite."
"inUse": "{0}-Port {1} ist belegt.",
"inUseBy": "{0}-Port {1} ist belegt von '{2}'.",
"inUseByOwnWorker": "Belegt vom laufenden ClaudeDo Worker: {0}.",
"available": "Ports sind verfügbar."
}, },
"writeAccess": { "writeAccess": {
"title": "Schreibzugriff", "title": "Schreibzugriff",
"hint": "Wähle ein anderes Installationsverzeichnis oder starte den Installer mit ausreichenden Rechten (z. B. als Administrator).", "hint": "Wähle ein anderes Installationsverzeichnis oder starte den Installer als Administrator."
"cannotWrite": "Kein Schreibzugriff auf '{0}': {1}",
"writable": "Installations- und Datenverzeichnis sind beschreibbar."
}, },
"claudeCli": { "claudeCli": {
"title": "Claude CLI", "title": "Claude CLI",
"hint": "Installiere die Claude CLI (npm install -g @anthropic-ai/claude-code) und starte danach dein Terminal/deine Anmeldesitzung neu, damit der aktualisierte PATH greift.", "hint": "Installiere die Claude CLI und stelle sicher, dass sie im PATH liegt."
"notFound": "'{0}' wurde nicht im PATH gefunden. Durchsucht: {1}.",
"exitCode": "'{0}' wurde mit Exitcode {1} beendet.",
"resolvedFormat": "{0} — {1}"
}, },
"claudeVersion": { "claudeVersion": {
"title": "Claude-CLI-Version", "title": "Claude-CLI-Version",
"hint": "Aktualisiere die CLI: npm update -g @anthropic-ai/claude-code", "hint": "Aktualisiere die Claude CLI auf eine neuere Version."
"notFound": "Die claude-CLI wurde nicht gefunden — Version konnte nicht geprüft werden.",
"parseFailed": "Konnte keine Version aus '{0}' auslesen.",
"tooOld": "claude {0} ist älter als die erforderliche Version {1}.",
"ok": "claude {0} erfüllt die Mindestanforderung ({1})."
}, },
"claudeAuth": { "claudeAuth": {
"title": "Claude-CLI-Login", "title": "Claude-Anmeldung",
"hint": "Starte 'claude' einmal und schließe den Login-Vorgang ab.", "hint": "Führe 'claude auth login' aus, um dich anzumelden."
"notFound": "Die claude-CLI wurde nicht gefunden — Login konnte nicht geprüft werden.",
"undetermined": "Login-Status konnte nicht ermittelt werden.",
"notLoggedIn": "Nicht angemeldet.",
"loggedIn": "Angemeldet."
}, },
"permissionModeAuto": { "permissionModeAuto": {
"title": "Berechtigungsmodus", "title": "Berechtigungsmodus",
"hint": "Aktualisiere die CLI: npm update -g @anthropic-ai/claude-code. ClaudeDo funktioniert auch im Modus acceptEdits/default, dann mit mehr Rückfragen.", "hint": "Aktualisiere die Claude CLI auf eine Version, die --permission-mode auto unterstützt."
"notFound": "Die claude-CLI wurde nicht gefunden — Unterstützung für permission-mode konnte nicht geprüft werden.",
"undetermined": "Konnte nicht ermitteln, ob --permission-mode auto unterstützt wird.",
"ok": "--permission-mode auto wird von dieser CLI erkannt.",
"notListed": "Diese claude-CLI-Version listet 'auto' nicht als --permission-mode-Option."
} }
}, },
"planning": { "planning": {
@@ -793,9 +706,6 @@
"abort": "Merge abbrechen" "abort": "Merge abbrechen"
}, },
"controls": { "controls": {
"markdown": {
"copy": "Befehl kopieren"
},
"datePicker": { "datePicker": {
"today": "Heute", "today": "Heute",
"tomorrow": "Morgen", "tomorrow": "Morgen",
@@ -812,18 +722,9 @@
"repositories": "Repositories", "repositories": "Repositories",
"checkForUpdates": "Nach Updates suchen", "checkForUpdates": "Nach Updates suchen",
"restartWorker": "Worker neu starten", "restartWorker": "Worker neu starten",
"updateClaudeCli": "Claude CLI aktualisieren",
"shutdown": "Beenden",
"worktrees": "Worktrees…", "worktrees": "Worktrees…",
"weeklyReport": "Wochenbericht…", "weeklyReport": "Wochenbericht…",
"usageMonitor": "Usage Monitor…", "usageMonitor": "Usage Monitor…",
"cheatSheets": "Cheat Sheets",
"cheatSheetGit": "Git…",
"cheatSheetCommits": "Conventional Commits…",
"cheatSheetClaude": "Claude CLI…",
"cheatSheetClaudeConfig": "Claude-Konfiguration…",
"cheatSheetDotnet": "dotnet CLI…",
"cheatSheetPowershell": "PowerShell…",
"about": "Über…", "about": "Über…",
"addRepos": "Repos als Listen hinzufügen…" "addRepos": "Repos als Listen hinzufügen…"
}, },
@@ -839,10 +740,10 @@
}, },
"vm": { "vm": {
"connection": { "online": "Online", "connecting": "Verbinden…", "offline": "Offline" }, "connection": { "online": "Online", "connecting": "Verbinden…", "offline": "Offline" },
"shell": { "unexpectedError": "Unerwarteter Fehler: {0}", "shutdownConfirm": "Dadurch wird der ClaudeDo-Worker beendet (laufende Task-Runs und interaktive Sitzungen brechen ab) und die App geschlossen. Fortfahren?" }, "shell": { "restartingWorker": "Worker wird neu gestartet…", "unexpectedError": "Unerwarteter Fehler: {0}" },
"mainWindow": { "closeConfirm": { "message": "{0} Mission-Control-Sitzung(en) laufen noch. Beim Beenden werden sie abgebrochen. Trotzdem schließen?" } }, "mainWindow": { "closeConfirm": { "message": "{0} Mission-Control-Sitzung(en) laufen noch. Beim Beenden werden sie abgebrochen. Trotzdem schließen?" } },
"agentStatus": { "idle": "Leerlauf", "queued": "In Warteschlange", "running": "Läuft", "review": "Prüfung", "children": "Wartet auf Teilaufgaben", "done": "Fertig", "failed": "Fehlgeschlagen", "cancelled": "Abgebrochen" }, "agentStatus": { "idle": "Leerlauf", "queued": "In Warteschlange", "running": "Läuft", "review": "Prüfung", "children": "Wartet auf Teilaufgaben", "done": "Fertig", "failed": "Fehlgeschlagen", "cancelled": "Abgebrochen" },
"taskStatus": { "idle": "Leerlauf", "queued": "In Warteschlange", "running": "Läuft", "waitingForReview": "Wartet auf Prüfung", "waitingForChildren": "Wartet auf Teilaufgaben", "done": "Fertig", "failed": "Fehlgeschlagen", "cancelled": "Abgebrochen", "parked": "Geparkt", "interactive": "Interaktiv", "waiting": "Wartet" }, "taskStatus": { "idle": "Leerlauf", "queued": "In Warteschlange", "running": "Läuft", "waitingForReview": "Wartet auf Prüfung", "waitingForChildren": "Wartet auf Teilaufgaben", "done": "Fertig", "failed": "Fehlgeschlagen", "cancelled": "Abgebrochen", "parked": "Geparkt", "interactive": "Interaktiv" },
"failureReason": { "maxTurns": "Turn-Limit erreicht", "timeout": "Zeitüberschreitung", "usageLimit": "Nutzungslimit erreicht", "error": "Fehler", "cancelled": "Abgebrochen", "unknown": "Grund unbekannt" }, "failureReason": { "maxTurns": "Turn-Limit erreicht", "timeout": "Zeitüberschreitung", "usageLimit": "Nutzungslimit erreicht", "error": "Fehler", "cancelled": "Abgebrochen", "unknown": "Grund unbekannt" },
"failureReasonTooltip": { "maxTurns": "Turn-Limit erreicht ({0}/{1} Turns) — der Worktree ist meist brauchbar; Task fortsetzen statt zurücksetzen." }, "failureReasonTooltip": { "maxTurns": "Turn-Limit erreicht ({0}/{1} Turns) — der Worktree ist meist brauchbar; Task fortsetzen statt zurücksetzen." },
"planningBadge": { "active": "PLANUNG", "finalized": "GEPLANT" }, "planningBadge": { "active": "PLANUNG", "finalized": "GEPLANT" },
@@ -851,7 +752,7 @@
"tasksIsland": { "completedHeader": "ABGESCHLOSSEN", "completedHeaderCount": "ABGESCHLOSSEN · {0}", "statusPill": "{0} laufend · {1} Prüfung", "openTaskOne": "1 offene Aufgabe", "openTasks": "{0} offene Aufgaben", "planningResumeFailed": "Planungssitzung konnte nicht fortgesetzt werden: {0}", "approveFailed": "Genehmigen & Mergen fehlgeschlagen: {0}", "cancelReviewFailed": "Prüfung abbrechen fehlgeschlagen: {0}", "sendToQueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}", "queuePlanBlockedInteractive": "Plan kann nicht in die Warteschlange gestellt werden — {0} hat eine offene interaktive Sitzung und muss zuerst geschlossen werden.", "moveRunningRejected": "Ein laufender Task kann nicht in eine andere Liste verschoben werden.", "moveWorktreeRejected": "Verschieben nicht möglich — dieser Task hat einen aktiven Worktree, der auf sein aktuelles Repo zeigt.", "moveRepoConfirm": "Unterschiedliche Repos — {0} → {1}. Task trotzdem verschieben?", "moveConfirmUnavailable": "Verschieben nicht möglich — der Bestätigungsdialog ist nicht verfügbar.", "quickClaudeNoWorkingDir": "Für diese Liste ist kein Arbeitsverzeichnis konfiguriert.", "quickClaudeDirMissing": "Arbeitsverzeichnis existiert nicht mehr: {0}", "setStatusFailed": "Status konnte nicht aktualisiert werden: {0}", "cancelFailed": "Abbrechen fehlgeschlagen: {0}", "rejectToQueueFailed": "Zurückweisen in die Warteschlange fehlgeschlagen: {0}", "rejectToIdleFailed": "Zurückweisen fehlgeschlagen: {0}", "deleteTaskConfirm": "\"{0}\" löschen? Dies kann nicht rückgängig gemacht werden.", "deleteTaskFailed": "Löschen fehlgeschlagen: {0}", "toggleDoneFailed": "Erledigt-Status konnte nicht aktualisiert werden: {0}", "removeFromQueueFailed": "Aus der Warteschlange entfernen fehlgeschlagen: {0}", "openWorktreeFailed": "Worktree konnte nicht geöffnet werden: {0}" }, "tasksIsland": { "completedHeader": "ABGESCHLOSSEN", "completedHeaderCount": "ABGESCHLOSSEN · {0}", "statusPill": "{0} laufend · {1} Prüfung", "openTaskOne": "1 offene Aufgabe", "openTasks": "{0} offene Aufgaben", "planningResumeFailed": "Planungssitzung konnte nicht fortgesetzt werden: {0}", "approveFailed": "Genehmigen & Mergen fehlgeschlagen: {0}", "cancelReviewFailed": "Prüfung abbrechen fehlgeschlagen: {0}", "sendToQueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}", "queuePlanBlockedInteractive": "Plan kann nicht in die Warteschlange gestellt werden — {0} hat eine offene interaktive Sitzung und muss zuerst geschlossen werden.", "moveRunningRejected": "Ein laufender Task kann nicht in eine andere Liste verschoben werden.", "moveWorktreeRejected": "Verschieben nicht möglich — dieser Task hat einen aktiven Worktree, der auf sein aktuelles Repo zeigt.", "moveRepoConfirm": "Unterschiedliche Repos — {0} → {1}. Task trotzdem verschieben?", "moveConfirmUnavailable": "Verschieben nicht möglich — der Bestätigungsdialog ist nicht verfügbar.", "quickClaudeNoWorkingDir": "Für diese Liste ist kein Arbeitsverzeichnis konfiguriert.", "quickClaudeDirMissing": "Arbeitsverzeichnis existiert nicht mehr: {0}", "setStatusFailed": "Status konnte nicht aktualisiert werden: {0}", "cancelFailed": "Abbrechen fehlgeschlagen: {0}", "rejectToQueueFailed": "Zurückweisen in die Warteschlange fehlgeschlagen: {0}", "rejectToIdleFailed": "Zurückweisen fehlgeschlagen: {0}", "deleteTaskConfirm": "\"{0}\" löschen? Dies kann nicht rückgängig gemacht werden.", "deleteTaskFailed": "Löschen fehlgeschlagen: {0}", "toggleDoneFailed": "Erledigt-Status konnte nicht aktualisiert werden: {0}", "removeFromQueueFailed": "Aus der Warteschlange entfernen fehlgeschlagen: {0}", "openWorktreeFailed": "Worktree konnte nicht geöffnet werden: {0}" },
"diff": { "loadFailed": "Diff konnte nicht geladen werden: {0}", "noChanges": "Keine Änderungen anzuzeigen.", "unavailable": "Diff nicht mehr verfügbar — Commit-Bereich unvollständig." }, "diff": { "loadFailed": "Diff konnte nicht geladen werden: {0}", "noChanges": "Keine Änderungen anzuzeigen.", "unavailable": "Diff nicht mehr verfügbar — Commit-Bereich unvollständig." },
"planningDiff": { "hubError": "Kombinierte Vorschau konnte nicht erstellt werden (Hub-Fehler).", "conflict": "Kombinierte Vorschau nicht möglich: Teilaufgabe {0} steht im Konflikt mit einer früheren Teilaufgabe ({1} Dateien).", "buildFailed": "Kombinierte Vorschau konnte nicht erstellt werden: {0}" }, "planningDiff": { "hubError": "Kombinierte Vorschau konnte nicht erstellt werden (Hub-Fehler).", "conflict": "Kombinierte Vorschau nicht möglich: Teilaufgabe {0} steht im Konflikt mit einer früheren Teilaufgabe ({1} Dateien).", "buildFailed": "Kombinierte Vorschau konnte nicht erstellt werden: {0}" },
"merge": { "commitMessage": "chore: merge {0}", "progressMerging": "Wird zusammengeführt…", "progressVerifying": "Verify-Kommando der Liste läuft… ({0})", "workerOfflineBranches": "Worker offline — Branches können nicht aufgelistet werden.", "loadBranchesFailed": "Branches konnten nicht geladen werden: {0}", "merged": "Zusammengeführt.", "blocked": "Blockiert: {0}", "verifyFailed": "Merge ist gelandet, aber das Verify-Kommando der Liste ist fehlgeschlagen — die Aufgabe wurde nicht auf Erledigt gesetzt.", "untrackedCollision": "Merge abgelehnt — er würde eine unversionierte Datei im Ziel-Arbeitsverzeichnis überschreiben.", "dirtyTarget": "Merge abgelehnt — das Ziel-Arbeitsverzeichnis hat uncommittete Änderungen.", "unknownStatus": "Unbekannter Status: {0}", "mergeFailed": "Merge fehlgeschlagen: {0}" }, "merge": { "commitMessage": "chore: merge {0}", "progressMerging": "Wird zusammengeführt…", "progressVerifying": "Verify-Kommando der Liste läuft… ({0})", "workerOfflineBranches": "Worker offline — Branches können nicht aufgelistet werden.", "loadBranchesFailed": "Branches konnten nicht geladen werden: {0}", "merged": "Zusammengeführt.", "blocked": "Blockiert: {0}", "verifyFailed": "Merge ist gelandet, aber das Verify-Kommando der Liste ist fehlgeschlagen — die Aufgabe wurde nicht auf Erledigt gesetzt.", "untrackedCollision": "Merge abgelehnt — er würde eine unversionierte Datei im Ziel-Arbeitsverzeichnis überschreiben.", "unknownStatus": "Unbekannter Status: {0}", "mergeFailed": "Merge fehlgeschlagen: {0}" },
"settingsModal": { "workerOffline": "Worker offline — Einstellungen schreibgeschützt.", "saveFailed": "Speichern fehlgeschlagen: {0}" }, "settingsModal": { "workerOffline": "Worker offline — Einstellungen schreibgeschützt.", "saveFailed": "Speichern fehlgeschlagen: {0}" },
"onlineInbox": { "workerOffline": "Worker offline — Konfiguration kann nicht geladen werden.", "saved": "Konfiguration gespeichert.", "saveFailed": "Speichern fehlgeschlagen: {0}", "signedIn": "Erfolgreich angemeldet.", "signedInNoRole": "Angemeldet, aber diesem Konto fehlt die Rolle 'user' in Zitadel — die Online-Synchronisierung wird abgelehnt, bis die Rolle im ClaudeDo-Projekt zugewiesen wird.", "signInFailed": "Anmeldung fehlgeschlagen: {0}", "signedOut": "Abgemeldet.", "signOutFailed": "Abmeldung fehlgeschlagen: {0}" }, "onlineInbox": { "workerOffline": "Worker offline — Konfiguration kann nicht geladen werden.", "saved": "Konfiguration gespeichert.", "saveFailed": "Speichern fehlgeschlagen: {0}", "signedIn": "Erfolgreich angemeldet.", "signedInNoRole": "Angemeldet, aber diesem Konto fehlt die Rolle 'user' in Zitadel — die Online-Synchronisierung wird abgelehnt, bis die Rolle im ClaudeDo-Projekt zugewiesen wird.", "signInFailed": "Anmeldung fehlgeschlagen: {0}", "signedOut": "Abgemeldet.", "signOutFailed": "Abmeldung fehlgeschlagen: {0}" },
"tickets": { "connectionOk": "Verbunden als {0}.", "connectionMissingScopes": "Verbunden als {0}, aber es fehlen Scopes: {1}", "tokenCleared": "Token entfernt.", "workerOffline": "Worker nicht erreichbar." }, "tickets": { "connectionOk": "Verbunden als {0}.", "connectionMissingScopes": "Verbunden als {0}, aber es fehlen Scopes: {1}", "tokenCleared": "Token entfernt.", "workerOffline": "Worker nicht erreichbar." },
@@ -860,6 +761,7 @@
"loadFailed": "Nutzungsdaten konnten nicht geladen werden: {0}", "loadFailed": "Nutzungsdaten konnten nicht geladen werden: {0}",
"refreshFailed": "Nutzung konnte nicht aktualisiert werden: {0}", "refreshFailed": "Nutzung konnte nicht aktualisiert werden: {0}",
"thresholdSaveFailed": "Grenze konnte nicht gespeichert werden: {0}", "thresholdSaveFailed": "Grenze konnte nicht gespeichert werden: {0}",
"powerUseSaveFailed": "PowerUse-Schalter konnte nicht gespeichert werden: {0}",
"installStarted": "TokenTracker wird installiert — der Fortschritt läuft in der Log-Leiste.", "installStarted": "TokenTracker wird installiert — der Fortschritt läuft in der Log-Leiste.",
"installFailed": "TokenTracker konnte nicht installiert werden: {0}", "installFailed": "TokenTracker konnte nicht installiert werden: {0}",
"analyticsRefreshFailed": "Die Auswertung konnte nicht aktualisiert werden: {0}", "analyticsRefreshFailed": "Die Auswertung konnte nicht aktualisiert werden: {0}",
@@ -870,12 +772,12 @@
"sessionSkillsTab": { "installed": "Installiert: {0}", "installFailed": "Installation fehlgeschlagen: {0}", "updated": "Aktualisiert.", "updateFailed": "Aktualisierung fehlgeschlagen: {0}", "removed": "Entfernt.", "removeFailed": "Entfernen fehlgeschlagen: {0}" }, "sessionSkillsTab": { "installed": "Installiert: {0}", "installFailed": "Installation fehlgeschlagen: {0}", "updated": "Aktualisiert.", "updateFailed": "Aktualisierung fehlgeschlagen: {0}", "removed": "Entfernt.", "removeFailed": "Entfernen fehlgeschlagen: {0}" },
"worktreesTab": { "workerOffline": "Worker offline.", "removed": "{0} Worktree(s) entfernt.", "blocked": "Zwangsentfernung nicht möglich: {0} Aufgabe(n) laufen noch. Brich sie zuerst ab.", "removedFrom": "{0} Worktree(s) von {1} Aufgabe(n) entfernt.", "cleanupFailed": "Aufräumen fehlgeschlagen: {0}", "resetFailed": "Zurücksetzen fehlgeschlagen: {0}" }, "worktreesTab": { "workerOffline": "Worker offline.", "removed": "{0} Worktree(s) entfernt.", "blocked": "Zwangsentfernung nicht möglich: {0} Aufgabe(n) laufen noch. Brich sie zuerst ab.", "removedFrom": "{0} Worktree(s) von {1} Aufgabe(n) entfernt.", "cleanupFailed": "Aufräumen fehlgeschlagen: {0}", "resetFailed": "Zurücksetzen fehlgeschlagen: {0}" },
"worktreesOverview": { "titleAll": "Worktrees", "titleList": "Worktrees — {0}", "listFallback": "Liste", "cleanupFailed": "Aufräumen fehlgeschlagen.", "cleanupFailedDetailed": "Aufräumen fehlgeschlagen: {0}", "removed": "{0} Worktree(s) entfernt.", "discardConfirm": "Worktree für \"{0}\" verwerfen? Nicht committete Arbeit geht verloren.", "discardFailed": "Worktree konnte nicht verworfen werden.", "keepFailed": "Worktree konnte nicht behalten werden.", "cannotForceRunning": "Eine laufende Aufgabe kann nicht zwangsweise entfernt werden.", "forceRemoveFailed": "Zwangsentfernung fehlgeschlagen.", "forceRemoveFailedDetailed": "Zwangsentfernung fehlgeschlagen: {0}", "batchDone": "{0} gemergt, {1} zu lösen.", "openInExplorerFailed": "Pfad konnte nicht geöffnet werden: {0}" }, "worktreesOverview": { "titleAll": "Worktrees", "titleList": "Worktrees — {0}", "listFallback": "Liste", "cleanupFailed": "Aufräumen fehlgeschlagen.", "cleanupFailedDetailed": "Aufräumen fehlgeschlagen: {0}", "removed": "{0} Worktree(s) entfernt.", "discardConfirm": "Worktree für \"{0}\" verwerfen? Nicht committete Arbeit geht verloren.", "discardFailed": "Worktree konnte nicht verworfen werden.", "keepFailed": "Worktree konnte nicht behalten werden.", "cannotForceRunning": "Eine laufende Aufgabe kann nicht zwangsweise entfernt werden.", "forceRemoveFailed": "Zwangsentfernung fehlgeschlagen.", "forceRemoveFailedDetailed": "Zwangsentfernung fehlgeschlagen: {0}", "batchDone": "{0} gemergt, {1} zu lösen.", "openInExplorerFailed": "Pfad konnte nicht geöffnet werden: {0}" },
"listSettings": { "untitled": "Unbenannt", "ticketProjectNone": "— keins —", "loadFailed": "Listeneinstellungen konnten nicht geladen werden: {0}", "ticketProjectsLoadFailed": "Ticket-Projekte konnten nicht geladen werden: {0}", "confirmDeleteFolder": "Ordner \"{0}\" löschen? Die Listen darin bleiben erhalten und wandern auf die oberste Ebene.", "confirmDeleteList": "Liste \"{0}\" und alle ihre Aufgaben löschen? Das kann nicht rückgängig gemacht werden.", "deleteBlockedPlanning": "Diese Liste hat Planungssitzungen mit Kind-Aufgaben. Erst diese verwerfen, dann die Liste löschen.", "workingDirMissing": "Dieser Ordner existiert nicht.", "workingDirNotRepo": "Dieser Ordner ist noch kein Git-Repository. Führe darin zuerst `git init` aus, oder leere das Arbeitsverzeichnis, um dies als manuelle Liste zu speichern." }, "listSettings": { "untitled": "Unbenannt", "ticketProjectNone": "— keins —" },
"detailsIsland": { "verifyFailed": "Merge ist erfolgt, aber das Verifikationskommando der Liste ist fehlgeschlagen — die Aufgabe wurde nicht auf 'Erledigt' gesetzt.", "untrackedCollision": "Merge abgelehnt — er würde eine unversionierte Datei im Ziel-Arbeitsverzeichnis überschreiben.", "dirtyTarget": "Merge abgelehnt — das Ziel-Arbeitsverzeichnis hat uncommittete Änderungen.", "stashAndMergeConfirm": "Das Ziel-Arbeitsverzeichnis hat uncommittete Änderungen.\nStashen, mergen und danach wiederherstellen?", "stopOffline": "Worker offline — Task kann nicht gestoppt werden.", "stopFailed": "Stoppen fehlgeschlagen: {0}", "enqueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}", "dequeueFailed": "Aus der Warteschlange entfernen fehlgeschlagen: {0}", "resetAndRetryFailed": "Zurücksetzen & erneut versuchen fehlgeschlagen: {0}", "toggleDoneFailed": "Erledigt-Status konnte nicht aktualisiert werden: {0}" }, "detailsIsland": { "verifyFailed": "Merge ist erfolgt, aber das Verifikationskommando der Liste ist fehlgeschlagen — die Aufgabe wurde nicht auf 'Erledigt' gesetzt.", "untrackedCollision": "Merge abgelehnt — er würde eine unversionierte Datei im Ziel-Arbeitsverzeichnis überschreiben.", "stopOffline": "Worker offline — Task kann nicht gestoppt werden.", "stopFailed": "Stoppen fehlgeschlagen: {0}", "enqueueFailed": "In die Warteschlange stellen fehlgeschlagen: {0}", "dequeueFailed": "Aus der Warteschlange entfernen fehlgeschlagen: {0}", "resetAndRetryFailed": "Zurücksetzen & erneut versuchen fehlgeschlagen: {0}", "toggleDoneFailed": "Erledigt-Status konnte nicht aktualisiert werden: {0}" },
"mergeSection": { "openWorktreeFailed": "Worktree konnte nicht geöffnet werden: {0}" }, "mergeSection": { "openWorktreeFailed": "Worktree konnte nicht geöffnet werden: {0}" },
"about": { "openPathFailed": "Pfad konnte nicht geöffnet werden: {0}" }, "about": { "openPathFailed": "Pfad konnte nicht geöffnet werden: {0}" },
"lists": { "localSuffix": "{0} / lokal", "smartMyDay": "Mein Tag", "smartImportant": "Wichtig", "smartPlanned": "Geplant", "smartNotes": "Notizen", "virtualQueue": "Warteschlange", "virtualRunning": "Läuft", "virtualReview": "Prüfung", "newList": "Neue Liste", "findingsNotFound": "Für diese Liste gibt es noch keine Findings.", "findingsOpenFailed": "Findings-Ordner konnte nicht geöffnet werden: {0}", "openInExplorerFailed": "Pfad konnte nicht geöffnet werden: {0}" }, "lists": { "localSuffix": "{0} / lokal", "smartMyDay": "Mein Tag", "smartImportant": "Wichtig", "smartPlanned": "Geplant", "smartNotes": "Notizen", "virtualQueue": "Warteschlange", "virtualRunning": "Läuft", "virtualReview": "Prüfung", "newList": "Neue Liste", "findingsNotFound": "Für diese Liste gibt es noch keine Findings.", "findingsOpenFailed": "Findings-Ordner konnte nicht geöffnet werden: {0}", "openInExplorerFailed": "Pfad konnte nicht geöffnet werden: {0}" },
"repoImport": { "loadFailed": "Gespeicherte Ordner konnten nicht geladen werden: {0}", "saveFailed": "Ordner konnten nicht gespeichert werden: {0}", "createButton": "{0} Liste(n) erstellen" } "repoImport": { "loadFailed": "Gespeicherte Ordner konnten nicht geladen werden: {0}", "saveFailed": "Ordner konnten nicht gespeichert werden: {0}" }
}, },
"ops": { "ops": {
"stalledHint": "Läuft weiter — Worker antwortet noch", "stalledHint": "Läuft weiter — Worker antwortet noch",
@@ -943,5 +845,39 @@
"lastError": "Letzter Fehler: {0}", "lastError": "Letzter Fehler: {0}",
"throttled": "Gedrosselt: {0}/{1} Slots ({2})" "throttled": "Gedrosselt: {0}/{1} Slots ({2})"
} }
},
"checks": {
"git": {
"title": "Git",
"hint": "Installiere Git von https://git-scm.com/downloads und starte den Installer neu."
},
"gitIdentity": {
"title": "Git-Identität",
"hint": "Führe aus: git config --global user.name \"Dein Name\" und git config --global user.email \"du@example.com\""
},
"ports": {
"title": "Ports",
"hint": "Ändere die SignalR-/MCP-Ports auf der Dienste-Seite, oder beende den blockierenden Prozess."
},
"writeAccess": {
"title": "Schreibzugriff",
"hint": "Wähle ein anderes Installationsverzeichnis oder starte den Installer mit ausreichenden Rechten (z. B. als Administrator)."
},
"claudeCli": {
"title": "Claude CLI",
"hint": "Installiere die Claude CLI (npm install -g @anthropic-ai/claude-code) und starte danach dein Terminal/deine Anmeldesitzung neu, damit der aktualisierte PATH greift."
},
"claudeVersion": {
"title": "Claude-CLI-Version",
"hint": "Aktualisiere die CLI: npm update -g @anthropic-ai/claude-code"
},
"claudeAuth": {
"title": "Claude-CLI-Login",
"hint": "Starte 'claude' einmal und schließe den Login-Vorgang ab."
},
"permissionModeAuto": {
"title": "Unterstützung für --permission-mode auto",
"hint": "Aktualisiere die CLI: npm update -g @anthropic-ai/claude-code. ClaudeDo funktioniert auch im Modus acceptEdits/default, dann mit mehr Rückfragen."
}
} }
} }
+62 -126
View File
@@ -11,7 +11,6 @@
"categoryGeneral": "General", "categoryGeneral": "General",
"categoryExecution": "Execution", "categoryExecution": "Execution",
"categoryPrime": "Prime Claude", "categoryPrime": "Prime Claude",
"categoryPrimeHint": "Scheduled Claude runs: Ping, Fill My Day, or a custom prompt, at fixed times.",
"categoryWorktrees": "Worktrees", "categoryWorktrees": "Worktrees",
"categoryFiles": "Files & Prompts", "categoryFiles": "Files & Prompts",
"categorySkills": "Session Skills", "categorySkills": "Session Skills",
@@ -28,7 +27,6 @@
"model": "Model", "model": "Model",
"maxTurns": "Max turns", "maxTurns": "Max turns",
"effort": "Effort", "effort": "Effort",
"effortHint": "Reasoning effort the model applies. Higher costs more and reasons deeper.",
"modelPresets": "Per-model defaults", "modelPresets": "Per-model defaults",
"modelPresetsHint": "Reasoning effort and turn budget used when a session runs under that model. List- and task-level max-turn overrides still win.", "modelPresetsHint": "Reasoning effort and turn budget used when a session runs under that model. List- and task-level max-turn overrides still win.",
"maxTurnsCeiling": "Max turns ceiling", "maxTurnsCeiling": "Max turns ceiling",
@@ -45,14 +43,6 @@
"autoContinueOnUsageLimitHint": "When a run stops because it hit the usage limit, automatically continue it once the 5-hour window resets. Also wakes the paused queue exactly at reset time instead of waiting for the next backstop check.", "autoContinueOnUsageLimitHint": "When a run stops because it hit the usage limit, automatically continue it once the 5-hour window resets. Also wakes the paused queue exactly at reset time instead of waiting for the next backstop check.",
"listHandlerMaxHandoffs": "List-handler handoff budget", "listHandlerMaxHandoffs": "List-handler handoff budget",
"listHandlerMaxHandoffsHint": "How many wait/merge handoffs one \"Let Claude handle it\" run may chain. 4 means two merge rounds. Raise it for runs meant to keep going for hours; it bounds a runaway chain, so it cannot be 0.", "listHandlerMaxHandoffsHint": "How many wait/merge handoffs one \"Let Claude handle it\" run may chain. 4 means two merge rounds. Raise it for runs meant to keep going for hours; it bounds a runaway chain, so it cannot be 0.",
"powerUseHeading": "PowerUse",
"powerUse": "Enable PowerUse",
"powerUseHint": "Spend the rest of the window: a list-handler run asks nothing, resolves conflicts itself, harvests new work, and keeps handing off for as long as its budget allows. Only affects lists that allowed PowerUse in their list settings.",
"powerUseWindow": "Only between",
"powerUseWindowPlaceholder": "HH:mm",
"powerUseHandoffPct": "Hand off at (% of 5h)",
"powerUseWindowHint": "Leave both times empty for round the clock. A window is checked whenever a handler phase starts, so a chain that runs past the end time continues without PowerUse.",
"powerUseWindowInvalid": "PowerUse window times must be HH:mm, or left blank.",
"throttleStagesHeading": "Throttle stages", "throttleStagesHeading": "Throttle stages",
"throttleStagesHint": "Parallelism is capped before the hard gate: soft caps at 2 slots, hard at 1. Edited by dragging the markers on the usage-monitor gauges. Opening the monitor closes these settings — save first if you changed anything.", "throttleStagesHint": "Parallelism is capped before the hard gate: soft caps at 2 slots, hard at 1. Edited by dragging the markers on the usage-monitor gauges. Opening the monitor closes these settings — save first if you changed anything.",
"throttleStagesValues": "5h: soft {0}% / hard {1}% · 7d: soft {2}% / hard {3}%", "throttleStagesValues": "5h: soft {0}% / hard {1}% · 7d: soft {2}% / hard {3}%",
@@ -242,7 +232,6 @@
"toggleSubtasksTip": "Expand / collapse subtasks", "toggleSubtasksTip": "Expand / collapse subtasks",
"agentSuggestedTip": "Suggested by the agent", "agentSuggestedTip": "Suggested by the agent",
"interactiveChipTip": "Interactive session open — click to jump to it in Mission Control", "interactiveChipTip": "Interactive session open — click to jump to it in Mission Control",
"waitingOnTip": "Waiting on {0}",
"scheduleTitle": "Schedule task", "scheduleTitle": "Schedule task",
"scheduleWhen": "WHEN", "scheduleWhen": "WHEN",
"scheduleConfirm": "Schedule", "scheduleConfirm": "Schedule",
@@ -264,8 +253,6 @@
"contextOpenFindings": "Open findings folder", "contextOpenFindings": "Open findings folder",
"contextImportTickets": "Update from ticket system", "contextImportTickets": "Update from ticket system",
"contextSettings": "Settings…", "contextSettings": "Settings…",
"contextFolderSettings": "Folder settings…",
"contextRemoveFromFolder": "Move out of folder",
"newList": "New list", "newList": "New list",
"addReposTip": "Add repos as lists", "addReposTip": "Add repos as lists",
"noRepoBannerText": "No repo linked yet. ClaudeDo runs tasks in a git repo.", "noRepoBannerText": "No repo linked yet. ClaudeDo runs tasks in a git repo.",
@@ -281,7 +268,6 @@
"starTip": "Star", "starTip": "Star",
"agentSettingsTip": "Agent settings", "agentSettingsTip": "Agent settings",
"agentSettingsHeading": "Agent settings (overrides)", "agentSettingsHeading": "Agent settings (overrides)",
"waitingOnPrefix": "Waiting on",
"copyFormattedTip": "Copy title, description and open steps", "copyFormattedTip": "Copy title, description and open steps",
"toggleEditPreviewTip": "Toggle edit/preview", "toggleEditPreviewTip": "Toggle edit/preview",
"planDay": "Plan day", "planDay": "Plan day",
@@ -307,36 +293,7 @@
"steps": "Steps", "steps": "Steps",
"files": "Files" "files": "Files"
}, },
"emptyState": "Select a task to see its details", "emptyState": "Select a task to see its details"
"roadblockLabel": "ROADBLOCK",
"stepsCard": {
"preview": "Preview",
"edit": "Edit",
"addStepPlaceholder": "Add step…"
},
"workConsole": {
"continue": "Continue",
"resetAndRetry": "Reset & Retry",
"tabOutput": "Output",
"tabGit": "Git",
"tabSession": "Session",
"outcomeLabel": "OUTCOME",
"reviewLabel": "REVIEW",
"mergeLabel": "MERGE",
"targetBranch": "Target branch",
"openDiff": "Open Diff",
"worktree": "Worktree",
"reviewCombinedDiff": "Review Combined Diff",
"openDiffHint": "Open the diff to enable merge",
"approveMerge": "Approve & Merge",
"park": "Park",
"parkTip": "Set aside — back to Idle, keeps the worktree",
"cancel": "Cancel",
"resetDiscardBranch": "Reset (discard branch)…",
"submitForReviewHint": "Worked on this by hand? Submit the worktree for review to merge it.",
"submitForReview": "Submit for review",
"outcomesLabel": "OUTCOMES"
}
}, },
"agent": { "agent": {
"openWorktreeTip": "Open worktree in file explorer — requires an active worktree", "openWorktreeTip": "Open worktree in file explorer — requires an active worktree",
@@ -375,17 +332,13 @@
"failed": "Failed", "failed": "Failed",
"roadblock": "Roadblock reported", "roadblock": "Roadblock reported",
"openSession": "Open session", "openSession": "Open session",
"homeFolder": "Home (quick session)",
"browseForFolder": "Choose folder…", "browseForFolder": "Choose folder…",
"focusMode": "Focus", "focusMode": "Focus",
"overviewMode": "Overview", "overviewMode": "Overview",
"closeSession": "Kill session", "closeSession": "Kill session",
"closeSessionConfirm": "End the running session? The Claude process will be aborted.",
"conptyLaunchFailed": "Couldn't open interactive session: {0}", "conptyLaunchFailed": "Couldn't open interactive session: {0}",
"conptyStarting": "Starting session…", "conptyStarting": "Starting session…",
"conptyExited": "Session ended (code {0}).",
"usageWarningNotDelivered": "Couldn't warn the list-handler session about the usage limit.", "usageWarningNotDelivered": "Couldn't warn the list-handler session about the usage limit.",
"terminalSendFailed": "Couldn't send that to the terminal session.",
"mergeHelperTitle": "Merge Helper", "mergeHelperTitle": "Merge Helper",
"mergeHelperHandoffTitleSuffix": " (Handoff)", "mergeHelperHandoffTitleSuffix": " (Handoff)",
"mergeHelperTaskTitle": "List handler: {0}", "mergeHelperTaskTitle": "List handler: {0}",
@@ -401,10 +354,6 @@
"enqueueAlreadyOpen": "Can't queue — this task has an open interactive session.", "enqueueAlreadyOpen": "Can't queue — this task has an open interactive session.",
"enqueueFailed": "Queue failed: {0}", "enqueueFailed": "Queue failed: {0}",
"queueRefreshFailed": "Couldn't refresh the queue: {0}", "queueRefreshFailed": "Couldn't refresh the queue: {0}",
"abandonRun": "Abandon run",
"abandonRunTip": "Cancel this run's still-open tasks and close the session",
"abandonRunConfirm": "Cancel {0} open task(s) and close this session? Tasks already in review or done are not affected.",
"abandonRunFailed": "Couldn't cancel the open tasks: {0}",
"question": { "question": {
"title": "Claude is asking", "title": "Claude is asking",
"placeholder": "Type your answer…", "placeholder": "Type your answer…",
@@ -438,18 +387,11 @@
"body": "ClaudeDo can't reach the background worker. It is normally started automatically at logon. You can start it now, or reinstall if the problem persists.", "body": "ClaudeDo can't reach the background worker. It is normally started automatically at logon. You can start it now, or reinstall if the problem persists.",
"dismiss": "Dismiss", "dismiss": "Dismiss",
"rerunInstaller": "Rerun Installer", "rerunInstaller": "Rerun Installer",
"startWorker": "Start Worker", "startWorker": "Start Worker"
"workerNotFound": "Worker executable not found. Check the installation.",
"installerNotFound": "Installer not found. Check the installation.",
"startFailed": "Start failed: {0}"
}, },
"listSettings": { "listSettings": {
"title": "LIST SETTINGS", "title": "LIST SETTINGS",
"folderTitle": "FOLDER",
"deleteList": "Delete list", "deleteList": "Delete list",
"deleteFolder": "Delete folder",
"createAsFolder": "Create a folder instead",
"createAsFolderHint": "A folder just groups lists in the sidebar — it holds no tasks and runs nothing. Drag lists onto it to fill it.",
"sectionGeneral": "GENERAL", "sectionGeneral": "GENERAL",
"name": "Name", "name": "Name",
"workingDirectory": "Working directory", "workingDirectory": "Working directory",
@@ -461,7 +403,7 @@
"findingsTracked": "Commit the .claudedo findings folder", "findingsTracked": "Commit the .claudedo findings folder",
"findingsTrackedHint": "Off: the folder stays out of git via .git/info/exclude. On: findings travel with the repo.", "findingsTrackedHint": "Off: the folder stays out of git via .git/info/exclude. On: findings travel with the repo.",
"powerUseAllowed": "Allow PowerUse for this list", "powerUseAllowed": "Allow PowerUse for this list",
"powerUseAllowedHint": "Lets a list-handler run on this list go unattended when PowerUse is switched on in Settings → Execution: it asks nothing, resolves conflicts itself, and harvests new work. Both switches are needed, so leaving PowerUse on globally never changes a list that hasn't opted in.", "powerUseAllowedHint": "Lets a list-handler run on this list go unattended when PowerUse is switched on in the usage monitor: it asks nothing, resolves conflicts itself, and harvests new work. Both switches are needed, so leaving PowerUse on globally never changes a list that hasn't opted in.",
"sectionIcon": "ICON", "sectionIcon": "ICON",
"icon": "List icon", "icon": "List icon",
"iconHint": "Shown next to the list name in the sidebar.", "iconHint": "Shown next to the list name in the sidebar.",
@@ -481,8 +423,7 @@
"targetBranch": "Target branch", "targetBranch": "Target branch",
"removeWorktree": "Remove worktree after merge", "removeWorktree": "Remove worktree after merge",
"commitMessage": "Commit message", "commitMessage": "Commit message",
"conflictedFiles": "Conflicted files:", "conflictedFiles": "Conflicted files:"
"stashAndMerge": "Stash changes and merge"
}, },
"diff": { "diff": {
"title": "DIFF", "title": "DIFF",
@@ -538,8 +479,6 @@
"windowTitle": "Let Claude handle it", "windowTitle": "Let Claude handle it",
"scopeList": "List: {0}", "scopeList": "List: {0}",
"scopeReview": "All lists — tasks waiting for review", "scopeReview": "All lists — tasks waiting for review",
"modelLabel": "Model",
"modelTip": "Model for the triage session (dedupe & refine). Later merge phases always run on opus.",
"confirm": "Let Claude handle it", "confirm": "Let Claude handle it",
"cancel": "Cancel", "cancel": "Cancel",
"selectAll": "Select all", "selectAll": "Select all",
@@ -567,18 +506,18 @@
"regenerate": "Regenerate", "regenerate": "Regenerate",
"emptyStateHint": "No report for this range yet. Click “Generate”." "emptyStateHint": "No report for this range yet. Click “Generate”."
}, },
"cheatSheets": {
"title": "CHEAT SHEETS",
"windowTitle": "Cheat Sheets",
"pin": "Pin",
"pinTooltip": "Keep this window on top of the others",
"missing": "Cheat sheet {0} not found."
},
"usageMonitor": { "usageMonitor": {
"title": "USAGE MONITOR", "title": "USAGE MONITOR",
"windowTitle": "Usage Monitor", "windowTitle": "Usage Monitor",
"noGauges": "No usage limits reported yet.", "noGauges": "No usage limits reported yet.",
"refreshHint": "Refresh now — polled every 5 min while a task runs, otherwise every 15 min.", "powerUse": "PowerUse",
"powerUseHint": "Spend the rest of the window: a list-handler run asks nothing, resolves conflicts itself, harvests new work, and keeps handing off for as long as its budget allows. Only affects lists that allowed PowerUse in their list settings.",
"powerUseWindow": "Only between",
"powerUseWindowPlaceholder": "HH:mm",
"powerUseHandoffPct": "Hand off at (% of 5h)",
"powerUseWindowHint": "Leave both times empty for round the clock. A window is checked whenever a handler phase starts, so a chain that runs past the end time continues without PowerUse.",
"refresh": "Refresh now",
"refreshHint": "Polled every 5 min while a task runs, otherwise every 15 min.",
"staleFormat": "Values stale (as of {0})", "staleFormat": "Values stale (as of {0})",
"staleGateHint": "The gate does not apply while values are stale.", "staleGateHint": "The gate does not apply while values are stale.",
"gateBlockedFormat": "Queue paused — {0}", "gateBlockedFormat": "Queue paused — {0}",
@@ -711,61 +650,35 @@
"checks": { "checks": {
"git": { "git": {
"title": "Git", "title": "Git",
"hint": "Install Git from https://git-scm.com/downloads, then restart the installer.", "hint": "Install Git and make sure it is on PATH."
"notFound": "git was not found on PATH.",
"exitCode": "'{0}' exited with code {1}.",
"resolvedFormat": "{0} — {1}"
}, },
"gitIdentity": { "gitIdentity": {
"title": "Git Identity", "title": "Git Identity",
"hint": "Run: git config --global user.name \"Your Name\" and git config --global user.email \"you@example.com\"", "hint": "Set your git identity: git config --global user.name \"...\" and user.email \"...\"."
"notFound": "git was not found — identity could not be checked.",
"missing": "Missing git identity: {0}."
}, },
"ports": { "ports": {
"title": "Ports", "title": "Ports",
"hint": "Change the SignalR/MCP ports on the Service page, or stop the process using them.", "hint": "Free the port, or change it on the Worker page after install."
"inUse": "{0} port {1} is in use.",
"inUseBy": "{0} port {1} is in use by '{2}'.",
"inUseByOwnWorker": "In use by the running ClaudeDo Worker: {0}.",
"available": "Ports are available."
}, },
"writeAccess": { "writeAccess": {
"title": "Write Access", "title": "Write Access",
"hint": "Choose a different install directory, or run the installer with sufficient permissions (e.g. as administrator).", "hint": "Choose a different install directory, or run the installer as administrator."
"cannotWrite": "Cannot write to '{0}': {1}",
"writable": "Install directory and data directory are writable."
}, },
"claudeCli": { "claudeCli": {
"title": "Claude CLI", "title": "Claude CLI",
"hint": "Install the Claude CLI (npm install -g @anthropic-ai/claude-code), then restart your terminal/login session so the updated PATH takes effect.", "hint": "Install the Claude CLI and make sure it is on PATH."
"notFound": "'{0}' was not found on PATH. Searched: {1}.",
"exitCode": "'{0}' exited with code {1}.",
"resolvedFormat": "{0} — {1}"
}, },
"claudeVersion": { "claudeVersion": {
"title": "Claude CLI Version", "title": "Claude CLI Version",
"hint": "Update the CLI: npm update -g @anthropic-ai/claude-code", "hint": "Update the Claude CLI to a newer version."
"notFound": "The claude CLI was not found — version could not be checked.",
"parseFailed": "Could not parse a version from '{0}'.",
"tooOld": "claude {0} is older than the required {1}.",
"ok": "claude {0} meets the minimum ({1})."
}, },
"claudeAuth": { "claudeAuth": {
"title": "Claude CLI Login", "title": "Claude Login",
"hint": "Run 'claude' once and complete the login flow.", "hint": "Run 'claude auth login' to sign in."
"notFound": "The claude CLI was not found — login could not be checked.",
"undetermined": "Login status could not be determined.",
"notLoggedIn": "Not logged in.",
"loggedIn": "Logged in."
}, },
"permissionModeAuto": { "permissionModeAuto": {
"title": "Permission Mode", "title": "Permission Mode",
"hint": "Update the CLI: npm update -g @anthropic-ai/claude-code. ClaudeDo still works in acceptEdits/default mode, with more prompts.", "hint": "Update the Claude CLI to a version that supports --permission-mode auto."
"notFound": "The claude CLI was not found — permission-mode support could not be checked.",
"undetermined": "Could not determine whether --permission-mode auto is supported.",
"ok": "--permission-mode auto is recognized by this CLI.",
"notListed": "This claude CLI version does not list 'auto' as a --permission-mode choice."
} }
}, },
"planning": { "planning": {
@@ -793,9 +706,6 @@
"abort": "Abort merge" "abort": "Abort merge"
}, },
"controls": { "controls": {
"markdown": {
"copy": "Copy command"
},
"datePicker": { "datePicker": {
"today": "Today", "today": "Today",
"tomorrow": "Tomorrow", "tomorrow": "Tomorrow",
@@ -812,18 +722,9 @@
"repositories": "Repositories", "repositories": "Repositories",
"checkForUpdates": "Check for updates", "checkForUpdates": "Check for updates",
"restartWorker": "Restart worker", "restartWorker": "Restart worker",
"updateClaudeCli": "Update Claude CLI",
"shutdown": "Shutdown",
"worktrees": "Worktrees…", "worktrees": "Worktrees…",
"weeklyReport": "Weekly Report…", "weeklyReport": "Weekly Report…",
"usageMonitor": "Usage Monitor…", "usageMonitor": "Usage Monitor…",
"cheatSheets": "Cheat Sheets",
"cheatSheetGit": "Git…",
"cheatSheetCommits": "Conventional Commits…",
"cheatSheetClaude": "Claude CLI…",
"cheatSheetClaudeConfig": "Claude configuration…",
"cheatSheetDotnet": "dotnet CLI…",
"cheatSheetPowershell": "PowerShell…",
"about": "About…", "about": "About…",
"addRepos": "Add repos as lists…" "addRepos": "Add repos as lists…"
}, },
@@ -839,10 +740,10 @@
}, },
"vm": { "vm": {
"connection": { "online": "Online", "connecting": "Connecting…", "offline": "Offline" }, "connection": { "online": "Online", "connecting": "Connecting…", "offline": "Offline" },
"shell": { "unexpectedError": "Unexpected error: {0}", "shutdownConfirm": "This stops the ClaudeDo worker (any running task or interactive session is interrupted) and closes the app. Continue?" }, "shell": { "restartingWorker": "Restarting worker…", "unexpectedError": "Unexpected error: {0}" },
"mainWindow": { "closeConfirm": { "message": "{0} Mission Control session(s) are still running. Closing the app will end them. Close anyway?" } }, "mainWindow": { "closeConfirm": { "message": "{0} Mission Control session(s) are still running. Closing the app will end them. Close anyway?" } },
"agentStatus": { "idle": "Idle", "queued": "Queued", "running": "Running", "review": "Review", "children": "Waiting for Subtasks", "done": "Done", "failed": "Failed", "cancelled": "Cancelled" }, "agentStatus": { "idle": "Idle", "queued": "Queued", "running": "Running", "review": "Review", "children": "Waiting for Subtasks", "done": "Done", "failed": "Failed", "cancelled": "Cancelled" },
"taskStatus": { "idle": "Idle", "queued": "Queued", "running": "Running", "waitingForReview": "Waiting for Review", "waitingForChildren": "Waiting for Subtasks", "done": "Done", "failed": "Failed", "cancelled": "Cancelled", "parked": "Parked", "interactive": "Interactive", "waiting": "Waiting" }, "taskStatus": { "idle": "Idle", "queued": "Queued", "running": "Running", "waitingForReview": "Waiting for Review", "waitingForChildren": "Waiting for Subtasks", "done": "Done", "failed": "Failed", "cancelled": "Cancelled", "parked": "Parked", "interactive": "Interactive" },
"failureReason": { "maxTurns": "Turn limit reached", "timeout": "Timed out", "usageLimit": "Usage limit reached", "error": "Error", "cancelled": "Cancelled", "unknown": "Unknown reason" }, "failureReason": { "maxTurns": "Turn limit reached", "timeout": "Timed out", "usageLimit": "Usage limit reached", "error": "Error", "cancelled": "Cancelled", "unknown": "Unknown reason" },
"failureReasonTooltip": { "maxTurns": "Turn limit reached ({0}/{1} turns) — the worktree is usually fine; continue the task instead of resetting it." }, "failureReasonTooltip": { "maxTurns": "Turn limit reached ({0}/{1} turns) — the worktree is usually fine; continue the task instead of resetting it." },
"planningBadge": { "active": "PLANNING", "finalized": "PLANNED" }, "planningBadge": { "active": "PLANNING", "finalized": "PLANNED" },
@@ -851,7 +752,7 @@
"tasksIsland": { "completedHeader": "COMPLETED", "completedHeaderCount": "COMPLETED · {0}", "statusPill": "{0} running · {1} review", "openTaskOne": "1 open task", "openTasks": "{0} open tasks", "planningResumeFailed": "Couldn't resume planning session: {0}", "approveFailed": "Approve & merge failed: {0}", "cancelReviewFailed": "Cancel review failed: {0}", "sendToQueueFailed": "Send to queue failed: {0}", "queuePlanBlockedInteractive": "Can't queue the plan — {0} has an open interactive session and must be closed first.", "moveRunningRejected": "Can't move a running task to another list.", "moveWorktreeRejected": "Can't move — this task has an active worktree pointing at its current repo.", "moveRepoConfirm": "Different repos — {0} → {1}. Move the task anyway?", "moveConfirmUnavailable": "Can't move — the confirmation dialog isn't available.", "quickClaudeNoWorkingDir": "This list has no working directory configured.", "quickClaudeDirMissing": "Working directory no longer exists: {0}", "setStatusFailed": "Failed to update status: {0}", "cancelFailed": "Cancel failed: {0}", "rejectToQueueFailed": "Reject to queue failed: {0}", "rejectToIdleFailed": "Reject failed: {0}", "deleteTaskConfirm": "Delete \"{0}\"? This cannot be undone.", "deleteTaskFailed": "Delete failed: {0}", "toggleDoneFailed": "Couldn't update done state: {0}", "removeFromQueueFailed": "Remove from queue failed: {0}", "openWorktreeFailed": "Couldn't open worktree: {0}" }, "tasksIsland": { "completedHeader": "COMPLETED", "completedHeaderCount": "COMPLETED · {0}", "statusPill": "{0} running · {1} review", "openTaskOne": "1 open task", "openTasks": "{0} open tasks", "planningResumeFailed": "Couldn't resume planning session: {0}", "approveFailed": "Approve & merge failed: {0}", "cancelReviewFailed": "Cancel review failed: {0}", "sendToQueueFailed": "Send to queue failed: {0}", "queuePlanBlockedInteractive": "Can't queue the plan — {0} has an open interactive session and must be closed first.", "moveRunningRejected": "Can't move a running task to another list.", "moveWorktreeRejected": "Can't move — this task has an active worktree pointing at its current repo.", "moveRepoConfirm": "Different repos — {0} → {1}. Move the task anyway?", "moveConfirmUnavailable": "Can't move — the confirmation dialog isn't available.", "quickClaudeNoWorkingDir": "This list has no working directory configured.", "quickClaudeDirMissing": "Working directory no longer exists: {0}", "setStatusFailed": "Failed to update status: {0}", "cancelFailed": "Cancel failed: {0}", "rejectToQueueFailed": "Reject to queue failed: {0}", "rejectToIdleFailed": "Reject failed: {0}", "deleteTaskConfirm": "Delete \"{0}\"? This cannot be undone.", "deleteTaskFailed": "Delete failed: {0}", "toggleDoneFailed": "Couldn't update done state: {0}", "removeFromQueueFailed": "Remove from queue failed: {0}", "openWorktreeFailed": "Couldn't open worktree: {0}" },
"diff": { "loadFailed": "Failed to load diff: {0}", "noChanges": "No changes to show.", "unavailable": "Diff no longer available — commit range incomplete." }, "diff": { "loadFailed": "Failed to load diff: {0}", "noChanges": "No changes to show.", "unavailable": "Diff no longer available — commit range incomplete." },
"planningDiff": { "hubError": "Could not build combined preview (hub error).", "conflict": "Cannot build combined preview: subtask {0} conflicts with an earlier subtask ({1} files).", "buildFailed": "Could not build combined preview: {0}" }, "planningDiff": { "hubError": "Could not build combined preview (hub error).", "conflict": "Cannot build combined preview: subtask {0} conflicts with an earlier subtask ({1} files).", "buildFailed": "Could not build combined preview: {0}" },
"merge": { "commitMessage": "chore: merge {0}", "progressMerging": "Merging…", "progressVerifying": "Running the list's verify command… ({0})", "workerOfflineBranches": "Worker offline — cannot list branches.", "loadBranchesFailed": "Failed to load branches: {0}", "merged": "Merged.", "blocked": "Blocked: {0}", "verifyFailed": "Merge landed, but the list's verify command failed — the task was kept out of Done.", "untrackedCollision": "Merge refused — it would overwrite an untracked file in the target working directory.", "dirtyTarget": "Merge refused — the target working directory has uncommitted changes.", "unknownStatus": "Unknown status: {0}", "mergeFailed": "Merge failed: {0}" }, "merge": { "commitMessage": "chore: merge {0}", "progressMerging": "Merging…", "progressVerifying": "Running the list's verify command… ({0})", "workerOfflineBranches": "Worker offline — cannot list branches.", "loadBranchesFailed": "Failed to load branches: {0}", "merged": "Merged.", "blocked": "Blocked: {0}", "verifyFailed": "Merge landed, but the list's verify command failed — the task was kept out of Done.", "untrackedCollision": "Merge refused — it would overwrite an untracked file in the target working directory.", "unknownStatus": "Unknown status: {0}", "mergeFailed": "Merge failed: {0}" },
"settingsModal": { "workerOffline": "Worker offline — settings read-only.", "saveFailed": "Save failed: {0}" }, "settingsModal": { "workerOffline": "Worker offline — settings read-only.", "saveFailed": "Save failed: {0}" },
"onlineInbox": { "workerOffline": "Worker offline — cannot load config.", "saved": "Config saved.", "saveFailed": "Save failed: {0}", "signedIn": "Signed in successfully.", "signedInNoRole": "Signed in, but this account is missing the 'user' role in Zitadel — online sync will be rejected until the role is granted in the ClaudeDo project.", "signInFailed": "Sign-in failed: {0}", "signedOut": "Signed out.", "signOutFailed": "Sign-out failed: {0}" }, "onlineInbox": { "workerOffline": "Worker offline — cannot load config.", "saved": "Config saved.", "saveFailed": "Save failed: {0}", "signedIn": "Signed in successfully.", "signedInNoRole": "Signed in, but this account is missing the 'user' role in Zitadel — online sync will be rejected until the role is granted in the ClaudeDo project.", "signInFailed": "Sign-in failed: {0}", "signedOut": "Signed out.", "signOutFailed": "Sign-out failed: {0}" },
"tickets": { "connectionOk": "Connected as {0}.", "connectionMissingScopes": "Connected as {0}, but missing scopes: {1}", "tokenCleared": "Token removed.", "workerOffline": "Worker not reachable." }, "tickets": { "connectionOk": "Connected as {0}.", "connectionMissingScopes": "Connected as {0}, but missing scopes: {1}", "tokenCleared": "Token removed.", "workerOffline": "Worker not reachable." },
@@ -860,6 +761,7 @@
"loadFailed": "Couldn't load usage data: {0}", "loadFailed": "Couldn't load usage data: {0}",
"refreshFailed": "Couldn't refresh usage: {0}", "refreshFailed": "Couldn't refresh usage: {0}",
"thresholdSaveFailed": "Couldn't save the threshold: {0}", "thresholdSaveFailed": "Couldn't save the threshold: {0}",
"powerUseSaveFailed": "Couldn't save the PowerUse switch: {0}",
"installStarted": "Installing TokenTracker — watch the log strip for progress.", "installStarted": "Installing TokenTracker — watch the log strip for progress.",
"installFailed": "Couldn't install TokenTracker: {0}", "installFailed": "Couldn't install TokenTracker: {0}",
"analyticsRefreshFailed": "Couldn't refresh the analytics: {0}", "analyticsRefreshFailed": "Couldn't refresh the analytics: {0}",
@@ -870,12 +772,12 @@
"sessionSkillsTab": { "installed": "Installed: {0}", "installFailed": "Install failed: {0}", "updated": "Updated.", "updateFailed": "Update failed: {0}", "removed": "Removed.", "removeFailed": "Remove failed: {0}" }, "sessionSkillsTab": { "installed": "Installed: {0}", "installFailed": "Install failed: {0}", "updated": "Updated.", "updateFailed": "Update failed: {0}", "removed": "Removed.", "removeFailed": "Remove failed: {0}" },
"worktreesTab": { "workerOffline": "Worker offline.", "removed": "Removed {0} worktree(s).", "blocked": "Cannot force-remove: {0} task(s) still running. Cancel them first.", "removedFrom": "Removed {0} worktree(s) from {1} task(s).", "cleanupFailed": "Cleanup failed: {0}", "resetFailed": "Reset failed: {0}" }, "worktreesTab": { "workerOffline": "Worker offline.", "removed": "Removed {0} worktree(s).", "blocked": "Cannot force-remove: {0} task(s) still running. Cancel them first.", "removedFrom": "Removed {0} worktree(s) from {1} task(s).", "cleanupFailed": "Cleanup failed: {0}", "resetFailed": "Reset failed: {0}" },
"worktreesOverview": { "titleAll": "Worktrees", "titleList": "Worktrees — {0}", "listFallback": "list", "cleanupFailed": "Cleanup failed.", "cleanupFailedDetailed": "Cleanup failed: {0}", "removed": "Removed {0} worktree(s).", "discardConfirm": "Discard the worktree for \"{0}\"? Uncommitted work will be lost.", "discardFailed": "Failed to discard worktree.", "keepFailed": "Failed to keep worktree.", "cannotForceRunning": "Cannot force-remove a running task.", "forceRemoveFailed": "Force remove failed.", "forceRemoveFailedDetailed": "Force remove failed: {0}", "batchDone": "Merged {0}, {1} need resolution.", "openInExplorerFailed": "Couldn't open path: {0}" }, "worktreesOverview": { "titleAll": "Worktrees", "titleList": "Worktrees — {0}", "listFallback": "list", "cleanupFailed": "Cleanup failed.", "cleanupFailedDetailed": "Cleanup failed: {0}", "removed": "Removed {0} worktree(s).", "discardConfirm": "Discard the worktree for \"{0}\"? Uncommitted work will be lost.", "discardFailed": "Failed to discard worktree.", "keepFailed": "Failed to keep worktree.", "cannotForceRunning": "Cannot force-remove a running task.", "forceRemoveFailed": "Force remove failed.", "forceRemoveFailedDetailed": "Force remove failed: {0}", "batchDone": "Merged {0}, {1} need resolution.", "openInExplorerFailed": "Couldn't open path: {0}" },
"listSettings": { "untitled": "Untitled", "ticketProjectNone": "— none —", "loadFailed": "Couldn't load list settings: {0}", "ticketProjectsLoadFailed": "Couldn't load ticket projects: {0}", "confirmDeleteFolder": "Delete folder \"{0}\"? The lists inside it are kept and move back to the top level.", "confirmDeleteList": "Delete list \"{0}\" and all its tasks? This cannot be undone.", "deleteBlockedPlanning": "This list has planning sessions with child tasks. Discard those first, then delete the list.", "workingDirMissing": "This folder doesn't exist.", "workingDirNotRepo": "This folder isn't a git repository yet. Run `git init` in it first, or clear the working directory to save this as a manual list." }, "listSettings": { "untitled": "Untitled", "ticketProjectNone": "— none —" },
"detailsIsland": { "verifyFailed": "Merge landed, but the list's verify command failed — the task was kept out of Done.", "untrackedCollision": "Merge refused — it would overwrite an untracked file in the target working directory.", "dirtyTarget": "Merge refused — the target working directory has uncommitted changes.", "stashAndMergeConfirm": "The target working directory has uncommitted changes.\nStash them, merge, and restore them afterwards?", "stopOffline": "Worker offline — can't stop the task.", "stopFailed": "Stop failed: {0}", "enqueueFailed": "Queue failed: {0}", "dequeueFailed": "Remove from queue failed: {0}", "resetAndRetryFailed": "Reset & retry failed: {0}", "toggleDoneFailed": "Couldn't update done state: {0}" }, "detailsIsland": { "verifyFailed": "Merge landed, but the list's verify command failed — the task was kept out of Done.", "untrackedCollision": "Merge refused — it would overwrite an untracked file in the target working directory.", "stopOffline": "Worker offline — can't stop the task.", "stopFailed": "Stop failed: {0}", "enqueueFailed": "Queue failed: {0}", "dequeueFailed": "Remove from queue failed: {0}", "resetAndRetryFailed": "Reset & retry failed: {0}", "toggleDoneFailed": "Couldn't update done state: {0}" },
"mergeSection": { "openWorktreeFailed": "Couldn't open worktree: {0}" }, "mergeSection": { "openWorktreeFailed": "Couldn't open worktree: {0}" },
"about": { "openPathFailed": "Couldn't open path: {0}" }, "about": { "openPathFailed": "Couldn't open path: {0}" },
"lists": { "localSuffix": "{0} / local", "smartMyDay": "My Day", "smartImportant": "Important", "smartPlanned": "Planned", "smartNotes": "Notes", "virtualQueue": "Queue", "virtualRunning": "Running", "virtualReview": "Review", "newList": "New list", "findingsNotFound": "No findings yet for this list.", "findingsOpenFailed": "Couldn't open findings folder: {0}", "openInExplorerFailed": "Couldn't open path: {0}" }, "lists": { "localSuffix": "{0} / local", "smartMyDay": "My Day", "smartImportant": "Important", "smartPlanned": "Planned", "smartNotes": "Notes", "virtualQueue": "Queue", "virtualRunning": "Running", "virtualReview": "Review", "newList": "New list", "findingsNotFound": "No findings yet for this list.", "findingsOpenFailed": "Couldn't open findings folder: {0}", "openInExplorerFailed": "Couldn't open path: {0}" },
"repoImport": { "loadFailed": "Couldn't load remembered folders: {0}", "saveFailed": "Couldn't save folders: {0}", "createButton": "Create {0} list(s)" } "repoImport": { "loadFailed": "Couldn't load remembered folders: {0}", "saveFailed": "Couldn't save folders: {0}" }
}, },
"ops": { "ops": {
"stalledHint": "Still running — worker hasn't responded in a while", "stalledHint": "Still running — worker hasn't responded in a while",
@@ -943,5 +845,39 @@
"lastError": "Last error: {0}", "lastError": "Last error: {0}",
"throttled": "Throttled: {0}/{1} slots ({2})" "throttled": "Throttled: {0}/{1} slots ({2})"
} }
},
"checks": {
"git": {
"title": "Git",
"hint": "Install Git from https://git-scm.com/downloads, then restart the installer."
},
"gitIdentity": {
"title": "Git identity",
"hint": "Run: git config --global user.name \"Your Name\" and git config --global user.email \"you@example.com\""
},
"ports": {
"title": "Ports",
"hint": "Change the SignalR/MCP ports on the Service page, or stop the process using them."
},
"writeAccess": {
"title": "Write access",
"hint": "Choose a different install directory, or run the installer with sufficient permissions (e.g. as administrator)."
},
"claudeCli": {
"title": "Claude CLI",
"hint": "Install the Claude CLI (npm install -g @anthropic-ai/claude-code), then restart your terminal/login session so the updated PATH takes effect."
},
"claudeVersion": {
"title": "Claude CLI version",
"hint": "Update the CLI: npm update -g @anthropic-ai/claude-code"
},
"claudeAuth": {
"title": "Claude CLI login",
"hint": "Run 'claude' once and complete the login flow."
},
"permissionModeAuto": {
"title": "--permission-mode auto support",
"hint": "Update the CLI: npm update -g @anthropic-ai/claude-code. ClaudeDo still works in acceptEdits/default mode, with more prompts."
}
} }
} }
@@ -1,63 +0,0 @@
# Claude CLI
## Session starten
- `claude` — interaktive Session im aktuellen Verzeichnis
- `claude "<prompt>"` — Session mit erstem Prompt starten
- `claude -c` — letzte Session in diesem Verzeichnis fortsetzen
- `claude -r` — Session aus einer Auswahlliste fortsetzen
- `claude -r <session-id>` — bestimmte Session fortsetzen
- `claude --fork-session -r <id>` — Session unter neuer ID fortsetzen
- `claude -n "<name>"` — Anzeigename für die Session setzen
## Modell und Aufwand
- `claude --model sonnet` — Alias oder voller Name (`fable`, `opus`, `sonnet`, `claude-opus-5`)
- `claude --effort high` — Denkaufwand: `low`, `medium`, `high`, `xhigh`, `max`
- `claude --fallback-model sonnet` — Ausweichmodell bei Überlast (nur mit `-p`)
## Nicht interaktiv
- `claude -p "<prompt>"` — antworten und beenden
- `claude -p --output-format json` — ein JSON-Ergebnis
- `claude -p --output-format stream-json` — Streaming-JSON für Skripte
- `claude -p --include-partial-messages` — Teil-Chunks mitstreamen
- `claude -p --max-budget-usd 5` — Kostendeckel für den Lauf
- `claude -p --json-schema '<schema>'` — strukturierte Ausgabe validieren
## Berechtigungen und Tools
- `claude --permission-mode <mode>` — `acceptEdits`, `auto`, `plan`, `manual`, `dontAsk`, `bypassPermissions`
- `claude --allowed-tools "Bash(git *)" Edit` — nur diese Tools erlauben
- `claude --disallowed-tools "Bash(rm *)"` — diese Tools sperren
- `claude --tools "Bash,Edit,Read"` — Built-in-Toolset festlegen
- `claude --add-dir <pfad>` — weiteres Arbeitsverzeichnis freigeben
- `claude --restricted` — ohne befehlsausführende Tools und ohne lokale Settings
## Kontext und Konfiguration
- `claude --append-system-prompt "<text>"` — Systemprompt ergänzen
- `claude --system-prompt "<text>"` — Systemprompt ersetzen
- `claude --settings <datei|json>` — zusätzliche Settings laden
- `claude --agents '<json>'` — eigene Subagents für diese Session
- `claude --mcp-config <datei>` — MCP-Server aus JSON laden
- `claude --strict-mcp-config` — nur diese MCP-Server, alle anderen ignorieren
- `claude --safe-mode` — alle Anpassungen aus, zum Fehlersuchen
- `claude --bare` — Minimalmodus ohne Hooks, Plugins, CLAUDE.md
## Hintergrund-Sessions
- `claude --bg "<prompt>"` — im Hintergrund starten, gibt die Kurz-ID aus
- `claude agents` — laufende Hintergrund-Sessions auflisten
- `claude attach <id>` — Hintergrund-Session in dieses Terminal holen
- `claude logs <id>` — letzte Ausgabe einer Hintergrund-Session
- `claude stop <id>` — Session stoppen, Verlauf bleibt
- `claude rm <id>` — Session löschen
## Worktree
- `claude -w` — neuen Git-Worktree für diese Session anlegen
- `claude -w <name>` — Worktree mit eigenem Namen
## Verwaltung
- `claude doctor` — Installation prüfen
- `claude update` — auf neue Version aktualisieren
- `claude mcp` — MCP-Server konfigurieren
- `claude plugin` — Plugins verwalten
- `claude auth` — Authentifizierung verwalten
- `claude setup-token` — Langzeit-Token einrichten
- `claude -d api,hooks` — Debugmodus mit Kategoriefilter
- `claude -v` — Version ausgeben
@@ -1,48 +0,0 @@
# Claude Konfiguration
## Dateien und Orte
- `~/.claude/settings.json` — globale Settings für alle Projekte
- `.claude/settings.json` — Projekt-Settings, eingecheckt fürs Team
- `.claude/settings.local.json` — persönliche Projekt-Settings, nicht eingecheckt
- `Rangfolge: managed > local > projekt > global` — spezifischer gewinnt
- `/config` — Settings interaktiv in der Session ansehen und ändern
- `claude doctor` — Konfiguration auf Fehler prüfen
## CLAUDE.md
- `~/.claude/CLAUDE.md` — globale Anweisungen für alle Projekte
- `CLAUDE.md` — im Projekt-Root, wird bei Start automatisch geladen
- `<unterordner>/CLAUDE.md` — wird geladen, sobald dort gearbeitet wird
- `@pfad/zur/datei.md` — Import einer weiteren Datei in eine CLAUDE.md
- `# <notiz>` — in der Session: Notiz in die CLAUDE.md übernehmen
- `/init` — CLAUDE.md für ein Projekt generieren lassen
## Berechtigungen
- `"permissions": { "allow": [...], "deny": [...], "ask": [...] }` — Struktur in settings.json
- `Bash(git *)` — Bash-Befehle per Muster erlauben oder sperren
- `Edit(src/**)` — Dateizugriff per Glob einschränken
- `WebFetch(domain:example.com)` — Webzugriff auf eine Domain begrenzen
- `mcp__<server>__<tool>` — Regel für ein einzelnes MCP-Tool
- `/permissions` — Regeln in der Session ansehen und ergänzen
## MCP-Server
- `claude mcp add <name> -- <befehl>` — lokalen stdio-Server anlegen
- `claude mcp add --transport http <name> <url>` — HTTP-Server anlegen
- `claude mcp add --scope project <name> ...` — in `.mcp.json` fürs Team
- `claude mcp list` — konfigurierte Server anzeigen
- `claude mcp remove <name>` — Server entfernen
- `/mcp` — Serverstatus in der Session, OAuth-Login
## Hooks
- `"hooks": { "PreToolUse": [...] }` — Shell-Befehle an Lifecycle-Events hängen
- `PreToolUse / PostToolUse` — vor und nach jedem Tool-Aufruf
- `UserPromptSubmit` — beim Absenden eines Prompts
- `SessionStart / Stop` — bei Sessionbeginn und -ende
- `Exit-Code 2` — blockiert die Aktion, stderr geht an Claude
- `/hooks` — Hooks interaktiv verwalten
## Erweiterungen
- `.claude/commands/<name>.md` — eigener Slash-Command `/name`
- `.claude/skills/<name>/SKILL.md` — Skill, wird bei passender Aufgabe geladen
- `.claude/agents/<name>.md` — eigener Subagent-Typ
- `~/.claude/...` — dieselben Ordner global statt pro Projekt
- `claude plugin` — Plugins installieren und verwalten
@@ -1,34 +0,0 @@
# Conventional Commits
## Format
- `<type>(<scope>): <beschreibung>` — Grundform, Scope optional
- `feat(auth): add login endpoint` — Beispiel mit Scope
- `fix: prevent crash on empty input` — Beispiel ohne Scope
- `imperativ, klein, kein Punkt am Ende` — Stil der Beschreibung
## Types
- `feat` — neues Feature
- `fix` — Bugfix
- `refactor` — Umbau ohne Verhaltensänderung
- `perf` — Performance-Verbesserung
- `docs` — nur Dokumentation
- `test` — Tests hinzufügen oder korrigieren
- `style` — Formatierung, kein Code-Effekt
- `build` — Build-System oder Dependencies
- `ci` — CI-Konfiguration
- `chore` — Sonstiges ohne src- oder Test-Änderung
## Breaking Changes
- `feat(api)!: remove legacy endpoint` — `!` markiert einen Breaking Change
- `BREAKING CHANGE: <erklärung>` — alternativ als Footer im Commit-Body
## Body und Footer
- `Leerzeile nach der Betreffzeile` — dann optionaler Body mit dem Warum
- `Refs: #123` — Footer für Ticket-Referenzen
- `Reverts: <hash>` — Footer für Reverts
## Warum das Ganze
- `feat` — löst ein Minor-Release aus (SemVer)
- `fix` — löst ein Patch-Release aus (SemVer)
- `!` oder `BREAKING CHANGE` — löst ein Major-Release aus
- `git log --oneline --grep "^feat"` — Verlauf wird filterbar
@@ -1,49 +0,0 @@
# dotnet CLI
## Projekt anlegen
- `dotnet new list` — verfügbare Vorlagen anzeigen
- `dotnet new console -n <name>` — Projekt aus Vorlage anlegen
- `dotnet new sln` — Solution anlegen
- `dotnet sln add <projekt>` — Projekt in die Solution aufnehmen
## Bauen
- `dotnet restore` — NuGet-Pakete auflösen
- `dotnet build <projekt> -c Release` — Release bauen
- `dotnet build --no-restore` — ohne Restore, wenn Pakete aktuell sind
- `dotnet build -v minimal` — knappere Ausgabe
- `dotnet clean -c Release` — Build-Ausgabe löschen
## Laufen lassen
- `dotnet run --project <projekt> -c Release` — starten
- `dotnet run --project <projekt> -- <args>` — Argumente an die App
- `dotnet watch --project <projekt> run` — bei Dateiänderung neu starten
## Testen
- `dotnet test <projekt> -c Release --no-build` — Tests ohne Neubau
- `dotnet test --filter "FullyQualifiedName~<name>"` — nur passende Tests
- `dotnet test --filter "FullyQualifiedName!~<name>"` — Tests ausschließen
- `dotnet test --logger "console;verbosity=detailed"` — Details pro Test
- `dotnet test --blame-hang-timeout 60s` — hängende Tests aufspüren
## Pakete
- `dotnet add <projekt> package <name>` — Paket hinzufügen
- `dotnet add <projekt> package <name> --version 1.2.3` — feste Version
- `dotnet remove <projekt> package <name>` — Paket entfernen
- `dotnet list <projekt> package --outdated` — veraltete Pakete
- `dotnet nuget locals all --clear` — NuGet-Caches leeren
## EF Core Migrationen
- `dotnet ef migrations add <name> -p <daten-projekt>` — Migration anlegen
- `dotnet ef migrations list -p <daten-projekt>` — Migrationen anzeigen
- `dotnet ef migrations remove -p <daten-projekt>` — letzte Migration zurücknehmen
- `dotnet ef database update -p <daten-projekt>` — Schema anwenden
## Veröffentlichen
- `dotnet publish <projekt> -c Release -r win-x64 --self-contained` — eigenständiges Build
- `dotnet publish <projekt> -c Release -p:PublishSingleFile=true` — eine Exe
## Diagnose
- `dotnet --info` — SDKs, Runtimes, RID
- `dotnet --list-sdks` — installierte SDKs
- `dotnet format <projekt>` — Formatierung anwenden
- `dotnet build -p:TreatWarningsAsErrors=true` — Warnungen als Fehler
-80
View File
@@ -1,80 +0,0 @@
# Git
## Start
- `git clone <url>` — Repository klonen
- `git init` — neues Repository anlegen
- `git remote add origin <url>` — Remote verbinden
## Stand ansehen
- `git status -sb` — Kurzstatus mit Branch-Zeile
- `git diff` — nicht gestagete Änderungen
- `git diff --staged` — gestagete Änderungen
- `git diff main...HEAD` — alles, was dieser Branch gegenüber main bringt
- `git diff --stat` — nur Datei- und Zeilenzähler
- `git log --oneline --graph --decorate -20` — kompakter Verlauf
- `git log -p -- <pfad>` — Verlauf einer Datei mit Diffs
- `git show <commit>` — ein Commit im Detail
## Branch
- `git switch <branch>` — Branch wechseln
- `git switch -c <name>` — Branch anlegen und wechseln
- `git switch -` — zurück zum vorherigen Branch
- `git branch -vv` — Branches mit Upstream und letztem Commit
- `git branch -d <name>` — gemergten Branch löschen (`-D` erzwingt)
## Committen
- `git add <pfad>` — Änderungen stagen
- `git add -p` — Änderungen hunk-weise stagen
- `git commit -m "<text>"` — gestagete Änderungen committen
- `git commit -- <pfad>` — nur diese Pfade committen
- `git commit --amend --no-edit` — letzten Commit um die Staging-Area erweitern
- `git commit --fixup <commit>` — Fixup für späteres Autosquash
## Remote
- `git fetch --all --prune` — alles holen, gelöschte Remote-Branches aufräumen
- `git pull --rebase` — holen und eigene Commits obendrauf setzen
- `git push -u origin <name>` — pushen und Upstream setzen
- `git push --force-with-lease` — sicheres Force-Push, nie plain `--force`
## Rebase und Merge
- `git rebase main` — Branch auf aktuellen main setzen
- `git rebase -i --autosquash main` — interaktiv aufräumen
- `git rebase --continue` — nach gelöstem Konflikt weiter
- `git rebase --abort` — Rebase abbrechen, Ausgangszustand zurück
- `git merge --no-ff <branch>` — Merge-Commit erzwingen
- `git merge --abort` — laufenden Merge abbrechen
- `git cherry-pick <commit>` — einzelnen Commit übernehmen
## Konflikte
- `git diff --name-only --diff-filter=U` — konfliktbehaftete Dateien
- `git checkout --ours <pfad>` — eigene Seite übernehmen
- `git checkout --theirs <pfad>` — fremde Seite übernehmen
- `git mergetool` — konfiguriertes Merge-Tool starten
## Rückgängig
- `git restore <pfad>` — Datei auf HEAD zurücksetzen, Änderungen weg
- `git restore --staged <pfad>` — unstagen, Änderungen behalten
- `git reset --soft HEAD~1` — letzten Commit auflösen, Änderungen gestaged behalten
- `git reset --hard <commit>` — alles verwerfen, nicht rückholbar
- `git revert <commit>` — Commit durch Gegen-Commit aufheben
- `git reflog` — Referenzverlauf, um verlorene Commits wiederzufinden
## Stash
- `git stash push -m "<text>"` — Änderungen wegpacken
- `git stash push -u` — inklusive unversionierter Dateien
- `git stash list` — Stashes anzeigen
- `git stash pop` — letzten Stash zurückholen und entfernen
- `git stash apply <stash>` — anwenden, aber behalten
## Worktrees
- `git worktree list` — alle Worktrees
- `git worktree add <pfad> <branch>` — Worktree für bestehenden Branch
- `git worktree add -b <name> <pfad>` — Worktree mit neuem Branch
- `git worktree remove <pfad>` — Worktree entfernen
- `git worktree prune` — verwaiste Einträge aufräumen
## Suchen
- `git grep -n "<text>"` — im Arbeitsbaum suchen
- `git log -S"<text>"` — Commits, die den Text einfügen oder entfernen
- `git blame -L 40,60 <pfad>` — Zeilenbereich zuordnen
- `git bisect start` — binäre Suche nach dem Fehler-Commit
@@ -1,52 +0,0 @@
# PowerShell
## Navigieren und Dateien
- `Get-ChildItem` — Verzeichnis auflisten (`ls`, `-Force` zeigt versteckte)
- `Set-Location <pfad>` — Verzeichnis wechseln (`cd`)
- `New-Item -ItemType Directory <pfad>` — Ordner anlegen (`mkdir`)
- `Copy-Item <quelle> <ziel> -Recurse` — kopieren
- `Move-Item <quelle> <ziel>` — verschieben oder umbenennen
- `Remove-Item <pfad> -Recurse -Force` — löschen, endgültig
- `Test-Path <pfad>` — existiert die Datei oder der Ordner?
## Ansehen und Suchen
- `Get-Content <datei> -Tail 50` — letzte Zeilen (`-Wait` folgt wie tail -f)
- `Select-String "<text>" <dateien> -List` — in Dateien suchen (grep)
- `Get-ChildItem -Recurse -Filter *.log` — Dateien rekursiv finden
- `<befehl> | Select-Object -First 10` — Ausgabe begrenzen (head)
- `<befehl> | Where-Object Name -like "*test*"` — Ausgabe filtern
- `<befehl> | Measure-Object` — zählen (wc)
- `<befehl> | Out-GridView` — Ausgabe in sortierbarem Fenster
## Prozesse und Dienste
- `Get-Process | Sort-Object CPU -Descending | Select-Object -First 10` — Top-Prozesse
- `Stop-Process -Name <name>` — Prozess beenden (`-Id <pid>` per PID)
- `Get-Service <name>` — Dienststatus
- `Restart-Service <name>` — Dienst neu starten (Admin nötig)
## Netzwerk
- `Test-NetConnection <host> -Port 443` — Erreichbarkeit und Port testen
- `Get-NetTCPConnection -LocalPort <port>` — wer belegt den Port (OwningProcess = PID)
- `Invoke-RestMethod <url>` — HTTP-Aufruf, JSON kommt als Objekt zurück
- `Resolve-DnsName <host>` — DNS-Auflösung prüfen
## Umgebung
- `$env:PATH -split ";"` — PATH lesbar ausgeben
- `$env:NAME = "wert"` — Variable für diese Session setzen
- `[Environment]::SetEnvironmentVariable("NAME", "wert", "User")` — dauerhaft setzen
- `Get-Command <name>` — wo liegt ein Befehl (which)
- `Get-History` — bisherige Befehle dieser Session
## Windows-Spezifisches
- `explorer .` — aktuellen Ordner im Explorer öffnen
- `Start-Process <datei>` — mit Standardprogramm öffnen
- `Start-Process pwsh -Verb RunAs` — Terminal als Administrator
- `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned` — lokale Skripte erlauben
- `winget search <name>` — Software im Paketmanager suchen
- `winget install <id>` — installieren
- `winget upgrade --all` — alles aktualisieren
## Hilfe
- `Get-Help <befehl> -Examples` — Beispiele zu einem Cmdlet
- `Get-Member` — Eigenschaften eines Pipeline-Objekts anzeigen
- `Get-Alias <kurzform>` — welches Cmdlet steckt hinter einem Alias
+2 -18
View File
@@ -41,7 +41,6 @@ Design/ — Tokens.axaml (design tokens; merged before styles)
- **IslandsShellViewModel** — root coordinator. Owns the three island VMs and the `WorkerClient`, wires cross-island events (selection, notes/prep mode, conflict resolution), connection state, the update banner, the inline worker-log strip (clickable → Log Visualizer overlay; `FlashFooterError` surfaces UI-action failures + the worker's Warn/Error there), responsive-layout flags (`ShowLists`/`ShowDetails` by window width), `PrimeStatus` flash, the modal openers, and `RestartWorkerAsync`/`CheckForUpdatesAsync`. Hosts `UpdateCheckService`. - **IslandsShellViewModel** — root coordinator. Owns the three island VMs and the `WorkerClient`, wires cross-island events (selection, notes/prep mode, conflict resolution), connection state, the update banner, the inline worker-log strip (clickable → Log Visualizer overlay; `FlashFooterError` surfaces UI-action failures + the worker's Warn/Error there), responsive-layout flags (`ShowLists`/`ShowDetails` by window width), `PrimeStatus` flash, the modal openers, and `RestartWorkerAsync`/`CheckForUpdatesAsync`. Hosts `UpdateCheckService`.
- **ListsIslandViewModel** — smart lists (My Day, Important, Planned, virtual queued/running/review), user lists, selection, list CRUD, drag-reorder, badge counts, opens list settings / repo import / worktrees overview, `OpenInExplorer`/`OpenInTerminal`. - **ListsIslandViewModel** — smart lists (My Day, Important, Planned, virtual queued/running/review), user lists, selection, list CRUD, drag-reorder, badge counts, opens list settings / repo import / worktrees overview, `OpenInExplorer`/`OpenInTerminal`.
- **Folders:** the sidebar's top level is **one mixed collection**, `TopLevel` (`ObservableCollection<object>`: `ListFolderNavItemViewModel` rows, each with its own `Lists`, interleaved with folder-less `ListNavItemViewModel` rows) — that's what lets a list sit *above* a folder. `Folders`/`RootLists` are `OfType` **projections** of it, not collections to keep in sync. `UserLists` stays the **flat superset** every count refresh, row refresh and the no-repo banner work over — a row lives in both. `ContainerOf(row)` resolves which collection renders it (non-generic `IList`, since the top level is mixed). The view is a single `ItemsControl` over `TopLevel` with **implicit, type-matched `DataTemplate`s in `UserControl.DataTemplates`** — no keyed row template, and the folder's child `ItemsControl` resolves the same list template by walking up to the UserControl. A folder is never selectable: tapping the header runs `ToggleFolderCommand` (persisted to `list_folders.is_collapsed`), and its badge is the sum of its children. `DropAsync(source, target, placeBelow)` handles all four source/target combinations and doubles as the move: a drop position implies a container, so dropping a list onto a row in another folder — or next to *anything* at the top level, folder headers included — reassigns `FolderId`. A folder dropped onto a row inside a folder is ignored; folders never nest. `MoveToFolderAsync` is the drop-into-the-header path (reaches collapsed/empty folders, bound to the middle half of the header — the outer quarters insert *next to* the folder instead); `RemoveFromFolderCommand` is its context-menu counterpart. Both end in `PersistOrderAsync` → `ListRepository.ReorderSidebarAsync`, one `sort_order` sequence spanning **both tables**. ⚠️ A **folder** drag starts from `PointerMoved` past a 4px threshold using the *stored* `PointerPressedEventArgs` (`DoDragDropAsync` only accepts those) — starting it on press would capture the pointer and swallow the `Tapped` that folds the folder.
- **TasksIslandViewModel** — open/overdue/completed groups for the selected list with hierarchy-aware regrouping; task CRUD, drag-reorder, toggle done/star, schedule, enqueue/dequeue, cancel; review actions; planning session lifecycle; `RefineTask`, `OpenConPtySessionRequested`, `ToggleManual`, `SyncInteractiveSessions`; MyDay extras (`IsMyDayList`, `ClearDayCommand`, `ShowPrepLogCommand`) and the pinned Notes pseudo-row. Raises `NotesRequested`/`PrepRequested` for the shell. - **TasksIslandViewModel** — open/overdue/completed groups for the selected list with hierarchy-aware regrouping; task CRUD, drag-reorder, toggle done/star, schedule, enqueue/dequeue, cancel; review actions; planning session lifecycle; `RefineTask`, `OpenConPtySessionRequested`, `ToggleManual`, `SyncInteractiveSessions`; MyDay extras (`IsMyDayList`, `ClearDayCommand`, `ShowPrepLogCommand`) and the pinned Notes pseudo-row. Raises `NotesRequested`/`PrepRequested` for the shell.
- **DetailsIslandViewModel** — the detail pane for a bound `TaskRowViewModel`. Owns live-log streaming (`Log` via `StreamLineFormatter`), debounced title/description editing, subtasks, the session-outcome/roadblock split, the three-tab work console (`output`/`git`/`session`), child surfacing (`ChildOutcomes` + `ChildrenNeedingAttention` drive an attention band on the Session tab), attachments, and the modes `IsNotesMode`/`IsPrepMode`/computed `IsTaskDetailVisible`. Failures raise `ErrorReported`, wired by the shell into `FlashFooterError`. - **DetailsIslandViewModel** — the detail pane for a bound `TaskRowViewModel`. Owns live-log streaming (`Log` via `StreamLineFormatter`), debounced title/description editing, subtasks, the session-outcome/roadblock split, the three-tab work console (`output`/`git`/`session`), child surfacing (`ChildOutcomes` + `ChildrenNeedingAttention` drive an attention band on the Session tab), attachments, and the modes `IsNotesMode`/`IsPrepMode`/computed `IsTaskDetailVisible`. Failures raise `ErrorReported`, wired by the shell into `FlashFooterError`.
- Three concerns are extracted into section VMs exposed as properties: `AgentSettings` (`AgentConfigEditorViewModel`, scope=Task), `MergeSectionViewModel`, `PrepPanelViewModel`. Helper rows live in the same file. - Three concerns are extracted into section VMs exposed as properties: `AgentSettings` (`AgentConfigEditorViewModel`, scope=Task), `MergeSectionViewModel`, `PrepPanelViewModel`. Helper rows live in the same file.
@@ -56,28 +55,16 @@ Design/ — Tokens.axaml (design tokens; merged before styles)
| VM | Notes | | VM | Notes |
|---|---| |---|---|
| `SettingsModalViewModel` | Four tabs: General, Worktrees, Files (prompt paths), Prime Claude. General hosts the per-model preset table (`ModelPresetRowViewModel`: effort + max turns per alias) which **replaced** the single global "Max turns" field. The Prime Claude tab gives each schedule row a three-way action radio group (Ping / Fill My Day / Custom) — `RadioButton.GroupName` is bound to a **per-row** `RadioGroup` string, since a shared group name would make every schedule share one selection. `DailyPrepMaxTasks` is disabled unless some row is `FillMyDay`. | | `SettingsModalViewModel` | Four tabs: General, Worktrees, Files (prompt paths), Prime Claude. General hosts the per-model preset table (`ModelPresetRowViewModel`: effort + max turns per alias) which **replaced** the single global "Max turns" field. The Prime Claude tab gives each schedule row a three-way action radio group (Ping / Fill My Day / Custom) — `RadioButton.GroupName` is bound to a **per-row** `RadioGroup` string, since a shared group name would make every schedule share one selection. `DailyPrepMaxTasks` is disabled unless some row is `FillMyDay`. |
| `ListSettingsModalViewModel` | Name, working dir, commit type, "manual list" flag, `VerifyCommand`, delete. Hosts the shared `AgentConfigEditorViewModel` as `Agent` (scope=List) — ⚠️ save delegates to `Agent.SaveAsync(verifyCommand)` because both land in the same `list_config` row via one `UpdateListConfig` call and would otherwise clobber each other. **Doubles as the folder editor:** `IsFolder` collapses the body to name + icon, and it's reached either via the create-only "create a folder instead" toggle (`CanToggleFolder`, set by `BeginLoad`) or via `BeginLoadFolder` on an existing folder. There is no list↔folder conversion. Creating a folder writes a `list_folders` row and **deletes the list row the create flow pre-created**, reporting it as `Deleted` so the caller does a full reload. | | `ListSettingsModalViewModel` | Name, working dir, commit type, "manual list" flag, `VerifyCommand`, delete. Hosts the shared `AgentConfigEditorViewModel` as `Agent` (scope=List) — ⚠️ save delegates to `Agent.SaveAsync(verifyCommand)` because both land in the same `list_config` row via one `UpdateListConfig` call and would otherwise clobber each other. |
| `WeeklyReportModalViewModel` | Range pickers default "since last standup weekday → today", cached per range. | | `WeeklyReportModalViewModel` | Range pickers default "since last standup weekday → today", cached per range. |
| `MergeHelperSelectionModalViewModel` | "Let Claude handle it" picker → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md). | | `MergeHelperSelectionModalViewModel` | "Let Claude handle it" picker → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md). |
| `UsageMonitorModalViewModel` | Opened from the usage pill (shown **before** the data loads via `BeginLoad`); gauges are **dynamic** per `UsageSnapshotDto.Limits` row, and the 5h/7d ones carry three draggable stage markers (soft/hard/gate) via `UsageGaugeBar` + the pure `UsageThresholdDrag`, plus a colour-matched legend with a `NumericUpDown` per stage → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md). The **analytics** part (models/tasks/cost) comes from the external TokenTracker export, not from us: without the CLI the modal shows a hint card with an install button (gated on Node ≥ 20) instead of the totals header. Gauges, gate and throttle are unaffected by it. The modal is **display + threshold drag only** — the PowerUse switch/window/handoff % it used to host moved to Settings → Execution (`GeneralSettingsTabViewModel`), and "Refresh now" is an icon in the titlebar via `ModalShell.HeaderActions` rather than a body row. | | `UsageMonitorModalViewModel` | Opened from the usage pill (shown **before** the data loads via `BeginLoad`); gauges are **dynamic** per `UsageSnapshotDto.Limits` row, and the 5h/7d ones carry three draggable stage markers (soft/hard/gate) via `UsageGaugeBar` + the pure `UsageThresholdDrag`, plus a colour-matched legend with a `NumericUpDown` per stage → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md). The **analytics** part (models/tasks/cost) comes from the external TokenTracker export, not from us: without the CLI the modal shows a hint card with an install button (gated on Node ≥ 20) instead of the totals header. Gauges, gate and throttle are unaffected by it. |
Self-explanatory: `RepoImportModalViewModel` (bulk-create lists from git repos; already-wired Self-explanatory: `RepoImportModalViewModel` (bulk-create lists from git repos; already-wired
repos disabled), `MergeModalViewModel`, `WorktreesOverviewModalViewModel`, repos disabled), `MergeModalViewModel`, `WorktreesOverviewModalViewModel`,
`UnfinishedPlanningModalViewModel`, `LogVisualizerViewModel` (last 30 min, all levels + a `UnfinishedPlanningModalViewModel`, `LogVisualizerViewModel` (last 30 min, all levels + a
warn/error filter), `WorkerConnectionModalViewModel`, `AboutModalViewModel`. warn/error filter), `WorkerConnectionModalViewModel`, `AboutModalViewModel`.
`CheatSheetsViewModel` backs the modeless `CheatSheetsWindow` (Help → Cheat Sheets): content is
markdown under `Assets/CheatSheets/*.md` as **EmbeddedResource** (not `AvaloniaResource` —
`AssetLoader` throws without an initialized Avalonia app, which would make the VM unconstructible
in tests), rendered through `MarkdownView`, with a `Topmost` pin so it can sit docked beside the
shell. A new sheet = a new `.md` file + its key in `CheatSheetsViewModel.Keys` (+ a menu entry if
it should be directly reachable). `MarkdownView` has no table/fenced-code support, so sheets are
bullet lists with inline code — rendered via its opt-in `CommandRows` property, which turns a
`` `command` — description `` bullet into a mono chip + copy button + description and wraps each
`##` section in a collapsible `Expander` (blocks are added to the open section's panel, not to the
host). The flag is opt-in because the other three `MarkdownView` call sites (prompt-file viewer,
weekly report, task-description preview) render prose where copy buttons would be noise.
## Diff & Conflicts ## Diff & Conflicts
`UnifiedDiffParser` (static) + `DiffModels.cs` shared types + `DiffViewerViewModel` (one unified `UnifiedDiffParser` (static) + `DiffModels.cs` shared types + `DiffViewerViewModel` (one unified
@@ -119,9 +106,6 @@ There is no null→bool converter — bind
Modals use `TaskCompletionSource` results behind the reusable `ModalShell` control — the dialog Modals use `TaskCompletionSource` results behind the reusable `ModalShell` control — the dialog
sets the result on save/cancel, the caller awaits the TCS. sets the result on save/cancel, the caller awaits the TCS.
`ModalShell.HeaderActions` is the titlebar slot left of maximise/close — for a window-level action
that should stay visible without costing a body row (currently only the usage monitor's refresh).
`ModalShell` also owns the window chrome for every modal: the titlebar drag goes through `ModalShell` also owns the window chrome for every modal: the titlebar drag goes through
`Window.BeginMoveDrag` (so Windows snap works — drag to the top edge to maximise; the OS only `Window.BeginMoveDrag` (so Windows snap works — drag to the top edge to maximise; the OS only
snaps `CanResize="True"` windows, which is the opt-in), and it insets itself by the window's snaps `CanResize="True"` windows, which is the opt-in), and it insets itself by the window's
-3
View File
@@ -36,9 +36,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<!-- EmbeddedResource, not AvaloniaResource: reading these needs no initialized Avalonia
app, so the VM stays constructible in tests. -->
<EmbeddedResource Include="Assets/CheatSheets/*.md" />
<AvaloniaResource Include="Assets/Fonts/*.ttf" /> <AvaloniaResource Include="Assets/Fonts/*.ttf" />
<AvaloniaResource Include="Assets/Fonts/OFL-InterTight.txt" /> <AvaloniaResource Include="Assets/Fonts/OFL-InterTight.txt" />
<AvaloniaResource Include="Assets/Fonts/OFL-JetBrainsMono.txt" /> <AvaloniaResource Include="Assets/Fonts/OFL-JetBrainsMono.txt" />
-12
View File
@@ -297,18 +297,6 @@
<Setter Property="Foreground" Value="{StaticResource StatusQueuedBrush}" /> <Setter Property="Foreground" Value="{StaticResource StatusQueuedBrush}" />
</Style> </Style>
<!-- waiting → muted amber: a Queued task blocked on an unmet predecessor (a task_dependencies
edge, or the planning chain's BlockedByTaskId) — distinct from queued (unblocked, next up
to run) and from children (a parent waiting on its own subtasks). Mutually exclusive with
.queued on the same chip (IsQueued/IsWaiting), so no declaration-order fight between them. -->
<Style Selector="Border.chip.waiting">
<Setter Property="Background" Value="#332F1A" />
<Setter Property="BorderBrush" Value="#4D451A" />
</Style>
<Style Selector="Border.chip.waiting > TextBlock">
<Setter Property="Foreground" Value="#C9A227" />
</Style>
<!-- done → green (#6FA86B) --> <!-- done → green (#6FA86B) -->
<Style Selector="Border.chip.done"> <Style Selector="Border.chip.done">
<Setter Property="Background" Value="{StaticResource DoneTintBrush}" /> <Setter Property="Background" Value="{StaticResource DoneTintBrush}" />
@@ -36,7 +36,4 @@ public interface IDialogService
/// <summary>Show (or re-show + focus) the modeless Mission Control window. Lazily created; hides on close.</summary> /// <summary>Show (or re-show + focus) the modeless Mission Control window. Lazily created; hides on close.</summary>
void ShowMissionControl(MissionControlViewModel vm); void ShowMissionControl(MissionControlViewModel vm);
/// <summary>Show (or re-show + focus) the modeless cheat-sheet window for the shell's shared VM.</summary>
void ShowCheatSheets(CheatSheetsViewModel vm);
} }
@@ -1,10 +1,9 @@
namespace ClaudeDo.Ui.Services; namespace ClaudeDo.Ui.Services;
// Two named types because DI resolves them by type, not by key. Not sealed: tests subclass // Two named types because DI resolves them by type, not by key.
// these to fake Find() without touching the real filesystem/registry. public sealed class InstallerLocator() : InstallArtifactLocator("uninstaller", "ClaudeDo.Installer.exe");
public class InstallerLocator() : InstallArtifactLocator("uninstaller", "ClaudeDo.Installer.exe");
public class WorkerLocator() : InstallArtifactLocator("worker", "ClaudeDo.Worker.exe"); public sealed class WorkerLocator() : InstallArtifactLocator("worker", "ClaudeDo.Worker.exe");
/// <summary> /// <summary>
/// Locates an executable inside a ClaudeDo install: walk up from the running /// Locates an executable inside a ClaudeDo install: walk up from the running
@@ -15,7 +14,7 @@ public abstract class InstallArtifactLocator(string subdir, string exeName)
{ {
private const string InstallJson = "install.json"; private const string InstallJson = "install.json";
public virtual string? Find() public string? Find()
=> FindByWalkingUp(AppContext.BaseDirectory) => FindByWalkingUp(AppContext.BaseDirectory)
?? (OperatingSystem.IsWindows() ? FindByRegistry() : null); ?? (OperatingSystem.IsWindows() ? FindByRegistry() : null);
@@ -52,6 +52,13 @@ public interface IWorkerClient : INotifyPropertyChanged
/// total.</summary> /// total.</summary>
event Action<string, string, int, int>? OperationProgressEvent; event Action<string, string, int, int>? OperationProgressEvent;
/// <summary>(taskId, phase, elapsedSeconds) — phase of an in-flight single-task merge
/// ("merging" | "verifying"). Fires while the MergeTask call itself is still pending, so the
/// waiting UI can show what it's blocked on; the verify phase re-fires every 30 s. A thin
/// forwarder over <see cref="OperationProgressEvent"/> kept for existing consumers (elapsed
/// seconds riding in the generic "current" slot).</summary>
event Action<string, string, int>? MergeProgressEvent;
event Action<string, string>? PlanningMergeStartedEvent; event Action<string, string>? PlanningMergeStartedEvent;
event Action<string, string>? PlanningSubtaskMergedEvent; event Action<string, string>? PlanningSubtaskMergedEvent;
/// <summary>(planningTaskId, subtaskId, conflictedFiles, externallyDriven). externallyDriven /// <summary>(planningTaskId, subtaskId, conflictedFiles, externallyDriven). externallyDriven
@@ -110,11 +117,9 @@ public interface IWorkerClient : INotifyPropertyChanged
/// and clears BlockedByTaskId in the same update) — call once per row (parent and each /// and clears BlockedByTaskId in the same update) — call once per row (parent and each
/// queued child) rather than cascading server-side.</summary> /// queued child) rather than cascading server-side.</summary>
Task DequeueTaskAsync(string taskId); Task DequeueTaskAsync(string taskId);
/// <param name="autostash">Retry flag for status "dirty_target": stash the target working Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch);
/// tree's uncommitted changes before merging and restore them afterwards (git --autostash).</param>
Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch, bool autostash = false);
Task<MergePreviewDto?> PreviewMergeAsync(string taskId, string targetBranch); Task<MergePreviewDto?> PreviewMergeAsync(string taskId, string targetBranch);
Task<MergeResultDto> MergeTaskAsync(string taskId, string targetBranch, bool removeWorktree, string commitMessage, bool autostash = false); Task<MergeResultDto> MergeTaskAsync(string taskId, string targetBranch, bool removeWorktree, string commitMessage);
Task RejectReviewToQueueAsync(string taskId, string feedback); Task RejectReviewToQueueAsync(string taskId, string feedback);
Task RejectReviewToIdleAsync(string taskId); Task RejectReviewToIdleAsync(string taskId);
Task CancelReviewAsync(string taskId); Task CancelReviewAsync(string taskId);
@@ -138,9 +143,8 @@ public interface IWorkerClient : INotifyPropertyChanged
/// <summary>Launch spec for an embedded ConPTY "merge helper" session that drives the given /// <summary>Launch spec for an embedded ConPTY "merge helper" session that drives the given
/// tasks to a merged/Done state. listId scopes the session (and cwd) to that list. /// tasks to a merged/Done state. listId scopes the session (and cwd) to that list.
/// handlerTaskId (from CreateMergeHelperTaskAsync) is rendered into the brief so the session /// handlerTaskId (from CreateMergeHelperTaskAsync) is rendered into the brief so the session
/// can call handoff_list_handler on its own handler task. model overrides the triage /// can call handoff_list_handler on its own handler task.</summary>
/// session's model (null = default).</summary> Task<LaunchSpec> GetMergeHelperLaunchSpecAsync(IReadOnlyList<string> taskIds, string listId, string handlerTaskId, CancellationToken ct = default);
Task<LaunchSpec> GetMergeHelperLaunchSpecAsync(IReadOnlyList<string> taskIds, string listId, string handlerTaskId, string? model = null, CancellationToken ct = default);
/// <summary>Creates the ClaudeDo task that owns a list-handler run (one per run, Idle/IsManual, /// <summary>Creates the ClaudeDo task that owns a list-handler run (one per run, Idle/IsManual,
/// never queued) so the ConPTY tile can be task-based instead of ad-hoc. Returns the new task id.</summary> /// never queued) so the ConPTY tile can be task-based instead of ad-hoc. Returns the new task id.</summary>
Task<string> CreateMergeHelperTaskAsync( Task<string> CreateMergeHelperTaskAsync(
@@ -154,10 +158,6 @@ public interface IWorkerClient : INotifyPropertyChanged
/// running. The exit code only exists in this process; the worker decides whether it was a /// running. The exit code only exists in this process; the worker decides whether it was a
/// list-handler session killed by the usage limit and reopens the same phase after the 5h reset.</summary> /// list-handler session killed by the usage limit and reopens the same phase after the 5h reset.</summary>
Task ReportInteractiveSessionExitedAsync(string taskId, int exitCode, CancellationToken ct = default); Task ReportInteractiveSessionExitedAsync(string taskId, int exitCode, CancellationToken ct = default);
/// <summary>The handler round's still-open (Queued/Running) tasks, for the Mission Control
/// "abandon run" action. Empty when the round has no entry or nothing open -- the caller then
/// closes the pane without a confirmation dialog.</summary>
Task<IReadOnlyList<HandlerOpenTaskDto>> GetHandlerOpenTasksAsync(string handlerTaskId, CancellationToken ct = default);
/// <summary>Starts a planning session and returns the launch spec for an embedded ConPTY /// <summary>Starts a planning session and returns the launch spec for an embedded ConPTY
/// planning terminal (replaces StartPlanningSessionAsync's external wt window).</summary> /// planning terminal (replaces StartPlanningSessionAsync's external wt window).</summary>
Task<LaunchSpec> GetPlanningStartLaunchSpecAsync(string taskId, CancellationToken ct = default); Task<LaunchSpec> GetPlanningStartLaunchSpecAsync(string taskId, CancellationToken ct = default);
@@ -68,14 +68,6 @@ public sealed class PtyTerminalSession : IDisposable
await WaitForLaunchGateAsync(s_launchGate, s_launchGateTimeout, ct); await WaitForLaunchGateAsync(s_launchGate, s_launchGateTimeout, ct);
try try
{ {
// If ClaudeDo.App itself was started from inside a claude session (e.g. a dev/test
// launch), it inherits these markers and every embedded PTY session would otherwise
// inherit them too — the child claude then thinks it's a spawned subagent and
// disables transcript saving / degrades its own startup banner. Every ConPTY tile
// must look like a fresh top-level session regardless of how ClaudeDo.App was launched.
Environment.SetEnvironmentVariable("CLAUDE_CODE_CHILD_SESSION", null);
Environment.SetEnvironmentVariable("CLAUDECODE", null);
foreach (var (key, value) in descriptor.Env) foreach (var (key, value) in descriptor.Env)
Environment.SetEnvironmentVariable(key, value); Environment.SetEnvironmentVariable(key, value);
@@ -137,46 +129,6 @@ public sealed class PtyTerminalSession : IDisposable
} }
} }
/// <summary>
/// Inserts <paramref name="text"/> at the cursor without submitting it — the drop-a-file-path
/// case. Same write seam as <see cref="SendLineAsync"/>, just without the Enter.
/// </summary>
public async Task<bool> SendTextAsync(string text)
{
if (_control is not { } control || !IsRunning || string.IsNullOrEmpty(text)) return false;
try
{
await SendRawAsync(control, text);
return true;
}
catch (Exception)
{
return false;
}
}
/// <summary>
/// Pastes the clipboard into the session. <see cref="TerminalControl"/> wires paste to the
/// right-click menu only, so Ctrl+V otherwise reaches the child as a raw control byte and does
/// nothing. Goes through the emulator's own <see cref="TerminalView.PasteAsync"/> rather than
/// writing the clipboard text raw, because that is what honours bracketed-paste mode — without
/// it a multi-line paste is read line by line and submits on the first newline.
/// </summary>
public async Task<bool> PasteAsync()
{
if (_control is not { } control || !IsRunning) return false;
try
{
if (s_terminalViewField?.GetValue(control) is not TerminalView view) return false;
await view.PasteAsync();
return true;
}
catch (Exception)
{
return false;
}
}
// Long enough that the two writes can't be read as one chunk by the child's stdin reader. // Long enough that the two writes can't be read as one chunk by the child's stdin reader.
private static readonly TimeSpan SubmitDelay = TimeSpan.FromMilliseconds(150); private static readonly TimeSpan SubmitDelay = TimeSpan.FromMilliseconds(150);
+1 -1
View File
@@ -69,5 +69,5 @@ public static class RepoScanner
// A real clone has .git as a directory. Worktrees and submodules have it as a file // A real clone has .git as a directory. Worktrees and submodules have it as a file
// ("gitdir: ...") — those are not standalone repos and would flood the list. // ("gitdir: ...") — those are not standalone repos and would flood the list.
public static bool IsRepo(string dir) => Directory.Exists(Path.Combine(dir, ".git")); private static bool IsRepo(string dir) => Directory.Exists(Path.Combine(dir, ".git"));
} }
+12 -11
View File
@@ -67,6 +67,7 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
public event Action<UsageSnapshotDto>? UsageUpdatedEvent; public event Action<UsageSnapshotDto>? UsageUpdatedEvent;
public event Action<string, string, int, int>? OperationProgressEvent; public event Action<string, string, int, int>? OperationProgressEvent;
public event Action<string, string, int>? MergeProgressEvent;
public event Action<string, string>? PlanningMergeStartedEvent; public event Action<string, string>? PlanningMergeStartedEvent;
public event Action<string, string>? PlanningSubtaskMergedEvent; public event Action<string, string>? PlanningSubtaskMergedEvent;
@@ -188,7 +189,11 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
_hub.On<string, string, int, int>("OperationProgress", (opKey, phase, current, total) => _hub.On<string, string, int, int>("OperationProgress", (opKey, phase, current, total) =>
{ {
Dispatcher.UIThread.Post(() => OperationProgressEvent?.Invoke(opKey, phase, current, total)); Dispatcher.UIThread.Post(() =>
{
OperationProgressEvent?.Invoke(opKey, phase, current, total);
MergeProgressEvent?.Invoke(opKey, phase, current);
});
}); });
_hub.On<string, string>("PlanningMergeStarted", (planningTaskId, targetBranch) => _hub.On<string, string>("PlanningMergeStarted", (planningTaskId, targetBranch) =>
@@ -353,11 +358,10 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
await InvokeTimedAsync("ResetTask", () => _hub.InvokeAsync("ResetTask", taskId)); await InvokeTimedAsync("ResetTask", () => _hub.InvokeAsync("ResetTask", taskId));
} }
public async Task<MergeResultDto> MergeTaskAsync( public async Task<MergeResultDto> MergeTaskAsync(string taskId, string targetBranch, bool removeWorktree, string commitMessage)
string taskId, string targetBranch, bool removeWorktree, string commitMessage, bool autostash = false)
{ {
return await InvokeTimedAsync<MergeResultDto>("MergeTask", () => _hub.InvokeAsync<MergeResultDto>( return await InvokeTimedAsync<MergeResultDto>("MergeTask", () => _hub.InvokeAsync<MergeResultDto>(
"MergeTask", taskId, targetBranch, removeWorktree, commitMessage, autostash)); "MergeTask", taskId, targetBranch, removeWorktree, commitMessage));
} }
public Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) public Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch)
@@ -554,10 +558,10 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
public Task DequeueTaskAsync(string taskId) public Task DequeueTaskAsync(string taskId)
=> InvokeTimedAsync("DequeueTask", () => _hub.InvokeAsync("DequeueTask", taskId)); => InvokeTimedAsync("DequeueTask", () => _hub.InvokeAsync("DequeueTask", taskId));
public async Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch, bool autostash = false) public async Task<MergeResultDto?> ApproveReviewAsync(string taskId, string targetBranch)
{ {
LastApproveTarget = targetBranch; LastApproveTarget = targetBranch;
return await InvokeTimedAsync<MergeResultDto>("ApproveReview", () => _hub.InvokeAsync<MergeResultDto>("ApproveReview", taskId, targetBranch, autostash)); return await InvokeTimedAsync<MergeResultDto>("ApproveReview", () => _hub.InvokeAsync<MergeResultDto>("ApproveReview", taskId, targetBranch));
} }
public Task<MergePreviewDto?> PreviewMergeAsync(string taskId, string targetBranch) public Task<MergePreviewDto?> PreviewMergeAsync(string taskId, string targetBranch)
@@ -623,8 +627,8 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
public async Task<LaunchSpec> GetAdHocLaunchSpecAsync(string directory, CancellationToken ct = default) public async Task<LaunchSpec> GetAdHocLaunchSpecAsync(string directory, CancellationToken ct = default)
=> await InvokeTimedAsync<LaunchSpec>("GetAdHocLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetAdHocLaunchSpec", directory, ct)); => await InvokeTimedAsync<LaunchSpec>("GetAdHocLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetAdHocLaunchSpec", directory, ct));
public async Task<LaunchSpec> GetMergeHelperLaunchSpecAsync(IReadOnlyList<string> taskIds, string listId, string handlerTaskId, string? model = null, CancellationToken ct = default) public async Task<LaunchSpec> GetMergeHelperLaunchSpecAsync(IReadOnlyList<string> taskIds, string listId, string handlerTaskId, CancellationToken ct = default)
=> await InvokeTimedAsync<LaunchSpec>("GetMergeHelperLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetMergeHelperLaunchSpec", taskIds, listId, handlerTaskId, model, ct)); => await InvokeTimedAsync<LaunchSpec>("GetMergeHelperLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetMergeHelperLaunchSpec", taskIds, listId, handlerTaskId, ct));
public async Task<string> CreateMergeHelperTaskAsync( public async Task<string> CreateMergeHelperTaskAsync(
IReadOnlyList<string> taskIds, string listId, string title, string descriptionHeader, CancellationToken ct = default) IReadOnlyList<string> taskIds, string listId, string title, string descriptionHeader, CancellationToken ct = default)
@@ -637,9 +641,6 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
public Task ReportInteractiveSessionExitedAsync(string taskId, int exitCode, CancellationToken ct = default) public Task ReportInteractiveSessionExitedAsync(string taskId, int exitCode, CancellationToken ct = default)
=> InvokeTimedAsync("ReportInteractiveSessionExited", () => _hub.InvokeAsync("ReportInteractiveSessionExited", taskId, exitCode, ct)); => InvokeTimedAsync("ReportInteractiveSessionExited", () => _hub.InvokeAsync("ReportInteractiveSessionExited", taskId, exitCode, ct));
public async Task<IReadOnlyList<HandlerOpenTaskDto>> GetHandlerOpenTasksAsync(string handlerTaskId, CancellationToken ct = default)
=> await InvokeTimedAsync<List<HandlerOpenTaskDto>>("GetHandlerOpenTasks", () => _hub.InvokeAsync<List<HandlerOpenTaskDto>>("GetHandlerOpenTasks", handlerTaskId, ct));
public async Task<LaunchSpec> GetPlanningStartLaunchSpecAsync(string taskId, CancellationToken ct = default) public async Task<LaunchSpec> GetPlanningStartLaunchSpecAsync(string taskId, CancellationToken ct = default)
=> await InvokeTimedAsync<LaunchSpec>("GetPlanningStartLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetPlanningStartLaunchSpec", taskId, ct)); => await InvokeTimedAsync<LaunchSpec>("GetPlanningStartLaunchSpec", () => _hub.InvokeAsync<LaunchSpec>("GetPlanningStartLaunchSpec", taskId, ct));
@@ -236,10 +236,6 @@ public sealed partial class AgentConfigEditorViewModel : ViewModelBase, IDisposa
return names.Count == 0 ? null : names; return names.Count == 0 ? null : names;
} }
// The list_config row fetched by the most recent LoadForListAsync — exposed so a caller that
// needs the same row (ListSettingsModalViewModel) can reuse it instead of fetching it again.
public ListConfigDto? LastLoadedListConfig { get; private set; }
public async System.Threading.Tasks.Task LoadForListAsync(string listId, CancellationToken ct = default) public async System.Threading.Tasks.Task LoadForListAsync(string listId, CancellationToken ct = default)
{ {
_suppressSave = true; _suppressSave = true;
@@ -250,7 +246,6 @@ public sealed partial class AgentConfigEditorViewModel : ViewModelBase, IDisposa
await LoadGlobalDefaultsAsync(); await LoadGlobalDefaultsAsync();
var cfg = await _worker.GetListConfigAsync(listId); var cfg = await _worker.GetListConfigAsync(listId);
LastLoadedListConfig = cfg;
ApplyConfig(cfg?.Model, cfg?.MaxTurns, cfg?.SystemPrompt, cfg?.AgentPath, cfg?.PermissionMode); ApplyConfig(cfg?.Model, cfg?.MaxTurns, cfg?.SystemPrompt, cfg?.AgentPath, cfg?.PermissionMode);
await ReloadSessionSkillsAsync(cfg?.SessionSkills); await ReloadSessionSkillsAsync(cfg?.SessionSkills);
@@ -145,7 +145,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
{ {
// Any non-conflict outcome here means nothing was left mid-merge for this dialog // Any non-conflict outcome here means nothing was left mid-merge for this dialog
// to resolve -- surface why instead of quietly closing with no explanation. // to resolve -- surface why instead of quietly closing with no explanation.
if (start.Status is "blocked" or "untracked_collision" or "dirty_target") if (start.Status is "blocked" or "untracked_collision")
Error = start.ErrorMessage; Error = start.ErrorMessage;
return false; return false;
} }
@@ -1,7 +1,6 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using ClaudeDo.Ui.Localization;
using ClaudeDo.Ui.Services; using ClaudeDo.Ui.Services;
using Iciclecreek.Terminal; using Iciclecreek.Terminal;
@@ -37,29 +36,14 @@ public sealed partial class InteractiveTerminalViewModel : ViewModelBase, IDispo
/// can show a spinner instead of an empty black pane.</summary> /// can show a spinner instead of an empty black pane.</summary>
public bool IsStarting => !IsRunning && !HasExited && StartError is null; public bool IsStarting => !IsRunning && !HasExited && StartError is null;
/// <summary>True once the process has died without a <see cref="StartError"/> already covering it —
/// i.e. every death that isn't a launch-time failure: a crash after running a while, a clean exit,
/// or a quiet exit inside the startup grace window. Drives the host's "session ended" banner so a
/// dead pane never looks like it's still running/thinking.</summary>
public bool HasExitedAfterStartup => HasExited && StartError is null;
partial void OnIsRunningChanged(bool value) partial void OnIsRunningChanged(bool value)
{ {
OnPropertyChanged(nameof(IsStarting)); OnPropertyChanged(nameof(IsStarting));
if (value) _startedAtUtc = _utcNow(); if (value) _startedAtUtc = _utcNow();
} }
partial void OnHasExitedChanged(bool value) partial void OnHasExitedChanged(bool value) => OnPropertyChanged(nameof(IsStarting));
{ partial void OnStartErrorChanged(string? value) => OnPropertyChanged(nameof(IsStarting));
OnPropertyChanged(nameof(IsStarting));
OnPropertyChanged(nameof(HasExitedAfterStartup));
}
partial void OnStartErrorChanged(string? value)
{
OnPropertyChanged(nameof(IsStarting));
OnPropertyChanged(nameof(HasExitedAfterStartup));
}
public InteractiveTerminalViewModel() : this(() => DateTime.UtcNow) public InteractiveTerminalViewModel() : this(() => DateTime.UtcNow)
{ {
@@ -112,15 +96,6 @@ public sealed partial class InteractiveTerminalViewModel : ViewModelBase, IDispo
} }
} }
/// <summary>Raised when a user-initiated paste or drop couldn't reach the session (write seam
/// gone, no running process) — mirrors the island ViewModels' ErrorReported, forwarded by
/// <see cref="ClaudeDo.Ui.ViewModels.MissionControl.ConPtyPaneViewModel"/> into the footer error strip.</summary>
public event Action<string>? ErrorReported;
/// <summary>Called by the view after a failed <see cref="PasteAsync"/>/<see cref="SendTextAsync"/>
/// so the failure surfaces through <see cref="ErrorReported"/> instead of vanishing silently.</summary>
public void ReportSendFailed() => ErrorReported?.Invoke(Loc.T("missionControl.terminalSendFailed"));
/// <summary>Raised when the process died non-zero *after* clearing <see cref="StartupGraceWindow"/> — /// <summary>Raised when the process died non-zero *after* clearing <see cref="StartupGraceWindow"/> —
/// i.e. a session that ran, then broke. That used to be a silent dead tile with no signal at all; /// i.e. a session that ran, then broke. That used to be a silent dead tile with no signal at all;
/// the worker turns it into a usage-limit auto-restart for list-handler sessions /// the worker turns it into a usage-limit auto-restart for list-handler sessions
@@ -161,15 +136,6 @@ public sealed partial class InteractiveTerminalViewModel : ViewModelBase, IDispo
/// type into (or the write seam is gone).</summary> /// type into (or the write seam is gone).</summary>
public Task<bool> SendLineAsync(string text) => _session.SendLineAsync(text); public Task<bool> SendLineAsync(string text) => _session.SendLineAsync(text);
/// <summary>Inserts text at the cursor without submitting — see
/// <see cref="PtyTerminalSession.SendTextAsync"/> (dropped file paths).</summary>
public Task<bool> SendTextAsync(string text) => _session.SendTextAsync(text);
/// <summary>Pastes the clipboard into the session (Ctrl+V) — see
/// <see cref="PtyTerminalSession.PasteAsync"/>. False when there is no running process to
/// paste into (or the write seam is gone).</summary>
public Task<bool> PasteAsync() => _session.PasteAsync();
public void Kill() => _session.Kill(); public void Kill() => _session.Kill();
public void Dispose() public void Dispose()
@@ -1262,34 +1262,25 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
using var op = ApproveOp.Begin(Loc.T("ops.merge.merging")); using var op = ApproveOp.Begin(Loc.T("ops.merge.merging"));
// Subscribed only for the duration of the call: the worker broadcasts to every // Subscribed only for the duration of the call: the worker broadcasts to every
// client, and a VM left on this event would keep reacting to merges for other tasks. // client, and a VM left on this event would keep reacting to merges for other tasks.
void OnMergeProgress(string progressTaskId, string phase, int elapsedSeconds)
{
if (progressTaskId != taskId || phase != MergePhaseVerifying) return;
ApproveOp.Report(Loc.T("ops.merge.verifying", FormatElapsed(elapsedSeconds)));
}
// Separate event: MergeProgressEvent forwards elapsed-seconds-only (verifying), but the
// rebase phase needs the branch count too, which only rides the untrimmed OperationProgress.
void OnOperationProgress(string opKey, string phase, int current, int total) void OnOperationProgress(string opKey, string phase, int current, int total)
{ {
if (opKey != taskId) return; if (opKey != taskId || phase != MergePhaseRebasing) return;
if (phase == MergePhaseVerifying) ApproveOp.Report(FormatRebasing(current, total));
ApproveOp.Report(Loc.T("ops.merge.verifying", FormatElapsed(current)));
else if (phase == MergePhaseRebasing)
ApproveOp.Report(FormatRebasing(current, total));
} }
_worker.MergeProgressEvent += OnMergeProgress;
_worker.OperationProgressEvent += OnOperationProgress; _worker.OperationProgressEvent += OnOperationProgress;
try try
{ {
var hasChildren = Subtasks.Count > 0 || ChildOutcomes.Count > 0; var hasChildren = Subtasks.Count > 0 || ChildOutcomes.Count > 0;
var result = await _worker.ApproveReviewAsync(taskId, Merge.SelectedMergeTarget ?? ""); var result = await _worker.ApproveReviewAsync(taskId, Merge.SelectedMergeTarget ?? "");
if (!hasChildren && result?.Status == "conflict")
// Nothing landed -- the target working dir has uncommitted changes (often another
// session's WIP in the shared main checkout). Offer the one-shot stash retry; git
// restores the changes itself once the merge is through.
if (result?.Status == "dirty_target" && ConfirmAsync != null
&& await ConfirmAsync(Loc.T("vm.detailsIsland.stashAndMergeConfirm")))
{
ApproveOp.Report(Loc.T("ops.merge.merging"));
result = await _worker.ApproveReviewAsync(
taskId, Merge.SelectedMergeTarget ?? "", autostash: true);
}
if (result?.Status == "dirty_target" && ShowErrorAsync != null)
await ShowErrorAsync(result.ErrorMessage ?? Loc.T("vm.detailsIsland.dirtyTarget"));
else if (!hasChildren && result?.Status == "conflict")
await _merge.ResolveConflictAsync(taskId, Merge.SelectedMergeTarget ?? ""); await _merge.ResolveConflictAsync(taskId, Merge.SelectedMergeTarget ?? "");
// The merge itself already landed; the verify command failed, so the task stayed // The merge itself already landed; the verify command failed, so the task stayed
// out of Done. Surface that instead of silently looking like nothing happened. // out of Done. Surface that instead of silently looking like nothing happened.
@@ -1307,6 +1298,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
} }
finally finally
{ {
_worker.MergeProgressEvent -= OnMergeProgress;
_worker.OperationProgressEvent -= OnOperationProgress; _worker.OperationProgressEvent -= OnOperationProgress;
} }
} }
@@ -1517,17 +1509,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase, IDisposable
catch { /* best-effort */ } catch { /* best-effort */ }
} }
// Shared by TaskRowViewModel.UpdateFromEntity — this is the one parser for
// `git diff --stat`'s summary line ("N insertions(+), M deletions(-)"). Anchored on the
// literal "(+)"/"(-)" markers rather than the English words: git for Windows localizes
// "insertion"/"deletion" to the OS language (e.g. German "Einfügung(en)"/"Löschung(en)"),
// but always keeps the untranslated (+)/(-) suffix, so this reads correctly in any locale.
internal static (int Additions, int Deletions) ParseDiffStat(string? stat) internal static (int Additions, int Deletions) ParseDiffStat(string? stat)
{ {
if (string.IsNullOrEmpty(stat)) return (0, 0); if (string.IsNullOrEmpty(stat)) return (0, 0);
int add = 0, del = 0; int add = 0, del = 0;
var m1 = System.Text.RegularExpressions.Regex.Match(stat, @"(\d+)[^,\n]*\(\+\)"); var m1 = System.Text.RegularExpressions.Regex.Match(stat, @"(\d+)\s+insertion");
var m2 = System.Text.RegularExpressions.Regex.Match(stat, @"(\d+)[^,\n]*\(-\)"); var m2 = System.Text.RegularExpressions.Regex.Match(stat, @"(\d+)\s+deletion");
if (m1.Success) int.TryParse(m1.Groups[1].Value, out add); if (m1.Success) int.TryParse(m1.Groups[1].Value, out add);
if (m2.Success) int.TryParse(m2.Groups[1].Value, out del); if (m2.Success) int.TryParse(m2.Groups[1].Value, out del);
return (add, del); return (add, del);
@@ -1,27 +0,0 @@
using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
/// <summary>
/// A sidebar folder row. Not a <see cref="ListNavItemViewModel"/> and not a
/// <see cref="ListKind"/> — a folder holds no tasks and is never selectable, so tapping it
/// toggles <see cref="IsCollapsed"/> instead of changing the selection.
/// </summary>
public sealed partial class ListFolderNavItemViewModel : ViewModelBase
{
public required string Id { get; init; }
[ObservableProperty] private string _name = "";
[ObservableProperty] private string _iconKey = "Folder";
[ObservableProperty] private bool _isCollapsed;
// Sum of the child lists' counts — a collapsed folder still shows what's inside it.
[ObservableProperty] private int _count;
// Set while a dragged list row hovers over the middle of this folder header (move-into-folder).
[ObservableProperty] private bool _isDropTarget;
// Insert-position hints for a drop next to the folder instead of into it. Drawn around the
// whole folder block (header + children), not just the header.
[ObservableProperty] private bool _dropHintAbove;
[ObservableProperty] private bool _dropHintBelow;
public ObservableCollection<ListNavItemViewModel> Lists { get; } = new();
}
@@ -26,6 +26,4 @@ public sealed partial class ListNavItemViewModel : ViewModelBase
[ObservableProperty] private bool _isTaskDropTarget; [ObservableProperty] private bool _isTaskDropTarget;
// Settable (not init) so a list-settings icon change refreshes the row in place. // Settable (not init) so a list-settings icon change refreshes the row in place.
[ObservableProperty] private string? _iconKey; [ObservableProperty] private string? _iconKey;
// The sidebar folder this row sits in (ListEntity.FolderId); null = top level.
[ObservableProperty] private string? _folderId;
} }
@@ -17,9 +17,8 @@ namespace ClaudeDo.Ui.ViewModels.Islands;
public enum ListKind { Smart, Virtual, User } public enum ListKind { Smart, Virtual, User }
/// <summary>Confirmed handler run: the scope list, the ordered selected task ids, and the model /// <summary>Confirmed handler run: the scope list and the ordered selected task ids.</summary>
/// picked for the triage session (null = default; review-mode runs skip triage entirely).</summary> public sealed record MergeHelperRequest(string ListId, IReadOnlyList<string> TaskIds);
public sealed record MergeHelperRequest(string ListId, IReadOnlyList<string> TaskIds, string? TriageModel = null);
public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
{ {
@@ -27,9 +26,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
/// island show the notes editor instead of rows.</summary> /// island show the notes editor instead of rows.</summary>
public const string NotesListId = "smart:notes"; public const string NotesListId = "smart:notes";
/// <summary>Icon key a folder falls back to when it has none of its own.</summary>
public const string ListFolderIcon = "Folder";
private readonly IDbContextFactory<ClaudeDoDbContext> _dbFactory; private readonly IDbContextFactory<ClaudeDoDbContext> _dbFactory;
private readonly IServiceProvider? _services; private readonly IServiceProvider? _services;
private readonly IWorkerClient? _worker; private readonly IWorkerClient? _worker;
@@ -62,8 +58,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
if (row is null || Dialogs is null || _services is null) return; if (row is null || Dialogs is null || _services is null) return;
var rawId = row.Id.StartsWith("user:", StringComparison.Ordinal) ? row.Id["user:".Length..] : row.Id; var rawId = row.Id.StartsWith("user:", StringComparison.Ordinal) ? row.Id["user:".Length..] : row.Id;
var vm = _services.GetRequiredService<ListSettingsModalViewModel>(); var vm = _services.GetRequiredService<ListSettingsModalViewModel>();
vm.ErrorReported += msg => ErrorReported?.Invoke(msg); await vm.LoadAsync(rawId, row.Name, row.WorkingDir, row.DefaultCommitType, row.IsManual, row.FindingsTracked, row.IconKey);
vm.BeginLoad(rawId, row.Name, row.WorkingDir, row.DefaultCommitType, row.IsManual, row.FindingsTracked, row.IconKey);
await Dialogs.ShowListSettingsAsync(vm); await Dialogs.ShowListSettingsAsync(vm);
if (vm.Deleted) await LoadAsync(); if (vm.Deleted) await LoadAsync();
else await RefreshRowAsync(row.Id); else await RefreshRowAsync(row.Id);
@@ -115,7 +110,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
await vm.LoadAsync(); await vm.LoadAsync();
var ids = await Dialogs.ShowMergeHelperSelectionAsync(vm); var ids = await Dialogs.ShowMergeHelperSelectionAsync(vm);
if (ids is { Count: > 0 }) if (ids is { Count: > 0 })
LetClaudeHandleRequested?.Invoke(new MergeHelperRequest(rawId, ids, vm.SelectedModel)); LetClaudeHandleRequested?.Invoke(new MergeHelperRequest(rawId, ids));
} }
/// <summary>Raised once per list after the review-scoped selection dialog is confirmed; /// <summary>Raised once per list after the review-scoped selection dialog is confirmed;
@@ -206,22 +201,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
public ObservableCollection<ListNavItemViewModel> Items { get; } = new(); public ObservableCollection<ListNavItemViewModel> Items { get; } = new();
public ObservableCollection<ListNavItemViewModel> SmartLists { get; } = new(); public ObservableCollection<ListNavItemViewModel> SmartLists { get; } = new();
/// <summary>Every user list, flat, regardless of folder — the set the count refresh, the
/// row refresh and the no-repo banner work over.</summary>
public ObservableCollection<ListNavItemViewModel> UserLists { get; } = new(); public ObservableCollection<ListNavItemViewModel> UserLists { get; } = new();
/// <summary>The sidebar's top level, in render order: folder rows
/// (<see cref="ListFolderNavItemViewModel"/>) and folder-less lists
/// (<see cref="ListNavItemViewModel"/>) interleaved, so a list can sit above a folder.
/// This is what the view binds to; <see cref="UserLists"/> stays the flat superset.</summary>
public ObservableCollection<object> TopLevel { get; } = new();
/// <summary>Sidebar folders in order — a projection of <see cref="TopLevel"/>, not a second
/// collection to keep in sync.</summary>
public IReadOnlyList<ListFolderNavItemViewModel> Folders =>
TopLevel.OfType<ListFolderNavItemViewModel>().ToList();
/// <summary>The user lists that sit outside any folder — likewise a projection.</summary>
public IReadOnlyList<ListNavItemViewModel> RootLists =>
TopLevel.OfType<ListNavItemViewModel>().ToList();
[ObservableProperty] private string _searchText = ""; [ObservableProperty] private string _searchText = "";
[ObservableProperty] private ListNavItemViewModel? _selectedList; [ObservableProperty] private ListNavItemViewModel? _selectedList;
@@ -298,7 +278,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
Items.Clear(); Items.Clear();
SmartLists.Clear(); SmartLists.Clear();
UserLists.Clear(); UserLists.Clear();
TopLevel.Clear();
var smart = new[] var smart = new[]
{ {
@@ -319,24 +298,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
var ticketsConfigured = await IsTicketsConfiguredAsync(); var ticketsConfigured = await IsTicketsConfiguredAsync();
await using var ctx = await _dbFactory.CreateDbContextAsync(ct); await using var ctx = await _dbFactory.CreateDbContextAsync(ct);
var lists = new ListRepository(ctx); var lists = new ListRepository(ctx);
// Folders and top-level lists share one sort_order space, so both go into a single
// ordered bucket and get merged by it — that's what interleaves them.
var topLevel = new List<(int Sort, object Item)>();
var foldersById = new Dictionary<string, ListFolderNavItemViewModel>();
foreach (var f in await lists.GetFoldersAsync(ct))
{
var folder = new ListFolderNavItemViewModel
{
Id = f.Id,
Name = f.Name,
IconKey = f.Icon ?? ListFolderIcon,
IsCollapsed = f.IsCollapsed,
};
foldersById[f.Id] = folder;
topLevel.Add((f.SortOrder, folder));
}
var seedNames = new HashSet<string>(new[] { "My Day", "Important", "Planned" }); var seedNames = new HashSet<string>(new[] { "My Day", "Important", "Planned" });
foreach (var l in await lists.GetAllAsync(ct)) foreach (var l in await lists.GetAllAsync(ct))
{ {
@@ -353,20 +314,10 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
IsManual = l.IsManual, IsManual = l.IsManual,
FindingsTracked = l.FindingsTracked, FindingsTracked = l.FindingsTracked,
HasTicketProject = ticketsConfigured && cfg?.TicketProjectId > 0, HasTicketProject = ticketsConfigured && cfg?.TicketProjectId > 0,
FolderId = l.FolderId,
}; };
Items.Add(item); Items.Add(item);
UserLists.Add(item); UserLists.Add(item);
if (item.FolderId is { } fid && foldersById.TryGetValue(fid, out var owner))
owner.Lists.Add(item);
else
topLevel.Add((l.SortOrder, item));
} }
// OrderBy is stable, so legacy rows (folders and lists each numbered from 0
// independently) keep the old look — folders first — until the first drag.
foreach (var (_, item) in topLevel.OrderBy(t => t.Sort))
TopLevel.Add(item);
ok = true; ok = true;
} }
finally { OperationTiming.Shared.Record("db", "ListsIsland.LoadAsync", sw.Elapsed, ok); } finally { OperationTiming.Shared.Record("db", "ListsIsland.LoadAsync", sw.Elapsed, ok); }
@@ -413,8 +364,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
var filter = _filters.Resolve(item.Id); var filter = _filters.Resolve(item.Id);
item.Count = filter is null ? 0 : all.Count(filter.ShouldCount); item.Count = filter is null ? 0 : all.Count(filter.ShouldCount);
} }
RecomputeFolderCounts();
ok = true; ok = true;
} }
catch (OperationCanceledException) { throw; } catch (OperationCanceledException) { throw; }
@@ -453,16 +402,13 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
}; };
Items.Add(item); Items.Add(item);
UserLists.Add(item); UserLists.Add(item);
TopLevel.Add(item);
SelectedList = item; SelectedList = item;
RecomputeHasNoLinkedRepo(); RecomputeHasNoLinkedRepo();
if (Dialogs is not null && _services is not null) if (Dialogs is not null && _services is not null)
{ {
var vm = _services.GetRequiredService<ListSettingsModalViewModel>(); var vm = _services.GetRequiredService<ListSettingsModalViewModel>();
vm.ErrorReported += msg => ErrorReported?.Invoke(msg); await vm.LoadAsync(entity.Id, entity.Name, entity.WorkingDir, entity.DefaultCommitType, entity.IsManual, entity.FindingsTracked, entity.Icon);
// canToggleFolder: only the create flow offers "make this a folder instead".
vm.BeginLoad(entity.Id, entity.Name, entity.WorkingDir, entity.DefaultCommitType, entity.IsManual, entity.FindingsTracked, entity.Icon, canToggleFolder: true);
await Dialogs.ShowListSettingsAsync(vm); await Dialogs.ShowListSettingsAsync(vm);
if (!vm.Saved && !vm.Deleted) if (!vm.Saved && !vm.Deleted)
{ {
@@ -484,186 +430,42 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
r.DropHintAbove = false; r.DropHintAbove = false;
r.DropHintBelow = false; r.DropHintBelow = false;
} }
foreach (var f in Folders) }
public void SetDropHint(ListNavItemViewModel target, bool placeBelow)
{
foreach (var r in UserLists)
{ {
f.IsDropTarget = false; var isTarget = ReferenceEquals(r, target);
f.DropHintAbove = false; r.DropHintAbove = isTarget && !placeBelow;
f.DropHintBelow = false; r.DropHintBelow = isTarget && placeBelow;
} }
} }
/// <summary>Marks the insert position for a drop next to <paramref name="target"/> — either a public async Task ReorderAsync(ListNavItemViewModel source, ListNavItemViewModel target, bool placeBelow)
/// list row or a folder header (folders take the same two hint lines, drawn around the whole
/// folder block).</summary>
public void SetDropHint(object target, bool placeBelow)
{
ClearDropHints();
switch (target)
{
case ListNavItemViewModel row:
row.DropHintAbove = !placeBelow;
row.DropHintBelow = placeBelow;
break;
case ListFolderNavItemViewModel folder:
folder.DropHintAbove = !placeBelow;
folder.DropHintBelow = placeBelow;
break;
}
}
public void SetFolderDropTarget(ListFolderNavItemViewModel? target)
{
ClearDropHints();
if (target is not null) target.IsDropTarget = true;
}
/// <summary>The collection a row is rendered in: its folder's <c>Lists</c>, or
/// <see cref="TopLevel"/> when it has no folder. Non-generic because the top level is mixed.</summary>
public System.Collections.IList ContainerOf(ListNavItemViewModel row) =>
Folders.FirstOrDefault(f => f.Id == row.FolderId)?.Lists ?? (System.Collections.IList)TopLevel;
/// <summary>Kept for the list→list case; <see cref="DropAsync"/> covers all four combinations.</summary>
public Task ReorderAsync(ListNavItemViewModel source, ListNavItemViewModel target, bool placeBelow) =>
DropAsync(source, target, placeBelow);
/// <summary>
/// Drops <paramref name="source"/> (a list row or a folder) at <paramref name="target"/>'s
/// position. Since a drop position implies a container, dropping a list onto a row in a
/// different folder (or next to anything at the top level) also *moves* it there — that's the
/// only way to drag a list out of a folder. Folders live at the top level only, so a folder
/// dropped onto a row inside a folder is ignored rather than nested.
/// </summary>
public async Task DropAsync(object source, object target, bool placeBelow)
{ {
if (source.Kind != ListKind.User || target.Kind != ListKind.User) return;
if (ReferenceEquals(source, target)) return; if (ReferenceEquals(source, target)) return;
if (target is ListNavItemViewModel { Kind: not ListKind.User }) return;
if (source is ListFolderNavItemViewModel folder) MoveWithinCollection(UserLists, source, target, placeBelow);
{
if (target is ListNavItemViewModel { FolderId: not null }) return;
MoveWithinCollection(TopLevel, folder, target, placeBelow);
await PersistOrderAsync(null);
return;
}
if (source is not ListNavItemViewModel row || row.Kind != ListKind.User) return;
// Next to a folder *header* means top level, not inside it — MoveToFolderAsync is the
// drop-into-the-folder path.
var targetFolderId = target is ListNavItemViewModel t ? t.FolderId : null;
var folderChanged = row.FolderId != targetFolderId;
if (folderChanged)
{
ContainerOf(row).Remove(row);
row.FolderId = targetFolderId;
ContainerOf(row).Add(row);
}
MoveWithinCollection(ContainerOf(row), row, target, placeBelow);
await PersistOrderAsync(folderChanged ? row : null);
}
/// <summary>Appends a list to a folder (or to the top level when <paramref name="folder"/> is
/// null) — the drop-onto-the-folder-header path, which also reaches collapsed and empty folders.</summary>
public async Task MoveToFolderAsync(ListNavItemViewModel source, ListFolderNavItemViewModel? folder)
{
if (source.Kind != ListKind.User) return;
if (source.FolderId == folder?.Id) return;
ContainerOf(source).Remove(source);
source.FolderId = folder?.Id;
ContainerOf(source).Add(source);
await PersistOrderAsync(source);
}
/// <summary>
/// Writes the sidebar's visual order back as a single global <c>sort_order</c> sequence
/// (folders top to bottom, then the top-level lists) and, when a list changed folder, its new
/// <c>folder_id</c>.
/// </summary>
private async Task PersistOrderAsync(ListNavItemViewModel? movedRow)
{
var ordered = new List<(string Id, bool IsFolder)>();
foreach (var item in TopLevel)
{
switch (item)
{
case ListFolderNavItemViewModel f:
ordered.Add((f.Id, true));
ordered.AddRange(f.Lists.Select(l => (RawId(l.Id), false)));
break;
case ListNavItemViewModel l:
ordered.Add((RawId(l.Id), false));
break;
}
}
var orderedIds = UserLists.Select(i => i.Id["user:".Length..]).ToList();
var sw = System.Diagnostics.Stopwatch.StartNew(); var sw = System.Diagnostics.Stopwatch.StartNew();
var ok = false; var ok = false;
try try
{ {
await using var ctx = await _dbFactory.CreateDbContextAsync(); await using var ctx = await _dbFactory.CreateDbContextAsync();
var lists = new ListRepository(ctx); var lists = new ListRepository(ctx);
if (movedRow is not null) await lists.ReorderAsync(orderedIds);
await lists.SetListFolderAsync(RawId(movedRow.Id), movedRow.FolderId);
await lists.ReorderSidebarAsync(ordered);
ok = true; ok = true;
} }
finally { OperationTiming.Shared.Record("db", "ListsIsland.ReorderAsync", sw.Elapsed, ok); } finally { OperationTiming.Shared.Record("db", "ListsIsland.ReorderAsync", sw.Elapsed, ok); }
RecomputeFolderCounts();
} }
/// <summary>Context-menu counterpart to dragging a list out of a folder.</summary>
[RelayCommand]
private async Task RemoveFromFolderAsync(ListNavItemViewModel? row)
{
if (row is null) return;
await MoveToFolderAsync(row, null);
}
[RelayCommand]
private async Task ToggleFolderAsync(ListFolderNavItemViewModel? folder)
{
if (folder is null) return;
folder.IsCollapsed = !folder.IsCollapsed;
try
{
await using var ctx = await _dbFactory.CreateDbContextAsync();
await new ListRepository(ctx).SetFolderCollapsedAsync(folder.Id, folder.IsCollapsed);
}
catch (Exception ex)
{
// The fold itself already happened in the UI; only its persistence failed.
ErrorReported?.Invoke(ex.Message);
}
}
[RelayCommand]
private async Task OpenFolderSettingsAsync(ListFolderNavItemViewModel? folder)
{
if (folder is null || Dialogs is null || _services is null) return;
var vm = _services.GetRequiredService<ListSettingsModalViewModel>();
vm.ErrorReported += msg => ErrorReported?.Invoke(msg);
vm.BeginLoadFolder(folder.Id, folder.Name, folder.IconKey);
await Dialogs.ShowListSettingsAsync(vm);
// Rename, re-icon and delete all change the folder header (and delete releases its lists
// back to the top level) — one reload covers every outcome.
if (vm.Saved || vm.Deleted) await LoadAsync();
}
private void RecomputeFolderCounts()
{
foreach (var f in Folders) f.Count = f.Lists.Sum(l => l.Count);
}
private static string RawId(string rowId) =>
rowId.StartsWith("user:", StringComparison.Ordinal) ? rowId["user:".Length..] : rowId;
private static void MoveWithinCollection( private static void MoveWithinCollection(
System.Collections.IList coll, ObservableCollection<ListNavItemViewModel> coll,
object source, ListNavItemViewModel source,
object target, ListNavItemViewModel target,
bool placeBelow) bool placeBelow)
{ {
var srcIdx = coll.IndexOf(source); var srcIdx = coll.IndexOf(source);
@@ -676,8 +478,7 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
if (finalIdx >= coll.Count) finalIdx = coll.Count - 1; if (finalIdx >= coll.Count) finalIdx = coll.Count - 1;
if (finalIdx == srcIdx) return; if (finalIdx == srcIdx) return;
coll.RemoveAt(srcIdx); coll.Move(srcIdx, finalIdx);
coll.Insert(finalIdx, source);
} }
partial void OnSelectedListChanged(ListNavItemViewModel? value) partial void OnSelectedListChanged(ListNavItemViewModel? value)
@@ -767,7 +568,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
IsManual = entity.IsManual, IsManual = entity.IsManual,
FindingsTracked = entity.FindingsTracked, FindingsTracked = entity.FindingsTracked,
HasTicketProject = hasTicketProject, HasTicketProject = hasTicketProject,
FolderId = entity.FolderId,
}; };
var seedNames = new HashSet<string>(new[] { "My Day", "Important", "Planned" }); var seedNames = new HashSet<string>(new[] { "My Day", "Important", "Planned" });
@@ -777,22 +577,6 @@ public sealed partial class ListsIslandViewModel : ViewModelBase, IDisposable
UserLists.Insert(insertAt, item); UserLists.Insert(insertAt, item);
Items.Insert(SmartLists.Count + insertAt, item); Items.Insert(SmartLists.Count + insertAt, item);
// Inside a folder, the same DB-order position; at the top level just appended — the mixed
// top level has no index that a per-folder DB order maps onto, and AddAsync numbers a new
// list past everything anyway.
if (Folders.FirstOrDefault(f => f.Id == item.FolderId) is { } folder)
{
var containerIdx = ordered
.Where(l => l.FolderId == item.FolderId)
.Select(l => l.Id)
.ToList()
.IndexOf(entity.Id);
folder.Lists.Insert(
containerIdx < 0 || containerIdx > folder.Lists.Count ? folder.Lists.Count : containerIdx,
item);
}
else TopLevel.Add(item);
RecomputeHasNoLinkedRepo(); RecomputeHasNoLinkedRepo();
} }
} }
@@ -112,31 +112,10 @@ public sealed partial class TaskRowViewModel : ViewModelBase
[NotifyPropertyChangedFor(nameof(IsQueued))] [NotifyPropertyChangedFor(nameof(IsQueued))]
[NotifyPropertyChangedFor(nameof(IsWaiting))] [NotifyPropertyChangedFor(nameof(IsWaiting))]
[NotifyPropertyChangedFor(nameof(StatusChipClass))] [NotifyPropertyChangedFor(nameof(StatusChipClass))]
[NotifyPropertyChangedFor(nameof(StatusLabel))]
[NotifyPropertyChangedFor(nameof(StatusChipTooltip))]
[NotifyPropertyChangedFor(nameof(CanRemoveFromQueue))]
private string? _blockedByTaskId; private string? _blockedByTaskId;
[ObservableProperty] [ObservableProperty]
[NotifyPropertyChangedFor(nameof(DependsOnTaskId))] [NotifyPropertyChangedFor(nameof(DependsOnTaskId))]
private IReadOnlyList<string> _dependsOnTaskIds = []; private IReadOnlyList<string> _dependsOnTaskIds = [];
// Extrinsic — assigned by TasksIslandViewModel.ApplyDependencyWaitState, which alone has the
// cross-row graph (plus any cross-list predecessor lookup) needed to tell an unmet
// task_dependencies edge from a satisfied one. True only for the task_dependencies case;
// IsWaiting also ORs in the older BlockedByTaskId planning-chain link.
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsQueued))]
[NotifyPropertyChangedFor(nameof(IsWaiting))]
[NotifyPropertyChangedFor(nameof(StatusChipClass))]
[NotifyPropertyChangedFor(nameof(StatusLabel))]
[NotifyPropertyChangedFor(nameof(StatusChipTooltip))]
[NotifyPropertyChangedFor(nameof(CanRemoveFromQueue))]
private bool _isBlockedByDependency;
// The predecessor(s) this row is waiting on, rendered ("#42" or "#42, #57"), or null when not
// waiting. Prefers BlockedByTaskId's single predecessor (the planning chain "parent wins" the
// same way it does for the chain rail), else lists every unmet task_dependencies edge.
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(StatusChipTooltip))]
private string? _dependencyWaitLabel;
// The single predecessor, or null when the task has none or several. The chain rail can only // The single predecessor, or null when the task has none or several. The chain rail can only
// draw a line, so a task waiting on n predecessors gets a ChainAfterLabel instead — see // draw a line, so a task waiting on n predecessors gets a ChainAfterLabel instead — see
@@ -295,9 +274,9 @@ public sealed partial class TaskRowViewModel : ViewModelBase
// task). A live ConPTY session is that same shape but not parked — it reads "Interactive". // task). A live ConPTY session is that same shape but not parked — it reads "Interactive".
public bool IsParked => Status == TaskStatus.Idle && WorktreeState == ClaudeDo.Data.Models.WorktreeState.Active public bool IsParked => Status == TaskStatus.Idle && WorktreeState == ClaudeDo.Data.Models.WorktreeState.Active
&& !HasInteractiveSession; && !HasInteractiveSession;
public bool IsQueued => Status == TaskStatus.Queued && string.IsNullOrEmpty(BlockedByTaskId) && !IsBlockedByDependency; public bool IsQueued => Status == TaskStatus.Queued && string.IsNullOrEmpty(BlockedByTaskId);
public bool IsWaiting => Status == TaskStatus.Queued && (!string.IsNullOrEmpty(BlockedByTaskId) || IsBlockedByDependency); public bool IsWaiting => Status == TaskStatus.Queued && !string.IsNullOrEmpty(BlockedByTaskId);
public bool CanRemoveFromQueue => IsQueued || IsWaiting || HasQueuedSubtasks; public bool CanRemoveFromQueue => IsQueued || HasQueuedSubtasks;
// "Send to queue" is the single queue entry. On a finalized planning parent it queues the // "Send to queue" is the single queue entry. On a finalized planning parent it queues the
// plan (children) via CanQueuePlan; an Active (not-yet-finalized) planning parent is hidden — // plan (children) via CanQueuePlan; an Active (not-yet-finalized) planning parent is hidden —
// it must be finalized first. The worker never sees a UI-hosted ConPTY session (it never // it must be finalized first. The worker never sees a UI-hosted ConPTY session (it never
@@ -432,12 +411,9 @@ public sealed partial class TaskRowViewModel : ViewModelBase
: FailureReasonLabel; : FailureReasonLabel;
// Drives the status chip tooltip: an open interactive session takes priority (it's tappable), // Drives the status chip tooltip: an open interactive session takes priority (it's tappable),
// then the predecessor(s) a waiting task is blocked on, then a Failed task's reason, // otherwise a Failed task's reason, otherwise no tooltip.
// otherwise no tooltip.
public string? StatusChipTooltip public string? StatusChipTooltip
=> HasInteractiveSession ? Loc.T("tasks.interactiveChipTip") => HasInteractiveSession ? Loc.T("tasks.interactiveChipTip") : FailureReasonTooltip;
: IsWaiting && DependencyWaitLabel is not null ? Loc.T("tasks.waitingOnTip", DependencyWaitLabel)
: FailureReasonTooltip;
public string DiffAdditionsText => $"+{DiffAdditions}"; public string DiffAdditionsText => $"+{DiffAdditions}";
public string DiffDeletionsText => $"−{DiffDeletions}"; public string DiffDeletionsText => $"−{DiffDeletions}";
@@ -445,8 +421,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
public string StatusLabel public string StatusLabel
=> HasInteractiveSession ? Loc.T("vm.taskStatus.interactive") => HasInteractiveSession ? Loc.T("vm.taskStatus.interactive")
: IsParked ? Loc.T("vm.taskStatus.parked") : IsParked ? Loc.T("vm.taskStatus.parked") : Status switch
: IsWaiting ? Loc.T("vm.taskStatus.waiting") : Status switch
{ {
TaskStatus.Idle => Loc.T("vm.taskStatus.idle"), TaskStatus.Idle => Loc.T("vm.taskStatus.idle"),
TaskStatus.Queued => Loc.T("vm.taskStatus.queued"), TaskStatus.Queued => Loc.T("vm.taskStatus.queued"),
@@ -468,7 +443,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
public string StatusChipClass => HasInteractiveSession public string StatusChipClass => HasInteractiveSession
? "interactive" ? "interactive"
: (Status, IsBlocked: !string.IsNullOrEmpty(BlockedByTaskId) || IsBlockedByDependency) switch : (Status, IsBlocked: !string.IsNullOrEmpty(BlockedByTaskId)) switch
{ {
(TaskStatus.Running, _) => "running", (TaskStatus.Running, _) => "running",
(TaskStatus.WaitingForReview, _) => "review", (TaskStatus.WaitingForReview, _) => "review",
@@ -500,7 +475,7 @@ public sealed partial class TaskRowViewModel : ViewModelBase
// Any entity-backed refresh reflects a settled state, so the transient creation-phase // Any entity-backed refresh reflects a settled state, so the transient creation-phase
// banner (set from the OperationProgress broadcast) has nothing left to announce. // banner (set from the OperationProgress broadcast) has nothing left to announce.
CreationPhase = null; CreationPhase = null;
var (add, del) = DetailsIslandViewModel.ParseDiffStat(t.Worktree?.DiffStat); var (add, del) = ParseDiffStat(t.Worktree?.DiffStat);
Number = t.Number; Number = t.Number;
Title = t.Title; Title = t.Title;
ListName = t.List?.Name ?? ""; ListName = t.List?.Name ?? "";
@@ -529,4 +504,18 @@ public sealed partial class TaskRowViewModel : ViewModelBase
FailureTurnsUsed = t.FailureTurnsUsed; FailureTurnsUsed = t.FailureTurnsUsed;
FailureMaxTurns = t.FailureMaxTurns; FailureMaxTurns = t.FailureMaxTurns;
} }
// Best-effort parse of diff stat strings like "+12 -3" or "12 additions, 3 deletions".
private static (int add, int del) ParseDiffStat(string? s)
{
if (string.IsNullOrWhiteSpace(s)) return (0, 0);
int add = 0, del = 0;
var parts = s.Split(new[] { ' ', ',', '\t' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var p in parts)
{
if (p.Length > 1 && p[0] == '+' && int.TryParse(p.AsSpan(1), out var a)) add = a;
else if (p.Length > 1 && (p[0] == '-' || p[0] == '\u2212') && int.TryParse(p.AsSpan(1), out var d)) del = d;
}
return (add, del);
}
} }
@@ -43,12 +43,6 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
// Two events (TaskUpdated + WorktreeUpdated) drive the same delta refresh, so two reads for // Two events (TaskUpdated + WorktreeUpdated) drive the same delta refresh, so two reads for
// one task can be in flight at once. Only the newest may write to the row. // one task can be in flight at once. Only the newest may write to the row.
private readonly Dictionary<string, long> _deltaSeq = new(); private readonly Dictionary<string, long> _deltaSeq = new();
// Number/Title/Status for a predecessor id that isn't loaded into Items (a different list, My
// Day, or the completed group) -- populated by RefreshExternalDependencyCacheAsync so
// ApplyChainGrouping/ApplyDependencyWaitState can still render "after #N" and the blocked
// chip for a cross-list predecessor instead of silently dropping it. Refreshed, never evicted:
// stale entries just get overwritten on the next load/delta that references the same id.
private readonly Dictionary<string, (int Number, string Title, TaskStatus Status)> _externalDependencyInfo = new();
private long _deltaCounter; private long _deltaCounter;
// Phase 3 reconcile tick — see the block at the end of this class. // Phase 3 reconcile tick — see the block at the end of this class.
private readonly System.Timers.Timer _reconcileTimer = new(4_000); private readonly System.Timers.Timer _reconcileTimer = new(4_000);
@@ -369,12 +363,6 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
r.ParentTaskId == parent.Id && (r.IsQueued || r.IsWaiting)); r.ParentTaskId == parent.Id && (r.IsQueued || r.IsWaiting));
} }
// entity is not null here whenever `existing` is still reachable (see the branching
// above: an early return covers every entity-null-but-existing case except delete, which
// needs no lookup refresh).
if (entity is not null && existing is not null)
await RefreshExternalDependencyCacheAsync(db, DependencyLookupIds([existing]));
Regroup(); Regroup();
UpdateSubtitle(); UpdateSubtitle();
} }
@@ -560,8 +548,6 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
r.ParentFinalized = !string.IsNullOrEmpty(r.ParentTaskId) r.ParentFinalized = !string.IsNullOrEmpty(r.ParentTaskId)
&& finalizedParents.Contains(r.ParentTaskId!); && finalizedParents.Contains(r.ParentTaskId!);
await RefreshExternalDependencyCacheAsync(db, DependencyLookupIds(Items), ct);
Regroup(); Regroup();
UpdateSubtitle(); UpdateSubtitle();
ok = true; ok = true;
@@ -570,32 +556,6 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
finally { OperationTiming.Shared.Record("db", "TasksIsland.LoadForListAsync", sw.Elapsed, ok); } finally { OperationTiming.Shared.Record("db", "TasksIsland.LoadForListAsync", sw.Elapsed, ok); }
} }
// Every predecessor id a row in `items` could need labelled/checked: its task_dependencies
// edges plus the planning chain's BlockedByTaskId (both resolved the same way in
// ApplyDependencyWaitState/BuildAfterLabel).
private static IEnumerable<string> DependencyLookupIds(IEnumerable<TaskRowViewModel> items) =>
items.SelectMany(r => string.IsNullOrEmpty(r.BlockedByTaskId)
? r.DependsOnTaskIds
: r.DependsOnTaskIds.Append(r.BlockedByTaskId));
// Resolves predecessor ids that aren't loaded into Items (a different list, My Day, or the
// completed group) so cross-list dependency display doesn't silently drop them. Cheap: reuses
// the caller's already-open context, one query for however many ids are actually missing.
private async Task RefreshExternalDependencyCacheAsync(
ClaudeDoDbContext db, IEnumerable<string> ids, CancellationToken ct = default)
{
var known = Items.Select(r => r.Id).ToHashSet();
var missing = ids.Where(id => !string.IsNullOrEmpty(id) && !known.Contains(id)).Distinct().ToList();
if (missing.Count == 0) return;
var rows = await db.Tasks
.Where(t => missing.Contains(t.Id))
.Select(t => new { t.Id, t.Number, t.Title, t.Status })
.ToListAsync(ct);
foreach (var r in rows)
_externalDependencyInfo[r.Id] = (r.Number, r.Title, r.Status);
}
internal void Regroup() internal void Regroup()
{ {
// Collapse parents that have children by default, so subtasks stay tucked away until // Collapse parents that have children by default, so subtasks stay tucked away until
@@ -731,66 +691,13 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
// with a label rather than an orphaned rail. Whether the head is resolvable at all // with a label rather than an orphaned rail. Whether the head is resolvable at all
// still uses the whole-Items graph (rowsById), independent of section. // still uses the whole-Items graph (rowsById), independent of section.
var rowsById = Items.ToDictionary(r => r.Id); var rowsById = Items.ToDictionary(r => r.Id);
overdue = ApplyChainGrouping(overdue, rowsById);
// Blocked-by-dependency is independent of section (a blocked row can be Overdue or Open open = ApplyChainGrouping(open, rowsById);
// alike) and independent of chain membership, so it's computed once over all of Items completed = ApplyChainGrouping(completed, rowsById);
// rather than per section.
foreach (var r in Items)
ApplyDependencyWaitState(r, rowsById, _externalDependencyInfo);
overdue = ApplyChainGrouping(overdue, rowsById, _externalDependencyInfo);
open = ApplyChainGrouping(open, rowsById, _externalDependencyInfo);
completed = ApplyChainGrouping(completed, rowsById, _externalDependencyInfo);
return (overdue, open, completed); return (overdue, open, completed);
} }
// Assigns IsBlockedByDependency/DependencyWaitLabel for one row. BlockedByTaskId (the planning
// chain's single link) wins the label the same way a planning child's parent indent wins over
// chain-rail membership -- "parent wins" is the existing precedent (ApplyChainGrouping below).
private static void ApplyDependencyWaitState(
TaskRowViewModel row, Dictionary<string, TaskRowViewModel> rowsById,
IReadOnlyDictionary<string, (int Number, string Title, TaskStatus Status)> external)
{
if (row.Status != TaskStatus.Queued)
{
row.IsBlockedByDependency = false;
row.DependencyWaitLabel = null;
return;
}
var unmet = row.DependsOnTaskIds.Where(id => IsUnmet(id, rowsById, external)).ToList();
row.IsBlockedByDependency = unmet.Count > 0;
var waitIds = !string.IsNullOrEmpty(row.BlockedByTaskId) ? [row.BlockedByTaskId] : unmet;
row.DependencyWaitLabel = waitIds.Count == 0 ? null
: string.Join(", ", waitIds.Select(id => ResolveLabel(id, rowsById, external)).Where(s => s is not null));
}
// A predecessor missing from both rowsById and the external cache counts as unmet -- mirrors
// QueuePicker/Worker's TaskBlocking.Unmet: an edge pointing at an unresolved/vanished task
// keeps blocking rather than being silently treated as satisfied.
private static bool IsUnmet(
string id, Dictionary<string, TaskRowViewModel> rowsById,
IReadOnlyDictionary<string, (int Number, string Title, TaskStatus Status)> external)
{
if (rowsById.TryGetValue(id, out var p)) return p.Status != TaskStatus.Done;
if (external.TryGetValue(id, out var e)) return e.Status != TaskStatus.Done;
return true;
}
// Resolves a predecessor id to its display label, checking the in-view rows first and falling
// back to the cross-list cache (RefreshExternalDependencyCacheAsync) -- null only when the
// predecessor is genuinely unresolvable anywhere (e.g. a deleted task).
private static string? ResolveLabel(
string id, Dictionary<string, TaskRowViewModel> rowsById,
IReadOnlyDictionary<string, (int Number, string Title, TaskStatus Status)> external)
{
if (rowsById.TryGetValue(id, out var p)) return p.Number > 0 ? $"#{p.Number}" : p.Title;
if (external.TryGetValue(id, out var e)) return e.Number > 0 ? $"#{e.Number}" : e.Title;
return null;
}
// Cycles are rejected by TaskStateService.SetDependsOnAsync, so this should always // Cycles are rejected by TaskStateService.SetDependsOnAsync, so this should always
// terminate quickly — capped anyway against a corrupt/legacy row forming a loop. // terminate quickly — capped anyway against a corrupt/legacy row forming a loop.
private const int MaxChainWalkDepth = 64; private const int MaxChainWalkDepth = 64;
@@ -817,15 +724,14 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
// Content only — "after " + localization is Slice 2's concern (the view), which is why this // Content only — "after " + localization is Slice 2's concern (the view), which is why this
// holds just the identifying fragment rather than an assembled sentence. Names every // holds just the identifying fragment rather than an assembled sentence. Names every
// predecessor it can resolve (in-view first, then the cross-list external cache): a task can // predecessor it can resolve: a task can wait on n of them, and hiding all but the first
// wait on n of them, and hiding all but the first would misreport what the row is waiting for. // would misreport what the row is actually waiting for.
private static string? BuildAfterLabel( private static string? BuildAfterLabel(TaskRowViewModel row, Dictionary<string, TaskRowViewModel> rowsById)
TaskRowViewModel row, Dictionary<string, TaskRowViewModel> rowsById,
IReadOnlyDictionary<string, (int Number, string Title, TaskStatus Status)> external)
{ {
var parts = row.DependsOnTaskIds var parts = row.DependsOnTaskIds
.Select(id => ResolveLabel(id, rowsById, external)) .Select(id => rowsById.TryGetValue(id, out var p) ? p : null)
.Where(p => p is not null) .Where(p => p is not null)
.Select(p => p!.Number > 0 ? $"#{p.Number}" : p.Title)
.ToList(); .ToList();
return parts.Count == 0 ? null : string.Join(", ", parts); return parts.Count == 0 ? null : string.Join(", ", parts);
} }
@@ -835,8 +741,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
// (ascending ChainStep), regardless of their SortOrder-derived position — mirroring how // (ascending ChainStep), regardless of their SortOrder-derived position — mirroring how
// planning children already sit right after their parent regardless of Items order. // planning children already sit right after their parent regardless of Items order.
private static List<TaskRowViewModel> ApplyChainGrouping( private static List<TaskRowViewModel> ApplyChainGrouping(
List<TaskRowViewModel> section, Dictionary<string, TaskRowViewModel> rowsById, List<TaskRowViewModel> section, Dictionary<string, TaskRowViewModel> rowsById)
IReadOnlyDictionary<string, (int Number, string Title, TaskStatus Status)> external)
{ {
var sectionIds = section.Select(r => r.Id).ToHashSet(); var sectionIds = section.Select(r => r.Id).ToHashSet();
var headIdOf = new Dictionary<TaskRowViewModel, string>(); var headIdOf = new Dictionary<TaskRowViewModel, string>();
@@ -858,7 +763,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
{ {
r.ShowAsChainMember = false; r.ShowAsChainMember = false;
r.ChainStep = null; r.ChainStep = null;
r.ChainAfterLabel = BuildAfterLabel(r, rowsById, external); r.ChainAfterLabel = BuildAfterLabel(r, rowsById);
continue; continue;
} }
@@ -868,7 +773,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
{ {
r.ShowAsChainMember = false; r.ShowAsChainMember = false;
r.ChainStep = null; r.ChainStep = null;
r.ChainAfterLabel = BuildAfterLabel(r, rowsById, external); r.ChainAfterLabel = BuildAfterLabel(r, rowsById);
continue; continue;
} }
@@ -885,7 +790,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
{ {
r.ShowAsChainMember = false; r.ShowAsChainMember = false;
r.ChainStep = null; r.ChainStep = null;
r.ChainAfterLabel = BuildAfterLabel(r, rowsById, external); r.ChainAfterLabel = BuildAfterLabel(r, rowsById);
} }
} }
@@ -1834,12 +1739,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase, IDisposable
// reflects any of that after a Regroup — without this the tick would heal the row's data // reflects any of that after a Regroup — without this the tick would heal the row's data
// while leaving a completed task sitting in the Open section under a stale count. Gated // while leaving a completed task sitting in the Open section under a stale count. Gated
// on a real change so an idle tick stays free. // on a real change so an idle tick stays free.
if (groupingChanged) if (groupingChanged) Regroup();
{
await using var db2 = await _dbFactory.CreateDbContextAsync(ct);
await RefreshExternalDependencyCacheAsync(db2, DependencyLookupIds(Items), ct);
Regroup();
}
} }
// The slice of a row that Regroup reads: which section it lands in, where it sits inside it, // The slice of a row that Regroup reads: which section it lands in, where it sits inside it,
@@ -370,7 +370,7 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
Lists.LetClaudeHandleRequested += req => Lists.LetClaudeHandleRequested += req =>
{ {
OpenMissionControl(); OpenMissionControl();
_ = MissionControl.OpenMergeHelperConPtySessionAsync(req.ListId, req.TaskIds, req.TriageModel); _ = MissionControl.OpenMergeHelperConPtySessionAsync(req.ListId, req.TaskIds);
}; };
Lists.MergeReviewsRequested += req => Lists.MergeReviewsRequested += req =>
{ {
@@ -515,19 +515,6 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
if (Dialogs is not null) await Dialogs.ShowAboutAsync(vm); if (Dialogs is not null) await Dialogs.ShowAboutAsync(vm);
} }
// One shared VM so the sheets are parsed once and the window keeps its selection/pin
// across reopens; the window itself is single-instance in the dialog service.
private CheatSheetsViewModel? _cheatSheets;
[RelayCommand]
private void OpenCheatSheet(string? key)
{
if (Dialogs is null) return;
_cheatSheets ??= new CheatSheetsViewModel();
if (!string.IsNullOrEmpty(key)) _cheatSheets.Select(key);
Dialogs.ShowCheatSheets(_cheatSheets);
}
[RelayCommand] [RelayCommand]
private async Task OpenLogVisualizer() private async Task OpenLogVisualizer()
{ {
@@ -631,25 +618,20 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
await _updateCheck.CheckNowAsync(CancellationToken.None); await _updateCheck.CheckNowAsync(CancellationToken.None);
} }
// How long to wait after launching the new worker process before deciding it survived [ObservableProperty] private string? _restartWorkerStatus;
// (e.g. a port conflict kills it almost immediately — see #292 for the worker-side fix).
private const int RestartSurvivalCheckMs = 2000;
// Test seam: overrides the real kill-and-relaunch body, so tests can assert the
// success/failure footer routing without spawning a real worker process.
internal Func<Task>? RestartWorkerOperation { get; set; }
[RelayCommand] [RelayCommand]
private async Task RestartWorkerAsync() private async Task RestartWorkerAsync()
{ {
RestartWorkerStatus = Loc.T("vm.shell.restartingWorker");
try try
{ {
await (RestartWorkerOperation ?? (() => Task.Run(RestartWorkerService)))(); await Task.Run(RestartWorkerService);
FlashFooterSuccess("Worker restarted."); await FlashRestartStatusAsync("Worker restarted.");
} }
catch (Exception ex) catch (Exception ex)
{ {
FlashFooterError($"Restart failed: {ex.Message} — check the worker log."); await FlashRestartStatusAsync($"Restart failed: {ex.Message}");
} }
} }
@@ -658,17 +640,8 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
var exe = _workerLocator.Find(); var exe = _workerLocator.Find();
if (exe is null) throw new InvalidOperationException("Worker executable not found."); if (exe is null) throw new InvalidOperationException("Worker executable not found.");
KillMatchingWorkerProcesses(exe); // Only kill the worker belonging to THIS installation — not any other
// ClaudeDo.Worker on the machine (e.g. a second install).
var started = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(exe) { UseShellExecute = true });
if (started is not null && started.WaitForExit(RestartSurvivalCheckMs))
throw new InvalidOperationException($"worker process exited immediately (code {started.ExitCode})");
}
// Only kill the worker belonging to THIS installation — not any other
// ClaudeDo.Worker on the machine (e.g. a second install).
private static void KillMatchingWorkerProcesses(string exe)
{
var exeFull = System.IO.Path.GetFullPath(exe); var exeFull = System.IO.Path.GetFullPath(exe);
foreach (var p in System.Diagnostics.Process.GetProcessesByName("ClaudeDo.Worker")) foreach (var p in System.Diagnostics.Process.GetProcessesByName("ClaudeDo.Worker"))
{ {
@@ -684,121 +657,16 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
catch { /* may have exited or be inaccessible */ } catch { /* may have exited or be inaccessible */ }
finally { p.Dispose(); } finally { p.Dispose(); }
} }
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(exe) { UseShellExecute = true });
} }
// Set by MainWindow: force-closes the window without re-triggering its own close private async Task FlashRestartStatusAsync(string text)
// confirmation (the shutdown dialog above already confirmed).
public Action? CloseWindow { get; set; }
// Test seam: overrides the real kill-worker + close-window body.
internal Action? ShutdownOperation { get; set; }
[RelayCommand]
private async Task ShutdownAsync()
{ {
if (Dialogs is null) return; RestartWorkerStatus = text;
var confirmed = await Dialogs.ConfirmAsync(Loc.T("vm.shell.shutdownConfirm")); await Task.Delay(3000);
if (!confirmed) return; if (RestartWorkerStatus == text) RestartWorkerStatus = null;
(ShutdownOperation ?? ShutdownWorkerAndCloseApp)();
} }
private void ShutdownWorkerAndCloseApp()
{
var exe = _workerLocator.Find();
if (exe is not null) KillMatchingWorkerProcesses(exe);
CloseWindow?.Invoke();
}
private bool _updatingClaudeCli;
private bool CanUpdateClaudeCli() => !_updatingClaudeCli;
[RelayCommand(CanExecute = nameof(CanUpdateClaudeCli))]
private async Task UpdateClaudeCliAsync()
{
_updatingClaudeCli = true;
UpdateClaudeCliCommand.NotifyCanExecuteChanged();
try
{
var dto = Worker is null ? null : await Worker.GetClaudeBinAsync();
if (dto is null)
{
FlashFooterError("Update failed: worker offline.");
return;
}
var (success, message) = await RunClaudeUpdateAsync(dto);
if (success) FlashFooterSuccess(message);
else FlashFooterError(message);
}
finally
{
_updatingClaudeCli = false;
UpdateClaudeCliCommand.NotifyCanExecuteChanged();
}
}
private static async Task<(bool Success, string Message)> RunClaudeUpdateAsync(ClaudeBinDto dto)
{
var resolved = ClaudeDo.Data.Environment.ExecutableResolver.Resolve(dto.Value);
if (resolved is null) return (false, $"Update failed: '{dto.Value}' not found.");
var psi = resolved.IsShim
? BuildShimUpdatePsi(resolved.Path)
: new System.Diagnostics.ProcessStartInfo { FileName = resolved.Path, ArgumentList = { "update" } };
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.CreateNoWindow = true;
using var process = new System.Diagnostics.Process { StartInfo = psi };
var stdout = new System.Text.StringBuilder();
var stderr = new System.Text.StringBuilder();
process.OutputDataReceived += (_, e) => { if (e.Data is not null) stdout.AppendLine(e.Data); };
process.ErrorDataReceived += (_, e) => { if (e.Data is not null) stderr.AppendLine(e.Data); };
try { process.Start(); }
catch (Exception ex) { return (false, $"Update failed: {ex.Message}"); }
process.BeginOutputReadLine();
process.BeginErrorReadLine();
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
var timedOut = false;
// On timeout: kill the tree, which unblocks WaitForExitAsync below and lets the
// async output readers drain/complete naturally (mirrors VerifyCommandRunner).
await using var ctr = cts.Token.Register(() =>
{
timedOut = true;
try { process.Kill(entireProcessTree: true); } catch { /* already exited */ }
});
await process.WaitForExitAsync(CancellationToken.None);
return timedOut
? (false, "Update failed: timed out after 5 minutes.")
: SummarizeClaudeUpdateOutcome(process.ExitCode, stdout.ToString(), stderr.ToString());
}
private static System.Diagnostics.ProcessStartInfo BuildShimUpdatePsi(string shimPath)
{
var shim = ClaudeDo.Data.Environment.ExecutableResolver.BuildShimStartInfo(shimPath, new[] { "update" });
return new System.Diagnostics.ProcessStartInfo { FileName = shim.FileName, Arguments = shim.Arguments };
}
// Pure so a test can drive it with fake process output instead of spawning a real `claude`.
internal static (bool Success, string Message) SummarizeClaudeUpdateOutcome(int exitCode, string stdout, string stderr)
{
if (exitCode == 0)
return (true, LastNonEmptyLine(stdout) ?? "Claude CLI is already up to date.");
var detail = LastNonEmptyLine(stderr) ?? LastNonEmptyLine(stdout) ?? "";
return (false, $"Update failed (exit {exitCode}): {detail}");
}
private static string? LastNonEmptyLine(string text) =>
text.Split('\n').Select(l => l.Trim()).LastOrDefault(l => l.Length > 0);
[RelayCommand] [RelayCommand]
private void DismissBanner() private void DismissBanner()
{ {
@@ -2,7 +2,6 @@ using System;
using System.ComponentModel; using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
using ClaudeDo.Ui.Localization;
using ClaudeDo.Ui.Services; using ClaudeDo.Ui.Services;
namespace ClaudeDo.Ui.ViewModels.MissionControl; namespace ClaudeDo.Ui.ViewModels.MissionControl;
@@ -19,12 +18,6 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
// Only a task-based pane can be submitted for review (an ad-hoc directory session has no task). // Only a task-based pane can be submitted for review (an ad-hoc directory session has no task).
public bool IsTaskBased => TaskId is not null; public bool IsTaskBased => TaskId is not null;
/// <summary>Set by the host for a list-handler run ("Let Claude handle it" / "Let Claude merge
/// the reviews") pane -- shows the "Abandon run" action. Plain mutable property, not
/// <see cref="ObservableProperty"/>: the host sets it once right after construction, before the
/// pane is added to the visible collection, so no change notification is needed.</summary>
public bool IsListHandler { get; set; }
[ObservableProperty] private string _displayTitle; [ObservableProperty] private string _displayTitle;
[ObservableProperty] private InteractiveTerminalViewModel _terminal = new(); [ObservableProperty] private InteractiveTerminalViewModel _terminal = new();
@@ -33,10 +26,6 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
/// flight, so a rapid double-click can't race two submissions for the same task.</summary> /// flight, so a rapid double-click can't race two submissions for the same task.</summary>
[ObservableProperty] private bool _isSubmitPending; [ObservableProperty] private bool _isSubmitPending;
/// <summary>Set by the host while an abandon-run round trip (query open tasks, confirm,
/// cancel each, close pane) is in flight, so a rapid double-click can't race two runs.</summary>
[ObservableProperty] private bool _isAbandonPending;
/// <summary>Raised when the terminal failed to start — the host surfaces this via the footer error strip.</summary> /// <summary>Raised when the terminal failed to start — the host surfaces this via the footer error strip.</summary>
public event Action<string>? ErrorReported; public event Action<string>? ErrorReported;
@@ -47,12 +36,6 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
/// commits the worktree and moves the task to WaitingForReview.</summary> /// commits the worktree and moves the task to WaitingForReview.</summary>
public event Action<string>? SubmitForReviewRequested; public event Action<string>? SubmitForReviewRequested;
/// <summary>Raised when the user abandons a list-handler run (<see cref="IsListHandler"/>
/// only): the host looks up this round's still-open tasks, confirms with the user (naming the
/// count), cancels them, then closes this pane -- one action instead of closing the tile and
/// separately cancelling the queue.</summary>
public event Action<string>? AbandonRunRequested;
/// <summary>Raised with <c>(taskId, exitCode)</c> when a task-based session that had been running /// <summary>Raised with <c>(taskId, exitCode)</c> when a task-based session that had been running
/// dies non-zero. The host reports it to the worker, which decides whether this was a list /// dies non-zero. The host reports it to the worker, which decides whether this was a list
/// handler killed by the usage limit and worth reopening. Ad-hoc panes never raise it — there is /// handler killed by the usage limit and worth reopening. Ad-hoc panes never raise it — there is
@@ -89,18 +72,14 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
{ {
terminal.PropertyChanged += OnTerminalPropertyChanged; terminal.PropertyChanged += OnTerminalPropertyChanged;
terminal.ExitedAfterStartup += OnTerminalExitedAfterStartup; terminal.ExitedAfterStartup += OnTerminalExitedAfterStartup;
terminal.ErrorReported += OnTerminalErrorReported;
} }
private void Unsubscribe(InteractiveTerminalViewModel terminal) private void Unsubscribe(InteractiveTerminalViewModel terminal)
{ {
terminal.PropertyChanged -= OnTerminalPropertyChanged; terminal.PropertyChanged -= OnTerminalPropertyChanged;
terminal.ExitedAfterStartup -= OnTerminalExitedAfterStartup; terminal.ExitedAfterStartup -= OnTerminalExitedAfterStartup;
terminal.ErrorReported -= OnTerminalErrorReported;
} }
private void OnTerminalErrorReported(string message) => ErrorReported?.Invoke(message);
private void OnTerminalExitedAfterStartup(int exitCode) private void OnTerminalExitedAfterStartup(int exitCode)
{ {
if (TaskId is { } id) SessionDiedAfterStartup?.Invoke(id, exitCode); if (TaskId is { } id) SessionDiedAfterStartup?.Invoke(id, exitCode);
@@ -142,18 +121,8 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
SubmitForReviewCommand.NotifyCanExecuteChanged(); SubmitForReviewCommand.NotifyCanExecuteChanged();
RetryCommand.NotifyCanExecuteChanged(); RetryCommand.NotifyCanExecuteChanged();
} }
if (e.PropertyName is nameof(InteractiveTerminalViewModel.HasExitedAfterStartup)
or nameof(InteractiveTerminalViewModel.ExitCode))
{
OnPropertyChanged(nameof(ExitedBannerText));
}
} }
/// <summary>"Session ended (code N)" text for <see cref="InteractiveTerminalViewModel.HasExitedAfterStartup"/> —
/// computed here (rather than formatted in XAML) since <c>loc:Tr</c> has no binding-arg support.</summary>
public string ExitedBannerText => Loc.T("missionControl.conptyExited", Terminal.ExitCode ?? 0);
/// <summary>Types a message into this pane's live session and submits it (the worker's /// <summary>Types a message into this pane's live session and submits it (the worker's
/// pre-usage-limit warning). False when the session isn't running.</summary> /// pre-usage-limit warning). False when the session isn't running.</summary>
public System.Threading.Tasks.Task<bool> SendLineAsync(string text) => Terminal.SendLineAsync(text); public System.Threading.Tasks.Task<bool> SendLineAsync(string text) => Terminal.SendLineAsync(text);
@@ -172,20 +141,9 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
partial void OnIsSubmitPendingChanged(bool value) => SubmitForReviewCommand.NotifyCanExecuteChanged(); partial void OnIsSubmitPendingChanged(bool value) => SubmitForReviewCommand.NotifyCanExecuteChanged();
private bool CanAbandonRun() => IsListHandler && !IsAbandonPending; // A launch failure permanently occupies the TaskId dedupe slot unless the user can retry —
// re-opening the same task would otherwise just re-focus a dead tile.
[RelayCommand(CanExecute = nameof(CanAbandonRun))] private bool CanRetry() => Terminal.HasExited && Terminal.StartError is not null;
private void AbandonRun()
{
if (TaskId is { } id) AbandonRunRequested?.Invoke(id);
}
partial void OnIsAbandonPendingChanged(bool value) => AbandonRunCommand.NotifyCanExecuteChanged();
// A dead session permanently occupies the TaskId dedupe slot unless the user can retry — whether
// it died at launch (StartError) or after (HasExitedAfterStartup), the same descriptor factory
// can always relaunch it, so any HasExited state is retryable.
private bool CanRetry() => Terminal.HasExited;
[RelayCommand(CanExecute = nameof(CanRetry))] [RelayCommand(CanExecute = nameof(CanRetry))]
private void Retry() private void Retry()
@@ -79,10 +79,6 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
// MissionControlView.OnNewSessionClicked). // MissionControlView.OnNewSessionClicked).
public Action? BrowseForSessionRequested { get; set; } public Action? BrowseForSessionRequested { get; set; }
// View-layer seam: confirms the "abandon run" action, naming the open-task count. Wired by the
// view the same way TasksIslandViewModel/DetailsIslandViewModel are.
public Func<string, System.Threading.Tasks.Task<bool>>? ConfirmAsync { get; set; }
public UsagePillViewModel UsagePill { get; } public UsagePillViewModel UsagePill { get; }
public MissionControlViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient worker, UsagePillViewModel usagePill) public MissionControlViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient worker, UsagePillViewModel usagePill)
@@ -179,14 +175,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
internal async System.Threading.Tasks.Task RefreshSessionTargetsAsync() internal async System.Threading.Tasks.Task RefreshSessionTargetsAsync()
{ {
SessionTargets.Clear(); SessionTargets.Clear();
// Home + browse go in first so the menu stays usable even if the list query below fails. // Browse goes in first so the menu stays usable even if the list query below fails.
// Home is the target for quick general questions that belong to no project.
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
SessionTargets.Add(new SessionTargetViewModel
{
Label = Loc.T("missionControl.homeFolder"),
StartCommand = new RelayCommand(() => _ = OpenAdHocConPtySessionAsync(home)),
});
SessionTargets.Add(new SessionTargetViewModel SessionTargets.Add(new SessionTargetViewModel
{ {
Label = Loc.T("missionControl.browseForFolder"), Label = Loc.T("missionControl.browseForFolder"),
@@ -331,10 +320,10 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
// creates one new ClaudeDo task per run to own the session (title/diff/result), deduped by // creates one new ClaudeDo task per run to own the session (title/diff/result), deduped by
// TaskId like OpenConPtySessionAsync. The handler still merges the tasks it handles itself // TaskId like OpenConPtySessionAsync. The handler still merges the tasks it handles itself
// (no worktree of its own) — see TaskEntity.HandlerBaseCommit/HandlerHeadCommit. // (no worktree of its own) — see TaskEntity.HandlerBaseCommit/HandlerHeadCommit.
public System.Threading.Tasks.Task OpenMergeHelperConPtySessionAsync(string listId, IReadOnlyList<string> taskIds, string? triageModel = null) public System.Threading.Tasks.Task OpenMergeHelperConPtySessionAsync(string listId, IReadOnlyList<string> taskIds)
=> OpenListHandlerConPtySessionAsync(listId, taskIds, => OpenListHandlerConPtySessionAsync(listId, taskIds,
"missionControl.mergeHelperTitle", "missionControl.mergeHelperTaskTitle", "missionControl.mergeHelperTitle", "missionControl.mergeHelperTaskTitle",
taskId => _worker.GetMergeHelperLaunchSpecAsync(taskIds, listId, taskId, triageModel)); taskId => _worker.GetMergeHelperLaunchSpecAsync(taskIds, listId, taskId));
// Merge-only list-handler session over a list's WaitingForReview tasks (the review list's // Merge-only list-handler session over a list's WaitingForReview tasks (the review list's
// "Let Claude merge the reviews"). Same host-task shape as the full run, but the session // "Let Claude merge the reviews"). Same host-task shape as the full run, but the session
@@ -386,7 +375,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
} }
AddConPtyPane(new ConPtyPaneViewModel(taskId, title, AddConPtyPane(new ConPtyPaneViewModel(taskId, title,
() => DescribeAsync(() => launchSpec(taskId))) { IsListHandler = true }); () => DescribeAsync(() => launchSpec(taskId))));
} }
finally finally
{ {
@@ -427,8 +416,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
catch { /* best-effort title lookup */ } catch { /* best-effort title lookup */ }
AddConPtyPane(new ConPtyPaneViewModel(taskId, title, AddConPtyPane(new ConPtyPaneViewModel(taskId, title,
() => DescribeAsync(() => _worker.GetMergeHelperHandoffLaunchSpecAsync(taskId, survivingTaskIds, nextPhase))) () => DescribeAsync(() => _worker.GetMergeHelperHandoffLaunchSpecAsync(taskId, survivingTaskIds, nextPhase))));
{ IsListHandler = true });
} }
// The 5h usage window is about to run out under this handler session: type the worker's warning // The 5h usage window is about to run out under this handler session: type the worker's warning
@@ -449,10 +437,9 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
private void AddConPtyPane(ConPtyPaneViewModel pane) private void AddConPtyPane(ConPtyPaneViewModel pane)
{ {
pane.ErrorReported += OnConPtyPaneError; pane.ErrorReported += OnConPtyPaneError;
pane.CloseRequested += OnPaneCloseRequested; pane.CloseRequested += CloseConPtySession;
pane.SubmitForReviewRequested += OnPaneSubmitForReview; pane.SubmitForReviewRequested += OnPaneSubmitForReview;
pane.SessionDiedAfterStartup += OnPaneSessionDied; pane.SessionDiedAfterStartup += OnPaneSessionDied;
pane.AbandonRunRequested += OnPaneAbandonRun;
ConPtySessions.Add(pane); ConPtySessions.Add(pane);
pane.Start(); pane.Start();
} }
@@ -508,65 +495,13 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
} }
} }
// Handler-run abort ("Not-Aus"): cancels every still-open (Queued/Running) task this handler
// round queued or started, then closes the pane -- one action instead of "close tile" + "cancel
// the tasks separately", which used to leave orphaned rows nobody merges. No open tasks (or no
// round entry at all -- 7-day retention, or a run predating this feature) closes the pane
// straight away, no confirmation needed. Guarded by IsAbandonPending like OnPaneSubmitForReview.
private async void OnPaneAbandonRun(string taskId)
{
if (ConPtySessions.FirstOrDefault(s => s.TaskId == taskId) is not { } pane || pane.IsAbandonPending)
return;
pane.IsAbandonPending = true;
try
{
var open = await _worker.GetHandlerOpenTasksAsync(taskId);
if (open.Count > 0)
{
if (ConfirmAsync is null) return;
if (!await ConfirmAsync(Loc.T("missionControl.abandonRunConfirm", open.Count))) return;
foreach (var task in open)
await _worker.CancelTaskAsync(task.Id);
}
CloseConPtySession(pane);
}
catch (Exception ex)
{
ErrorReported?.Invoke(Loc.T("missionControl.abandonRunFailed", ex.Message));
}
finally
{
pane.IsAbandonPending = false;
}
}
// The tile's own X: a reflex click must not silently kill a live session the way it would a
// regular window. Confirm only when the terminal is actually running -- a dead one (StartError,
// or HasExited i.e. the #290 exited banner) is pure cleanup and closes straight away, same as it
// always did. Every other close path (handoff replacing a pane, submit-for-review, abandon-run)
// still calls CloseConPtySession directly and is unaffected.
private async void OnPaneCloseRequested(ConPtyPaneViewModel pane)
{
if (pane.Terminal.IsRunning)
{
if (ConfirmAsync is null) return;
if (!await ConfirmAsync(Loc.T("missionControl.closeSessionConfirm"))) return;
}
CloseConPtySession(pane);
}
private void CloseConPtySession(ConPtyPaneViewModel pane) private void CloseConPtySession(ConPtyPaneViewModel pane)
{ {
if (!ConPtySessions.Contains(pane)) return; if (!ConPtySessions.Contains(pane)) return;
pane.ErrorReported -= OnConPtyPaneError; pane.ErrorReported -= OnConPtyPaneError;
pane.CloseRequested -= OnPaneCloseRequested; pane.CloseRequested -= CloseConPtySession;
pane.SubmitForReviewRequested -= OnPaneSubmitForReview; pane.SubmitForReviewRequested -= OnPaneSubmitForReview;
pane.SessionDiedAfterStartup -= OnPaneSessionDied; pane.SessionDiedAfterStartup -= OnPaneSessionDied;
pane.AbandonRunRequested -= OnPaneAbandonRun;
ConPtySessions.Remove(pane); ConPtySessions.Remove(pane);
pane.Dispose(); pane.Dispose();
} }
@@ -617,10 +552,9 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
foreach (var c in ConPtySessions.ToList()) foreach (var c in ConPtySessions.ToList())
{ {
c.ErrorReported -= OnConPtyPaneError; c.ErrorReported -= OnConPtyPaneError;
c.CloseRequested -= OnPaneCloseRequested; c.CloseRequested -= CloseConPtySession;
c.SubmitForReviewRequested -= OnPaneSubmitForReview; c.SubmitForReviewRequested -= OnPaneSubmitForReview;
c.SessionDiedAfterStartup -= OnPaneSessionDied; c.SessionDiedAfterStartup -= OnPaneSessionDied;
c.AbandonRunRequested -= OnPaneAbandonRun;
c.Dispose(); c.Dispose();
} }
ConPtySessions.Clear(); ConPtySessions.Clear();
@@ -1,5 +1,3 @@
using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using ClaudeDo.Data; using ClaudeDo.Data;
@@ -12,14 +10,8 @@ namespace ClaudeDo.Ui.ViewModels.Modals;
public sealed partial class AboutModalViewModel : ViewModelBase public sealed partial class AboutModalViewModel : ViewModelBase
{ {
// MinVer sets AssemblyVersion to {Major}.0.0.0 for binding compat — Assembly.GetName().Version
// shows "2.0.0" no matter the release. FileVersion carries the real Major.Minor.Patch.
public string AppVersion { get; } = public string AppVersion { get; } =
Version.TryParse( Assembly.GetExecutingAssembly().GetName().Version?.ToString(3) ?? "0.0.0";
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion,
out var version)
? version.ToString(3)
: "0.0.0";
public string DataFolderPath { get; } = Paths.AppDataRoot(); public string DataFolderPath { get; } = Paths.AppDataRoot();
public string LogsFolderPath { get; } = Path.Combine(Paths.AppDataRoot(), "logs"); public string LogsFolderPath { get; } = Path.Combine(Paths.AppDataRoot(), "logs");
public string WorkerConfigPath { get; } = Path.Combine(Paths.AppDataRoot(), "worker.config.json"); public string WorkerConfigPath { get; } = Path.Combine(Paths.AppDataRoot(), "worker.config.json");
@@ -1,80 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using ClaudeDo.Ui.Localization;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace ClaudeDo.Ui.ViewModels.Modals;
/// <summary>One cheat sheet: title from the file's leading <c># </c> heading, body is the rest.</summary>
public sealed record CheatSheet(string Key, string Title, string Body);
/// <summary>
/// Backs the non-modal cheat-sheet window (Help → Cheat Sheets). Content lives as markdown
/// under <c>Assets/CheatSheets/*.md</c> (embedded resources) and is rendered by the existing
/// <c>MarkdownView</c>,
/// so a new sheet is a new file — but the key list here stays explicit to keep the order
/// deterministic and a missing resource visible instead of silently absent.
/// </summary>
public partial class CheatSheetsViewModel : ViewModelBase
{
private static readonly string[] Keys =
["git", "conventional-commits", "claude-cli", "claude-config", "dotnet-cli", "powershell"];
public ObservableCollection<CheatSheet> Sheets { get; } = [];
[ObservableProperty]
private CheatSheet? _selectedSheet;
/// <summary>Keeps the window above the shell so it can sit docked at a screen edge.</summary>
[ObservableProperty]
private bool _isPinned;
public Action? CloseAction { get; set; }
public CheatSheetsViewModel()
{
foreach (var key in Keys) Sheets.Add(Load(key));
SelectedSheet = Sheets.FirstOrDefault();
}
/// <summary>Preselects a sheet by key; unknown keys keep the current selection.</summary>
public void Select(string key)
{
var sheet = Sheets.FirstOrDefault(s => s.Key == key);
if (sheet is not null) SelectedSheet = sheet;
}
[RelayCommand]
private void Close() => CloseAction?.Invoke();
private static CheatSheet Load(string key)
{
var assembly = typeof(CheatSheetsViewModel).Assembly;
// Match by suffix rather than composing the logical name from RootNamespace — the
// prefix is a build detail, and a rename shouldn't silently blank the sheet.
var name = assembly.GetManifestResourceNames()
.FirstOrDefault(n => n.EndsWith($".CheatSheets.{key}.md", StringComparison.Ordinal));
var stream = name is null ? null : assembly.GetManifestResourceStream(name);
if (stream is null)
return new CheatSheet(key, key, Loc.T("modals.cheatSheets.missing", $"{key}.md"));
using var reader = new StreamReader(stream);
var text = reader.ReadToEnd().Replace("\r\n", "\n");
// The window shows the title in its own selector, so strip the leading heading
// rather than rendering it a second time inside the body.
var lines = new List<string>(text.Split('\n'));
var title = key;
var first = lines.FindIndex(l => !string.IsNullOrWhiteSpace(l));
if (first >= 0 && lines[first].StartsWith("# ", StringComparison.Ordinal))
{
title = lines[first][2..].Trim();
lines.RemoveRange(0, first + 1);
}
return new CheatSheet(key, title, string.Join('\n', lines).Trim());
}
}
@@ -34,16 +34,8 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
public Func<string, Task<bool>>? ConfirmAsync { get; set; } public Func<string, Task<bool>>? ConfirmAsync { get; set; }
public Func<string, Task>? ShowErrorAsync { get; set; } public Func<string, Task>? ShowErrorAsync { get; set; }
// Mirrors UsageMonitorModalViewModel.ErrorReported — the caller wires this into FlashFooterError.
public event Action<string>? ErrorReported;
[ObservableProperty] private string _name = ""; [ObservableProperty] private string _name = "";
[ObservableProperty] private string _workingDir = ""; [ObservableProperty] private string _workingDir = "";
// Recomputed whenever WorkingDir changes (typing or Browse) — RepoScanner.IsRepo is the same
// check RepoImport uses, so a folder either scans in there or warns here, never neither.
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(SaveCommand))]
private string _workingDirWarning = "";
[ObservableProperty] private string _defaultCommitType = CommitTypeRegistry.DefaultType; [ObservableProperty] private string _defaultCommitType = CommitTypeRegistry.DefaultType;
// A manual list holds reminders: tasks created here start out manual (TaskEntity.IsManual). // A manual list holds reminders: tasks created here start out manual (TaskEntity.IsManual).
[ObservableProperty] private bool _isManual; [ObservableProperty] private bool _isManual;
@@ -54,61 +46,16 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
// lands; a non-zero exit keeps the task out of Done instead of silently reporting merged. // lands; a non-zero exit keeps the task out of Done instead of silently reporting merged.
[ObservableProperty] private string _verifyCommand = ""; [ObservableProperty] private string _verifyCommand = "";
// Per-list opt-in for PowerUse. A handler run on this list only goes unattended (no questions, // Per-list opt-in for PowerUse. A handler run on this list only goes unattended (no questions,
// harvests new work, longer handoff chain) when this AND the global switch in Settings → // harvests new work, longer handoff chain) when this AND the global switch in the usage monitor
// Execution are both on. Off by default — the global switch alone must never change a list's behaviour. // are both on. Off by default — the global switch alone must never change a list's behaviour.
[ObservableProperty] private bool _powerUseAllowed; [ObservableProperty] private bool _powerUseAllowed;
// Dropdown hidden entirely when no ticket-system base URL is configured (Settings → Files tab). // Dropdown hidden entirely when no ticket-system base URL is configured (Settings → Files tab).
// Icon key into the UI icon library (IconKeyConverter -> "Icon.<key>" StreamGeometry). // Icon key into the UI icon library (IconKeyConverter -> "Icon.<key>" StreamGeometry).
[ObservableProperty] private string _icon = DefaultIcon; [ObservableProperty] private string _icon = DefaultIcon;
[ObservableProperty] [ObservableProperty] private bool _ticketsAvailable;
[NotifyPropertyChangedFor(nameof(ShowTicketProject))]
private bool _ticketsAvailable;
/// <summary>The dropdown needs a configured ticket system *and* a list — folders link to nothing.</summary>
public bool ShowTicketProject => TicketsAvailable && !IsFolder;
// ---- Folder mode ----
// A folder is a sidebar grouping, not a list: it carries only a name and an icon, so every
// other field/section collapses. Reached two ways — the "create a folder instead" toggle in
// the create flow (FolderId still null), and editing an existing folder (FolderId set).
// There is no list <-> folder conversion: the toggle is offered on create only.
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(HeaderTitle))]
[NotifyPropertyChangedFor(nameof(DeleteLabel))]
[NotifyPropertyChangedFor(nameof(ShowTicketProject))]
private bool _isFolder;
/// <summary>True only while creating — an existing list can't become a folder or back.</summary>
[ObservableProperty] private bool _canToggleFolder;
private string? _folderId;
// Resolved rather than a {loc:Tr} key because the text depends on IsFolder.
public string HeaderTitle => Loc.T(IsFolder ? "modals.listSettings.folderTitle" : "modals.listSettings.title");
public string DeleteLabel => Loc.T(IsFolder ? "modals.listSettings.deleteFolder" : "modals.listSettings.deleteList");
[ObservableProperty] private TicketProjectOption? _selectedTicketProject; [ObservableProperty] private TicketProjectOption? _selectedTicketProject;
public ObservableCollection<TicketProjectOption> TicketProjects { get; } = new(); public ObservableCollection<TicketProjectOption> TicketProjects { get; } = new();
// Gates Save/Delete while the core fields (name/agent/verify command) are still loading, so a
// save can't land before they're populated and clobber the list_config row with blanks. Ticket
// projects load separately (see LoadTicketProjectsAsync) and are NOT covered by this — Save's
// own tri-state handles that case instead.
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(SaveCommand))]
[NotifyCanExecuteChangedFor(nameof(DeleteCommand))]
private bool _isLoading;
// Set when the core load (name/agent/verify command) threw — keeps Save gated even after
// IsLoading resets to false in LoadAsync's finally, so a failed load can't clobber the
// stored config with blank fields.
private bool _loadFailed;
// True once GetTicketProjectsAsync has completed successfully for the current load — Save
// only writes an explicit TicketProjectId when this is true, so a slow/unreachable ticket
// system leaves the stored link untouched instead of wiping it to "none".
private bool _ticketProjectsLoaded;
public ObservableCollection<string> CommitTypeOptions { get; } = new(CommitTypeRegistry.Types); public ObservableCollection<string> CommitTypeOptions { get; } = new(CommitTypeRegistry.Types);
public const string DefaultIcon = "Folder"; public const string DefaultIcon = "Folder";
@@ -144,36 +91,6 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
Agent = new AgentConfigEditorViewModel(worker, AgentConfigScope.List); Agent = new AgentConfigEditorViewModel(worker, AgentConfigScope.List);
} }
// Fires the load without blocking the caller, so the modal window can be shown right away
// instead of appearing only after seven serial hub round-trips (one of them a 10s-timeout
// ticket-system HTTP call) have finished — same pattern as UsageMonitorModalViewModel.BeginLoad.
public void BeginLoad(
string listId,
string name,
string? workingDir,
string defaultCommitType,
bool isManual = false,
bool findingsTracked = false,
string? icon = null,
bool canToggleFolder = false)
{
CanToggleFolder = canToggleFolder;
_ = LoadAsync(listId, name, workingDir, defaultCommitType, isManual, findingsTracked, icon);
}
/// <summary>
/// Opens the modal on an existing folder: name + icon only, no list config to load and
/// nothing to fetch from the worker, so this needs no async counterpart.
/// </summary>
public void BeginLoadFolder(string folderId, string name, string? icon)
{
_folderId = folderId;
IsFolder = true;
CanToggleFolder = false;
Name = name;
Icon = IconOptions.Contains(icon) ? icon! : DefaultIcon;
}
public async Task LoadAsync( public async Task LoadAsync(
string listId, string listId,
string name, string name,
@@ -184,100 +101,45 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
string? icon = null, string? icon = null,
CancellationToken ct = default) CancellationToken ct = default)
{ {
ListConfigDto? cfg = null; ListId = listId;
IsLoading = true; Name = name;
_loadFailed = false; IsManual = isManual;
try FindingsTracked = findingsTracked;
{ // An unknown/legacy key would leave the picker with no selection and silently reset the
ListId = listId; // icon on the next save — fall back to the default instead.
Name = name; Icon = IconOptions.Contains(icon) ? icon! : DefaultIcon;
IsManual = isManual; WorkingDir = workingDir ?? "";
FindingsTracked = findingsTracked; DefaultCommitType = string.IsNullOrWhiteSpace(defaultCommitType) ? CommitTypeRegistry.DefaultType : defaultCommitType;
// An unknown/legacy key would leave the picker with no selection and silently reset the
// icon on the next save — fall back to the default instead.
Icon = IconOptions.Contains(icon) ? icon! : DefaultIcon;
WorkingDir = workingDir ?? "";
DefaultCommitType = string.IsNullOrWhiteSpace(defaultCommitType) ? CommitTypeRegistry.DefaultType : defaultCommitType;
await Agent.LoadForListAsync(listId, ct); await Agent.LoadForListAsync(listId, ct);
cfg = Agent.LastLoadedListConfig; var cfg = await _worker.GetListConfigAsync(listId);
VerifyCommand = cfg?.VerifyCommand ?? ""; VerifyCommand = cfg?.VerifyCommand ?? "";
PowerUseAllowed = cfg?.PowerUseAllowed ?? false; PowerUseAllowed = cfg?.PowerUseAllowed ?? false;
}
catch (Exception ex)
{
// BeginLoad fires this without awaiting it — catching here (instead of letting it
// propagate) turns what would be an unobserved task exception, with the modal stuck
// open and every field blank, into a reported error and a locked Save button.
_loadFailed = true;
ErrorReported?.Invoke(Loc.T("vm.listSettings.loadFailed", ex.Message));
}
finally { IsLoading = false; }
if (_loadFailed) return; var ticketSettings = TicketSettingsTabViewModel.FeatureEnabled
? await _worker.GetTicketSettingsAsync()
// Deliberately NOT awaited: an unreachable ticket system (10s HTTP timeout) must not hold : null;
// up the rest of the modal. The dropdown just stays empty until this finishes. TicketsAvailable = !string.IsNullOrWhiteSpace(ticketSettings?.ApiBaseUrl);
_ = LoadTicketProjectsAsync(cfg?.TicketProjectId);
}
private async Task LoadTicketProjectsAsync(int? existingTicketProjectId)
{
_ticketProjectsLoaded = false;
TicketProjects.Clear(); TicketProjects.Clear();
try if (TicketsAvailable)
{ {
var ticketSettings = TicketSettingsTabViewModel.FeatureEnabled
? await _worker.GetTicketSettingsAsync()
: null;
TicketsAvailable = !string.IsNullOrWhiteSpace(ticketSettings?.ApiBaseUrl);
if (!TicketsAvailable)
{
SelectedTicketProject = null;
return;
}
TicketProjects.Add(new TicketProjectOption(0, Loc.T("vm.listSettings.ticketProjectNone"))); TicketProjects.Add(new TicketProjectOption(0, Loc.T("vm.listSettings.ticketProjectNone")));
foreach (var p in await _worker.GetTicketProjectsAsync()) foreach (var p in await _worker.GetTicketProjectsAsync())
TicketProjects.Add(new TicketProjectOption(p.Id, $"{p.DepartmentName} / {p.Title}")); TicketProjects.Add(new TicketProjectOption(p.Id, $"{p.DepartmentName} / {p.Title}"));
SelectedTicketProject = existingTicketProjectId is int id SelectedTicketProject = cfg?.TicketProjectId is int id
? TicketProjects.FirstOrDefault(t => t.Id == id) ?? TicketProjects[0] ? TicketProjects.FirstOrDefault(t => t.Id == id) ?? TicketProjects[0]
: TicketProjects[0]; : TicketProjects[0];
_ticketProjectsLoaded = true;
} }
catch (Exception ex) else
{ {
// Ticket system unreachable/slow — leave the dropdown as-is. Save's tri-state (below) SelectedTicketProject = null;
// skips writing TicketProjectId when _ticketProjectsLoaded is false, so the stored
// link survives instead of being wiped to "none".
ErrorReported?.Invoke(Loc.T("vm.listSettings.ticketProjectsLoadFailed", ex.Message));
} }
} }
private bool CanSave() => !IsLoading && !_loadFailed && (IsFolder || string.IsNullOrEmpty(WorkingDirWarning)); [RelayCommand]
private bool CanDelete() => !IsLoading;
// A manual list without a WorkingDir is untouched (empty is always valid) — this only fires
// for the "picked a folder that turns out not to be a repo" case the audit found: it would
// otherwise only surface as a Failed task the first time the worker tries to use it.
partial void OnWorkingDirChanged(string value)
{
if (string.IsNullOrWhiteSpace(value)) { WorkingDirWarning = ""; return; }
WorkingDirWarning = !Directory.Exists(value)
? Loc.T("vm.listSettings.workingDirMissing")
: RepoScanner.IsRepo(value) ? "" : Loc.T("vm.listSettings.workingDirNotRepo");
}
[RelayCommand(CanExecute = nameof(CanSave))]
private async Task SaveAsync() private async Task SaveAsync()
{ {
if (IsFolder)
{
await SaveFolderAsync();
return;
}
await _worker.UpdateListAsync(new UpdateListDto( await _worker.UpdateListAsync(new UpdateListDto(
ListId, ListId,
string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name, string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name,
@@ -287,11 +149,10 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
FindingsTracked, FindingsTracked,
Icon)); Icon));
// Tri-state: dropdown never shown (no base URL), or ticket projects failed/never loaded // Tri-state: dropdown never shown (no base URL) -> null, leave the stored link alone.
// (e.g. an unreachable ticket system) -> null, leave the stored link alone. Dropdown shown // Dropdown shown -> always an explicit value, 0 for "— none —" to actively clear it.
// and loaded -> always an explicit value, 0 for "— none —" to actively clear it. Never // Never null here, or an explicit unlink would silently fail to reach the worker.
// null in that case, or an explicit unlink would silently fail to reach the worker. var ticketProjectId = TicketsAvailable ? (SelectedTicketProject?.Id ?? 0) : (int?)null;
var ticketProjectId = TicketsAvailable && _ticketProjectsLoaded ? (SelectedTicketProject?.Id ?? 0) : (int?)null;
// Always explicit (never null) — this modal owns the checkbox, so unchecking it has to reach // Always explicit (never null) — this modal owns the checkbox, so unchecking it has to reach
// the worker as a real false rather than a "leave it alone". // the worker as a real false rather than a "leave it alone".
@@ -304,49 +165,13 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
CloseAction?.Invoke(); CloseAction?.Invoke();
} }
private async Task SaveFolderAsync() [RelayCommand]
{
var name = string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name;
await using var ctx = await _dbFactory.CreateDbContextAsync();
var lists = new ListRepository(ctx);
if (_folderId is null)
{
await lists.AddFolderAsync(new ListFolderEntity
{
Id = Guid.NewGuid().ToString("N"),
Name = name,
Icon = Icon,
CreatedAt = DateTime.UtcNow,
});
// The create flow pre-creates a list row for this modal to save against; a folder
// doesn't need it. Deleted=true (it genuinely is) makes the caller do a full reload,
// which is what picks the new folder up.
await lists.DeleteAsync(ListId);
Deleted = true;
}
else
{
await lists.RenameFolderAsync(_folderId, name, Icon);
}
Saved = true;
CloseAction?.Invoke();
}
[RelayCommand(CanExecute = nameof(CanDelete))]
private async Task DeleteAsync() private async Task DeleteAsync()
{ {
if (IsFolder)
{
await DeleteFolderAsync();
return;
}
var displayName = string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name; var displayName = string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name;
if (ConfirmAsync is not null) if (ConfirmAsync is not null)
{ {
var ok = await ConfirmAsync(Loc.T("vm.listSettings.confirmDeleteList", displayName)); var ok = await ConfirmAsync($"Delete list \"{displayName}\" and all its tasks? This cannot be undone.");
if (!ok) return; if (!ok) return;
} }
@@ -363,35 +188,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
|| ex.InnerException?.Message.Contains("FOREIGN KEY", StringComparison.OrdinalIgnoreCase) == true)) || ex.InnerException?.Message.Contains("FOREIGN KEY", StringComparison.OrdinalIgnoreCase) == true))
{ {
if (ShowErrorAsync is not null) if (ShowErrorAsync is not null)
await ShowErrorAsync(Loc.T("vm.listSettings.deleteBlockedPlanning")); await ShowErrorAsync("This list has planning sessions with child tasks. Discard those first, then delete the list.");
return;
}
Deleted = true;
CloseAction?.Invoke();
}
private async Task DeleteFolderAsync()
{
// Create mode with the folder toggle on: nothing has been written yet, so this is a cancel
// — and the caller's rollback drops the pre-created list row.
if (_folderId is null) { CloseAction?.Invoke(); return; }
var displayName = string.IsNullOrWhiteSpace(Name) ? Loc.T("vm.listSettings.untitled") : Name;
if (ConfirmAsync is not null)
{
var ok = await ConfirmAsync(Loc.T("vm.listSettings.confirmDeleteFolder", displayName));
if (!ok) return;
}
try
{
await using var ctx = await _dbFactory.CreateDbContextAsync();
await new ListRepository(ctx).DeleteFolderAsync(_folderId);
}
catch (Exception ex)
{
ErrorReported?.Invoke(ex.Message);
return; return;
} }
@@ -67,15 +67,6 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
public ObservableCollection<MergeHelperTaskRowViewModel> Tasks { get; } = new(); public ObservableCollection<MergeHelperTaskRowViewModel> Tasks { get; } = new();
/// <summary>Model choices for the triage session. Only opus/fable are offered on purpose —
/// triage is the dedupe/refine leverage point; cheaper models aren't worth a picker slot.</summary>
public IReadOnlyList<string> ModelOptions { get; } = new[] { "opus", "fable" };
[ObservableProperty] private string _selectedModel = Data.Models.ModelRegistry.HandlerTriageAlias;
/// <summary>Hidden in review mode — those runs start directly at the merge phase, no triage.</summary>
public bool ShowModelPicker => !_reviewMode;
[ObservableProperty] private string _scopeLabel = ""; [ObservableProperty] private string _scopeLabel = "";
public bool HasTasks => Tasks.Count > 0; public bool HasTasks => Tasks.Count > 0;
@@ -109,7 +100,6 @@ public sealed partial class MergeHelperSelectionModalViewModel : ViewModelBase
{ {
_reviewMode = true; _reviewMode = true;
ScopeLabel = Loc.T("modals.mergeHelper.scopeReview"); ScopeLabel = Loc.T("modals.mergeHelper.scopeReview");
OnPropertyChanged(nameof(ShowModelPicker));
} }
/// <summary>Groups a confirmed review-mode selection by owning list, preserving row order — /// <summary>Groups a confirmed review-mode selection by owning list, preserving row order —
@@ -31,10 +31,6 @@ public sealed partial class MergeModalViewModel : ViewModelBase
[ObservableProperty] private string? _warningMessage; [ObservableProperty] private string? _warningMessage;
[ObservableProperty] private string? _successMessage; [ObservableProperty] private string? _successMessage;
[ObservableProperty][NotifyCanExecuteChangedFor(nameof(SubmitCommand))] private bool _hasConflict; [ObservableProperty][NotifyCanExecuteChangedFor(nameof(SubmitCommand))] private bool _hasConflict;
/// The merge was refused because the target working dir is dirty — offer the stash retry
/// instead of dead-ending on the error text.
[ObservableProperty] private bool _showStashRetry;
[ObservableProperty] private IReadOnlyList<string> _conflictFiles = Array.Empty<string>(); [ObservableProperty] private IReadOnlyList<string> _conflictFiles = Array.Empty<string>();
public Action? CloseAction { get; set; } public Action? CloseAction { get; set; }
@@ -88,29 +84,22 @@ public sealed partial class MergeModalViewModel : ViewModelBase
!IsBusy && !HasConflict && !string.IsNullOrWhiteSpace(SelectedBranch); !IsBusy && !HasConflict && !string.IsNullOrWhiteSpace(SelectedBranch);
[RelayCommand(CanExecute = nameof(CanSubmit))] [RelayCommand(CanExecute = nameof(CanSubmit))]
private Task SubmitAsync() => RunMergeAsync(autostash: false); private async Task SubmitAsync()
/// Retry after "dirty_target": git stashes the target working tree's uncommitted changes,
/// merges, and restores them afterwards.
[RelayCommand(CanExecute = nameof(CanSubmit))]
private Task StashAndMergeAsync() => RunMergeAsync(autostash: true);
private async Task RunMergeAsync(bool autostash)
{ {
if (string.IsNullOrWhiteSpace(SelectedBranch)) return; if (string.IsNullOrWhiteSpace(SelectedBranch)) return;
IsBusy = true; IsBusy = true;
ErrorMessage = null; ErrorMessage = null;
WarningMessage = null; WarningMessage = null;
SuccessMessage = null; SuccessMessage = null;
ShowStashRetry = false;
// Subscribed only for the duration of the call: the worker's broadcast reaches every // Subscribed only for the duration of the call: the worker's broadcast reaches every
// client, and a transient VM left on that event would outlive its window. // client, and a transient VM left on that event would outlive its window.
ProgressMessage = Loc.T("vm.merge.progressMerging"); ProgressMessage = Loc.T("vm.merge.progressMerging");
_worker.MergeProgressEvent += OnMergeProgress;
_worker.OperationProgressEvent += OnOperationProgress; _worker.OperationProgressEvent += OnOperationProgress;
try try
{ {
var result = await _worker.MergeTaskAsync( var result = await _worker.MergeTaskAsync(
TaskId, SelectedBranch!, RemoveWorktree, CommitMessage, autostash); TaskId, SelectedBranch!, RemoveWorktree, CommitMessage);
switch (result.Status) switch (result.Status)
{ {
@@ -142,12 +131,6 @@ public sealed partial class MergeModalViewModel : ViewModelBase
// point of the gate. // point of the gate.
ErrorMessage = result.ErrorMessage ?? Loc.T("vm.merge.verifyFailed"); ErrorMessage = result.ErrorMessage ?? Loc.T("vm.merge.verifyFailed");
break; break;
case "dirty_target":
// Nothing landed -- the target working dir has uncommitted changes. Offer the
// stash retry; git restores the changes after the merge.
ErrorMessage = result.ErrorMessage ?? Loc.T("vm.merge.dirtyTarget");
ShowStashRetry = true;
break;
case "untracked_collision": case "untracked_collision":
// Nothing landed -- the merge was refused before touching the repo. Show the // Nothing landed -- the merge was refused before touching the repo. Show the
// real message (it names the colliding path and size); the locale string is // real message (it names the colliding path and size); the locale string is
@@ -165,25 +148,36 @@ public sealed partial class MergeModalViewModel : ViewModelBase
} }
finally finally
{ {
_worker.MergeProgressEvent -= OnMergeProgress;
_worker.OperationProgressEvent -= OnOperationProgress; _worker.OperationProgressEvent -= OnOperationProgress;
ProgressMessage = null; ProgressMessage = null;
IsBusy = false; IsBusy = false;
} }
} }
private void OnOperationProgress(string opKey, string phase, int current, int total) private void OnMergeProgress(string taskId, string phase, int elapsedSeconds)
{ {
if (opKey != TaskId) return; if (taskId != TaskId) return;
// Rebasing is handled by OnOperationProgress (needs the branch total, which this
// elapsed-seconds-only forwarder drops) -- don't overwrite it with the generic fallback.
if (phase == MergePhaseRebasing) return;
ProgressMessage = phase switch ProgressMessage = phase switch
{ {
MergePhaseRebasing => total > 0 MergePhaseVerifying => Loc.T("vm.merge.progressVerifying", FormatElapsed(elapsedSeconds)),
? $"{Loc.T("ops.worker.rebasingAfterMerge")} ({current}/{total})"
: Loc.T("ops.worker.rebasingAfterMerge"),
MergePhaseVerifying => Loc.T("vm.merge.progressVerifying", FormatElapsed(current)),
_ => Loc.T("vm.merge.progressMerging"), _ => Loc.T("vm.merge.progressMerging"),
}; };
} }
// Separate event: MergeProgressEvent forwards elapsed-seconds-only (verifying), but the
// rebase phase needs the branch count too, which only rides the untrimmed OperationProgress.
private void OnOperationProgress(string opKey, string phase, int current, int total)
{
if (opKey != TaskId || phase != MergePhaseRebasing) return;
ProgressMessage = total > 0
? $"{Loc.T("ops.worker.rebasingAfterMerge")} ({current}/{total})"
: Loc.T("ops.worker.rebasingAfterMerge");
}
/// Mirrors TaskMergeService.PhaseVerifying — a hub payload token, not a display string. /// Mirrors TaskMergeService.PhaseVerifying — a hub payload token, not a display string.
private const string MergePhaseVerifying = "verifying"; private const string MergePhaseVerifying = "verifying";
@@ -44,7 +44,7 @@ public sealed partial class RepoImportModalViewModel : ViewModelBase
public int CreateCount => Repos.Count(r => r.IsChecked && !r.AlreadyAdded); public int CreateCount => Repos.Count(r => r.IsChecked && !r.AlreadyAdded);
public bool CanCreate => CreateCount > 0; public bool CanCreate => CreateCount > 0;
public string CreateButtonText => Loc.T("vm.repoImport.createButton", CreateCount); public string CreateButtonText => $"Create {CreateCount} list(s)";
public bool HasFolders => _folders.Count > 0; public bool HasFolders => _folders.Count > 0;
public RepoImportModalViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient workerClient) public RepoImportModalViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient workerClient)
@@ -30,15 +30,6 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
// Cap on a list-handler run's wait<->merge handoff chain. 4 = two merge rounds (the long-standing // Cap on a list-handler run's wait<->merge handoff chain. 4 = two merge rounds (the long-standing
// default); raise it for runs meant to keep going for hours. Bounds a runaway chain, so never 0. // default); raise it for runs meant to keep going for hours. Bounds a runaway chain, so never 0.
[ObservableProperty] private int _listHandlerMaxHandoffs = 4; [ObservableProperty] private int _listHandlerMaxHandoffs = 4;
// PowerUse master switch: a handler run spends the rest of the window unattended. On its own it
// changes nothing — the run's LIST must also opt in (list settings → PowerUse).
[ObservableProperty] private bool _powerUseEnabled;
// Optional local-time window (HH:mm) narrowing when PowerUse applies; both blank = round the
// clock. Unparseable input is normalized to null on save, same as the worker does.
[ObservableProperty] private string? _powerUseWindowStart;
[ObservableProperty] private string? _powerUseWindowEnd;
// 5h-usage percentage at which a PowerUse handler session hands off. Clamped 50..99.
[ObservableProperty] private int _powerUseHandoffPct = 95;
// Newline-separated path prefixes excluded from the weekly report. // Newline-separated path prefixes excluded from the weekly report.
[ObservableProperty] private string _reportExcludedPaths = @"C:\Private"; [ObservableProperty] private string _reportExcludedPaths = @"C:\Private";
// 0=Sunday..6=Saturday (System.DayOfWeek); default Wednesday. // 0=Sunday..6=Saturday (System.DayOfWeek); default Wednesday.
@@ -119,13 +110,8 @@ public sealed partial class GeneralSettingsTabViewModel : ViewModelBase
foreach (var row in ModelPresets) foreach (var row in ModelPresets)
if (row.MaxTurns is < 1 or > 200) if (row.MaxTurns is < 1 or > 200)
return $"Max turns for {row.Model} must be between 1 and 200."; return $"Max turns for {row.Model} must be between 1 and 200.";
if (!IsValidWindowBound(PowerUseWindowStart) || !IsValidWindowBound(PowerUseWindowEnd))
return Loc.T("settings.general.powerUseWindowInvalid");
return null; return null;
} }
private static bool IsValidWindowBound(string? value)
=> string.IsNullOrWhiteSpace(value) || PowerUseWindow.Parse(value) is not null;
} }
/// <summary>One row of the per-model preset table. Single consumer, so it lives here.</summary> /// <summary>One row of the per-model preset table. Single consumer, so it lives here.</summary>
@@ -1,6 +1,5 @@
using System.Linq; using System.Linq;
using ClaudeDo.Data; using ClaudeDo.Data;
using ClaudeDo.Data.Models;
using ClaudeDo.Localization; using ClaudeDo.Localization;
using ClaudeDo.Ui.Localization; using ClaudeDo.Ui.Localization;
using ClaudeDo.Ui.Services; using ClaudeDo.Ui.Services;
@@ -131,6 +130,14 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
// carried through load→save verbatim so saving Settings can never reset a dragged value. // carried through load→save verbatim so saving Settings can never reset a dragged value.
private (int FiveSoft, int FiveHard, int SevenSoft, int SevenHard) _throttleStages = (50, 65, 50, 65); private (int FiveSoft, int FiveHard, int SevenSoft, int SevenHard) _throttleStages = (50, 65, 50, 65);
// Same deal: the PowerUse master switch is toggled on the usage monitor. Carried load→save so
// opening and saving Settings can't switch it off behind the user's back.
private bool _powerUseEnabled;
// Ditto for the PowerUse time window and handoff threshold — usage-monitor-owned, invisible
// here, but they must survive a Settings save.
private (string? Start, string? End, int HandoffPct) _powerUseWindow = (null, null, 95);
public async Task LoadAsync() public async Task LoadAsync()
{ {
IsBusy = true; IsBusy = true;
@@ -149,10 +156,11 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
General.UsageGateSevenDayPct = dto.UsageGateSevenDayPct; General.UsageGateSevenDayPct = dto.UsageGateSevenDayPct;
General.AutoContinueOnUsageLimit = dto.AutoContinueOnUsageLimit; General.AutoContinueOnUsageLimit = dto.AutoContinueOnUsageLimit;
General.ListHandlerMaxHandoffs = dto.ListHandlerMaxHandoffs; General.ListHandlerMaxHandoffs = dto.ListHandlerMaxHandoffs;
General.PowerUseEnabled = dto.PowerUseEnabled; // Owned by the usage monitor, not editable here — but it MUST be round-tripped,
General.PowerUseWindowStart = dto.PowerUseWindowStart; // because SaveAsync rebuilds the whole DTO positionally and would otherwise write
General.PowerUseWindowEnd = dto.PowerUseWindowEnd; // the record default (false) back and silently switch PowerUse off.
General.PowerUseHandoffPct = dto.PowerUseHandoffPct; _powerUseEnabled = dto.PowerUseEnabled;
_powerUseWindow = (dto.PowerUseWindowStart, dto.PowerUseWindowEnd, dto.PowerUseHandoffPct);
_throttleStages = ( _throttleStages = (
dto.UsageThrottleFiveHourSoftPct, dto.UsageThrottleFiveHourHardPct, dto.UsageThrottleFiveHourSoftPct, dto.UsageThrottleFiveHourHardPct,
dto.UsageThrottleSevenDaySoftPct, dto.UsageThrottleSevenDayHardPct); dto.UsageThrottleSevenDaySoftPct, dto.UsageThrottleSevenDayHardPct);
@@ -220,13 +228,11 @@ public sealed partial class SettingsModalViewModel : ViewModelBase
_throttleStages.SevenSoft, _throttleStages.SevenSoft,
_throttleStages.SevenHard, _throttleStages.SevenHard,
General.AutoContinueOnUsageLimit, General.AutoContinueOnUsageLimit,
General.PowerUseEnabled, _powerUseEnabled,
General.ListHandlerMaxHandoffs, General.ListHandlerMaxHandoffs,
// The worker stores an unparseable time as null; normalize here too so the box _powerUseWindow.Start,
// shows what was actually saved instead of a typo that looks like a live window. _powerUseWindow.End,
PowerUseWindow.Normalize(General.PowerUseWindowStart), _powerUseWindow.HandoffPct);
PowerUseWindow.Normalize(General.PowerUseWindowEnd),
Math.Clamp(General.PowerUseHandoffPct, 50, 99));
await _worker.UpdateAppSettingsAsync(dto); await _worker.UpdateAppSettingsAsync(dto);
await Prime.SaveAsync(); await Prime.SaveAsync();
await OnlineInbox.SaveAsync(); await OnlineInbox.SaveAsync();
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using ClaudeDo.Data.Models;
using ClaudeDo.Ui.Localization; using ClaudeDo.Ui.Localization;
using ClaudeDo.Ui.Services; using ClaudeDo.Ui.Services;
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
@@ -100,6 +101,77 @@ public sealed partial class UsageMonitorModalViewModel : ViewModelBase
[ObservableProperty] [ObservableProperty]
private IReadOnlyList<UsageGaugeRowViewModel> _gaugeRows = Array.Empty<UsageGaugeRowViewModel>(); private IReadOnlyList<UsageGaugeRowViewModel> _gaugeRows = Array.Empty<UsageGaugeRowViewModel>();
/// <summary>
/// PowerUse master switch. It lives here rather than in Settings because turning it on is a
/// "spend the rest of the window" decision, made while looking at how much window is left.
/// On its own it changes nothing — a list-handler run only goes unattended when its LIST also
/// opted in (list settings → PowerUse), so this can stay on without affecting other lists.
/// </summary>
[ObservableProperty] private bool _powerUseEnabled;
/// <summary>Optional local-time window (<c>HH:mm</c>) narrowing when PowerUse applies. Both
/// blank = round the clock. Committed on focus loss / Enter, not per keystroke.</summary>
[ObservableProperty] private string? _powerUseWindowStart;
[ObservableProperty] private string? _powerUseWindowEnd;
/// <summary>5h-usage percentage at which a PowerUse handler session should hand off.</summary>
[ObservableProperty] private int _powerUseHandoffPct = 95;
// Set while LoadAsync writes the stored value in, so seeding the property doesn't immediately
// write it straight back to the worker.
private bool _loadingPowerUse;
partial void OnPowerUseEnabledChanged(bool value)
{
if (_loadingPowerUse) return;
_ = SavePowerUse();
}
/// Read-modify-write, same discipline as SaveStagesAsync: never clobber a field this modal
/// doesn't own. All four PowerUse fields go in one write, so committing one box can't drop a
/// value the user just typed into a sibling box.
[RelayCommand]
private async Task SavePowerUse()
{
if (_loadingPowerUse) return;
try
{
var settings = await _worker.GetAppSettingsAsync();
if (settings is null)
{
ErrorReported?.Invoke(Loc.T("vm.usageMonitor.powerUseSaveFailed", Loc.T("vm.settingsModal.workerOffline")));
return;
}
// The worker stores an unparseable time as null; normalize here too so the box shows
// what was actually saved instead of a typo that looks like a live window.
var start = PowerUseWindow.Normalize(PowerUseWindowStart);
var end = PowerUseWindow.Normalize(PowerUseWindowEnd);
var pct = Math.Clamp(PowerUseHandoffPct, 50, 99);
await _worker.UpdateAppSettingsAsync(settings with
{
PowerUseEnabled = PowerUseEnabled,
PowerUseWindowStart = start,
PowerUseWindowEnd = end,
PowerUseHandoffPct = pct,
});
_loadingPowerUse = true;
try
{
PowerUseWindowStart = start;
PowerUseWindowEnd = end;
PowerUseHandoffPct = pct;
}
finally { _loadingPowerUse = false; }
}
catch (Exception ex)
{
ErrorReported?.Invoke(Loc.T("vm.usageMonitor.powerUseSaveFailed", ex.Message));
}
}
public bool IsStale => Snapshot?.IsStale == true; public bool IsStale => Snapshot?.IsStale == true;
public string? LastError => Snapshot?.LastError; public string? LastError => Snapshot?.LastError;
public bool IsGateBlocked => Snapshot?.IsGateBlocked == true; public bool IsGateBlocked => Snapshot?.IsGateBlocked == true;
@@ -149,6 +221,20 @@ public sealed partial class UsageMonitorModalViewModel : ViewModelBase
_worker.UsageUpdatedEvent -= OnUsageUpdated; _worker.UsageUpdatedEvent -= OnUsageUpdated;
_worker.UsageUpdatedEvent += OnUsageUpdated; _worker.UsageUpdatedEvent += OnUsageUpdated;
var settings = await _worker.GetAppSettingsAsync();
if (settings is not null)
{
_loadingPowerUse = true;
try
{
PowerUseEnabled = settings.PowerUseEnabled;
PowerUseWindowStart = settings.PowerUseWindowStart;
PowerUseWindowEnd = settings.PowerUseWindowEnd;
PowerUseHandoffPct = settings.PowerUseHandoffPct;
}
finally { _loadingPowerUse = false; }
}
ApplyPresetRange(SelectedPresetDays); ApplyPresetRange(SelectedPresetDays);
await LoadUsageDataAsync(); await LoadUsageDataAsync();
} }
@@ -1,9 +1,7 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using ClaudeDo.Ui.Localization;
using ClaudeDo.Ui.Services; using ClaudeDo.Ui.Services;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
namespace ClaudeDo.Ui.ViewModels.Modals; namespace ClaudeDo.Ui.ViewModels.Modals;
@@ -13,9 +11,6 @@ public sealed partial class WorkerConnectionModalViewModel : ViewModelBase
private readonly WorkerLocator _workerLocator; private readonly WorkerLocator _workerLocator;
private readonly InstallerLocator _installerLocator; private readonly InstallerLocator _installerLocator;
// Test seam: real Process.Start by default, swappable to simulate a blocked/failed launch.
internal Action<ProcessStartInfo> ProcessStarter { get; set; } = psi => Process.Start(psi);
public WorkerConnectionModalViewModel(WorkerLocator workerLocator, InstallerLocator installerLocator) public WorkerConnectionModalViewModel(WorkerLocator workerLocator, InstallerLocator installerLocator)
{ {
_workerLocator = workerLocator; _workerLocator = workerLocator;
@@ -24,29 +19,15 @@ public sealed partial class WorkerConnectionModalViewModel : ViewModelBase
public Action? CloseAction { get; set; } public Action? CloseAction { get; set; }
[ObservableProperty] private string? _errorText;
[RelayCommand] private void Close() => CloseAction?.Invoke(); [RelayCommand] private void Close() => CloseAction?.Invoke();
[RelayCommand] [RelayCommand]
private void StartWorker() private void StartWorker()
{ {
var exe = _workerLocator.Find(); var exe = _workerLocator.Find();
if (exe is null) if (exe is null) return;
{ try { Process.Start(new ProcessStartInfo(exe) { UseShellExecute = true }); }
ErrorText = Loc.T("modals.workerConnection.workerNotFound"); catch { /* nothing useful to show */ }
return;
}
try
{
ProcessStarter(new ProcessStartInfo(exe) { UseShellExecute = true });
}
catch (Exception ex)
{
ErrorText = Loc.T("modals.workerConnection.startFailed", ex.Message);
return;
}
ErrorText = null;
CloseAction?.Invoke(); CloseAction?.Invoke();
} }
@@ -54,26 +35,18 @@ public sealed partial class WorkerConnectionModalViewModel : ViewModelBase
private void RerunInstaller() private void RerunInstaller()
{ {
var path = _installerLocator.Find(); var path = _installerLocator.Find();
if (path is null) if (path is null) return;
{
ErrorText = Loc.T("modals.workerConnection.installerNotFound");
return;
}
try try
{ {
// See IslandsShellViewModel.UpdateNow: an inherited CWD inside the install dir // See IslandsShellViewModel.UpdateNow: an inherited CWD inside the install dir
// makes the installer block its own app\ rename. // makes the installer block its own app\ rename.
ProcessStarter(new ProcessStartInfo(path) Process.Start(new ProcessStartInfo(path)
{ {
UseShellExecute = true, UseShellExecute = true,
WorkingDirectory = Path.GetTempPath(), WorkingDirectory = Path.GetTempPath(),
}); });
Environment.Exit(0);
} }
catch (Exception ex) catch { /* nothing useful to show */ }
{
ErrorText = Loc.T("modals.workerConnection.startFailed", ex.Message);
return;
}
Environment.Exit(0);
} }
} }
@@ -415,8 +415,7 @@ public sealed partial class WorktreesOverviewModalViewModel : ViewModelBase
private bool CanMergeAll() => !BatchMergeStatus.IsRunning && SelectedCount > 0 && !string.IsNullOrWhiteSpace(SelectedTarget); private bool CanMergeAll() => !BatchMergeStatus.IsRunning && SelectedCount > 0 && !string.IsNullOrWhiteSpace(SelectedTarget);
[RelayCommand(CanExecute = nameof(CanMergeAll))] [RelayCommand(CanExecute = nameof(CanMergeAll))]
private Task MergeAll() => MergeSelectedAsync( private Task MergeAll() => MergeSelectedAsync(_worker.MergeTaskAsync);
(taskId, target, removeWorktree, message) => _worker.MergeTaskAsync(taskId, target, removeWorktree, message));
[RelayCommand] [RelayCommand]
private void ResolveConflict(WorktreeOverviewRowViewModel? row) private void ResolveConflict(WorktreeOverviewRowViewModel? row)
@@ -1,14 +1,10 @@
using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Controls.Documents; using Avalonia.Controls.Documents;
using Avalonia.Input.Platform;
using Avalonia.Layout; using Avalonia.Layout;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Threading;
using ClaudeDo.Ui.Localization;
namespace ClaudeDo.Ui.Views.Controls; namespace ClaudeDo.Ui.Views.Controls;
@@ -17,27 +13,12 @@ public partial class MarkdownView : UserControl
public static readonly StyledProperty<string?> MarkdownProperty = public static readonly StyledProperty<string?> MarkdownProperty =
AvaloniaProperty.Register<MarkdownView, string?>(nameof(Markdown)); AvaloniaProperty.Register<MarkdownView, string?>(nameof(Markdown));
/// <summary>
/// Renders a bullet that starts with inline code as a command row: the command as a
/// monospace chip with a copy button, the rest as a description below it, and a rule under
/// each <c>##</c> section. Opt-in — the prompt-file viewer and the weekly report render
/// prose where nearly every bullet carries inline code, and copy buttons there are noise.
/// </summary>
public static readonly StyledProperty<bool> CommandRowsProperty =
AvaloniaProperty.Register<MarkdownView, bool>(nameof(CommandRows));
public string? Markdown public string? Markdown
{ {
get => GetValue(MarkdownProperty); get => GetValue(MarkdownProperty);
set => SetValue(MarkdownProperty, value); set => SetValue(MarkdownProperty, value);
} }
public bool CommandRows
{
get => GetValue(CommandRowsProperty);
set => SetValue(CommandRowsProperty, value);
}
private StackPanel? _host; private StackPanel? _host;
public MarkdownView() public MarkdownView()
@@ -53,8 +34,6 @@ public partial class MarkdownView : UserControl
base.OnPropertyChanged(change); base.OnPropertyChanged(change);
if (change.Property == MarkdownProperty) if (change.Property == MarkdownProperty)
Render(change.GetNewValue<string?>()); Render(change.GetNewValue<string?>());
else if (change.Property == CommandRowsProperty)
Render(Markdown);
} }
private static readonly Regex NumberedItem = new(@"^\s*(\d+)\.\s+(.*)$", RegexOptions.Compiled); private static readonly Regex NumberedItem = new(@"^\s*(\d+)\.\s+(.*)$", RegexOptions.Compiled);
@@ -69,9 +48,6 @@ public partial class MarkdownView : UserControl
return; return;
var lines = md.Replace("\r\n", "\n").Split('\n'); var lines = md.Replace("\r\n", "\n").Split('\n');
// In CommandRows mode every "## " opens a collapsible section and blocks land inside it;
// otherwise this stays the host for the whole document.
var target = _host;
int i = 0; int i = 0;
while (i < lines.Length) while (i < lines.Length)
{ {
@@ -80,22 +56,19 @@ public partial class MarkdownView : UserControl
if (line.StartsWith("### ")) if (line.StartsWith("### "))
{ {
target.Children.Add(Heading(line[4..], 13)); _host.Children.Add(Heading(line[4..], 13));
i++; i++;
continue; continue;
} }
if (line.StartsWith("## ")) if (line.StartsWith("## "))
{ {
if (CommandRows) _host.Children.Add(Heading(line[3..], 15));
target = OpenSection(line[3..]);
else
target.Children.Add(Heading(line[3..], 15));
i++; i++;
continue; continue;
} }
if (line.StartsWith("# ")) if (line.StartsWith("# "))
{ {
target.Children.Add(Heading(line[2..], 17)); _host.Children.Add(Heading(line[2..], 17));
i++; i++;
continue; continue;
} }
@@ -104,10 +77,7 @@ public partial class MarkdownView : UserControl
{ {
while (i < lines.Length && (lines[i].StartsWith("- ") || lines[i].StartsWith("* "))) while (i < lines.Length && (lines[i].StartsWith("- ") || lines[i].StartsWith("* ")))
{ {
var item = lines[i][2..]; _host.Children.Add(Bullet(lines[i][2..]));
target.Children.Add(CommandRows && TrySplitCommand(item, out var cmd, out var desc)
? CommandRow(cmd, desc)
: Bullet(item));
i++; i++;
} }
continue; continue;
@@ -119,7 +89,7 @@ public partial class MarkdownView : UserControl
while (i < lines.Length && NumberedItem.IsMatch(lines[i])) while (i < lines.Length && NumberedItem.IsMatch(lines[i]))
{ {
var m = NumberedItem.Match(lines[i]); var m = NumberedItem.Match(lines[i]);
target.Children.Add(Numbered(m.Groups[1].Value, m.Groups[2].Value)); _host.Children.Add(Numbered(m.Groups[1].Value, m.Groups[2].Value));
i++; i++;
} }
continue; continue;
@@ -134,7 +104,7 @@ public partial class MarkdownView : UserControl
paragraph.Append(lines[i].Trim()); paragraph.Append(lines[i].Trim());
i++; i++;
} }
target.Children.Add(Paragraph(paragraph.ToString())); _host.Children.Add(Paragraph(paragraph.ToString()));
} }
} }
@@ -156,120 +126,6 @@ public partial class MarkdownView : UserControl
return tb; return tb;
} }
/// <summary>
/// Adds a collapsible section for a <c>##</c> heading and returns the panel its blocks go
/// into. Native <see cref="Expander"/> — it carries the chevron, keyboard toggle and
/// animation, and the app already uses it unstyled in the worktrees overview.
/// </summary>
private StackPanel OpenSection(string title)
{
var header = new TextBlock
{
FontSize = 15,
FontWeight = FontWeight.SemiBold,
TextWrapping = TextWrapping.Wrap,
};
AppendInlines(header.Inlines!, title);
var body = new StackPanel { Spacing = 6 };
_host!.Children.Add(new Expander
{
Header = header,
Content = body,
IsExpanded = true,
HorizontalAlignment = HorizontalAlignment.Stretch,
HorizontalContentAlignment = HorizontalAlignment.Stretch,
});
return body;
}
/// <summary>
/// Splits <c>`command` — description</c> into its two parts. False when the bullet doesn't
/// open with inline code, so prose bullets keep the plain renderer.
/// </summary>
internal static bool TrySplitCommand(string text, out string command, out string description)
{
command = "";
description = "";
if (text.Length < 3 || text[0] != '`') return false;
var close = text.IndexOf('`', 1);
if (close <= 1) return false;
command = text[1..close];
description = text[(close + 1)..].TrimStart(' ', '—', '–', '-', ':').Trim();
return true;
}
private Control CommandRow(string command, string description)
{
var grid = new Grid
{
ColumnDefinitions = new ColumnDefinitions("*,Auto"),
Margin = new Thickness(0, 2, 0, 2),
};
var text = new SelectableTextBlock { Text = command, TextWrapping = TextWrapping.Wrap };
// Bound, not resolved: Render can run while detached, where a resource lookup finds
// nothing and would freeze on the fallback.
text.Bind(TextBlock.FontFamilyProperty, this.GetResourceObservable("MonoFont"));
text.Bind(TextBlock.FontSizeProperty, this.GetResourceObservable("FontSizeMono"));
var chip = new Border
{
CornerRadius = new CornerRadius(4),
Padding = new Thickness(7, 4),
HorizontalAlignment = HorizontalAlignment.Left,
Child = text,
};
chip.Bind(Border.BackgroundProperty, this.GetResourceObservable("Surface2Brush"));
var stack = new StackPanel { Spacing = 3, Children = { chip } };
if (description.Length > 0)
{
var desc = new TextBlock
{
Classes = { "body" },
TextWrapping = TextWrapping.Wrap,
Margin = new Thickness(2, 0, 0, 0),
};
AppendInlines(desc.Inlines!, description);
stack.Children.Add(desc);
}
Grid.SetColumn(stack, 0);
grid.Children.Add(stack);
var copy = CopyButton(command);
Grid.SetColumn(copy, 1);
grid.Children.Add(copy);
return grid;
}
private Button CopyButton(string command)
{
var copyIcon = new PathIcon { Width = 11, Height = 11 };
copyIcon.Bind(PathIcon.DataProperty, this.GetResourceObservable("Icon.Copy"));
var checkIcon = new PathIcon { Width = 11, Height = 11 };
checkIcon.Bind(PathIcon.DataProperty, this.GetResourceObservable("Icon.Check"));
var button = new Button
{
Classes = { "icon-btn" },
Content = copyIcon,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(6, 0, 0, 0),
};
ToolTip.SetTip(button, Loc.T("controls.markdown.copy"));
button.Click += async (_, _) =>
{
if (TopLevel.GetTopLevel(this)?.Clipboard is not { } clipboard) return;
await clipboard.SetTextAsync(command);
// The clipboard gives no feedback of its own; a brief check mark is the confirmation.
button.Content = checkIcon;
DispatcherTimer.RunOnce(() => button.Content = copyIcon, TimeSpan.FromSeconds(1.5));
};
return button;
}
private static Control Paragraph(string text) private static Control Paragraph(string text)
{ {
var tb = new SelectableTextBlock { TextWrapping = TextWrapping.Wrap }; var tb = new SelectableTextBlock { TextWrapping = TextWrapping.Wrap };
@@ -14,21 +14,19 @@
Background="{DynamicResource DeepBrush}" Background="{DynamicResource DeepBrush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="0,0,0,1"> BorderThickness="0,0,0,1">
<Grid ColumnDefinitions="*,Auto,Auto,Auto" Margin="14,0"> <Grid ColumnDefinitions="*,Auto,Auto" Margin="14,0">
<TextBlock Text="{TemplateBinding Title}" <TextBlock Text="{TemplateBinding Title}"
FontFamily="{DynamicResource MonoFont}" FontFamily="{DynamicResource MonoFont}"
FontSize="{DynamicResource FontSizeMono}" FontSize="{DynamicResource FontSizeMono}"
LetterSpacing="1.4" LetterSpacing="1.4"
Foreground="{DynamicResource TextBrush}" Foreground="{DynamicResource TextBrush}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<ContentPresenter Grid.Column="1" Content="{TemplateBinding HeaderActions}" <Button Name="PART_MaxButton" Grid.Column="1" Classes="icon-btn"
VerticalAlignment="Center" Margin="0,0,8,0"/>
<Button Name="PART_MaxButton" Grid.Column="2" Classes="icon-btn"
IsVisible="{TemplateBinding ShowMaximizeButton}" IsVisible="{TemplateBinding ShowMaximizeButton}"
VerticalAlignment="Center"> VerticalAlignment="Center">
<PathIcon Name="PART_MaxIcon" Data="{StaticResource Icon.WinMax}" Width="10" Height="10"/> <PathIcon Name="PART_MaxIcon" Data="{StaticResource Icon.WinMax}" Width="10" Height="10"/>
</Button> </Button>
<Button Grid.Column="3" Classes="icon-btn" Content="✕" <Button Grid.Column="2" Classes="icon-btn" Content="✕"
FontSize="{DynamicResource FontSizeBody}" FontSize="{DynamicResource FontSizeBody}"
Command="{TemplateBinding CloseCommand}" Command="{TemplateBinding CloseCommand}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -17,11 +17,6 @@ public class ModalShell : ContentControl
public static readonly StyledProperty<object?> FooterProperty = public static readonly StyledProperty<object?> FooterProperty =
AvaloniaProperty.Register<ModalShell, object?>(nameof(Footer)); AvaloniaProperty.Register<ModalShell, object?>(nameof(Footer));
// Window-level actions rendered in the titlebar, left of maximise/close. Keeps a single
// always-visible action (e.g. the usage monitor's refresh) out of the body's vertical flow.
public static readonly StyledProperty<object?> HeaderActionsProperty =
AvaloniaProperty.Register<ModalShell, object?>(nameof(HeaderActions));
public static readonly StyledProperty<ICommand?> CloseCommandProperty = public static readonly StyledProperty<ICommand?> CloseCommandProperty =
AvaloniaProperty.Register<ModalShell, ICommand?>(nameof(CloseCommand)); AvaloniaProperty.Register<ModalShell, ICommand?>(nameof(CloseCommand));
@@ -32,7 +27,6 @@ public class ModalShell : ContentControl
public string? Title { get => GetValue(TitleProperty); set => SetValue(TitleProperty, value); } public string? Title { get => GetValue(TitleProperty); set => SetValue(TitleProperty, value); }
public object? Footer { get => GetValue(FooterProperty); set => SetValue(FooterProperty, value); } public object? Footer { get => GetValue(FooterProperty); set => SetValue(FooterProperty, value); }
public object? HeaderActions { get => GetValue(HeaderActionsProperty); set => SetValue(HeaderActionsProperty, value); }
public ICommand? CloseCommand { get => GetValue(CloseCommandProperty); set => SetValue(CloseCommandProperty, value); } public ICommand? CloseCommand { get => GetValue(CloseCommandProperty); set => SetValue(CloseCommandProperty, value); }
public bool ShowMaximizeButton { get => GetValue(ShowMaximizeButtonProperty); set => SetValue(ShowMaximizeButtonProperty, value); } public bool ShowMaximizeButton { get => GetValue(ShowMaximizeButtonProperty); set => SetValue(ShowMaximizeButtonProperty, value); }
@@ -4,8 +4,7 @@
xmlns:term="using:Iciclecreek.Terminal" xmlns:term="using:Iciclecreek.Terminal"
x:Class="ClaudeDo.Ui.Views.InteractiveTerminalView" x:Class="ClaudeDo.Ui.Views.InteractiveTerminalView"
x:DataType="vm:InteractiveTerminalViewModel" x:DataType="vm:InteractiveTerminalViewModel"
x:Name="Root" x:Name="Root">
DragDrop.AllowDrop="True">
<!-- <!--
Process="" suppresses TerminalView.OnLoaded's built-in auto-launch (it otherwise spawns its Process="" suppresses TerminalView.OnLoaded's built-in auto-launch (it otherwise spawns its
own cmd.exe/bash the moment this control loads). PtyTerminalSession sets Process/Args/ own cmd.exe/bash the moment this control loads). PtyTerminalSession sets Process/Args/
@@ -1,10 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
using ClaudeDo.Ui.ViewModels; using ClaudeDo.Ui.ViewModels;
namespace ClaudeDo.Ui.Views; namespace ClaudeDo.Ui.Views;
@@ -16,12 +12,6 @@ public partial class InteractiveTerminalView : UserControl
InitializeComponent(); InitializeComponent();
TerminalHost.Loaded += OnTerminalHostLoaded; TerminalHost.Loaded += OnTerminalHostLoaded;
DataContextChanged += OnDataContextChanged; DataContextChanged += OnDataContextChanged;
// Tunnel: TerminalControl handles KeyDown itself and forwards Ctrl+V to the child as a raw
// control byte, where nothing acts on it — paste has to be intercepted before it gets there.
AddHandler(KeyDownEvent, OnPreviewKeyDown, RoutingStrategies.Tunnel);
AddHandler(DragDrop.DragOverEvent, OnDragOver);
AddHandler(DragDrop.DropEvent, OnDrop);
} }
private void OnDataContextChanged(object? sender, EventArgs e) private void OnDataContextChanged(object? sender, EventArgs e)
@@ -35,56 +25,4 @@ public partial class InteractiveTerminalView : UserControl
if (DataContext is InteractiveTerminalViewModel vm) if (DataContext is InteractiveTerminalViewModel vm)
vm.AttachControl(TerminalHost); vm.AttachControl(TerminalHost);
} }
private void OnPreviewKeyDown(object? sender, KeyEventArgs e)
{
if (e.Key != Key.V || !e.KeyModifiers.HasFlag(KeyModifiers.Control) || e.KeyModifiers.HasFlag(KeyModifiers.Alt))
return;
if (DataContext is not InteractiveTerminalViewModel vm) return;
e.Handled = true;
_ = PasteAndReportAsync(vm);
}
private static async System.Threading.Tasks.Task PasteAndReportAsync(InteractiveTerminalViewModel vm)
{
if (!await vm.PasteAsync())
vm.ReportSendFailed();
}
private static bool IsFilesDrop(DragEventArgs e) => e.DataTransfer?.Contains(DataFormat.File) == true;
private void OnDragOver(object? sender, DragEventArgs e)
{
e.DragEffects = IsFilesDrop(e) ? DragDropEffects.Copy : DragDropEffects.None;
e.Handled = true;
}
// Dropping files types their paths into the session's composer (no Enter) — the common case is
// "look at this file", not "run something".
private void OnDrop(object? sender, DragEventArgs e)
{
if (DataContext is not InteractiveTerminalViewModel vm || !IsFilesDrop(e)) return;
e.Handled = true;
var text = FormatDroppedPaths(e.DataTransfer!.TryGetFiles()?.Select(i => i.TryGetLocalPath()));
if (text.Length > 0) _ = SendTextAndReportAsync(vm, text);
}
private static async System.Threading.Tasks.Task SendTextAndReportAsync(InteractiveTerminalViewModel vm, string text)
{
if (!await vm.SendTextAsync(text))
vm.ReportSendFailed();
}
/// <summary>Joins dropped file paths into one insertable chunk: quoted when they contain a
/// space, space-separated, with a trailing space so the user can keep typing.</summary>
internal static string FormatDroppedPaths(IEnumerable<string?>? paths)
{
var usable = (paths ?? Enumerable.Empty<string?>())
.Where(p => !string.IsNullOrWhiteSpace(p))
.Select(p => p!.Contains(' ') ? $"\"{p}\"" : p)
.ToList();
return usable.Count == 0 ? string.Empty : string.Join(" ", usable) + " ";
}
} }
@@ -88,8 +88,8 @@
ToolTip.Tip="{loc:Tr details.toggleEditPreviewTip}" ToolTip.Tip="{loc:Tr details.toggleEditPreviewTip}"
Command="{Binding ToggleEditDescriptionCommand}"> Command="{Binding ToggleEditDescriptionCommand}">
<Panel> <Panel>
<TextBlock Text="{loc:Tr details.stepsCard.preview}" IsVisible="{Binding IsEditingDescription}"/> <TextBlock Text="Preview" IsVisible="{Binding IsEditingDescription}"/>
<TextBlock Text="{loc:Tr details.stepsCard.edit}" IsVisible="{Binding !IsEditingDescription}"/> <TextBlock Text="Edit" IsVisible="{Binding !IsEditingDescription}"/>
</Panel> </Panel>
</Button> </Button>
@@ -123,7 +123,7 @@
<!-- Steps --> <!-- Steps -->
<StackPanel IsVisible="{Binding IsStepsSection}" Spacing="6"> <StackPanel IsVisible="{Binding IsStepsSection}" Spacing="6">
<TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}" <TextBox Text="{Binding NewSubtaskTitle, Mode=TwoWay}"
PlaceholderText="{loc:Tr details.stepsCard.addStepPlaceholder}" PlaceholderText="Add step…"
Padding="8" Padding="8"
Background="{DynamicResource Surface3Brush}" Background="{DynamicResource Surface3Brush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
@@ -41,14 +41,6 @@
</Viewbox> </Viewbox>
<TextBlock Classes="meta" Text="{Binding Task.Branch}"/> <TextBlock Classes="meta" Text="{Binding Task.Branch}"/>
</StackPanel> </StackPanel>
<!-- Dependency-wait line: this task is Queued but blocked on an unmet predecessor (a
task_dependencies edge, or the planning chain's BlockedByTaskId). -->
<StackPanel Orientation="Horizontal" Spacing="4" Margin="0,4,0,0"
IsVisible="{Binding Task.IsWaiting, FallbackValue=False}">
<TextBlock Classes="meta" Text="{loc:Tr details.waitingOnPrefix}"/>
<TextBlock Classes="meta" Text="{Binding Task.DependencyWaitLabel}"/>
</StackPanel>
</StackPanel> </StackPanel>
<!-- Column 1: trash button (not running) --> <!-- Column 1: trash button (not running) -->
@@ -172,12 +172,12 @@
TextWrapping="Wrap" VerticalAlignment="Center" /> TextWrapping="Wrap" VerticalAlignment="Center" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<Button Classes="btn accent" Content="{loc:Tr details.workConsole.continue}" <Button Classes="btn accent" Content="Continue"
Command="{Binding ContinueCommand}" Command="{Binding ContinueCommand}"
IsVisible="{Binding ShowContinue}" IsVisible="{Binding ShowContinue}"
ToolTip.Tip="{loc:Tr session.continueNoSessionTip}" ToolTip.Tip="{loc:Tr session.continueNoSessionTip}"
ToolTip.ShowOnDisabled="True" /> ToolTip.ShowOnDisabled="True" />
<Button Classes="btn" Content="{loc:Tr details.workConsole.resetAndRetry}" <Button Classes="btn" Content="Reset &amp; Retry"
Command="{Binding ResetAndRetryCommand}" Command="{Binding ResetAndRetryCommand}"
IsVisible="{Binding ShowResetAndRetry}" IsVisible="{Binding ShowResetAndRetry}"
ToolTip.Tip="{loc:Tr session.resetAndRetryInteractiveTip}" ToolTip.Tip="{loc:Tr session.resetAndRetryInteractiveTip}"
@@ -194,7 +194,7 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Button Classes="tab-btn" <Button Classes="tab-btn"
Classes.active="{Binding IsOutputTab}" Classes.active="{Binding IsOutputTab}"
Content="{loc:Tr details.workConsole.tabOutput}" Content="Output"
Command="{Binding SelectTabCommand}" Command="{Binding SelectTabCommand}"
CommandParameter="output" /> CommandParameter="output" />
<Button Classes="tab-btn" <Button Classes="tab-btn"
@@ -202,7 +202,7 @@
Command="{Binding SelectTabCommand}" Command="{Binding SelectTabCommand}"
CommandParameter="git"> CommandParameter="git">
<StackPanel Orientation="Horizontal" Spacing="6"> <StackPanel Orientation="Horizontal" Spacing="6">
<TextBlock Text="{loc:Tr details.workConsole.tabGit}" VerticalAlignment="Center" /> <TextBlock Text="Git" VerticalAlignment="Center" />
<!-- Review-pending dot: where to act when a task awaits review --> <!-- Review-pending dot: where to act when a task awaits review -->
<Ellipse Width="6" Height="6" VerticalAlignment="Center" <Ellipse Width="6" Height="6" VerticalAlignment="Center"
Fill="{DynamicResource AccentBrush}" Fill="{DynamicResource AccentBrush}"
@@ -211,7 +211,7 @@
</Button> </Button>
<Button Classes="tab-btn" <Button Classes="tab-btn"
Classes.active="{Binding IsSessionTab}" Classes.active="{Binding IsSessionTab}"
Content="{loc:Tr details.workConsole.tabSession}" Content="Session"
IsVisible="{Binding HasChildOutcomes}" IsVisible="{Binding HasChildOutcomes}"
Command="{Binding SelectTabCommand}" Command="{Binding SelectTabCommand}"
CommandParameter="session" /> CommandParameter="session" />
@@ -233,7 +233,7 @@
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="1" CornerRadius="8"> BorderThickness="1" CornerRadius="8">
<StackPanel Spacing="6"> <StackPanel Spacing="6">
<TextBlock Classes="section-label" Text="{loc:Tr details.workConsole.outcomeLabel}" /> <TextBlock Classes="section-label" Text="OUTCOME" />
<ScrollViewer MaxHeight="160" VerticalScrollBarVisibility="Auto"> <ScrollViewer MaxHeight="160" VerticalScrollBarVisibility="Auto">
<SelectableTextBlock Text="{Binding SessionOutcome}" <SelectableTextBlock Text="{Binding SessionOutcome}"
TextWrapping="Wrap" TextWrapping="Wrap"
@@ -309,9 +309,9 @@
<!-- Merge controls — shown whenever there's a worktree / unit to merge. <!-- Merge controls — shown whenever there's a worktree / unit to merge.
Header reads REVIEW while a decision is pending, otherwise MERGE. --> Header reads REVIEW while a decision is pending, otherwise MERGE. -->
<StackPanel Spacing="14" IsVisible="{Binding Merge.ShowMergeSection}"> <StackPanel Spacing="14" IsVisible="{Binding Merge.ShowMergeSection}">
<TextBlock Classes="section-label" Text="{loc:Tr details.workConsole.reviewLabel}" <TextBlock Classes="section-label" Text="REVIEW"
IsVisible="{Binding IsWaitingForReview}" /> IsVisible="{Binding IsWaitingForReview}" />
<TextBlock Classes="section-label" Text="{loc:Tr details.workConsole.mergeLabel}" <TextBlock Classes="section-label" Text="MERGE"
IsVisible="{Binding !IsWaitingForReview}" /> IsVisible="{Binding !IsWaitingForReview}" />
<!-- Change summary (review only) --> <!-- Change summary (review only) -->
@@ -323,7 +323,7 @@
<!-- Target branch + pre-flight mergeability --> <!-- Target branch + pre-flight mergeability -->
<StackPanel Spacing="4"> <StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="{loc:Tr details.workConsole.targetBranch}" /> <TextBlock Classes="field-label" Text="Target branch" />
<ComboBox ItemsSource="{Binding Merge.MergeTargetBranches}" <ComboBox ItemsSource="{Binding Merge.MergeTargetBranches}"
SelectedItem="{Binding Merge.SelectedMergeTarget, Mode=TwoWay}" SelectedItem="{Binding Merge.SelectedMergeTarget, Mode=TwoWay}"
HorizontalAlignment="Stretch" /> HorizontalAlignment="Stretch" />
@@ -344,7 +344,7 @@
<!-- Inspect: diff / worktree / combined diff --> <!-- Inspect: diff / worktree / combined diff -->
<WrapPanel Orientation="Horizontal"> <WrapPanel Orientation="Horizontal">
<Button Classes="btn" Content="{loc:Tr details.workConsole.openDiff}" Margin="0,0,8,8" <Button Classes="btn" Content="Open Diff" Margin="0,0,8,8"
ToolTip.Tip="{loc:Tr agent.openDiffTip}" ToolTip.Tip="{loc:Tr agent.openDiffTip}"
ToolTip.ShowOnDisabled="True" ToolTip.ShowOnDisabled="True"
Command="{Binding Merge.OpenDiffCommand}" /> Command="{Binding Merge.OpenDiffCommand}" />
@@ -353,11 +353,11 @@
ToolTip.ShowOnDisabled="True" ToolTip.ShowOnDisabled="True"
Command="{Binding Merge.OpenWorktreeCommand}"> Command="{Binding Merge.OpenWorktreeCommand}">
<StackPanel Orientation="Horizontal" Spacing="5"> <StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{loc:Tr details.workConsole.worktree}" /> <TextBlock Text="Worktree" />
<PathIcon Data="{StaticResource Icon.ArrowOut}" Width="11" Height="11" /> <PathIcon Data="{StaticResource Icon.ArrowOut}" Width="11" Height="11" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button Classes="btn" Content="{loc:Tr details.workConsole.reviewCombinedDiff}" Margin="0,0,8,8" <Button Classes="btn" Content="Review Combined Diff" Margin="0,0,8,8"
ToolTip.Tip="{loc:Tr agent.reviewCombinedDiffTip}" ToolTip.Tip="{loc:Tr agent.reviewCombinedDiffTip}"
ToolTip.ShowOnDisabled="True" ToolTip.ShowOnDisabled="True"
Command="{Binding Merge.ReviewCombinedDiffCommand}" /> Command="{Binding Merge.ReviewCombinedDiffCommand}" />
@@ -377,7 +377,7 @@
Foreground="{DynamicResource AmberBrush}" VerticalAlignment="Center" /> Foreground="{DynamicResource AmberBrush}" VerticalAlignment="Center" />
<TextBlock Classes="meta" VerticalAlignment="Center" <TextBlock Classes="meta" VerticalAlignment="Center"
Foreground="{DynamicResource AmberBrush}" Foreground="{DynamicResource AmberBrush}"
Text="{loc:Tr details.workConsole.openDiffHint}" /> Text="Open the diff to enable merge" />
</StackPanel> </StackPanel>
<TextBlock Classes="meta" Margin="17,0,0,0" <TextBlock Classes="meta" Margin="17,0,0,0"
Text="{loc:Tr session.approveMergesUnitHint}" /> Text="{loc:Tr session.approveMergesUnitHint}" />
@@ -396,23 +396,23 @@
<WrapPanel Orientation="Horizontal"> <WrapPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8"> <StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8">
<Button Classes="btn accent" Content="{loc:Tr details.workConsole.approveMerge}" <Button Classes="btn accent" Content="Approve &amp; Merge"
Command="{Binding ApproveReviewCommand}" /> Command="{Binding ApproveReviewCommand}" />
<controls:OperationIndicator Status="{Binding ApproveOp}" /> <controls:OperationIndicator Status="{Binding ApproveOp}" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8"> <StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}" Margin="0,0,8,8">
<Button Classes="btn" Content="{loc:Tr details.workConsole.park}" <Button Classes="btn" Content="Park"
ToolTip.Tip="{loc:Tr details.workConsole.parkTip}" ToolTip.Tip="Set aside — back to Idle, keeps the worktree"
Command="{Binding ParkReviewCommand}" /> Command="{Binding ParkReviewCommand}" />
<controls:OperationIndicator Status="{Binding ParkOp}" /> <controls:OperationIndicator Status="{Binding ParkOp}" />
</StackPanel> </StackPanel>
<Button Classes="btn" Content="{loc:Tr details.workConsole.cancel}" Margin="0,0,8,8" <Button Classes="btn" Content="Cancel" Margin="0,0,8,8"
ToolTip.Tip="{loc:Tr session.mergeDrainHint}" ToolTip.Tip="{loc:Tr session.mergeDrainHint}"
ToolTip.ShowOnDisabled="True" ToolTip.ShowOnDisabled="True"
Command="{Binding CancelReviewCommand}" /> Command="{Binding CancelReviewCommand}" />
</WrapPanel> </WrapPanel>
<Button Classes="prompt-action" Content="{loc:Tr details.workConsole.resetDiscardBranch}" <Button Classes="prompt-action" Content="Reset (discard branch)…"
ToolTip.Tip="{loc:Tr session.reviewResetTip}" ToolTip.Tip="{loc:Tr session.reviewResetTip}"
Command="{Binding ResetReviewCommand}" /> Command="{Binding ResetReviewCommand}" />
</StackPanel> </StackPanel>
@@ -434,9 +434,9 @@
<Border Height="1" Background="{DynamicResource LineBrush}" /> <Border Height="1" Background="{DynamicResource LineBrush}" />
<TextBlock Classes="meta" TextWrapping="Wrap" <TextBlock Classes="meta" TextWrapping="Wrap"
Foreground="{DynamicResource TextMuteBrush}" Foreground="{DynamicResource TextMuteBrush}"
Text="{loc:Tr details.workConsole.submitForReviewHint}" /> Text="Worked on this by hand? Submit the worktree for review to merge it." />
<StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}"> <StackPanel Orientation="Horizontal" Spacing="{StaticResource SpaceSm}">
<Button Classes="btn accent" Content="{loc:Tr details.workConsole.submitForReview}" HorizontalAlignment="Left" <Button Classes="btn accent" Content="Submit for review" HorizontalAlignment="Left"
Command="{Binding SubmitForReviewCommand}" /> Command="{Binding SubmitForReviewCommand}" />
<controls:OperationIndicator Status="{Binding SubmitOp}" /> <controls:OperationIndicator Status="{Binding SubmitOp}" />
</StackPanel> </StackPanel>
@@ -466,7 +466,7 @@
<!-- Child outcomes --> <!-- Child outcomes -->
<StackPanel Spacing="6" IsVisible="{Binding HasChildOutcomes}"> <StackPanel Spacing="6" IsVisible="{Binding HasChildOutcomes}">
<TextBlock Classes="section-label" Text="{loc:Tr details.workConsole.outcomesLabel}" /> <TextBlock Classes="section-label" Text="OUTCOMES" />
<ItemsControl ItemsSource="{Binding ChildOutcomes}"> <ItemsControl ItemsSource="{Binding ChildOutcomes}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:ChildOutcomeRowViewModel"> <DataTemplate x:DataType="vm:ChildOutcomeRowViewModel">
@@ -51,7 +51,7 @@
<PathIcon Data="{StaticResource Icon.Warning}" <PathIcon Data="{StaticResource Icon.Warning}"
Foreground="{DynamicResource StatusReviewBrush}" Foreground="{DynamicResource StatusReviewBrush}"
Width="14" Height="14" VerticalAlignment="Center"/> Width="14" Height="14" VerticalAlignment="Center"/>
<TextBlock Classes="section-label" Text="{loc:Tr details.roadblockLabel}" <TextBlock Classes="section-label" Text="ROADBLOCK"
Foreground="{DynamicResource StatusReviewBrush}" Foreground="{DynamicResource StatusReviewBrush}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
@@ -5,152 +5,6 @@
xmlns:loc="using:ClaudeDo.Ui.Localization" xmlns:loc="using:ClaudeDo.Ui.Localization"
x:Class="ClaudeDo.Ui.Views.Islands.ListsIslandView" x:Class="ClaudeDo.Ui.Views.Islands.ListsIslandView"
x:DataType="vm:ListsIslandViewModel"> x:DataType="vm:ListsIslandViewModel">
<!-- Implicit, type-matched templates: the sidebar's top level is one mixed ItemsControl over
TopLevel (folders and folder-less lists interleaved), and each folder's children resolve the
list template the same way. -->
<UserControl.DataTemplates>
<!-- One user-list row. Shared by the top level and by each folder's children, so the
row (context menu, drag handlers, drop indicators) exists once. -->
<DataTemplate DataType="vm:ListNavItemViewModel">
<Grid RowDefinitions="Auto,Auto,Auto">
<!-- Above-row drop indicator -->
<Border Grid.Row="0" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintAbove}"/>
<Border Grid.Row="1" Classes="list-item" Classes.active="{Binding IsActive}"
Classes.drop-target="{Binding IsTaskDropTarget}"
Tapped="OnItemTapped"
DragDrop.AllowDrop="True"
DragDrop.DragOver="OnListDragOver"
DragDrop.Drop="OnListDrop">
<Border.ContextMenu>
<ContextMenu>
<MenuItem Header="{loc:Tr lists.contextWorktrees}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenWorktreesOverviewCommand}"
CommandParameter="{Binding}"/>
<Separator IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<MenuItem Header="{loc:Tr lists.contextOpenExplorer}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInExplorerCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextOpenFindings}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenFindingsCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextOpenTerminal}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInTerminalCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextImportTickets}"
IsVisible="{Binding HasTicketProject}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).ImportTicketsCommand}"
CommandParameter="{Binding}"/>
<Separator/>
<MenuItem Header="{loc:Tr lists.contextRemoveFromFolder}"
IsVisible="{Binding FolderId, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).RemoveFromFolderCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextSettings}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenListSettingsCommand}"
CommandParameter="{Binding}"/>
</ContextMenu>
</Border.ContextMenu>
<Grid ColumnDefinitions="20,*,Auto">
<!-- Left accent bar for active state -->
<Border Grid.Column="0" Grid.ColumnSpan="3"
Background="Transparent"
CornerRadius="8" IsHitTestVisible="False"
IsVisible="{Binding IsActive}">
<Border Width="2" Height="16"
Background="{DynamicResource AccentBrush}"
CornerRadius="1"
HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="-8,0,0,0"/>
</Border>
<!-- Icon (list-settings → Icon tab; "Folder" when unset) -->
<PathIcon Grid.Column="0" Classes="list-icon"
Width="14" Height="14"
Data="{Binding IconKey, Converter={StaticResource IconKey}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<!-- Name -->
<TextBlock Grid.Column="1" Classes="list-label"
Text="{Binding Name}"
VerticalAlignment="Center" Margin="8,0"
Foreground="{DynamicResource TextDimBrush}" FontSize="{StaticResource FontSizeBody}"/>
<!-- Count -->
<TextBlock Grid.Column="2" Classes="list-count"
Text="{Binding Count}"/>
</Grid>
</Border>
<!-- Below-row drop indicator (last item only) -->
<Border Grid.Row="2" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintBelow}"/>
</Grid>
</DataTemplate>
<!-- One folder: header (never selectable — tapping folds it) plus its child lists. The two
drop indicators sit around the whole block, so "below this folder" doesn't draw a line
between the header and its children. -->
<DataTemplate DataType="vm:ListFolderNavItemViewModel">
<Grid RowDefinitions="Auto,Auto,Auto">
<Border Grid.Row="0" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintAbove}"/>
<StackPanel Grid.Row="1">
<Border Classes="list-item"
Classes.drop-target="{Binding IsDropTarget}"
Tapped="OnFolderTapped"
DragDrop.AllowDrop="True"
DragDrop.DragOver="OnFolderDragOver"
DragDrop.Drop="OnFolderDrop">
<Border.ContextMenu>
<ContextMenu>
<MenuItem Header="{loc:Tr lists.contextFolderSettings}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenFolderSettingsCommand}"
CommandParameter="{Binding}"/>
</ContextMenu>
</Border.ContextMenu>
<Grid ColumnDefinitions="12,20,*,Auto">
<PathIcon Grid.Column="0" Classes="list-icon"
Width="9" Height="9"
Data="{StaticResource Icon.ChevronRight}"
IsVisible="{Binding IsCollapsed}"
HorizontalAlignment="Left" VerticalAlignment="Center"/>
<PathIcon Grid.Column="0" Classes="list-icon"
Width="9" Height="9"
Data="{StaticResource Icon.ChevronDown}"
IsVisible="{Binding !IsCollapsed}"
HorizontalAlignment="Left" VerticalAlignment="Center"/>
<PathIcon Grid.Column="1" Classes="list-icon"
Width="14" Height="14"
Data="{Binding IconKey, Converter={StaticResource IconKey}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Grid.Column="2" Classes="list-label"
Text="{Binding Name}"
VerticalAlignment="Center" Margin="8,0"
Foreground="{DynamicResource TextDimBrush}" FontSize="{StaticResource FontSizeBody}"/>
<TextBlock Grid.Column="3" Classes="list-count"
Text="{Binding Count}"/>
</Grid>
</Border>
<ItemsControl ItemsSource="{Binding Lists}"
IsVisible="{Binding !IsCollapsed}"
Margin="14,0,0,0"/>
</StackPanel>
<Border Grid.Row="2" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintBelow}"/>
</Grid>
</DataTemplate>
</UserControl.DataTemplates>
<DockPanel LastChildFill="True"> <DockPanel LastChildFill="True">
<!-- ── Header ── --> <!-- ── Header ── -->
@@ -279,9 +133,86 @@
<PathIcon Data="{StaticResource Icon.Folder}" Width="14" Height="14"/> <PathIcon Data="{StaticResource Icon.Folder}" Width="14" Height="14"/>
</Button> </Button>
</Grid> </Grid>
<!-- Folders and folder-less lists in one sequence, so either can be dragged above the <ItemsControl ItemsSource="{Binding UserLists}">
other; each item picks its template from UserControl.DataTemplates by type. --> <ItemsControl.ItemTemplate>
<ItemsControl ItemsSource="{Binding TopLevel}"/> <DataTemplate DataType="vm:ListNavItemViewModel">
<Grid RowDefinitions="Auto,Auto,Auto">
<!-- Above-row drop indicator -->
<Border Grid.Row="0" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintAbove}"/>
<Border Grid.Row="1" Classes="list-item" Classes.active="{Binding IsActive}"
Classes.drop-target="{Binding IsTaskDropTarget}"
Tapped="OnItemTapped"
DragDrop.AllowDrop="True"
DragDrop.DragOver="OnListDragOver"
DragDrop.Drop="OnListDrop">
<Border.ContextMenu>
<ContextMenu>
<MenuItem Header="{loc:Tr lists.contextWorktrees}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenWorktreesOverviewCommand}"
CommandParameter="{Binding}"/>
<Separator IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<MenuItem Header="{loc:Tr lists.contextOpenExplorer}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInExplorerCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextOpenFindings}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenFindingsCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextOpenTerminal}"
IsVisible="{Binding WorkingDir, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenInTerminalCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="{loc:Tr lists.contextImportTickets}"
IsVisible="{Binding HasTicketProject}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).ImportTicketsCommand}"
CommandParameter="{Binding}"/>
<Separator/>
<MenuItem Header="{loc:Tr lists.contextSettings}"
Command="{Binding $parent[UserControl].((vm:ListsIslandViewModel)DataContext).OpenListSettingsCommand}"
CommandParameter="{Binding}"/>
</ContextMenu>
</Border.ContextMenu>
<Grid ColumnDefinitions="20,*,Auto">
<!-- Left accent bar for active state -->
<Border Grid.Column="0" Grid.ColumnSpan="3"
Background="Transparent"
CornerRadius="8" IsHitTestVisible="False"
IsVisible="{Binding IsActive}">
<Border Width="2" Height="16"
Background="{DynamicResource AccentBrush}"
CornerRadius="1"
HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="-8,0,0,0"/>
</Border>
<!-- Icon (list-settings → Icon tab; "Folder" when unset) -->
<PathIcon Grid.Column="0" Classes="list-icon"
Width="14" Height="14"
Data="{Binding IconKey, Converter={StaticResource IconKey}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<!-- Name -->
<TextBlock Grid.Column="1" Classes="list-label"
Text="{Binding Name}"
VerticalAlignment="Center" Margin="8,0"
Foreground="{DynamicResource TextDimBrush}" FontSize="{StaticResource FontSizeBody}"/>
<!-- Count -->
<TextBlock Grid.Column="2" Classes="list-count"
Text="{Binding Count}"/>
</Grid>
</Border>
<!-- Below-row drop indicator (last item only) -->
<Border Grid.Row="2" Height="2" VerticalAlignment="Center" Margin="4,0"
Background="{DynamicResource MossBrush}" CornerRadius="1"
IsVisible="{Binding DropHintBelow}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
@@ -17,28 +17,11 @@ public partial class ListsIslandView : UserControl
{ {
private static readonly DataFormat<string> ListRowFormat = private static readonly DataFormat<string> ListRowFormat =
DataFormat.CreateStringApplicationFormat("claudedo-list-row"); DataFormat.CreateStringApplicationFormat("claudedo-list-row");
private static readonly DataFormat<string> FolderRowFormat =
DataFormat.CreateStringApplicationFormat("claudedo-folder-row");
// A folder drag only starts once the pointer has moved: DoDragDropAsync captures the pointer,
// and starting it on press would swallow the Tapped that folds the folder. It only takes the
// *pressed* args, so the press is kept around until the threshold is crossed.
private ListFolderNavItemViewModel? _pendingFolderDrag;
private PointerPressedEventArgs? _pendingFolderDragPress;
private Point _folderDragOrigin;
private void CancelPendingFolderDrag()
{
_pendingFolderDrag = null;
_pendingFolderDragPress = null;
}
public ListsIslandView() public ListsIslandView()
{ {
InitializeComponent(); InitializeComponent();
AddHandler(PointerPressedEvent, OnTunnelPointerPressed, RoutingStrategies.Tunnel); AddHandler(PointerPressedEvent, OnTunnelPointerPressed, RoutingStrategies.Tunnel);
AddHandler(PointerMovedEvent, OnTunnelPointerMoved, RoutingStrategies.Tunnel);
AddHandler(PointerReleasedEvent, (_, _) => CancelPendingFolderDrag(), RoutingStrategies.Tunnel);
DataContextChanged += (_, _) => DataContextChanged += (_, _) =>
{ {
if (DataContext is ListsIslandViewModel vm) if (DataContext is ListsIslandViewModel vm)
@@ -59,19 +42,9 @@ public partial class ListsIslandView : UserControl
if (e.Source is not Visual src) return; if (e.Source is not Visual src) return;
var border = FindListItemBorder(src); var border = FindListItemBorder(src);
if (border is null) return; if (border?.DataContext is not ListNavItemViewModel row || row.Kind != ListKind.User) return;
if (!e.GetCurrentPoint(border).Properties.IsLeftButtonPressed) return; if (!e.GetCurrentPoint(border).Properties.IsLeftButtonPressed) return;
if (border.DataContext is ListFolderNavItemViewModel folder)
{
_pendingFolderDrag = folder;
_pendingFolderDragPress = e;
_folderDragOrigin = e.GetPosition(this);
return;
}
if (border.DataContext is not ListNavItemViewModel row || row.Kind != ListKind.User) return;
// Double-click opens the list's settings instead of starting a drag. Handled here // Double-click opens the list's settings instead of starting a drag. Handled here
// because DoDragDropAsync captures the pointer and would swallow a DoubleTapped event. // because DoDragDropAsync captures the pointer and would swallow a DoubleTapped event.
if (e.ClickCount == 2) if (e.ClickCount == 2)
@@ -96,149 +69,50 @@ public partial class ListsIslandView : UserControl
} }
} }
private async void OnTunnelPointerMoved(object? sender, PointerEventArgs e)
{
if (_pendingFolderDrag is not { } folder || _pendingFolderDragPress is not { } press) return;
if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) { CancelPendingFolderDrag(); return; }
var delta = e.GetPosition(this) - _folderDragOrigin;
if (Math.Abs(delta.X) < 4 && Math.Abs(delta.Y) < 4) return;
CancelPendingFolderDrag();
if (DataContext is not ListsIslandViewModel vm) return;
var data = new DataTransfer();
data.Add(DataTransferItem.Create(FolderRowFormat, folder.Id));
try
{
await DragDrop.DoDragDropAsync(press, data, DragDropEffects.Move);
}
finally
{
vm.ClearDropHints();
}
}
private void OnFolderTapped(object? sender, RoutedEventArgs e)
{
if (sender is Border { DataContext: ListFolderNavItemViewModel folder }
&& DataContext is ListsIslandViewModel vm)
vm.ToggleFolderCommand.Execute(folder);
}
/// <summary>The dragged row or folder, resolved from whichever of the two formats is present.</summary>
private static object? DragSource(ListsIslandViewModel vm, DragEventArgs e)
{
if (e.DataTransfer is not { } data) return null;
if (data.Contains(ListRowFormat))
return data.TryGetValue(ListRowFormat) is { } listId
? vm.UserLists.FirstOrDefault(r => r.Id == listId) : null;
if (data.Contains(FolderRowFormat))
return data.TryGetValue(FolderRowFormat) is { } folderId
? vm.Folders.FirstOrDefault(f => f.Id == folderId) : null;
return null;
}
private enum FolderDrop { None, Into, Beside }
/// <summary>
/// What a drop on a folder header means. For a list the middle half moves it *into* the folder
/// (the only route into a collapsed or empty one) while the outer quarters insert next to the
/// folder at the top level; a folder source has no "into" — folders never nest — so it splits
/// in half.
/// </summary>
private static (FolderDrop Kind, bool PlaceBelow) ClassifyFolderDrop(
object source, ListFolderNavItemViewModel folder, double y, double height)
{
if (source is ListFolderNavItemViewModel dragged)
return ReferenceEquals(dragged, folder)
? (FolderDrop.None, false)
: (FolderDrop.Beside, y > height / 2);
if (source is not ListNavItemViewModel row) return (FolderDrop.None, false);
if (y < height * 0.25) return (FolderDrop.Beside, false);
if (y > height * 0.75) return (FolderDrop.Beside, true);
return row.FolderId == folder.Id ? (FolderDrop.None, false) : (FolderDrop.Into, false);
}
private void OnFolderDragOver(object? sender, DragEventArgs e)
{
if (DataContext is not ListsIslandViewModel vm) { e.DragEffects = DragDropEffects.None; return; }
if (sender is not Border b || b.DataContext is not ListFolderNavItemViewModel folder)
{
Reject(vm, e);
return;
}
var source = DragSource(vm, e);
if (source is null) { Reject(vm, e); return; }
var (kind, placeBelow) = ClassifyFolderDrop(source, folder, e.GetPosition(b).Y, b.Bounds.Height);
switch (kind)
{
case FolderDrop.Into:
vm.SetFolderDropTarget(folder);
e.DragEffects = DragDropEffects.Move;
break;
case FolderDrop.Beside:
vm.SetDropHint(folder, placeBelow);
e.DragEffects = DragDropEffects.Move;
break;
default:
Reject(vm, e);
break;
}
}
private async void OnFolderDrop(object? sender, DragEventArgs e)
{
if (DataContext is not ListsIslandViewModel vm) return;
try
{
if (sender is not Border b || b.DataContext is not ListFolderNavItemViewModel folder) return;
var source = DragSource(vm, e);
if (source is null) return;
var (kind, placeBelow) = ClassifyFolderDrop(source, folder, e.GetPosition(b).Y, b.Bounds.Height);
vm.ClearDropHints();
if (kind == FolderDrop.Into && source is ListNavItemViewModel row)
await vm.MoveToFolderAsync(row, folder);
else if (kind == FolderDrop.Beside)
await vm.DropAsync(source, folder, placeBelow);
}
catch
{
vm.ClearDropHints();
throw;
}
}
private void OnListDragOver(object? sender, DragEventArgs e) private void OnListDragOver(object? sender, DragEventArgs e)
{ {
if (DataContext is not ListsIslandViewModel vm) { e.DragEffects = DragDropEffects.None; return; } if (DataContext is not ListsIslandViewModel vm) { e.DragEffects = DragDropEffects.None; return; }
if (!e.DataTransfer?.Contains(ListRowFormat) ?? true)
{
e.DragEffects = DragDropEffects.None;
vm.ClearDropHints();
return;
}
if (sender is not Border b || b.DataContext is not ListNavItemViewModel target || target.Kind != ListKind.User) if (sender is not Border b || b.DataContext is not ListNavItemViewModel target || target.Kind != ListKind.User)
{ {
Reject(vm, e); e.DragEffects = DragDropEffects.None;
vm.ClearDropHints();
return; return;
} }
var source = DragSource(vm, e); var sourceId = e.DataTransfer?.TryGetValue(ListRowFormat);
if (source is null || ReferenceEquals(source, target)) { Reject(vm, e); return; } if (string.IsNullOrEmpty(sourceId) || sourceId == target.Id)
// A folder can only be dropped at the top level, so a row inside a folder is no target.
if (source is ListFolderNavItemViewModel && target.FolderId is not null) { Reject(vm, e); return; }
// Canonicalize: "drop below X" == "drop above X+1". Only the last row shows a below-line.
object hintTarget = target;
var hintBelow = false;
if (e.GetPosition(b).Y > b.Bounds.Height / 2)
{ {
if (FindNextInContainer(vm, target) is { } next) hintTarget = next; e.DragEffects = DragDropEffects.None;
else hintBelow = true; vm.ClearDropHints();
return;
} }
if (ReferenceEquals(hintTarget, source)) { Reject(vm, e); return; } var placeBelow = e.GetPosition(b).Y > b.Bounds.Height / 2;
vm.SetDropHint(hintTarget, hintBelow); // Canonicalize: "drop below X" == "drop above X+1". Only the last row shows a below-line.
ListNavItemViewModel hintRow = target;
bool hintBelow = false;
if (placeBelow)
{
var next = FindNextUserList(vm, target);
if (next is not null) { hintRow = next; hintBelow = false; }
else { hintRow = target; hintBelow = true; }
}
if (hintRow.Id == sourceId)
{
e.DragEffects = DragDropEffects.None;
vm.ClearDropHints();
return;
}
vm.SetDropHint(hintRow, hintBelow);
e.DragEffects = DragDropEffects.Move; e.DragEffects = DragDropEffects.Move;
} }
@@ -249,13 +123,15 @@ public partial class ListsIslandView : UserControl
{ {
if (sender is not Border b || b.DataContext is not ListNavItemViewModel target || target.Kind != ListKind.User) return; if (sender is not Border b || b.DataContext is not ListNavItemViewModel target || target.Kind != ListKind.User) return;
var source = DragSource(vm, e); var sourceId = e.DataTransfer?.TryGetValue(ListRowFormat);
if (source is null || ReferenceEquals(source, target)) return; if (string.IsNullOrEmpty(sourceId) || sourceId == target.Id) return;
if (source is ListFolderNavItemViewModel && target.FolderId is not null) return;
var source = vm.UserLists.FirstOrDefault(r => r.Id == sourceId);
if (source is null) return;
var placeBelow = e.GetPosition(b).Y > b.Bounds.Height / 2; var placeBelow = e.GetPosition(b).Y > b.Bounds.Height / 2;
vm.ClearDropHints(); vm.ClearDropHints();
await vm.DropAsync(source, target, placeBelow); await vm.ReorderAsync(source, target, placeBelow);
} }
catch catch
{ {
@@ -264,12 +140,6 @@ public partial class ListsIslandView : UserControl
} }
} }
private static void Reject(ListsIslandViewModel vm, DragEventArgs e)
{
e.DragEffects = DragDropEffects.None;
vm.ClearDropHints();
}
private static Border? FindListItemBorder(Visual? v) private static Border? FindListItemBorder(Visual? v)
{ {
while (v is not null) while (v is not null)
@@ -280,15 +150,11 @@ public partial class ListsIslandView : UserControl
return null; return null;
} }
// Next item *within the same container* — the row below the last list of a folder belongs to private static ListNavItemViewModel? FindNextUserList(ListsIslandViewModel vm, ListNavItemViewModel row)
// another container, so it is not a "drop above" candidate here. At the top level the next
// item can be a folder, which is a valid hint target.
private static object? FindNextInContainer(ListsIslandViewModel vm, ListNavItemViewModel row)
{ {
var container = vm.ContainerOf(row); var idx = vm.UserLists.IndexOf(row);
var idx = container.IndexOf(row);
if (idx < 0) return null; if (idx < 0) return null;
return idx + 1 < container.Count ? container[idx + 1] : null; return idx + 1 < vm.UserLists.Count ? vm.UserLists[idx + 1] : null;
} }
} }
@@ -142,8 +142,7 @@
Classes.children="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=WaitingForChildren}" Classes.children="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=WaitingForChildren}"
Classes.done="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Done}" Classes.done="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Done}"
Classes.error="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Failed}" Classes.error="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Failed}"
Classes.queued="{Binding IsQueued}" Classes.queued="{Binding Status, Converter={StaticResource EqStatus}, ConverterParameter=Queued}">
Classes.waiting="{Binding IsWaiting}">
<TextBlock Text="{Binding StatusLabel}"/> <TextBlock Text="{Binding StatusLabel}"/>
</Border> </Border>
+2 -21
View File
@@ -64,13 +64,10 @@
Foreground="{DynamicResource TextDimBrush}"> Foreground="{DynamicResource TextDimBrush}">
<MenuItem Header="{loc:Tr shell.menu.restartWorker}" <MenuItem Header="{loc:Tr shell.menu.restartWorker}"
Command="{Binding RestartWorkerCommand}"/> Command="{Binding RestartWorkerCommand}"/>
<MenuItem Header="{loc:Tr shell.menu.checkForUpdates}"
Command="{Binding CheckForUpdatesCommand}"/>
<MenuItem Header="{loc:Tr shell.menu.usageMonitor}" <MenuItem Header="{loc:Tr shell.menu.usageMonitor}"
Command="{Binding OpenUsageMonitorCommand}"/> Command="{Binding OpenUsageMonitorCommand}"/>
<MenuItem Header="{loc:Tr shell.menu.updateClaudeCli}"
Command="{Binding UpdateClaudeCliCommand}"/>
<Separator/>
<MenuItem Header="{loc:Tr shell.menu.shutdown}"
Command="{Binding ShutdownCommand}"/>
</MenuItem> </MenuItem>
<MenuItem Header="{loc:Tr shell.menu.repositories}" <MenuItem Header="{loc:Tr shell.menu.repositories}"
FontSize="{StaticResource FontSizeMono}" FontSize="{StaticResource FontSizeMono}"
@@ -82,23 +79,7 @@
<MenuItem Header="{loc:Tr shell.menu.help}" <MenuItem Header="{loc:Tr shell.menu.help}"
FontSize="{StaticResource FontSizeMono}" FontSize="{StaticResource FontSizeMono}"
Foreground="{DynamicResource TextDimBrush}"> Foreground="{DynamicResource TextDimBrush}">
<MenuItem Header="{loc:Tr shell.menu.checkForUpdates}"
Command="{Binding CheckForUpdatesCommand}"/>
<MenuItem Header="{loc:Tr shell.menu.weeklyReport}" Command="{Binding OpenWeeklyReportCommand}"/> <MenuItem Header="{loc:Tr shell.menu.weeklyReport}" Command="{Binding OpenWeeklyReportCommand}"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheets}">
<MenuItem Header="{loc:Tr shell.menu.cheatSheetGit}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="git"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheetCommits}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="conventional-commits"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheetClaude}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="claude-cli"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheetClaudeConfig}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="claude-config"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheetDotnet}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="dotnet-cli"/>
<MenuItem Header="{loc:Tr shell.menu.cheatSheetPowershell}"
Command="{Binding OpenCheatSheetCommand}" CommandParameter="powershell"/>
</MenuItem>
<MenuItem Header="{loc:Tr shell.menu.about}" Command="{Binding OpenAboutCommand}"/> <MenuItem Header="{loc:Tr shell.menu.about}" Command="{Binding OpenAboutCommand}"/>
</MenuItem> </MenuItem>
</Menu> </Menu>
@@ -80,11 +80,6 @@ public partial class MainWindow : Window
WindowState = WindowState.Normal; WindowState = WindowState.Normal;
Activate(); Activate();
}; };
vm.CloseWindow = () =>
{
_forceClose = true;
Close();
};
if (vm.Tasks is not null) if (vm.Tasks is not null)
vm.Tasks.IsWindowVisible = WindowState != WindowState.Minimized; vm.Tasks.IsWindowVisible = WindowState != WindowState.Minimized;
} }
@@ -14,7 +14,7 @@
Background="{DynamicResource Surface2Brush}" Background="{DynamicResource Surface2Brush}"
BorderBrush="{DynamicResource LineBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="0,0,0,1" Padding="8,3"> BorderThickness="0,0,0,1" Padding="8,3">
<Grid ColumnDefinitions="*,Auto,Auto,Auto"> <Grid ColumnDefinitions="*,Auto,Auto">
<TextBlock Grid.Column="0" Classes="meta" Text="{Binding DisplayTitle}" <TextBlock Grid.Column="0" Classes="meta" Text="{Binding DisplayTitle}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
ToolTip.Tip="{Binding DisplayTitle}" ToolTip.Tip="{Binding DisplayTitle}"
@@ -25,12 +25,7 @@
Content="{loc:Tr missionControl.submitForReview}" Content="{loc:Tr missionControl.submitForReview}"
ToolTip.Tip="{loc:Tr missionControl.submitForReviewTip}" ToolTip.Tip="{loc:Tr missionControl.submitForReviewTip}"
Command="{Binding SubmitForReviewCommand}" /> Command="{Binding SubmitForReviewCommand}" />
<Button Grid.Column="2" Classes="btn" Margin="0,0,6,0" <Button Grid.Column="2" Classes="title-ctrl"
IsVisible="{Binding IsListHandler}"
Content="{loc:Tr missionControl.abandonRun}"
ToolTip.Tip="{loc:Tr missionControl.abandonRunTip}"
Command="{Binding AbandonRunCommand}" />
<Button Grid.Column="3" Classes="title-ctrl"
Command="{Binding CloseCommand}" Command="{Binding CloseCommand}"
ToolTip.Tip="{loc:Tr missionControl.closeSession}"> ToolTip.Tip="{loc:Tr missionControl.closeSession}">
<PathIcon Data="{StaticResource Icon.WinClose}" Width="12" Height="12"/> <PathIcon Data="{StaticResource Icon.WinClose}" Width="12" Height="12"/>
@@ -55,27 +50,6 @@
</Grid> </Grid>
</Border> </Border>
<!-- Session-ended banner: process died without a start-failure already covering it -->
<Border DockPanel.Dock="Top"
IsVisible="{Binding Terminal.HasExitedAfterStartup}"
Background="{DynamicResource ErrorTintBrush}"
BorderBrush="{DynamicResource BloodBrush}"
BorderThickness="0,0,0,1" Padding="12,6">
<Grid ColumnDefinitions="*,Auto,Auto">
<TextBlock Grid.Column="0" Classes="meta" Text="{Binding ExitedBannerText}"
Foreground="{DynamicResource BloodBrush}"
TextWrapping="Wrap" VerticalAlignment="Center" />
<Button Grid.Column="1" Classes="btn" Margin="12,0,0,0"
Content="{loc:Tr missionControl.retry}"
ToolTip.Tip="{loc:Tr missionControl.retryTip}"
Command="{Binding RetryCommand}" />
<Button Grid.Column="2" Classes="btn" Margin="12,0,0,0"
Content="{loc:Tr missionControl.closeSession}"
ToolTip.Tip="{loc:Tr missionControl.closeSession}"
Command="{Binding CloseCommand}" />
</Grid>
</Border>
<!-- Embedded ConPTY terminal, with a starting overlay until the session is spawned --> <!-- Embedded ConPTY terminal, with a starting overlay until the session is spawned -->
<Panel> <Panel>
<views:InteractiveTerminalView DataContext="{Binding Terminal}" /> <views:InteractiveTerminalView DataContext="{Binding Terminal}" />
@@ -2,7 +2,6 @@ using System;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Layout; using Avalonia.Layout;
using Avalonia.Media; using Avalonia.Media;
@@ -56,7 +55,6 @@ public partial class MissionControlView : UserControl
_vm.Panes.CollectionChanged -= OnPanesChanged; _vm.Panes.CollectionChanged -= OnPanesChanged;
_vm.PropertyChanged -= OnViewModelPropertyChanged; _vm.PropertyChanged -= OnViewModelPropertyChanged;
_vm.BrowseForSessionRequested = null; _vm.BrowseForSessionRequested = null;
_vm.ConfirmAsync = null;
} }
_vm = DataContext as MissionControlViewModel; _vm = DataContext as MissionControlViewModel;
@@ -66,59 +64,12 @@ public partial class MissionControlView : UserControl
_vm.Panes.CollectionChanged += OnPanesChanged; _vm.Panes.CollectionChanged += OnPanesChanged;
_vm.PropertyChanged += OnViewModelPropertyChanged; _vm.PropertyChanged += OnViewModelPropertyChanged;
_vm.BrowseForSessionRequested = BrowseForSessionAsync; _vm.BrowseForSessionRequested = BrowseForSessionAsync;
_vm.ConfirmAsync = ShowConfirmAsync;
} }
RebuildOverviewGrid(); RebuildOverviewGrid();
UpdateQueueColumn(); UpdateQueueColumn();
} }
// Abandon-run confirmation -- same TaskCompletionSource-backed plain Window as
// TasksIslandView.ShowConfirmAsync (no shared control for this shape yet).
private async Task<bool> ShowConfirmAsync(string message)
{
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return false;
var tcs = new TaskCompletionSource<bool>();
var cancel = new Button { Content = "Cancel", MinWidth = 90 };
var confirm = new Button { Content = "Confirm", MinWidth = 90, Classes = { "danger" } };
var dialog = new Window
{
Title = "Confirm",
Width = 380,
SizeToContent = SizeToContent.Height,
CanResize = false,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
ShowInTaskbar = false,
Background = this.FindResource("SurfaceBrush") as IBrush,
Content = new StackPanel
{
Margin = new Thickness(20),
Spacing = 16,
Children =
{
new TextBlock { Text = message, TextWrapping = TextWrapping.Wrap },
new StackPanel
{
Orientation = Orientation.Horizontal,
HorizontalAlignment = HorizontalAlignment.Right,
Spacing = 8,
Children = { cancel, confirm },
},
},
},
};
cancel.Click += (_, _) => { tcs.TrySetResult(false); dialog.Close(); };
confirm.Click += (_, _) => { tcs.TrySetResult(true); dialog.Close(); };
dialog.Closed += (_, _) => tcs.TrySetResult(false);
_ = dialog.ShowDialog(owner);
return await tcs.Task;
}
private void OnPanesChanged(object? sender, NotifyCollectionChangedEventArgs e) => RebuildOverviewGrid(); private void OnPanesChanged(object? sender, NotifyCollectionChangedEventArgs e) => RebuildOverviewGrid();
private void OnViewModelPropertyChanged(object? sender, PropertyChangedEventArgs e) private void OnViewModelPropertyChanged(object? sender, PropertyChangedEventArgs e)
@@ -17,8 +17,8 @@
<ctl:ModalShell Title="{loc:Tr modals.about.title}" CloseCommand="{Binding CloseCommand}"> <ctl:ModalShell Title="{loc:Tr modals.about.title}" CloseCommand="{Binding CloseCommand}">
<!-- Body --> <!-- Body -->
<ScrollViewer HorizontalScrollBarVisibility="Disabled"> <ScrollViewer Padding="20,16" HorizontalScrollBarVisibility="Disabled">
<Grid Margin="20,16" RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="10" ColumnSpacing="8"> <Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="10" ColumnSpacing="8">
<TextBlock Classes="meta" Grid.Row="0" Grid.Column="0" Text="{loc:Tr modals.about.version}" VerticalAlignment="Center"/> <TextBlock Classes="meta" Grid.Row="0" Grid.Column="0" Text="{loc:Tr modals.about.version}" VerticalAlignment="Center"/>
<TextBlock Classes="meta" Grid.Row="0" Grid.Column="1" Text="{Binding AppVersion}" VerticalAlignment="Center"/> <TextBlock Classes="meta" Grid.Row="0" Grid.Column="1" Text="{Binding AppVersion}" VerticalAlignment="Center"/>
<TextBlock Classes="meta" Grid.Row="1" Grid.Column="0" Text="{loc:Tr modals.about.data}" VerticalAlignment="Center"/> <TextBlock Classes="meta" Grid.Row="1" Grid.Column="0" Text="{loc:Tr modals.about.data}" VerticalAlignment="Center"/>
@@ -1,45 +0,0 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Modals"
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
xmlns:loc="using:ClaudeDo.Ui.Localization"
x:Class="ClaudeDo.Ui.Views.Modals.CheatSheetsWindow"
x:DataType="vm:CheatSheetsViewModel"
Title="{loc:Tr modals.cheatSheets.windowTitle}"
Width="480" Height="820" MinWidth="320" MinHeight="300"
CanResize="True"
Topmost="{Binding IsPinned}"
WindowDecorations="BorderOnly"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaTitleBarHeightHint="-1"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource SurfaceBrush}">
<Window.KeyBindings>
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
</Window.KeyBindings>
<ctl:ModalShell Title="{loc:Tr modals.cheatSheets.title}" CloseCommand="{Binding CloseCommand}">
<DockPanel>
<!-- Sheet picker + pin. Pin keeps the window above the shell while it sits at a screen edge. -->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8" Margin="16,10,16,0">
<ComboBox ItemsSource="{Binding Sheets}"
SelectedItem="{Binding SelectedSheet}"
DisplayMemberBinding="{Binding Title}"
MinWidth="180"
VerticalAlignment="Center"/>
<ToggleButton Content="{loc:Tr modals.cheatSheets.pin}"
IsChecked="{Binding IsPinned}"
VerticalAlignment="Center"
ToolTip.Tip="{loc:Tr modals.cheatSheets.pinTooltip}"/>
</StackPanel>
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
<!-- Inset on the content, not the ScrollViewer: Avalonia 12 leaves ScrollViewer.Padding
out of the Extent, which clips the last lines at max scroll. -->
<ctl:MarkdownView Markdown="{Binding SelectedSheet.Body}" CommandRows="True"
Margin="16,12,16,16"/>
</ScrollViewer>
</DockPanel>
</ctl:ModalShell>
</Window>
@@ -1,10 +0,0 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace ClaudeDo.Ui.Views.Modals;
public partial class CheatSheetsWindow : Window
{
public CheatSheetsWindow() => InitializeComponent();
private void InitializeComponent() => AvaloniaXamlLoader.Load(this);
}
@@ -20,10 +20,10 @@
<KeyBinding Gesture="Enter" Command="{Binding SaveCommand}"/> <KeyBinding Gesture="Enter" Command="{Binding SaveCommand}"/>
</Window.KeyBindings> </Window.KeyBindings>
<ctl:ModalShell Title="{Binding HeaderTitle}" CloseCommand="{Binding CancelCommand}"> <ctl:ModalShell Title="{loc:Tr modals.listSettings.title}" CloseCommand="{Binding CancelCommand}">
<ctl:ModalShell.Footer> <ctl:ModalShell.Footer>
<Grid ColumnDefinitions="Auto,*,Auto" VerticalAlignment="Center"> <Grid ColumnDefinitions="Auto,*,Auto" VerticalAlignment="Center">
<Button Grid.Column="0" Content="{Binding DeleteLabel}" Classes="danger" <Button Grid.Column="0" Content="{loc:Tr modals.listSettings.deleteList}" Classes="danger"
Command="{Binding DeleteCommand}" MinWidth="90"/> Command="{Binding DeleteCommand}" MinWidth="90"/>
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="8"> <StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="8">
<Button Classes="btn" Content="{loc:Tr settings.cancel}" Command="{Binding CancelCommand}" MinWidth="90"/> <Button Classes="btn" Content="{loc:Tr settings.cancel}" Command="{Binding CancelCommand}" MinWidth="90"/>
@@ -40,12 +40,8 @@
VerticalAlignment="Top"> VerticalAlignment="Top">
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionGeneral}"/> <ListBoxItem Content="{loc:Tr modals.listSettings.sectionGeneral}"/>
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionIcon}"/> <ListBoxItem Content="{loc:Tr modals.listSettings.sectionIcon}"/>
<!-- A folder runs nothing, so it has neither agent config nor a verify command. The <ListBoxItem Content="{loc:Tr modals.listSettings.sectionAgent}"/>
TabItems stay in place (index-driven host) and just become unreachable. --> <ListBoxItem Content="{loc:Tr modals.listSettings.sectionVerify}"/>
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionAgent}"
IsVisible="{Binding !IsFolder}"/>
<ListBoxItem Content="{loc:Tr modals.listSettings.sectionVerify}"
IsVisible="{Binding !IsFolder}"/>
</ListBox> </ListBox>
<Border Grid.Column="1" Background="{DynamicResource LineBrush}" Width="1" Margin="0,8"/> <Border Grid.Column="1" Background="{DynamicResource LineBrush}" Width="1" Margin="0,8"/>
@@ -73,61 +69,48 @@
<TabItem Header="{loc:Tr modals.listSettings.sectionGeneral}"> <TabItem Header="{loc:Tr modals.listSettings.sectionGeneral}">
<ScrollViewer> <ScrollViewer>
<StackPanel Spacing="12" Margin="0,8,0,0"> <StackPanel Spacing="12" Margin="0,8,0,0">
<!-- Create flow only: turns this into a sidebar folder (name + icon, nothing else).
Deliberately not a second sidebar button — the "+" and the repo-import button
already sit there. -->
<StackPanel Spacing="4" IsVisible="{Binding CanToggleFolder}">
<CheckBox IsChecked="{Binding IsFolder, Mode=TwoWay}"
Content="{loc:Tr modals.listSettings.createAsFolder}"/>
<TextBlock Text="{loc:Tr modals.listSettings.createAsFolderHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>
<StackPanel Spacing="4"> <StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.name}"/> <TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.name}"/>
<TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> <TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}"> <StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.workingDirectory}"/> <TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.workingDirectory}"/>
<Grid ColumnDefinitions="*,Auto"> <Grid ColumnDefinitions="*,Auto">
<TextBox Grid.Column="0" Text="{Binding WorkingDir}" PlaceholderText="{loc:Tr modals.listSettings.workingDirectoryPlaceholder}" /> <TextBox Grid.Column="0" Text="{Binding WorkingDir}" PlaceholderText="{loc:Tr modals.listSettings.workingDirectoryPlaceholder}" />
<Button Classes="btn" Grid.Column="1" Content="{loc:Tr modals.listSettings.browse}" Margin="8,0,0,0" Click="BrowseClicked" /> <Button Classes="btn" Grid.Column="1" Content="{loc:Tr modals.listSettings.browse}" Margin="8,0,0,0" Click="BrowseClicked" />
</Grid> </Grid>
<TextBlock Text="{Binding WorkingDirWarning}"
IsVisible="{Binding WorkingDirWarning, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Foreground="{DynamicResource StatusErrorBrush}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}"> <StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.defaultCommitType}"/> <TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.defaultCommitType}"/>
<ComboBox ItemsSource="{Binding CommitTypeOptions}" <ComboBox ItemsSource="{Binding CommitTypeOptions}"
SelectedItem="{Binding DefaultCommitType, Mode=TwoWay}" SelectedItem="{Binding DefaultCommitType, Mode=TwoWay}"
HorizontalAlignment="Left" MinWidth="160" /> HorizontalAlignment="Left" MinWidth="160" />
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}"> <StackPanel Spacing="4">
<CheckBox IsChecked="{Binding IsManual, Mode=TwoWay}" <CheckBox IsChecked="{Binding IsManual, Mode=TwoWay}"
Content="{loc:Tr modals.listSettings.manualList}"/> Content="{loc:Tr modals.listSettings.manualList}"/>
<TextBlock Text="{loc:Tr modals.listSettings.manualListHint}" <TextBlock Text="{loc:Tr modals.listSettings.manualListHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/> Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}"> <StackPanel Spacing="4">
<CheckBox IsChecked="{Binding FindingsTracked, Mode=TwoWay}" <CheckBox IsChecked="{Binding FindingsTracked, Mode=TwoWay}"
Content="{loc:Tr modals.listSettings.findingsTracked}"/> Content="{loc:Tr modals.listSettings.findingsTracked}"/>
<TextBlock Text="{loc:Tr modals.listSettings.findingsTrackedHint}" <TextBlock Text="{loc:Tr modals.listSettings.findingsTrackedHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/> Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding !IsFolder}"> <StackPanel Spacing="4">
<CheckBox IsChecked="{Binding PowerUseAllowed, Mode=TwoWay}" <CheckBox IsChecked="{Binding PowerUseAllowed, Mode=TwoWay}"
Content="{loc:Tr modals.listSettings.powerUseAllowed}"/> Content="{loc:Tr modals.listSettings.powerUseAllowed}"/>
<TextBlock Text="{loc:Tr modals.listSettings.powerUseAllowedHint}" <TextBlock Text="{loc:Tr modals.listSettings.powerUseAllowedHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/> Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
</StackPanel> </StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding ShowTicketProject}"> <StackPanel Spacing="4" IsVisible="{Binding TicketsAvailable}">
<TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.ticketProject}"/> <TextBlock Classes="field-label" Text="{loc:Tr modals.listSettings.ticketProject}"/>
<ComboBox ItemsSource="{Binding TicketProjects}" <ComboBox ItemsSource="{Binding TicketProjects}"
SelectedItem="{Binding SelectedTicketProject, Mode=TwoWay}" SelectedItem="{Binding SelectedTicketProject, Mode=TwoWay}"
@@ -29,18 +29,11 @@
<!-- Body: scope + select-all/none toolbar, headers, checkbox rows --> <!-- Body: scope + select-all/none toolbar, headers, checkbox rows -->
<DockPanel> <DockPanel>
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto,Auto,Auto" Margin="20,12,20,6"> <Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto,Auto" Margin="20,12,20,6">
<TextBlock Grid.Column="0" Classes="meta" Text="{Binding ScopeLabel}" VerticalAlignment="Center"/> <TextBlock Grid.Column="0" Classes="meta" Text="{Binding ScopeLabel}" VerticalAlignment="Center"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="6" Margin="0,0,12,0" <Button Grid.Column="1" Classes="btn" Content="{loc:Tr modals.mergeHelper.selectAll}"
IsVisible="{Binding ShowModelPicker}"
ToolTip.Tip="{loc:Tr modals.mergeHelper.modelTip}">
<TextBlock Classes="meta" Text="{loc:Tr modals.mergeHelper.modelLabel}" VerticalAlignment="Center"/>
<ComboBox MinWidth="90" ItemsSource="{Binding ModelOptions}"
SelectedItem="{Binding SelectedModel, Mode=TwoWay}"/>
</StackPanel>
<Button Grid.Column="2" Classes="btn" Content="{loc:Tr modals.mergeHelper.selectAll}"
Command="{Binding SelectAllCommand}" IsEnabled="{Binding HasTasks}"/> Command="{Binding SelectAllCommand}" IsEnabled="{Binding HasTasks}"/>
<Button Grid.Column="3" Classes="btn" Content="{loc:Tr modals.mergeHelper.selectNone}" <Button Grid.Column="2" Classes="btn" Content="{loc:Tr modals.mergeHelper.selectNone}"
Command="{Binding SelectNoneCommand}" IsEnabled="{Binding HasTasks}" Margin="8,0,0,0"/> Command="{Binding SelectNoneCommand}" IsEnabled="{Binding HasTasks}" Margin="8,0,0,0"/>
</Grid> </Grid>
@@ -51,8 +44,8 @@
<TextBlock Grid.Column="3" Classes="eyebrow" Text="{loc:Tr modals.mergeHelper.columnStatus}"/> <TextBlock Grid.Column="3" Classes="eyebrow" Text="{loc:Tr modals.mergeHelper.columnStatus}"/>
</Grid> </Grid>
<ScrollViewer> <ScrollViewer Padding="20,2,20,8">
<StackPanel Margin="20,2,20,8"> <StackPanel>
<TextBlock Classes="meta" Margin="0,8" <TextBlock Classes="meta" Margin="0,8"
Text="{loc:Tr modals.mergeHelper.empty}" Text="{loc:Tr modals.mergeHelper.empty}"
IsVisible="{Binding !HasTasks}"/> IsVisible="{Binding !HasTasks}"/>
@@ -39,8 +39,8 @@
</ctl:ModalShell.Footer> </ctl:ModalShell.Footer>
<!-- Body --> <!-- Body -->
<ScrollViewer> <ScrollViewer Padding="20,16">
<StackPanel Margin="20,16" Spacing="12"> <StackPanel Spacing="12">
<TextBlock Classes="title" Text="{Binding TaskTitle, StringFormat='Merging: {0}'}" /> <TextBlock Classes="title" Text="{Binding TaskTitle, StringFormat='Merging: {0}'}" />
@@ -70,11 +70,6 @@
TextWrapping="Wrap" TextWrapping="Wrap"
IsVisible="{Binding ErrorMessage, Converter={x:Static ObjectConverters.IsNotNull}}" /> IsVisible="{Binding ErrorMessage, Converter={x:Static ObjectConverters.IsNotNull}}" />
<Button Classes="btn" HorizontalAlignment="Left"
Content="{loc:Tr modals.merge.stashAndMerge}"
Command="{Binding StashAndMergeCommand}"
IsVisible="{Binding ShowStashRetry}" />
<Border Classes="danger-box" <Border Classes="danger-box"
IsVisible="{Binding HasConflict}"> IsVisible="{Binding HasConflict}">
<StackPanel Spacing="4"> <StackPanel Spacing="4">
@@ -43,8 +43,8 @@
</StackPanel> </StackPanel>
<!-- Repo checklist --> <!-- Repo checklist -->
<ScrollViewer> <ScrollViewer Padding="20,2,20,8">
<ItemsControl Margin="20,2,20,8" ItemsSource="{Binding Repos}"> <ItemsControl ItemsSource="{Binding Repos}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate DataType="vm:RepoImportItemViewModel"> <DataTemplate DataType="vm:RepoImportItemViewModel">
<Grid ColumnDefinitions="Auto,Auto,*,Auto" Margin="0,1" <Grid ColumnDefinitions="Auto,Auto,*,Auto" Margin="0,1"
@@ -190,8 +190,7 @@
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/> Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
<Grid ColumnDefinitions="90,12,*,12,110" Margin="0,4,0,0"> <Grid ColumnDefinitions="90,12,*,12,110" Margin="0,4,0,0">
<TextBlock Grid.Column="0" Classes="eyebrow" Text="{loc:Tr settings.general.model}"/> <TextBlock Grid.Column="0" Classes="eyebrow" Text="{loc:Tr settings.general.model}"/>
<TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr settings.general.effort}" <TextBlock Grid.Column="2" Classes="eyebrow" Text="{loc:Tr settings.general.effort}"/>
ToolTip.Tip="{loc:Tr settings.general.effortHint}"/>
<TextBlock Grid.Column="4" Classes="eyebrow" Text="{loc:Tr settings.general.maxTurns}"/> <TextBlock Grid.Column="4" Classes="eyebrow" Text="{loc:Tr settings.general.maxTurns}"/>
</Grid> </Grid>
<ItemsControl ItemsSource="{Binding General.ModelPresets}"> <ItemsControl ItemsSource="{Binding General.ModelPresets}">
@@ -253,8 +252,8 @@
<TextBlock Text="{loc:Tr settings.general.autoContinueOnUsageLimitHint}" <TextBlock Text="{loc:Tr settings.general.autoContinueOnUsageLimitHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/> Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
<!-- Outside the PowerUse section below on purpose: the handoff budget also bounds <!-- PowerUse itself is toggled on the usage monitor; only its handoff budget is
a normal (interactive) handler run. --> typed here, because it also applies to a normal (interactive) handler run. -->
<StackPanel Spacing="4"> <StackPanel Spacing="4">
<TextBlock Classes="eyebrow" Text="{loc:Tr settings.general.listHandlerMaxHandoffs}"/> <TextBlock Classes="eyebrow" Text="{loc:Tr settings.general.listHandlerMaxHandoffs}"/>
<NumericUpDown Value="{Binding General.ListHandlerMaxHandoffs, Mode=TwoWay, Converter={StaticResource KeepLastNumber}}" <NumericUpDown Value="{Binding General.ListHandlerMaxHandoffs, Mode=TwoWay, Converter={StaticResource KeepLastNumber}}"
@@ -265,34 +264,6 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<!-- PowerUse: a master switch plus its time window. Never sufficient on its own —
the run's list must also allow PowerUse in its list settings. -->
<StackPanel Spacing="4">
<TextBlock Classes="field-label" Text="{loc:Tr settings.general.powerUseHeading}"/>
<CheckBox IsChecked="{Binding General.PowerUseEnabled, Mode=TwoWay}"
Content="{loc:Tr settings.general.powerUse}"/>
<TextBlock Text="{loc:Tr settings.general.powerUseHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,6,0,0">
<TextBlock Classes="eyebrow" VerticalAlignment="Center"
Text="{loc:Tr settings.general.powerUseWindow}"/>
<TextBox Width="70" FontSize="12" Padding="6,2"
Watermark="{loc:Tr settings.general.powerUseWindowPlaceholder}"
Text="{Binding General.PowerUseWindowStart, Mode=TwoWay}"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Text="–"/>
<TextBox Width="70" FontSize="12" Padding="6,2"
Watermark="{loc:Tr settings.general.powerUseWindowPlaceholder}"
Text="{Binding General.PowerUseWindowEnd, Mode=TwoWay}"/>
<TextBlock Classes="eyebrow" VerticalAlignment="Center" Margin="12,0,0,0"
Text="{loc:Tr settings.general.powerUseHandoffPct}"/>
<NumericUpDown Width="80" FontSize="12" Padding="6,2" ShowButtonSpinner="False"
Minimum="50" Maximum="99" Increment="1" FormatString="0"
Value="{Binding General.PowerUseHandoffPct, Mode=TwoWay, Converter={StaticResource KeepLastNumber}}"/>
</StackPanel>
<TextBlock Text="{loc:Tr settings.general.powerUseWindowHint}"
Opacity="0.6" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>
<!-- Throttle stages live on the usage-monitor gauges (drag + spinner per stage); <!-- Throttle stages live on the usage-monitor gauges (drag + spinner per stage);
echoed read-only here so they aren't invisible on the tab that owns the gate. --> echoed read-only here so they aren't invisible on the tab that owns the gate. -->
<StackPanel Spacing="4"> <StackPanel Spacing="4">
@@ -308,8 +279,7 @@
</ScrollViewer> </ScrollViewer>
</TabItem> </TabItem>
<TabItem Header="{loc:Tr settings.sidebar.categoryPrime}" <TabItem Header="{loc:Tr settings.sidebar.categoryPrime}">
ToolTip.Tip="{loc:Tr settings.sidebar.categoryPrimeHint}">
<ScrollViewer> <ScrollViewer>
<StackPanel Spacing="12" Margin="0,8,0,0"> <StackPanel Spacing="12" Margin="0,8,0,0">
<Border IsVisible="{Binding !HasLinkedRepo}" <Border IsVisible="{Binding !HasLinkedRepo}"
@@ -19,18 +19,6 @@
</Window.KeyBindings> </Window.KeyBindings>
<ctl:ModalShell Title="{loc:Tr modals.usageMonitor.title}" CloseCommand="{Binding CloseCommand}"> <ctl:ModalShell Title="{loc:Tr modals.usageMonitor.title}" CloseCommand="{Binding CloseCommand}">
<!-- Refresh sits in the titlebar: the worker polls on a slow cadence to avoid the endpoint's
429s, so this is the way to get a number now — but it doesn't earn a row in the body. -->
<ctl:ModalShell.HeaderActions>
<StackPanel Orientation="Horizontal" Spacing="6">
<Ellipse Classes="spinner" Width="12" Height="12" VerticalAlignment="Center"
IsVisible="{Binding IsRefreshing}"/>
<Button Classes="icon-btn" Content="⟳" FontSize="{DynamicResource FontSizeBody}"
Command="{Binding RefreshCommand}"
IsEnabled="{Binding !IsRefreshing}"
ToolTip.Tip="{loc:Tr modals.usageMonitor.refreshHint}"/>
</StackPanel>
</ctl:ModalShell.HeaderActions>
<DockPanel> <DockPanel>
<!-- Stale / gate bands --> <!-- Stale / gate bands -->
@@ -59,6 +47,18 @@
</Border> </Border>
</StackPanel> </StackPanel>
<!-- Refresh: the worker polls on a slow cadence to avoid the endpoint's 429s -->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8"
Margin="20,12,20,0" VerticalAlignment="Center">
<Button Classes="btn" Content="{loc:Tr modals.usageMonitor.refresh}"
Command="{Binding RefreshCommand}"
IsEnabled="{Binding !IsRefreshing}"/>
<Ellipse Classes="spinner" Width="14" Height="14" VerticalAlignment="Center"
IsVisible="{Binding IsRefreshing}"/>
<TextBlock Classes="meta" VerticalAlignment="Center"
Text="{loc:Tr modals.usageMonitor.refreshHint}"/>
</StackPanel>
<!-- Gauges --> <!-- Gauges -->
<ItemsControl DockPanel.Dock="Top" Margin="20,12,20,0" ItemsSource="{Binding GaugeRows}"> <ItemsControl DockPanel.Dock="Top" Margin="20,12,20,0" ItemsSource="{Binding GaugeRows}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
@@ -134,6 +134,42 @@
Text="{loc:Tr modals.usageMonitor.noGauges}" Text="{loc:Tr modals.usageMonitor.noGauges}"
IsVisible="{Binding !GaugeRows.Count}"/> IsVisible="{Binding !GaugeRows.Count}"/>
<!-- PowerUse: sits under the gauges on purpose — "spend the rest of the window" is a
decision made while looking at how much window is left. Saves immediately on toggle. -->
<Border DockPanel.Dock="Top" Margin="20,12,20,0" Padding="12,10"
Background="{DynamicResource DeepBrush}" BorderBrush="{DynamicResource LineBrush}"
BorderThickness="1" CornerRadius="6">
<StackPanel Spacing="4">
<CheckBox IsChecked="{Binding PowerUseEnabled, Mode=TwoWay}"
Content="{loc:Tr modals.usageMonitor.powerUse}"/>
<TextBlock Classes="meta" TextWrapping="Wrap"
Text="{loc:Tr modals.usageMonitor.powerUseHint}"/>
<!-- Window + handoff threshold. Same commit-on-blur/Enter discipline as the gauge
legend boxes: a hub write per keystroke would be one save per typed digit. -->
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,6,0,0">
<TextBlock Classes="meta" VerticalAlignment="Center"
Text="{loc:Tr modals.usageMonitor.powerUseWindow}"/>
<TextBox Width="70" FontSize="12" Padding="6,2"
Watermark="{loc:Tr modals.usageMonitor.powerUseWindowPlaceholder}"
Text="{Binding PowerUseWindowStart, Mode=TwoWay}"
LostFocus="OnPowerUseBoxCommit" KeyDown="OnPowerUseBoxKeyDown"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Text="–"/>
<TextBox Width="70" FontSize="12" Padding="6,2"
Watermark="{loc:Tr modals.usageMonitor.powerUseWindowPlaceholder}"
Text="{Binding PowerUseWindowEnd, Mode=TwoWay}"
LostFocus="OnPowerUseBoxCommit" KeyDown="OnPowerUseBoxKeyDown"/>
<TextBlock Classes="meta" VerticalAlignment="Center" Margin="12,0,0,0"
Text="{loc:Tr modals.usageMonitor.powerUseHandoffPct}"/>
<NumericUpDown Width="80" FontSize="12" Padding="6,2" ShowButtonSpinner="False"
Minimum="50" Maximum="99" Increment="1" FormatString="0"
Value="{Binding PowerUseHandoffPct, Mode=TwoWay, Converter={StaticResource KeepLastNumber}}"
LostFocus="OnPowerUseBoxCommit" KeyDown="OnPowerUseBoxKeyDown"/>
</StackPanel>
<TextBlock Classes="meta" TextWrapping="Wrap" Opacity="0.75"
Text="{loc:Tr modals.usageMonitor.powerUseWindowHint}"/>
</StackPanel>
</Border>
<!-- Period picker --> <!-- Period picker -->
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8" Margin="20,12,20,0"> <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8" Margin="20,12,20,0">
<TextBlock Classes="meta" Text="{loc:Tr modals.usageMonitor.period}" VerticalAlignment="Center"/> <TextBlock Classes="meta" Text="{loc:Tr modals.usageMonitor.period}" VerticalAlignment="Center"/>
@@ -33,4 +33,19 @@ public partial class UsageMonitorModalView : Window
OnStageBoxCommit(sender, e); OnStageBoxCommit(sender, e);
e.Handled = true; e.Handled = true;
} }
/// <summary>Persists the PowerUse window / handoff threshold on blur — a save per keystroke
/// would be one hub round-trip per typed digit.</summary>
private void OnPowerUseBoxCommit(object? sender, RoutedEventArgs e)
{
if (DataContext is not UsageMonitorModalViewModel vm) return;
if (vm.SavePowerUseCommand.CanExecute(null)) vm.SavePowerUseCommand.Execute(null);
}
private void OnPowerUseBoxKeyDown(object? sender, KeyEventArgs e)
{
if (e.Key != Key.Enter) return;
OnPowerUseBoxCommit(sender, e);
e.Handled = true;
}
} }
@@ -16,14 +16,10 @@
</Window.KeyBindings> </Window.KeyBindings>
<ctl:ModalShell Title="{loc:Tr modals.workerConnection.title}" CloseCommand="{Binding CloseCommand}"> <ctl:ModalShell Title="{loc:Tr modals.workerConnection.title}" CloseCommand="{Binding CloseCommand}">
<Grid RowDefinitions="*,Auto,Auto" Margin="20,16"> <Grid RowDefinitions="*,Auto" Margin="20,16">
<TextBlock Grid.Row="0" Classes="meta" TextWrapping="Wrap" <TextBlock Grid.Row="0" Classes="meta" TextWrapping="Wrap"
Text="{loc:Tr modals.workerConnection.body}"/> Text="{loc:Tr modals.workerConnection.body}"/>
<TextBlock Grid.Row="1" TextWrapping="Wrap" Margin="0,8,0,0" <StackPanel Grid.Row="1" Orientation="Horizontal" Spacing="8"
Foreground="{DynamicResource StatusErrorBrush}"
IsVisible="{Binding ErrorText, Converter={x:Static ObjectConverters.IsNotNull}}"
Text="{Binding ErrorText}"/>
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="8"
HorizontalAlignment="Right" Margin="0,16,0,0"> HorizontalAlignment="Right" Margin="0,16,0,0">
<Button Classes="btn" Content="{loc:Tr modals.workerConnection.dismiss}" Command="{Binding CloseCommand}"/> <Button Classes="btn" Content="{loc:Tr modals.workerConnection.dismiss}" Command="{Binding CloseCommand}"/>
<Button Classes="btn" Content="{loc:Tr modals.workerConnection.rerunInstaller}" Command="{Binding RerunInstallerCommand}"/> <Button Classes="btn" Content="{loc:Tr modals.workerConnection.rerunInstaller}" Command="{Binding RerunInstallerCommand}"/>
@@ -134,8 +134,8 @@
</Border> </Border>
<!-- Content --> <!-- Content -->
<ScrollViewer> <ScrollViewer Padding="20,16">
<StackPanel Margin="20,16"> <StackPanel>
<Border IsVisible="{Binding ConflictRows.Count}" <Border IsVisible="{Binding ConflictRows.Count}"
Background="{DynamicResource ErrorTintBrush}" Background="{DynamicResource ErrorTintBrush}"
BorderBrush="{DynamicResource StatusErrorBrush}" BorderBrush="{DynamicResource StatusErrorBrush}"
@@ -28,7 +28,6 @@ public sealed class WindowDialogService : IDialogService
private readonly Window _owner; private readonly Window _owner;
private MissionControlWindow? _missionControl; private MissionControlWindow? _missionControl;
private DiffViewerView? _diffViewerWindow; private DiffViewerView? _diffViewerWindow;
private CheatSheetsWindow? _cheatSheets;
public WindowDialogService(Window owner) => _owner = owner; public WindowDialogService(Window owner) => _owner = owner;
@@ -183,29 +182,9 @@ public sealed class WindowDialogService : IDialogService
_missionControl ??= new MissionControlWindow { DataContext = vm }; _missionControl ??= new MissionControlWindow { DataContext = vm };
if (!_missionControl.IsVisible) if (!_missionControl.IsVisible)
_missionControl.Show(); // modeless, independent top-level window _missionControl.Show(); // modeless, independent top-level window
// Activate() alone does not restore a minimised window — it stays in the taskbar and the
// button looks dead. Un-minimise first, then take focus.
if (_missionControl.WindowState == WindowState.Minimized)
_missionControl.WindowState = WindowState.Normal;
_missionControl.Activate(); // bring to front / focus _missionControl.Activate(); // bring to front / focus
} }
public void ShowCheatSheets(CheatSheetsViewModel vm)
{
// Modeless and single-instance, like Mission Control: the point is to park it beside the
// shell, so a second window (or a modal that blocks the shell) would defeat it.
if (_cheatSheets is null)
{
_cheatSheets = new CheatSheetsWindow { DataContext = vm };
vm.CloseAction = () => _cheatSheets?.Close();
_cheatSheets.Closed += (_, _) => _cheatSheets = null;
_cheatSheets.Show(_owner);
}
if (_cheatSheets.WindowState == WindowState.Minimized)
_cheatSheets.WindowState = WindowState.Normal;
_cheatSheets.Activate();
}
public Task<bool> ConfirmAsync(string message) public Task<bool> ConfirmAsync(string message)
{ {
var tcs = new TaskCompletionSource<bool>(); var tcs = new TaskCompletionSource<bool>();
+5 -4
View File
@@ -30,7 +30,7 @@ Worker/
Findings/ — FindingsStore + FindingsStoreLocator: the per-project `.claudedo/` trap store Findings/ — FindingsStore + FindingsStoreLocator: the per-project `.claudedo/` trap store
Git/ — GitExcludeWriter (`.git/info/exclude`) + GitHead, shared by skill seeding and findings Git/ — GitExcludeWriter (`.git/info/exclude`) + GitHead, shared by skill seeding and findings
Config/ — WorkerConfig Config/ — WorkerConfig
Hub/ — WorkerHub, HubBroadcaster, ConnectedClientTracker (connected-UI-client count) Hub/ — WorkerHub, HubBroadcaster
Logging/ — LogRingBuffer (30-min window) + BroadcastLogSink (Serilog → footer + overlay) Logging/ — LogRingBuffer (30-min window) + BroadcastLogSink (Serilog → footer + overlay)
Report/ — ClaudeHistoryReader, WeekReportPromptBuilder, WeekReportService Report/ — ClaudeHistoryReader, WeekReportPromptBuilder, WeekReportService
Prime/ — "Prime Claude" schedules: PrimeScheduler, PrimeRunner, PrimePrompts, Prime/ — "Prime Claude" schedules: PrimeScheduler, PrimeRunner, PrimePrompts,
@@ -50,7 +50,7 @@ subfolder within their area; the namespace stays the area namespace.
## Architecture ## Architecture
- **Program.cs** — loads config, inits schema, registers DI, configures SignalR on `/hub`, binds to `127.0.0.1:47821` - **Program.cs** — loads config, inits schema, registers DI, configures SignalR on `/hub`, binds to `127.0.0.1:47821`
- **TaskStateService** — the **only** component that writes `Status`, `PlanningPhase`, `BlockedByTaskId`, and the `task_dependencies` edges. All transitions return a `TransitionResult` (no exceptions on invalid moves). Wakes the queue and advances the planning chain on child terminal transitions. `SubmitForChildrenAsync` (Running → WaitingForChildren) also chains and immediately queues a normal parent's own Idle/Queued children via `PlanningChainCoordinator.SetupChainAsync(enqueue: true)` — unlike a planning parent (`PlanningPhase != None`), whose children stay untouched here and wait for the user's explicit "Queue plan" (`QueuePlanAsync`); a child already `Running` makes `SetupChainAsync` throw, which is caught and logged rather than failing the parent's own transition. Every transition broadcasts via a private `NotifyAsync(taskId)` — never call `_broadcaster.TaskUpdated` directly from this class, `NotifyAsync` also drives `TicketStatusSync.SyncAsync` (see Tickets below) and a direct call skips that transition's ticket write-back. `SetDependsOnAsync` replaces the task's whole dependency **set** (empty list clears it) and rejects a self-reference, an unknown dependency id, or any link that would create a cycle — a BFS over the whole `task_dependencies` edge set from every proposed predecessor, so a multi-edge loop (A→B→C→A) is caught too, and one bad edge leaves the entire set unwritten. - **TaskStateService** — the **only** component that writes `Status`, `PlanningPhase`, `BlockedByTaskId`, and the `task_dependencies` edges. All transitions return a `TransitionResult` (no exceptions on invalid moves). Wakes the queue and advances the planning chain on child terminal transitions. Every transition broadcasts via a private `NotifyAsync(taskId)` — never call `_broadcaster.TaskUpdated` directly from this class, `NotifyAsync` also drives `TicketStatusSync.SyncAsync` (see Tickets below) and a direct call skips that transition's ticket write-back. `SetDependsOnAsync` replaces the task's whole dependency **set** (empty list clears it) and rejects a self-reference, an unknown dependency id, or any link that would create a cycle — a BFS over the whole `task_dependencies` edge set from every proposed predecessor, so a multi-edge loop (A→B→C→A) is caught too, and one bad edge leaves the entire set unwritten.
- **IQueueWaker / IQueuePicker / QueueService** — waker is a singleton `SemaphoreSlim`; picker performs the atomic `Queued → Running` claim filtered by `BlockedByTaskId IS NULL`, `is_manual = 0`, schedule, and "no `task_dependencies` edge whose predecessor isn't `done`" (doubly negated on purpose: zero edges stays eligible, all edges must be done, and an edge pointing at a vanished task keeps blocking); QueueService is a thin `BackgroundService` looping on the waker, dispatching via `TaskRunner`. Per tick it also applies the usage throttle and gate → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md). - **IQueueWaker / IQueuePicker / QueueService** — waker is a singleton `SemaphoreSlim`; picker performs the atomic `Queued → Running` claim filtered by `BlockedByTaskId IS NULL`, `is_manual = 0`, schedule, and "no `task_dependencies` edge whose predecessor isn't `done`" (doubly negated on purpose: zero edges stays eligible, all edges must be done, and an edge pointing at a vanished task keeps blocking); QueueService is a thin `BackgroundService` looping on the waker, dispatching via `TaskRunner`. Per tick it also applies the usage throttle and gate → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md).
- **RunCancellationRegistry** — taskId → running-run CTS. Lets `TaskStateService.CancelAsync` kill a cancelled task's process without a DI cycle. - **RunCancellationRegistry** — taskId → running-run CTS. Lets `TaskStateService.CancelAsync` kill a cancelled task's process without a DI cycle.
- **OverrideSlotService** — owns `RunNow` / `ContinueTask`; goes through `TaskStateService.StartRunningAsync` (caller-driven, serialized by slot lock). - **OverrideSlotService** — owns `RunNow` / `ContinueTask`; goes through `TaskStateService.StartRunningAsync` (caller-driven, serialized by slot lock).
@@ -130,7 +130,7 @@ Full flow, invariants, and model/effort/max-turns resolution (including the low-
- **ClaudeProcess** — spawns `claude -p --output-format stream-json --verbose --permission-mode auto` (or whatever app settings specify). Prompt via stdin, NDJSON from stdout. CancellationToken kills the process tree. Resolves `_cfg.ClaudeBin` via `ExecutableResolver` (`ClaudeDo.Data`, shared with `ClaudeCliPreflight` and the Installer's checks) before spawning — a `.cmd`/`.bat` shim (e.g. an npm-installed `claude`) is launched through `cmd.exe /c` since `UseShellExecute = false` can't exec a shim directly; a resolved `.exe` starts exactly as before. Throws if nothing resolves. *(Not yet on `main` — see `Environment Checks` in `ClaudeDo.Installer/CLAUDE.md`.)* - **ClaudeProcess** — spawns `claude -p --output-format stream-json --verbose --permission-mode auto` (or whatever app settings specify). Prompt via stdin, NDJSON from stdout. CancellationToken kills the process tree. Resolves `_cfg.ClaudeBin` via `ExecutableResolver` (`ClaudeDo.Data`, shared with `ClaudeCliPreflight` and the Installer's checks) before spawning — a `.cmd`/`.bat` shim (e.g. an npm-installed `claude`) is launched through `cmd.exe /c` since `UseShellExecute = false` can't exec a shim directly; a resolved `.exe` starts exactly as before. Throws if nothing resolves. *(Not yet on `main` — see `Environment Checks` in `ClaudeDo.Installer/CLAUDE.md`.)*
- **ClaudeArgsBuilder** — `--model`, `--effort`, `--max-turns`, `--append-system-prompt`, `--agents`, `--json-schema`, `--resume` - **ClaudeArgsBuilder** — `--model`, `--effort`, `--max-turns`, `--append-system-prompt`, `--agents`, `--json-schema`, `--resume`
- **StreamAnalyzer** — parses NDJSON; extracts session_id, token counts, turn counts, result text, structured output. Replaced MessageParser. - **StreamAnalyzer** — parses NDJSON; extracts session_id, token counts, turn counts, result text, structured output. Replaced MessageParser.
- **WorktreeManager** — worktrees on `claudedo/{id}` branches (full task GUID, dashes stripped — a prefix isn't enough to rule out collisions); commits with semantic messages, updates DB with head commit + diff stats - **WorktreeManager** — worktrees on `claudedo/{taskId[:8]}` branches; commits with semantic messages, updates DB with head commit + diff stats
- **CommitMessageBuilder** — `{commitType}(slug): title\n\ndescription\n\nClaudeDo-Task: taskId`; `BuildMerge` is the merge-commit variant (`{commitType}(slug): merge title` + trailer). **Every merge caller passes a blank commit message on purpose** — `TaskMergeService` fills in `BuildMerge` from the task's commit type and its list's name, which is the only place that knows both. Don't reintroduce a caller-side literal. - **CommitMessageBuilder** — `{commitType}(slug): title\n\ndescription\n\nClaudeDo-Task: taskId`; `BuildMerge` is the merge-commit variant (`{commitType}(slug): merge title` + trailer). **Every merge caller passes a blank commit message on purpose** — `TaskMergeService` fills in `BuildMerge` from the task's commit type and its list's name, which is the only place that knows both. Don't reintroduce a caller-side literal.
- **TaskResetService** — discards a failed task's worktree, resets the row to Idle, preserves run history - **TaskResetService** — discards a failed task's worktree, resets the row to Idle, preserves run history
- **AgentFileService** — manages `~/.claudeDo/agents/*.md`; list/refresh via SignalR - **AgentFileService** — manages `~/.claudeDo/agents/*.md`; list/refresh via SignalR
@@ -202,7 +202,8 @@ launch specs · worktrees · agents/settings/lists · reports/notes/prep · diag
- `PrepLine` - `PrepLine`
- `PrepFinished` - `PrepFinished`
- `OperationProgress` (generic `(opKey, phase, current, total)` channel; merge phases are its - `OperationProgress` (generic `(opKey, phase, current, total)` channel; merge phases are its
first producer) first producer — `IWorkerClient.MergeProgressEvent` on the Ui side is a thin forwarder over it
for existing consumers, elapsed seconds riding in the `current` slot)
- `PlanningMergeStarted` - `PlanningMergeStarted`
- `PlanningSubtaskMerged` - `PlanningSubtaskMerged`
- `PlanningMergeConflict` - `PlanningMergeConflict`
+1 -3
View File
@@ -708,9 +708,7 @@ public sealed class ExternalMcpService
else else
{ {
var r = await _merge.ApproveAndMergeAsync(taskId, targetBranch ?? "", leaveConflictsInTree, cancellationToken, progress, skipVerify); var r = await _merge.ApproveAndMergeAsync(taskId, targetBranch ?? "", leaveConflictsInTree, cancellationToken, progress, skipVerify);
// dirty_target is a refusal like blocked -- only the UI turns it into a stash if (r.Status == TaskMergeService.StatusBlocked)
// retry; an MCP session must not read it as an approve that went through.
if (r.Status is TaskMergeService.StatusBlocked or TaskMergeService.StatusDirtyTarget)
throw new InvalidOperationException(r.ErrorMessage ?? "approve failed"); throw new InvalidOperationException(r.ErrorMessage ?? "approve failed");
mergeStatus = r.Status; mergeStatus = r.Status;
mergeConflicts = r.ConflictFiles; mergeConflicts = r.ConflictFiles;
+6 -17
View File
@@ -7,36 +7,32 @@ using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
namespace ClaudeDo.Worker.External; namespace ClaudeDo.Worker.External;
public sealed record StartListHandlerResult(bool Requested, string ListId, string ListName, int TaskCount, IReadOnlyList<int> TaskNumbers, string? Reason = null); public sealed record StartListHandlerResult(bool Requested, string ListId, string ListName, int TaskCount, IReadOnlyList<int> TaskNumbers);
// The "Let Claude handle it" button, reachable from outside the UI. The worker only broadcasts; // The "Let Claude handle it" button, reachable from outside the UI. The worker only broadcasts;
// the App owns the ConPTY tile and creates the handler task exactly as the button does // the App owns the ConPTY tile and creates the handler task exactly as the button does
// (MissionControlViewModel.OpenMergeHelperConPtySessionAsync), so there is one code path for // (MissionControlViewModel.OpenMergeHelperConPtySessionAsync), so there is one code path for
// starting a run, not two. Without a connected App the broadcast has nobody to receive it, so // starting a run, not two. Without a connected App nothing happens -- the result says so.
// ConnectedClientTracker is checked first and Requested comes back false with a Reason instead of
// an unconditional true.
[McpServerToolType] [McpServerToolType]
public sealed class ListHandlerMcpTools public sealed class ListHandlerMcpTools
{ {
private readonly ListRepository _lists; private readonly ListRepository _lists;
private readonly TaskRepository _tasks; private readonly TaskRepository _tasks;
private readonly HubBroadcaster _broadcaster; private readonly HubBroadcaster _broadcaster;
private readonly ConnectedClientTracker _clients;
public ListHandlerMcpTools(ListRepository lists, TaskRepository tasks, HubBroadcaster broadcaster, ConnectedClientTracker clients) public ListHandlerMcpTools(ListRepository lists, TaskRepository tasks, HubBroadcaster broadcaster)
{ {
_lists = lists; _lists = lists;
_tasks = tasks; _tasks = tasks;
_broadcaster = broadcaster; _broadcaster = broadcaster;
_clients = clients;
} }
[McpServerTool, Description( [McpServerTool, Description(
"Start a list-handler run (\"Let Claude handle it\") for a list, exactly like the button in " + "Start a list-handler run (\"Let Claude handle it\") for a list, exactly like the button in " +
"Mission Control: the connected ClaudeDo App creates the handler task and opens the triage " + "Mission Control: the connected ClaudeDo App creates the handler task and opens the triage " +
"ConPTY tile for the given tasks. taskIds defaults to every Idle, non-manual task of the list. " + "ConPTY tile for the given tasks. taskIds defaults to every Idle, non-manual task of the list. " +
"Requires the App to be running and connected to this worker -- if it isn't, Requested comes " + "Requires the App to be running and connected to this worker -- the worker only broadcasts " +
"back false with a reason and nothing is started. taskIds accept task numbers (#123 or bare 123).")] "the request. taskIds accept task numbers (#123 or bare 123).")]
public async Task<StartListHandlerResult> StartListHandler( public async Task<StartListHandlerResult> StartListHandler(
[Description("The list to run the handler on.")] string listId, [Description("The list to run the handler on.")] string listId,
[Description("Tasks to hand to the run, in the order to triage them. Omit for all Idle, non-manual tasks of the list.")] IReadOnlyList<string>? taskIds = null, [Description("Tasks to hand to the run, in the order to triage them. Omit for all Idle, non-manual tasks of the list.")] IReadOnlyList<string>? taskIds = null,
@@ -69,15 +65,8 @@ public sealed class ListHandlerMcpTools
if (chosen.Count == 0) if (chosen.Count == 0)
throw new InvalidOperationException($"No tasks to hand to the list handler for {list.Name}."); throw new InvalidOperationException($"No tasks to hand to the list handler for {list.Name}.");
var numbers = chosen.Select(t => t.Number).ToList();
if (!_clients.AnyConnected)
{
return new StartListHandlerResult(false, listId, list.Name, chosen.Count, numbers,
"No ClaudeDo App is connected to this worker, so the request could not be delivered. Open the app and retry.");
}
var ids = chosen.Select(t => t.Id).ToList(); var ids = chosen.Select(t => t.Id).ToList();
await _broadcaster.ListHandlerStartRequested(listId, ids); await _broadcaster.ListHandlerStartRequested(listId, ids);
return new StartListHandlerResult(true, listId, list.Name, ids.Count, numbers); return new StartListHandlerResult(true, listId, list.Name, ids.Count, chosen.Select(t => t.Number).ToList());
} }
} }
@@ -1,19 +0,0 @@
namespace ClaudeDo.Worker.Hub;
/// <summary>
/// Counts SignalR clients (the ClaudeDo App) currently connected to <see cref="WorkerHub"/>.
/// A <c>Hub</c> instance is transient per connection, so this lives as a DI singleton and is
/// updated from <see cref="WorkerHub.OnConnectedAsync"/>/<see cref="WorkerHub.OnDisconnectedAsync"/>
/// — the only way an out-of-band caller (external MCP's start_list_handler, which only
/// broadcasts) can tell whether anything is listening before claiming it did something.
/// </summary>
public sealed class ConnectedClientTracker
{
private int _count;
public bool AnyConnected => Volatile.Read(ref _count) > 0;
public void Increment() => Interlocked.Increment(ref _count);
public void Decrement() => Interlocked.Decrement(ref _count);
}
+8 -54
View File
@@ -73,8 +73,6 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
private readonly TicketClientFactory _ticketClients; private readonly TicketClientFactory _ticketClients;
private readonly TicketImportService _ticketImport; private readonly TicketImportService _ticketImport;
private readonly HandlerRestartCoordinator? _handlerRestart; private readonly HandlerRestartCoordinator? _handlerRestart;
private readonly HandlerRoundState? _roundState;
private readonly ConnectedClientTracker? _clientTracker;
public WorkerHub( public WorkerHub(
QueueService queue, QueueService queue,
@@ -114,9 +112,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
TicketPatStore ticketPat = null!, TicketPatStore ticketPat = null!,
TicketClientFactory ticketClients = null!, TicketClientFactory ticketClients = null!,
TicketImportService ticketImport = null!, TicketImportService ticketImport = null!,
HandlerRestartCoordinator? handlerRestart = null, HandlerRestartCoordinator? handlerRestart = null)
HandlerRoundState? roundState = null,
ConnectedClientTracker? clientTracker = null)
{ {
_queue = queue; _queue = queue;
_waker = waker; _waker = waker;
@@ -156,22 +152,6 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
_ticketClients = ticketClients; _ticketClients = ticketClients;
_ticketImport = ticketImport; _ticketImport = ticketImport;
_handlerRestart = handlerRestart; _handlerRestart = handlerRestart;
_roundState = roundState;
_clientTracker = clientTracker;
}
// Tracks connected UI clients so an out-of-band caller (external MCP's start_list_handler)
// can tell whether the broadcast it just sent had anyone to receive it.
public override Task OnConnectedAsync()
{
_clientTracker?.Increment();
return base.OnConnectedAsync();
}
public override Task OnDisconnectedAsync(Exception? exception)
{
_clientTracker?.Decrement();
return base.OnDisconnectedAsync(exception);
} }
// Persistence boundary for the session_skills JSON-array columns (task/list/global). // Persistence boundary for the session_skills JSON-array columns (task/list/global).
@@ -478,7 +458,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
} }
public Task<MergeResultDto> MergeTask( public Task<MergeResultDto> MergeTask(
string taskId, string targetBranch, bool removeWorktree, string commitMessage, bool autostash = false) string taskId, string targetBranch, bool removeWorktree, string commitMessage)
=> HubGuard(async () => => HubGuard(async () =>
{ {
// A blank message is handed through deliberately — TaskMergeService builds the // A blank message is handed through deliberately — TaskMergeService builds the
@@ -488,9 +468,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
targetBranch ?? "", targetBranch ?? "",
removeWorktree, removeWorktree,
commitMessage, commitMessage,
leaveConflictsInTree: false, CancellationToken.None);
CancellationToken.None,
autostash: autostash);
return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage); return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage);
}); });
@@ -685,7 +663,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
if (!result.Ok) throw new HubException(result.Reason ?? "dequeue failed"); if (!result.Ok) throw new HubException(result.Reason ?? "dequeue failed");
} }
public Task<MergeResultDto> ApproveReview(string taskId, string targetBranch, bool autostash = false) public Task<MergeResultDto> ApproveReview(string taskId, string targetBranch)
=> HubGuard(async () => => HubGuard(async () =>
{ {
bool hasChildren; bool hasChildren;
@@ -700,7 +678,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
return new MergeResultDto(unitResult.Status, Array.Empty<string>(), unitResult.Reason); return new MergeResultDto(unitResult.Status, Array.Empty<string>(), unitResult.Reason);
} }
var r = await _mergeService.ApproveAndMergeAsync(taskId, targetBranch ?? "", CancellationToken.None, autostash); var r = await _mergeService.ApproveAndMergeAsync(taskId, targetBranch ?? "", CancellationToken.None);
if (r.Status == TaskMergeService.StatusBlocked) if (r.Status == TaskMergeService.StatusBlocked)
throw new HubException(r.ErrorMessage ?? "approve failed"); throw new HubException(r.ErrorMessage ?? "approve failed");
return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage); return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage);
@@ -789,13 +767,12 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
// Builds the launch spec for an embedded ConPTY "merge helper" session that drives the given // Builds the launch spec for an embedded ConPTY "merge helper" session that drives the given
// tasks to a merged/Done state via the mcp__claudedo__* tools. listId scopes the brief label // tasks to a merged/Done state via the mcp__claudedo__* tools. listId scopes the brief label
// and cwd to that list. handlerTaskId is the id returned by CreateMergeHelperTask -- it is // and cwd to that list. handlerTaskId is the id returned by CreateMergeHelperTask -- it is
// rendered into the brief so the session can call handoff_list_handler on itself. model // rendered into the brief so the session can call handoff_list_handler on itself.
// overrides the triage session's model (null = default opus). public Task<LaunchSpec> GetMergeHelperLaunchSpec(string[] taskIds, string listId, string handlerTaskId) => HubGuard(() =>
public Task<LaunchSpec> GetMergeHelperLaunchSpec(string[] taskIds, string listId, string handlerTaskId, string? model) => HubGuard(() =>
{ {
if (_interactiveLaunchSpec is null) if (_interactiveLaunchSpec is null)
throw new InvalidOperationException("Interactive launch spec service is not configured."); throw new InvalidOperationException("Interactive launch spec service is not configured.");
return _interactiveLaunchSpec.BuildForMergeHelperAsync(taskIds, listId, handlerTaskId, model, Context.ConnectionAborted); return _interactiveLaunchSpec.BuildForMergeHelperAsync(taskIds, listId, handlerTaskId, Context.ConnectionAborted);
}); });
// Creates the ClaudeDo task that owns a list-handler run, before the ConPTY tile opens -- // Creates the ClaudeDo task that owns a list-handler run, before the ConPTY tile opens --
@@ -833,24 +810,6 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
_ = _handlerRestart.OnSessionExitedAsync(taskId, exitCode, CancellationToken.None); _ = _handlerRestart.OnSessionExitedAsync(taskId, exitCode, CancellationToken.None);
} }
// The Mission Control "abandon run" action: what a handler round queued/started that is still
// open (Queued or Running), read from the structured HandlerRoundState store rather than
// parsed out of the handler task's description. Empty when there is no round entry (7-day
// retention, or a run from before this feature) or the round has no open tasks -- the caller
// treats both as "nothing to confirm, just close the pane".
public async Task<IReadOnlyList<HandlerOpenTaskDto>> GetHandlerOpenTasks(string handlerTaskId)
{
var round = _roundState?.Get(handlerTaskId);
if (round is not { TaskIds.Count: > 0 }) return Array.Empty<HandlerOpenTaskDto>();
await using var ctx = await _dbFactory.CreateDbContextAsync();
return await ctx.Tasks.AsNoTracking()
.Where(t => round.TaskIds.Contains(t.Id)
&& (t.Status == TaskStatus.Queued || t.Status == TaskStatus.Running))
.Select(t => new HandlerOpenTaskDto(t.Id, t.Title))
.ToListAsync();
}
// Starts a planning session (worktree + prompt files + token, task -> Planning) and returns // Starts a planning session (worktree + prompt files + token, task -> Planning) and returns
// the launch spec for an embedded ConPTY planning terminal -- the ConPTY replacement for // the launch spec for an embedded ConPTY planning terminal -- the ConPTY replacement for
// StartPlanningSessionAsync's external wt window. On any spec-build failure the just-started // StartPlanningSessionAsync's external wt window. On any spec-build failure the just-started
@@ -1396,11 +1355,6 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
try try
{ {
var result = await _ticketImport.ImportAsync(listId, Context.ConnectionAborted); var result = await _ticketImport.ImportAsync(listId, Context.ConnectionAborted);
// ListUpdated allein reicht nicht: die UI liest das als "Listen-Metadaten geaendert"
// und patcht nur bestehende Zeilen. Neue Tasks tauchen nur ueber TaskUpdated auf, wie
// bei jedem anderen out-of-band Creator (add_task und Co.).
foreach (var taskId in result.CreatedTaskIds)
await _broadcaster.TaskUpdated(taskId);
await _broadcaster.ListUpdated(listId); await _broadcaster.ListUpdated(listId);
return new TicketImportResultDto(result.Examined, result.Created); return new TicketImportResultDto(result.Examined, result.Created);
} }

Some files were not shown because too many files have changed in this diff Show More