From b3d219e75ad6cd935624d8d36596aad726677068 Mon Sep 17 00:00:00 2001 From: perditavojo <117562794+perditavojo@users.noreply.github.com> Date: Sun, 3 May 2026 08:41:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs(guidelines):=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=B8=AC=E8=A9=A6=E6=8C=87=E4=BB=A4=E8=88=87=20Steam=20Deck=20?= =?UTF-8?q?=E6=94=AF=E6=8F=B4=E9=82=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 統一文件中的 MTP 測試指令,改用 dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj。 補充 Wine、Proton 與 Gamescope 的 best-effort 支援政策,明確保留既有 Steam Deck 相容性保護並維持 WinForms 技術方向。 本次僅更新文件與 agent 指引,未變更應用程式行為。 --- .github/copilot-instructions.md | 2 +- AGENTS.md | 5 +++-- CLAUDE.md | 2 +- GEMINI.md | 2 +- README.md | 11 +++++++---- docs/engineering/environment.md | 8 ++++++++ 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 68f28fd..678b226 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -31,5 +31,5 @@ ```powershell [Console]::OutputEncoding = [Console]::InputEncoding = [System.Text.Encoding]::UTF8 dotnet build src/InputBox/InputBox.csproj --configuration Debug -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj ``` diff --git a/AGENTS.md b/AGENTS.md index a32bd01..d34be7c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,6 +36,7 @@ | 任務類型 | 必讀文件 | |---|---| | 任何程式碼異動 | `docs/engineering/environment.md`、`docs/engineering/core-engineering.md` | +| Steam Deck、Wine、Proton、Gamescope、支援平台或 UI 技術方向 | `docs/engineering/environment.md` | | UI、WinForms、DPI、版面、視覺回饋、螢幕報讀 | `docs/engineering/a11y-safety.md` | | 控制器輸入、XInput、GameInput、按鍵映射 | `docs/engineering/gamepad-api.md` | | 使用者可見文字、`.resx`、術語、助記鍵 | `docs/engineering/localization.md` | @@ -131,7 +132,7 @@ _cts?.Token ?? CancellationToken.None ```powershell dotnet build src/InputBox/InputBox.csproj --configuration Debug -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj ``` - 若測試會讀寫 `%AppData%` 相關資料,必須依 `docs/engineering/testing.md` 採用檔案系統隔離模式。 @@ -176,7 +177,7 @@ docs/engineering/ 交付前至少確認: 1. `dotnet build src/InputBox/InputBox.csproj --configuration Debug` -2. 若異動可測,執行 `dotnet test tests/InputBox.Tests/InputBox.Tests.csproj` +2. 若異動可測,執行 `dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj` 3. 修改過的 `*.cs` 沒有新增 IDE 或 CS 診斷 4. 若有使用者可見文字異動,已同步更新對應 `.resx` 5. 若有輸入、輸出、剪貼簿、快速鍵或控制器邏輯異動,已重新檢查 `docs/engineering/git-commit-safety.md` diff --git a/CLAUDE.md b/CLAUDE.md index 8e7d522..8635fae 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -30,5 +30,5 @@ ```powershell [Console]::OutputEncoding = [Console]::InputEncoding = [System.Text.Encoding]::UTF8 dotnet build src/InputBox/InputBox.csproj --configuration Debug -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj ``` diff --git a/GEMINI.md b/GEMINI.md index a0803e9..d380d5b 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -30,5 +30,5 @@ ```powershell [Console]::OutputEncoding = [Console]::InputEncoding = [System.Text.Encoding]::UTF8 dotnet build src/InputBox/InputBox.csproj --configuration Debug -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj ``` diff --git a/README.md b/README.md index 1dc085b..dafb409 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ 目前版本已針對 **Wine/Proton** 與 **SteamOS 3 的遊戲模式(Gamescope)** 加入相容性調整。整體原則是:**Steam Deck 桌面模式盡量保留完整功能;只有遊戲模式(Gamescope)會套用保守限制。** +本支援屬於 **best-effort compatibility**:專案會保留既有 Wine/Proton/Gamescope 偵測、Steam 虛擬鍵盤喚起與 Gamescope 畫面恢復機制,但不承諾原生 Linux 桌面版本。現階段仍以 Windows 11 + WinForms 作為主要技術路線;未來只有在實機回報、既有功能回歸或相容性保護失效時,才會繼續投入 Steam Deck 相容性修補。 + - **Steam Deck 桌面模式(KDE Plasma)**: - 不套用 Gamescope 專用限制。 - 高風險快速鍵與返回行為維持可用。 @@ -74,6 +76,7 @@ - **右鍵選單**:透過觸控螢幕或觸控板開啟右鍵選單,選擇「**恢復 Gamescope 畫面**」。 - **注意事項**: - 本專案目前的 Linux 相容性調整,重點在於 **Steam Deck/SteamOS 3 + Wine/Proton** 的實際使用情境。 + - 目前沒有計畫為 Steam Deck 支援而遷移到 WPF、WinUI 3、Avalonia 或 .NET MAUI;現有 WinForms 架構仍最貼近本專案需要的 Win32、TabTip、全域快速鍵、前景視窗恢復與控制器 API。 - 即使在桌面模式下可保留完整功能,螢幕鍵盤、輸入法候選窗與焦點恢復行為仍可能受桌面環境設定影響。 - 若應用程式在遊戲模式下出現難以解釋的異常行為,建議直接重新啟動應用程式,而非持續嘗試各種恢復操作。 @@ -536,19 +539,19 @@ bin\Release\net10.0-windows\publish\win-x64\InputBox.exe ### 1. 執行單元測試 ```powershell -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj ``` ### 2. 顯示詳細輸出(除錯用) ```powershell -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj --logger "console;verbosity=detailed" +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj --logger "console;verbosity=detailed" ``` ### 3. 收集 Code Coverage(與 CI 一致) ```powershell -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj -c Release --no-build ` +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj -c Release --no-build ` --filter-not-trait "Category=UI" ` --coverage ` --coverage-output-format cobertura ` @@ -559,7 +562,7 @@ dotnet test tests/InputBox.Tests/InputBox.Tests.csproj -c Release --no-build ` ```powershell $env:INPUTBOX_RUN_UI_TESTS = "1" -dotnet test tests/InputBox.Tests/InputBox.Tests.csproj -c Release --no-build --filter-trait "Category=UI" +dotnet test --project tests/InputBox.Tests/InputBox.Tests.csproj -c Release --no-build --filter-trait "Category=UI" Remove-Item Env:INPUTBOX_RUN_UI_TESTS -ErrorAction SilentlyContinue ``` diff --git a/docs/engineering/environment.md b/docs/engineering/environment.md index 97da3b5..91bf401 100644 --- a/docs/engineering/environment.md +++ b/docs/engineering/environment.md @@ -12,3 +12,11 @@ 2. Windows PowerShell 5.1 3. Command Prompt (cmd) - **指令相容性**:優先使用與環境相容的內建指令 (如 `dir` 或 `Get-ChildItem`)。 + +## Steam Deck / Wine / Proton 支援邊界 + +- **支援層級**:Steam Deck、SteamOS 3、Wine、Proton 與 Gamescope 僅屬於 best-effort compatibility;本專案不承諾原生 Linux 桌面應用程式支援。 +- **現有相容性保留**:應保留既有 Wine / Proton / Gamescope 偵測、Steam 虛擬鍵盤喚起、Gamescope surface recovery 與遊戲模式保守視窗行為。 +- **桌面模式與遊戲模式分流**:Steam Deck 桌面模式 (KDE Plasma) 應盡量維持 Windows 桌面功能;Gamescope 遊戲模式可套用保守限制,避免干擾合成器控管的全螢幕表面。 +- **投入原則**:僅在實機回報、既有功能回歸或相容性保護失效時繼續修補;不為了擴大 Steam Deck 支援而主動遷移至 WPF、WinUI 3、Avalonia 或 .NET MAUI。 +- **UI 技術方向**:現階段維持 WinForms 為最佳選擇,因核心功能依賴 Win32、TabTip、全域快速鍵、前景視窗恢復、XInput 與 GameInput。 From bbe225cd821cbb5052593fb5e02f71128290ab2b Mon Sep 17 00:00:00 2001 From: perditavojo <117562794+perditavojo@users.noreply.github.com> Date: Sun, 3 May 2026 09:00:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(deps):=20=E6=9B=B4=E6=96=B0=E6=B8=AC?= =?UTF-8?q?=E8=A9=A6=20SDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 將 Microsoft.NET.Test.Sdk 從 18.4.0 更新至 18.5.1。 已重新執行 Debug 建置與測試專案,確認既有測試維持通過。 --- tests/InputBox.Tests/InputBox.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/InputBox.Tests/InputBox.Tests.csproj b/tests/InputBox.Tests/InputBox.Tests.csproj index 1621cec..0b6f003 100644 --- a/tests/InputBox.Tests/InputBox.Tests.csproj +++ b/tests/InputBox.Tests/InputBox.Tests.csproj @@ -12,7 +12,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 8031cd506e627519bcfe61a99b37c5e63759855b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 May 2026 01:04:15 +0000 Subject: [PATCH 3/3] =?UTF-8?q?docs(environment):=20=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E5=85=A8=E5=BD=A2=E6=96=9C=E7=B7=9A=E4=B8=A6=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20Gamescope=20=E8=A1=93=E8=AA=9E=E7=82=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/rubujo/InputBox/sessions/2811007f-16a1-4b03-8e71-042507a99355 Co-authored-by: perditavojo <117562794+perditavojo@users.noreply.github.com> --- docs/engineering/environment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/engineering/environment.md b/docs/engineering/environment.md index 91bf401..6b4ef98 100644 --- a/docs/engineering/environment.md +++ b/docs/engineering/environment.md @@ -13,10 +13,10 @@ 3. Command Prompt (cmd) - **指令相容性**:優先使用與環境相容的內建指令 (如 `dir` 或 `Get-ChildItem`)。 -## Steam Deck / Wine / Proton 支援邊界 +## Steam Deck/Wine/Proton 支援邊界 - **支援層級**:Steam Deck、SteamOS 3、Wine、Proton 與 Gamescope 僅屬於 best-effort compatibility;本專案不承諾原生 Linux 桌面應用程式支援。 -- **現有相容性保留**:應保留既有 Wine / Proton / Gamescope 偵測、Steam 虛擬鍵盤喚起、Gamescope surface recovery 與遊戲模式保守視窗行為。 +- **現有相容性保留**:應保留既有 Wine/Proton/Gamescope 偵測、Steam 虛擬鍵盤喚起、Gamescope 畫面恢復機制與遊戲模式保守視窗行為。 - **桌面模式與遊戲模式分流**:Steam Deck 桌面模式 (KDE Plasma) 應盡量維持 Windows 桌面功能;Gamescope 遊戲模式可套用保守限制,避免干擾合成器控管的全螢幕表面。 - **投入原則**:僅在實機回報、既有功能回歸或相容性保護失效時繼續修補;不為了擴大 Steam Deck 支援而主動遷移至 WPF、WinUI 3、Avalonia 或 .NET MAUI。 - **UI 技術方向**:現階段維持 WinForms 為最佳選擇,因核心功能依賴 Win32、TabTip、全域快速鍵、前景視窗恢復、XInput 與 GameInput。