Repository navigation
Description
🤖 This issue was created by Repo Assist, an automated AI assistant, because GitHub Actions cannot create pull requests in this repository.
Problem
When the Settings window is open, changing brightness or colour temperature via hotkeys (Ctrl+Shift+↑/↓) or the toolbar buttons does not update the sliders in the Settings window. The sliders show stale values until the window is closed, causing user confusion.
This is a deeper version of the bug tracked in issue #137. That issue only fixes the save-on-close problem (reading actual values instead of stale slider values). This fix keeps the sliders live throughout the Settings session.
Root Cause
SetBrightness and SetColorTemperature in MainWindow have no notification mechanism. SettingsWindow reads the values only once at construction and never again until close.
Fix
Branch: repo-assist/fix-settings-live-sync-2026-07-26
Compare: https://github.com/shanselman/WindowsEdgeLight/compare/master...repo-assist/fix-settings-live-sync-2026-07-26?expand=1
Changes
MainWindow.xaml.cs — add two events:
public event EventHandler<double>? BrightnessChanged;
public event EventHandler<double>? ColorTemperatureChanged;Fire them at the end of SetBrightness and SetColorTemperature.
SettingsWindow.xaml.cs — subscribe on open, unsubscribe on close, guard against re-entrancy:
private bool _updatingFromExternal = false;
// In constructor (after isInitializing = false):
mainWindow.BrightnessChanged += OnBrightnessChanged;
mainWindow.ColorTemperatureChanged += OnColorTemperatureChanged;
private void OnBrightnessChanged(object? sender, double value)
{
_updatingFromExternal = true;
BrightnessSlider.Value = value;
UpdateBrightnessLabel();
_updatingFromExternal = false;
}
// ValueChanged handlers now also check _updatingFromExternalWhy _updatingFromExternal?
Setting BrightnessSlider.Value fires ValueChanged, which calls SetBrightness, which fires BrightnessChanged again — infinite loop. The flag breaks the cycle.
Test Status
✅ Build passed on Linux with -p:EnableWindowsTargeting=true — 0 warnings, 0 errors.
Manual testing required: open Settings, use Ctrl+Shift+↑ while window is open, verify slider moves in real time.
Supersedes
This fix makes issue #137 (read actual values on close) unnecessary, since the sliders are always in sync.
To apply: Settings → Actions → General → ✅ Allow GitHub Actions to create and approve pull requests
Note
🔒 Integrity filter blocked 2 items
The following items were blocked because they don't meet the GitHub integrity level.
- #144
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved". - Detect camera is being used by another application and automatically turn on #21
list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | noneGenerated by Repo Assist · ● 2.1M · ◷
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64
Activity
shanselman commentedon Aug 8, 2026
The consolidated batch fixes stale-value data loss; live slider observer plumbing is not worth the added coupling.