Skip to content

Release v0.3.2 - #7

Merged
rozx merged 4 commits into
mainfrom
release/v0.3.2
Nov 16, 2026
Merged

rozx merged 4 commits into
mainfrom
release/v0.3.2

Conversation

@rozx

@rozx rozx commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Merging this PR publishes release v0.3.2 (the release label and the branch name trigger the release workflow).

Release notes: CHANGELOG 0.3.2

Highlights

Switching modes with a different iGPU memory size now takes one restart instead of "unplug, wait, then restart".

  • Restart for a mode, from the tray menu. For each other mode whose profile uses a different iGPU memory size than the one in effect, the tray menu offers e.g. Restart for Handheld (8 GB). After a confirmation dialog, DockSense stores that mode's size in the firmware and restarts Windows; the user plugs in or unplugs while the PC restarts.
  • Restart now button on the "Restart to apply the iGPU memory" notification. It restarts only while a size is still pending, because Windows starts DockSense for a click on an old notification.
  • The notification is removed once no restart is pending any more.

Changes

  • IgpuRestartPlanner (Core, 5 new unit tests): which modes are worth restarting for.
  • DockSenseService.PrepareIgpuRestart, Platform/SystemPower, tray menu items, toast button and its activation handling.
  • CHANGELOG, both READMEs (feature list and FAQ), version 0.3.2.

Tested

  • Release build with 0 warnings, 135 unit tests pass.
  • On the ROG Xbox Ally X with the XG Mobile (eGPU mode, Auto in effect, Handheld profile 8 GB): the tray menu shows "Restart for Handheld (8 GB)", the item opens the window with the confirmation dialog, and Cancel leaves everything unchanged.
  • Not tested on hardware: confirming the dialog and the notification's button, since both restart the PC.

🤖 Generated with Claude Code

Changing the iGPU memory between modes took "unplug, wait for the mode
change, then restart", because the new size is only written once the new
mode is detected.

- Tray menu: "Restart for <mode> (<size>)" for each other mode whose
  profile size differs from the one in effect (IgpuRestartPlanner). After
  a confirmation dialog it stores that size and restarts Windows, so the
  user switches modes while the PC restarts.
- The "Restart to apply the iGPU memory" toast has a "Restart now" button.
  It restarts only while a size is still pending: Windows starts DockSense
  for a click on an old toast, and that must not restart the PC.
- The toast is removed once nothing is pending any more.
- SystemPower.Restart replaces the inline shutdown.exe call.

Co-Authored-By: Claude <noreply@anthropic.com>
@rozx rozx added the release Merging this PR from release/vX.Y publishes a GitHub release label Nov 16, 2026
Changelog, both READMEs (feature list and the iGPU memory FAQ) and the
version bump for the tray's "Restart for <mode>" and the toast's
"Restart now" button.

Co-Authored-By: Claude <noreply@anthropic.com>
@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-16T03:12:44.453774Z e9d9db8 New commits
ℹ️ 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.

Comment thread src/DockSense.App/Services/Toasts.cs Resolved
Comment thread src/DockSense.App/DockSenseService.cs Resolved
@kilo-code-bot

kilo-code-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of commits e9d9db8 and 4c34f86: all four findings from the previous review are fixed, and the new code introduces no issues.

  • RestartFor now checks SystemPower.Restart()'s result: after a requested restart it waits a 30 s grace, then RemindIgpuRestartPending() re-raises IgpuMemoryChanged so the "Restart to apply the iGPU memory" toast (with its working Restart-now button) appears when Windows was held up or cancelled. A failed restart request reminds immediately. The inverted confirm/prepare condition is correct, and the command's no-reentrancy during the grace is harmless (the toast button remains an alternate path).
  • PrepareIgpuRestart's "already stored" short-circuit now requires the just-read firmware value (fresh is not null && raw == fresh.CurrentRaw), so a stale cached CurrentRaw can no longer skip the write.
  • Toasts.ClearRestartNeeded sets _restartToastMayExist only after a successful History.Remove and logs the first failure once; a failed remove is retried on the next status change.
  • RestartFor_Message now reads "sets the iGPU memory to {1} for {0} mode", which works for Auto; Strings.zh-Hans.resx was already phrased that way, so EN/zh parity and {0}/{1} placeholder order are preserved.
  • The new CHANGELOG bullet accurately describes the held-up/cancelled-restart notification.
