From f74c7dd70b5da4cea268aed0de757c13251ed862 Mon Sep 17 00:00:00 2001 From: mika kuns Date: Mon, 10 Aug 2026 13:46:56 +0200 Subject: [PATCH] fix(ui): diff viewer opens non-modal and maximizable The diff viewer used ShowDialog at both call sites (task details, worktrees overview), blocking navigation of the rest of the app while open. Switch both to Window.Show(owner) and reuse the one open window (swap DataContext, Activate()) instead of stacking a second one on re-open. Add an opt-in maximize/restore button + double-click-titlebar toggle to ModalShell (ShowMaximizeButton, default false so other modals are untouched), wired on for DiffViewerView only. Reuses the existing Icon.WinMax/WinRestore geometry and OffScreenMargin inset from MainWindow's own maximize handling. The review gate (Approve & Merge locked until the diff is opened) already fires DiffViewed before the dialog/window is shown, so it is unaffected by the modal-to-non-modal change. --- src/ClaudeDo.Localization/locales/de.json | 4 +- src/ClaudeDo.Localization/locales/en.json | 4 +- .../Views/Controls/ModalShell.axaml | 9 +++- .../Views/Controls/ModalShell.axaml.cs | 46 +++++++++++++++++++ .../Views/Islands/DetailsIslandView.axaml.cs | 23 ++++++++-- .../Views/Modals/DiffViewerView.axaml | 2 +- src/ClaudeDo.Ui/Views/WindowDialogService.cs | 18 +++++++- 7 files changed, 95 insertions(+), 11 deletions(-) diff --git a/src/ClaudeDo.Localization/locales/de.json b/src/ClaudeDo.Localization/locales/de.json index dfdd95ae..1c9ff99d 100644 --- a/src/ClaudeDo.Localization/locales/de.json +++ b/src/ClaudeDo.Localization/locales/de.json @@ -365,7 +365,9 @@ "splitView": "Nebeneinander", "wrapLines": "Zeilenumbruch", "paneBase": "BASIS", - "paneWorktree": "WORKTREE" + "paneWorktree": "WORKTREE", + "maximize": "Maximieren", + "restore": "Wiederherstellen" }, "worktreesOverview": { "refresh": "Aktualisieren", diff --git a/src/ClaudeDo.Localization/locales/en.json b/src/ClaudeDo.Localization/locales/en.json index a4220211..e95adc87 100644 --- a/src/ClaudeDo.Localization/locales/en.json +++ b/src/ClaudeDo.Localization/locales/en.json @@ -365,7 +365,9 @@ "splitView": "Side by side", "wrapLines": "Wrap lines", "paneBase": "BASE", - "paneWorktree": "WORKTREE" + "paneWorktree": "WORKTREE", + "maximize": "Maximize", + "restore": "Restore" }, "worktreesOverview": { "refresh": "Refresh", diff --git a/src/ClaudeDo.Ui/Views/Controls/ModalShell.axaml b/src/ClaudeDo.Ui/Views/Controls/ModalShell.axaml index c3642f82..5bf693bd 100644 --- a/src/ClaudeDo.Ui/Views/Controls/ModalShell.axaml +++ b/src/ClaudeDo.Ui/Views/Controls/ModalShell.axaml @@ -14,14 +14,19 @@ Background="{DynamicResource DeepBrush}" BorderBrush="{DynamicResource LineBrush}" BorderThickness="0,0,0,1"> - + - +