Skip to content

refactor(desktop): 簡化互動註冊與對話框命名 - #765

Merged
crazysmile-PhD merged 2 commits into
mainfrom
refactor/desktop-interactions
Nov 16, 2026
Merged

crazysmile-PhD merged 2 commits into
mainfrom
refactor/desktop-interactions

Conversation

@crazysmile-PhD

Copy link
Copy Markdown
Owner

新增頁面/對話框原本必須同時更新 typed factory 與 DI 清單,容易留下不同步的型別登記。此 PR 由既有 factory 推導 31 個頁面與 8 個對話框的 transient 註冊,移除 47 筆重複手寫登記;缺少 enum mapping 時會在 composition 階段失敗。

  • 統一三個對話框名稱為 AlertDialog、DownloadSetterDialog、UpgradingDialog,同步 XAML、引用與既有 analyzer baseline 的型別/路徑。
  • 分開 XAML 載入與 Host 初始化,讓 real Host smoke 逐一驗證所有頁面的 production DataTemplate、DataContext 傳遞,以及頁面/對話框的 transient 實例隔離。
  • 將測試共用資源移到 TestApplication 初始化,修正獨立執行 UiSmokeTests 時缺少語系資源的順序相依;此修正獨立為提交 fd31440。

設計取捨、Parnas/Reflexion Models 論文與 Avalonia 官方範例的對照見 Desktop Feature Locality。保留 typed factory 與 XAML 各自的責任,沒有新增全域 registry 或名稱推測式 ViewLocator。

本機驗證:Windows x64、.NET SDK 11.0.100、clean commit 27f7c7a2d203229ce9813988801b3eba87f12cb3。

  • 完整 strict Release build:0 warnings、0 errors。
  • script/test-solution.ps1 -Configuration Release -NoRestore -NoBuild:8 個 Windows 適用測試專案,2000 passed、0 failed;另有 1 個 Explicit 子程序 probe 不在一般回合直接執行。
  • format、module-boundary audit、actionlint 1.7.12、diff check 全部通過。
  • NuGet vulnerable/deprecated 檢查沒有發現套件;Gitleaks 8.30.1:0 findings。

跨平台 exact-head CI 與 review 待 PR 執行。工作追蹤:DownKyiCore 工作項目「簡化桌面互動註冊與對話框命名」。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T08:09:18.788223Z 27f7c7a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@crazysmile-PhD
crazysmile-PhD merged commit 0329d48 into main Nov 16, 2026
8 checks passed
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.

1 participant