feat: Connect Device dialog matching design philosophy#488
Conversation
Redesigns the Connect Device dialog to match the dark visual system established in the Channels, Devices, Settings, and navigation-rail panes. Tile-based device lists with colored type stripes (purple for WiFi, cyan for USB, amber for firmware), segmented tab strip, accent pill actions. Palette pulled from DesignTokens.xaml — only the two connection-type stripe brushes remain local per the color-carries- meaning principle. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Review Summary by QodoRedesign Connect Device dialog with dark tile-based UI system
WalkthroughsDescription• Redesigns Connect Device dialog with dark tile-based UI matching design system • Implements segmented tab strip with colored connection-type stripes (purple WiFi, cyan USB, amber firmware) • Replaces ListView with styled ListBox tiles featuring accent borders on selection • Adds accent pill buttons, dark text fields, and scanning state overlays • Pulls palette from DesignTokens.xaml; increases dialog size to 560×500 Diagramflowchart LR
A["Old ListView<br/>layout"] -->|"Replace with<br/>tile-based ListBox"| B["Device tiles<br/>with stripes"]
C["Basic buttons"] -->|"Style as<br/>accent pills"| D["Rounded accent<br/>buttons"]
E["Simple TabControl"] -->|"Add segmented<br/>strip styling"| F["Dark tab control<br/>with borders"]
G["Inline text fields"] -->|"Wrap in<br/>dark borders"| H["Styled dark<br/>text fields"]
I["No scanning UI"] -->|"Add overlay<br/>with spinner"| J["Centered scanning<br/>state"]
B --> K["Cohesive dark<br/>dialog"]
D --> K
F --> K
H --> K
J --> K
File Changes1. Daqifi.Desktop/View/ConnectionDialog.xaml
|
Code Review by Qodo
1.
|
Response to Qodo reviewBug #1 — Close races async connect: Disagreed for this PR. Replied in the inline thread — the Bug #2 — Connect closes with no selection: Disagreed for this PR, same reasoning — pre-existing behavior. |
Addresses the two Qodo-flagged bugs on this PR. Both are pre-existing behavior since the SVN migration in ec6602d; consolidating the fix here since it touches the same buttons and code paths as the visual redesign. The Connect buttons wired both `Command` (async) and `Click="btnConnect_Click"` (sync `Close()`), which closed the window while the connect task was still running. The window's Closing handler then disposed discovery resources a second time — racing any cleanup the connect task had already started, and closing the dialog even when nothing was selected (empty SelectedItems → no connect, but still closed). Replace the click handler with a CloseRequested event raised by the VM only after each connect command's awaited work succeeds. Add empty-input guards so clicking Connect with no selection no longer closes the dialog. Make ConnectionDialogViewModel.Close idempotent so double-invocation from the connect path and the Closing handler can't double-dispose the discovery finders. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Update — consolidated the Qodo-flagged fixes into this PR after all (commit e6b13b8). Separating them made no practical sense: same buttons, same code paths, guaranteed conflict with whichever merged first. Folded the follow-up branch in here and closed #491. Bug 1 (close race) — fixed: removed Bug 2 (connect with no selection) — fixed: added explicit empty-input guards at the top of each connect command; the new Tests: added |
The redesigned Connect Device dialog replaced the device-tile thumbnail with styled badges, so Images/Nq.png is no longer referenced anywhere. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📊 Code Coverage ReportSummarySummary
CoverageDAQiFi - 17.2%
Daqifi.Desktop.Common - 30.8%
Daqifi.Desktop.IO - 100%
Coverage report generated by ReportGenerator • View full report in build artifacts |
Summary
Resources/DesignTokens.xamlvia App.xaml — only the two connection-type stripe brushes remain local, per the color-carries-meaning principle.Test plan
🤖 Generated with Claude Code