Skip to content

fix: prevent Sparkline shutdown race - #47

Merged
000hen merged 2 commits into
masterfrom
fix/sparkline-comexception
Jul 20, 2026
Merged

000hen merged 2 commits into
masterfrom
fix/sparkline-comexception

Conversation

@000hen

@000hen 000hen commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary / 摘要

  • Adds end-to-end modpack browsing, installation, import, update, and export with unified multi-role Lua sources.
  • Preserves the latest master WinUI design by moving new dialogs and finite UI states into XAML-owned localization resources.
  • Completes CurseForge API-key XOR obfuscation for GitHub Actions, build.ps1, Visual Studio/MSBuild, and MSIX builds through one shared PowerShell implementation.
  • Clears the plaintext key before child builds and adds regression checks against plaintext or MSBuild-log exposure.
  • Makes modpack updates transactional and coordinates create, start, update, stop, delete, and remove-all-data lifecycle races.
  • Keeps close-to-tray protection synchronized across startup, live server state changes, active servers, modpack operations, backups, server mutations, and data cleanup.

The earlier obfuscation implementation did not cover every build entry point. This PR unifies those paths while retaining master's XAML-first resource architecture and fixing the lifecycle failures found during review.

XOR is obfuscation rather than cryptographic secrecy because the binary contains both cipher and pad. The embedded key must remain scoped and rotatable.

Testing / 測試

  • go test ./... (from engine/) — 388 tests passed in 21 packages
  • dotnet test app/JustHostMC.Core.Tests/JustHostMC.Core.Tests.csproj — 35 tests passed
  • I performed any relevant manual testing. / 我已完成相關的手動測試。
  • go vet ./...
  • dotnet build app/JustHostMC.App/JustHostMC.App.csproj -p:Platform=x64 — 0 errors, 0 warnings
  • Resource, finite-state, and tray lifecycle tests — 41 tests passed
  • Changed C# files pass clang-format; git diff --check passes
  • GitHub Check code formatting workflow — passed
  • Final code review — no remaining Critical or Important findings

Screenshots / 螢幕截圖

No before/after screenshots were captured. UI changes were validated through the x64 WinUI build and resource/finite-state tests, but not through a manual visual test pass.

Checklist / 檢查清單

  • The change is focused and does not include unrelated edits. / 這項變更範圍明確,且未包含無關修改。
  • I updated tests for changed behavior where practical. / 我已在適當情況下更新測試,以涵蓋行為變更。
  • I updated documentation for user-facing or developer-facing changes. / 我已更新與使用者或開發者相關的文件。
  • I regenerated protobuf outputs locally if files under proto/ changed. / 若修改了 proto/,我已在本機重新產生 protobuf 輸出。
  • I did not commit credentials, private server data, or generated build artifacts. / 我未提交憑證、私人伺服器資料或建置產物。

000hen added 2 commits July 20, 2026 22:37
- Subscribe to collection changes only while Sparkline is Loaded; detach
  on Unloaded and guard Redraw against unloaded visual access
- Implement IAsyncDisposable on NavShellViewModel to snapshot/clear
  cache
  and start disposals concurrently; call Shell.DisposeAsync from
  MainWindow
- Add tests covering Sparkline lifecycle and NavShell disposal ordering
@000hen
000hen merged commit 7426c17 into master Jul 20, 2026
2 checks passed
@000hen
000hen deleted the fix/sparkline-comexception branch July 20, 2026 15:02
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