Files Re-reviewed (5 files)
  • CHANGELOG.md
  • src/DockSense.App/DockSenseService.cs
  • src/DockSense.App/Localization/Strings.resx
  • src/DockSense.App/Services/Toasts.cs
  • src/DockSense.App/ViewModels/MainViewModel.cs

Notes: read-only review — unit tests and the release build were not executed. The other 10 files of this PR are unchanged since the previous review; their previous findings are all covered by the fixes above.

Previous Review Summary (commit 3de3669)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 3de3669)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
src/DockSense.App/ViewModels/MainViewModel.cs 154 SystemPower.Restart() result ignored after PrepareIgpuRestart persisted the other mode's size in firmware; a failed or cancelled restart gets no in-app feedback (no IgpuMemoryChanged toast either), and a later restart in the current mode costs an extra restart cycle
src/DockSense.App/Localization/Strings.resx 313 RestartFor_Message renders "stores Auto of iGPU memory" when the target profile size is Auto (MemoryMb == 0 → FormatMemory returns "Auto"); suggestion provided

SUGGESTION

File Line Issue
src/DockSense.App/Services/Toasts.cs 110 _restartToastMayExist is cleared before History.Remove runs; if the remove throws, the stale toast is never retried for the rest of the session
src/DockSense.App/DockSenseService.cs 648 The raw == IgpuMemory.CurrentRaw short-circuit can trust a stale cached CurrentRaw when the SafeReadIgpuMemory() re-read fails, reporting stored = true without a write
Files Reviewed (15 files)
  • CHANGELOG.md - no issues
  • CLAUDE.md - no issues
  • Directory.Build.props - no issues
  • README.md - no issues
  • README.zh-CN.md - no issues
  • src/DockSense.App/App.xaml.cs - no issues
  • src/DockSense.App/DockSenseService.cs - 1 issue
  • src/DockSense.App/Localization/Strings.resx - 1 issue
  • src/DockSense.App/Localization/Strings.zh-Hans.resx - no issues
  • src/DockSense.App/Platform/SystemPower.cs - no issues
  • src/DockSense.App/Services/Toasts.cs - 1 issue
  • src/DockSense.App/Services/TrayIconService.cs - no issues
  • src/DockSense.App/ViewModels/MainViewModel.cs - 1 issue
  • src/DockSense.Core/IgpuRestartPlanner.cs - no issues
  • tests/DockSense.Core.Tests/IgpuRestartPlannerTests.cs - no issues

Notes: read-only review — unit tests and the release build were not executed. Verified clean during review: toast activation routing (button vs body), OnActivated background-thread marshaling, tray closure capture per mode, menu separator collapsing, Update() refresh on all StatusChanged paths, the inverted Restart confirm condition, IgpuRestartPlanner logic and all 5 new tests, EN/zh string parity and placeholder counts, and all changed README/CHANGELOG/CLAUDE.md claims against the code.


Reviewed by glm-5.3 · Input: 43.5K · Output: 11.5K · Cached: 401.4K

rozx and others added 2 commits November 15, 2026 22:10
- A restart that was asked for but did not happen (shutdown.exe could not
  be started, or the user cancelled at Windows' blocking-apps screen) left
  the other mode's size stored without a word. DockSense now shows the
  pending-restart notification when it is still running 30 seconds later,
  or at once when the restart could not be requested.
- "Already stored" only skips the write when the firmware was just read
  successfully; after a failed read the cached value may be out of date.
- The confirmation text read "stores Auto of iGPU memory" for a profile
  set to Auto; it now says "sets the iGPU memory to Auto".

Co-Authored-By: Claude <noreply@anthropic.com>
The "may exist" flag was cleared before the removal ran, so one failed
removal left the stale notification in place for the rest of the session.
The flag is now cleared only after the removal succeeded, and a failure is
logged once instead of at every status change.

Co-Authored-By: Claude <noreply@anthropic.com>
@rozx
rozx merged commit 69618ec into main Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Merging this PR from release/vX.Y publishes a GitHub release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant