Skip to content

Draw the Move-to-Applications window in the Kcap theme - #1239

Merged
alexeyzimarev merged 1 commit into
mainfrom
norton/move-to-apps-dialog-theme
Sep 30, 2026
Merged

alexeyzimarev merged 1 commit into
mainfrom
norton/move-to-apps-dialog-theme

Conversation

@nortonandreev

@nortonandreev nortonandreev commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1238 — AI-3370

What & why

The window macOS shows when the app runs from the disk image, or anywhere outside Applications, was built from Fluent defaults: a grey title bar over a black body, grey buttons and tight line height. It is now its own InstallLocationWindow on the Kcap theme. The canvas extends into the title bar, Quit is a kcapChip and Move is a kcapPrimary, and the body text uses subtitle line height. Above the text, the app icon points at a blue folder. Its copy names the app instead of opening with "It is…". A failed move shows in a danger panel whose text can be selected, and the button reads "Moving…" while the move runs.

Where to look

The window sizes itself to its content height. The headless platform can't lay that out, but no test builds this window.

Verification

  • Launched the Debug build from a Fake.app bundle outside Applications: the guard opened the new window, checked by eye.
  • dotnet run --project test/Capacitor.App.Tests.Unit: 2811 passed, 0 failed.

Visuals

Before

Screenshot 2026-09-28 at 19 39 07

After

Screenshot 2026-09-30 at 16 12 32

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Move-to-Applications window redrawn in the Kcap theme

✨ Enhancement 🕐 20-40 Minutes

Grey Divider

AI Description

• Replaces the ad-hoc Fluent-styled Move-to-Applications dialog with a dedicated
 InstallLocationWindow on the Kcap theme.
• Canvas background extends into the title bar, with kcapChip/kcapPrimary buttons, subtitle
 line-height copy, and an icon-to-folder graphic.
• Copy now names the app explicitly instead of "It is…", errors render in a selectable danger panel,
 and the Move button shows "Moving…" while in flight.
• App.BuildInstallLocationWindow shrinks to a thin factory delegating layout and interaction to
 the new view.
Diagram

graph TD
    A["App.axaml.cs Guard"] --> B["BuildInstallLocationWindow()"] --> C["InstallLocationWindow.axaml"]
    C --> D["InstallLocationWindow.axaml.cs"]
    D --> E["ApplicationsMover"]
    D --> F["WindowChrome.BeginDrag"]
    C --> G["Kcap Theme Resources"]
Loading
High-Level Assessment

Extracting the dialog into a themed Window subclass mirrors the pattern already used by other app windows (LifecyclePromptWindow, SignInWindow, etc.), keeping styling centralized in Kcap theme resources rather than duplicating Fluent defaults. This is the right approach for consistency with the rest of the app; no meaningfully different architecture was worth considering here.

Files changed (3) +102 / -44

Enhancement (2) +98 / -0
InstallLocationWindow.axamlAdd Kcap-themed Move-to-Applications window layout +57/-0

Add Kcap-themed Move-to-Applications window layout

• New XAML view with extended client area, app-icon-to-folder graphic, subtitle-style headline/body text, a selectable-text danger panel for errors, and kcapChip/kcapPrimary buttons.

src/Capacitor.App/Views/InstallLocationWindow.axaml

InstallLocationWindow.axaml.csAdd code-behind for move/quit interaction and error/progress states +41/-0

Add code-behind for move/quit interaction and error/progress states

• Wires the Move and Quit buttons, toggles a 'Moving…' button state during the async move, surfaces move errors in the danger panel, and hooks window drag via WindowChrome.

src/Capacitor.App/Views/InstallLocationWindow.axaml.cs

Refactor (1) +4 / -44
App.axaml.csSimplify BuildInstallLocationWindow to delegate to new view +4/-44

Simplify BuildInstallLocationWindow to delegate to new view

• Removes the inline Fluent-styled StackPanel/Button construction and error handling, updates the explanation copy to name the app explicitly, and returns a new InstallLocationWindow instance instead.

src/Capacitor.App/App.axaml.cs

@nortonandreev nortonandreev self-assigned this Sep 30, 2026
@qodo-code-review

qodo-code-review Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. The illustration gets a redundant comment ✗ Dismissed
Description
The comment above the icon, arrow, and folder describes the illustration rather than a
behavior-critical constraint. The adjacent markup and Move to Applications heading already convey
that meaning, leaving a later editor redundant prose to maintain.
Code

src/Capacitor.App/Views/InstallLocationWindow.axaml[15]

+            <!-- The move itself, drawn: this app, heading into the Applications folder. -->
Relevance

●●● Strong

Recent XAML precedents consistently accept removing comments that merely restate adjacent markup.

PR-#1199
PR-#1094
PR-#904

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added comment describes the icon-to-folder illustration immediately below it; it does not
document a non-obvious constraint required by the checklist item.

Rule 2762993: Restrict comments to documenting non-obvious, behavior‑critical constraints
src/Capacitor.App/Views/InstallLocationWindow.axaml[15-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The comment describes what the adjacent illustration already shows.

## Fix Focus Areas
- src/Capacitor.App/Views/InstallLocationWindow.axaml[15-15]

## Recommended Fix
Remove the comment.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: This is a localized UI and interaction change with asynchronous move/error handling, window lifecycle behavior, and platform-specific Avalonia theming, so it warrants a careful single-pass review.

Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread src/Capacitor.App/Views/InstallLocationWindow.axaml
@alexeyzimarev
alexeyzimarev merged commit e42c258 into main Sep 30, 2026
8 checks passed
@alexeyzimarev
alexeyzimarev deleted the norton/move-to-apps-dialog-theme branch September 30, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move-to-Applications window ignores the desktop app theme

2 participants