From b4d69f5db32214b7665f6c9f0c56990a86b92fd0 Mon Sep 17 00:00:00 2001 From: lacvet Date: Mon, 6 Apr 2026 12:12:44 +0900 Subject: [PATCH] =?UTF-8?q?AX=20Agent=20popup=20=EC=8B=9C=EA=B0=81=20?= =?UTF-8?q?=EC=96=B8=EC=96=B4=20=ED=86=B5=EC=9D=BC=20=EB=B0=8F=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20surface=20=ED=9B=84=EC=86=8D=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공통 popup factory가 surface visual helper를 사용하도록 정리 - worktree 선택과 권한 모드 row의 border/hover/selected 규칙을 같은 visual language로 통일 - README와 DEVELOPMENT 문서에 2026-04-06 11:27 (KST) 기준 popup polish 누적 범위 반영 - dotnet build 검증 경고 0, 오류 0 확인 --- README.md | 3 + docs/DEVELOPMENT.md | 2 + .../ChatWindow.PermissionPresentation.cs | 11 ++-- .../Views/ChatWindow.PopupPresentation.cs | 56 ++----------------- .../ChatWindow.SelectionPopupPresentation.cs | 2 +- 5 files changed, 18 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 65c6e54..7693724 100644 --- a/README.md +++ b/README.md @@ -1200,3 +1200,6 @@ MIT License - 업데이트: 2026-04-06 11:20 (KST) - preview/file browser의 popup과 row 스타일을 공통 surface helper로 통일했다. [ChatWindow.SurfaceVisualPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.SurfaceVisualPresentation.cs)를 추가해 popup container, popup menu item, separator, file tree header를 공통 helper로 만들고, [ChatWindow.PreviewPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.PreviewPresentation.cs) 와 [ChatWindow.FileBrowserPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.FileBrowserPresentation.cs) 가 같은 surface 언어를 쓰도록 맞췄다. - 이 단계는 큰 구조 분리 이후의 visual language polish 1차로, preview와 file browser가 서로 다른 위젯처럼 보이던 차이를 줄이고 이후 공통 popup/surface 확장을 쉽게 하는 기반을 마련했다. +- 업데이트: 2026-04-06 11:27 (KST) + - popup 계열 visual language 통일을 이어서 진행했다. [ChatWindow.PopupPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.PopupPresentation.cs)의 공통 popup factory와 menu item 생성이 surface helper를 사용하도록 바뀌었고, [ChatWindow.SelectionPopupPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.SelectionPopupPresentation.cs), [ChatWindow.PermissionPresentation.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.PermissionPresentation.cs) 도 선택 row의 border/hover/background 규칙을 같은 언어로 맞췄다. + - 이 단계까지로 preview, file browser, worktree 선택, 권한 모드 popup이 거의 같은 시각 규칙을 공유하게 됐다. 남은 polish는 세부 spacing이나 색 강조처럼 더 미세한 조정 수준이다. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 86b4928..0bfad9c 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -4937,3 +4937,5 @@ ow + toggle ?쒓컖 ?몄뼱濡??ㅼ떆 ?뺣젹?덈떎. - Document update: 2026-04-06 11:11 (KST) - This keeps sidebar state presentation more cohesive and further narrows the main chat window file toward orchestration-only responsibilities. Remaining work is now post-plan polish rather than another major structural split. - Document update: 2026-04-06 11:20 (KST) - Added `ChatWindow.SurfaceVisualPresentation.cs` and introduced shared surface helpers for popup containers, popup menu rows, separators, and file-tree headers. `ChatWindow.PreviewPresentation.cs` and `ChatWindow.FileBrowserPresentation.cs` now use the same popup/surface language instead of duplicating slightly different visual styles. - Document update: 2026-04-06 11:20 (KST) - This is the first visual-language polish pass after the large structure split. It reduces the feeling that preview and file browser are separate widgets and makes future popup/surface refinements reusable. +- Document update: 2026-04-06 11:27 (KST) - Continued popup visual-language unification by switching `ChatWindow.PopupPresentation.cs` to the shared surface helpers and aligning selection/permission rows in `ChatWindow.SelectionPopupPresentation.cs` and `ChatWindow.PermissionPresentation.cs` with the same border, hover, and selected-state rules. +- Document update: 2026-04-06 11:27 (KST) - At this point preview, file browser, worktree chooser, and permission-mode popup surfaces all share nearly the same visual language; remaining work is minor spacing/color polish rather than another behavior or structure change. diff --git a/src/AxCopilot/Views/ChatWindow.PermissionPresentation.cs b/src/AxCopilot/Views/ChatWindow.PermissionPresentation.cs index ec1ad36..d090d90 100644 --- a/src/AxCopilot/Views/ChatWindow.PermissionPresentation.cs +++ b/src/AxCopilot/Views/ChatWindow.PermissionPresentation.cs @@ -26,14 +26,17 @@ public partial class ChatWindow void AddPermissionRows(Panel container, IEnumerable levels) { + var hoverBackground = TryFindResource("ItemHoverBackground") as Brush ?? BrushFromHex("#F8FAFC"); + var selectedBackground = TryFindResource("HintBackground") as Brush ?? BrushFromHex("#F8FAFC"); + var selectedBorder = TryFindResource("AccentColor") as Brush ?? BrushFromHex("#D6E4FF"); foreach (var item in levels) { var level = item.Mode; var isActive = level.Equals(current, StringComparison.OrdinalIgnoreCase); var rowBorder = new Border { - Background = isActive ? BrushFromHex("#F8FAFC") : Brushes.Transparent, - BorderBrush = Brushes.Transparent, + Background = isActive ? selectedBackground : Brushes.Transparent, + BorderBrush = isActive ? selectedBorder : Brushes.Transparent, BorderThickness = new Thickness(1), CornerRadius = new CornerRadius(12), Padding = new Thickness(10, 10, 10, 10), @@ -93,8 +96,8 @@ public partial class ChatWindow row.Children.Add(check); rowBorder.Child = row; - rowBorder.MouseEnter += (_, _) => rowBorder.Background = BrushFromHex("#F8FAFC"); - rowBorder.MouseLeave += (_, _) => rowBorder.Background = isActive ? BrushFromHex("#F8FAFC") : Brushes.Transparent; + rowBorder.MouseEnter += (_, _) => rowBorder.Background = isActive ? selectedBackground : hoverBackground; + rowBorder.MouseLeave += (_, _) => rowBorder.Background = isActive ? selectedBackground : Brushes.Transparent; var capturedLevel = level; void ApplyPermission() diff --git a/src/AxCopilot/Views/ChatWindow.PopupPresentation.cs b/src/AxCopilot/Views/ChatWindow.PopupPresentation.cs index f15fcd5..b2a27fd 100644 --- a/src/AxCopilot/Views/ChatWindow.PopupPresentation.cs +++ b/src/AxCopilot/Views/ChatWindow.PopupPresentation.cs @@ -19,27 +19,8 @@ public partial class ChatWindow { _sharedContextPopup?.SetCurrentValue(Popup.IsOpenProperty, false); - var bg = TryFindResource("LauncherBackground") as Brush ?? Brushes.White; - var border = TryFindResource("BorderColor") as Brush ?? Brushes.Gray; var panel = new StackPanel { Margin = new Thickness(2) }; - var container = new Border - { - Background = bg, - BorderBrush = border, - BorderThickness = new Thickness(1), - CornerRadius = new CornerRadius(10), - Padding = new Thickness(6), - MinWidth = minWidth, - Child = panel, - Effect = new System.Windows.Media.Effects.DropShadowEffect - { - BlurRadius = 16, - ShadowDepth = 3, - Opacity = 0.18, - Color = Colors.Black, - Direction = 270, - }, - }; + var container = CreateSurfacePopupContainer(panel, minWidth, new Thickness(6)); var popup = new Popup { @@ -64,40 +45,13 @@ public partial class ChatWindow Brush hoverBrush, Action action) { - var sp = new StackPanel { Orientation = Orientation.Horizontal }; - sp.Children.Add(new TextBlock - { - Text = icon, - FontFamily = new FontFamily("Segoe MDL2 Assets"), - FontSize = 12.5, - Foreground = iconBrush, - VerticalAlignment = VerticalAlignment.Center, - Margin = new Thickness(0, 0, 9, 0), - }); - sp.Children.Add(new TextBlock - { - Text = label, - FontSize = 12.5, - Foreground = labelBrush, - VerticalAlignment = VerticalAlignment.Center, - }); - - var item = new Border - { - Child = sp, - Background = Brushes.Transparent, - CornerRadius = new CornerRadius(8), - Cursor = Cursors.Hand, - Padding = new Thickness(10, 7, 12, 7), - Margin = new Thickness(0, 1, 0, 1), - }; - item.MouseEnter += (s, _) => { if (s is Border b) b.Background = hoverBrush; }; - item.MouseLeave += (s, _) => { if (s is Border b) b.Background = Brushes.Transparent; }; - item.MouseLeftButtonUp += (_, _) => + var item = CreateSurfacePopupMenuItem(icon, iconBrush, label, () => { popup.SetCurrentValue(Popup.IsOpenProperty, false); action(); - }; + }, labelBrush); + item.MouseEnter += (s, _) => { if (s is Border b) b.Background = hoverBrush; }; + item.MouseLeave += (s, _) => { if (s is Border b) b.Background = Brushes.Transparent; }; return item; } diff --git a/src/AxCopilot/Views/ChatWindow.SelectionPopupPresentation.cs b/src/AxCopilot/Views/ChatWindow.SelectionPopupPresentation.cs index f560c73..b7dabd0 100644 --- a/src/AxCopilot/Views/ChatWindow.SelectionPopupPresentation.cs +++ b/src/AxCopilot/Views/ChatWindow.SelectionPopupPresentation.cs @@ -118,7 +118,7 @@ public partial class ChatWindow var row = new Border { Background = selected ? hintBackground : Brushes.Transparent, - BorderBrush = selected ? BrushFromHex("#D6E4FF") : Brushes.Transparent, + BorderBrush = selected ? (TryFindResource("AccentColor") as Brush ?? BrushFromHex("#D6E4FF")) : Brushes.Transparent, BorderThickness = new Thickness(1), CornerRadius = new CornerRadius(12), Padding = new Thickness(12, 10, 12, 10),