Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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` 採用檔案系統隔離模式。
Expand Down Expand Up @@ -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`
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 專用限制。
- 高風險快速鍵與返回行為維持可用。
Expand All @@ -74,6 +76,7 @@
- **右鍵選單**:透過觸控螢幕或觸控板開啟右鍵選單,選擇「**恢復 Gamescope 畫面**」。
- **注意事項**:
- 本專案目前的 Linux 相容性調整,重點在於 **Steam Deck/SteamOS 3 + Wine/Proton** 的實際使用情境。
- 目前沒有計畫為 Steam Deck 支援而遷移到 WPF、WinUI 3、Avalonia 或 .NET MAUI;現有 WinForms 架構仍最貼近本專案需要的 Win32、TabTip、全域快速鍵、前景視窗恢復與控制器 API。
- 即使在桌面模式下可保留完整功能,螢幕鍵盤、輸入法候選窗與焦點恢復行為仍可能受桌面環境設定影響。
- 若應用程式在遊戲模式下出現難以解釋的異常行為,建議直接重新啟動應用程式,而非持續嘗試各種恢復操作。

Expand Down Expand Up @@ -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 `
Expand All @@ -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
```

Expand Down
8 changes: 8 additions & 0 deletions docs/engineering/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 畫面恢復機制與遊戲模式保守視窗行為。
- **桌面模式與遊戲模式分流**:Steam Deck 桌面模式 (KDE Plasma) 應盡量維持 Windows 桌面功能;Gamescope 遊戲模式可套用保守限制,避免干擾合成器控管的全螢幕表面。
- **投入原則**:僅在實機回報、既有功能回歸或相容性保護失效時繼續修補;不為了擴大 Steam Deck 支援而主動遷移至 WPF、WinUI 3、Avalonia 或 .NET MAUI。
- **UI 技術方向**:現階段維持 WinForms 為最佳選擇,因核心功能依賴 Win32、TabTip、全域快速鍵、前景視窗恢復、XInput 與 GameInput。
2 changes: 1 addition & 1 deletion tests/InputBox.Tests/InputBox.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading