Skip to content

Prevent battery slider XAML startup crash - #516

Merged
onehoon merged 1 commit into
mainfrom
refactor/battery-ui-startup-hotfix
Sep 12, 2026
Merged

onehoon merged 1 commit into
mainfrom
refactor/battery-ui-startup-hotfix

Conversation

@onehoon

@onehoon onehoon commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Prevent the production Battery Charge Limit slider from handling XAML initialization changes before the frontend is connected.
  • Add a regression test that verifies the handler returns before touching the draft value or value label when _frontend is null.

Root cause

DevicePage is created directly by MainWindow. During Slider.Minimum initialization, WinUI may coerce the initial value and raise ValueChanged before later-named XAML elements have been created. The battery handler previously touched BatteryChargeLimitValueText without the existing frontend-startup guard, causing the UI process to fail during MainWindow.InitializeComponent().

Validation

  • Focused startup-guard regression: 1/1 passed.
  • Full test suite: 2737/2737 passed.
  • Release build: 0 warnings, 0 errors.
  • Physical MSI Claw validation remains manual.

Scope

This is a narrow UI startup hotfix. It does not change the battery hardware protocol, runtime lifecycle, persistence, IPC, or unrelated UI behavior.

@onehoon
onehoon marked this pull request as ready for review September 12, 2026 10:15
@onehoon
onehoon merged commit fcc6307 into main Sep 12, 2026
1 check passed
@onehoon
onehoon deleted the refactor/battery-ui-startup-hotfix branch September 13, 2026 09:01
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