Skip to content

[Repo Assist] Fix: apply current colour temperature when enabling all-monitors mode #85

Description

@github-actions

🤖 This PR was created by Repo Assist, an automated AI assistant.

Problem

When the user enables "Show on All Monitors" mode, ShowOnAllMonitors() creates a new window for each secondary display using CreateMonitorWindow(). Those windows are initialised with a hardcoded neutral-white gradient, completely ignoring the colour temperature (and brightness) the user had already set.

Reproducer: set a warm colour temperature, then click "Toggle All Monitors" — secondary monitor windows appear with plain white light instead of the warm amber tint shown on the primary monitor.

Root Cause

ShowOnAllMonitors() never called UpdateAdditionalMonitorWindows() after adding the new contexts to additionalMonitorWindows. That call is what pushes the current _colorTemperature and currentOpacity values into each secondary window's brush and visibility state.

Fix

Add a single call to UpdateAdditionalMonitorWindows() at the end of ShowOnAllMonitors():

// Apply current colour temperature and brightness to the newly created windows
UpdateAdditionalMonitorWindows();

Trade-offs

  • No behaviour change for users on a single monitor.
  • The call iterates over the newly added windows and sets their gradient stops — negligible cost at startup.

Test Status

Step Result
dotnet build -p:EnableWindowsTargeting=true ✅ 0 errors, 0 warnings

Note

🔒 Integrity filter blocked 4 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #68 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #26 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".
  • #68 search_pull_requests: 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 | none

Generated by Repo Assist · ● 3.4M ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64

Note

This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch repo-assist/fix-all-monitors-color-temp-2026-06-26-2e908b7f00da0f99.

Click here to create the pull request

To fix the permissions issue, go to SettingsActionsGeneral and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ

Show patch (41 lines)
From aa3ae48fd4854be947557b18c0b0e3aa13c6f5b2 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Fri, 26 Jun 2026 01:36:28 +0000
Subject: [PATCH] fix: apply current colour temperature when enabling
 all-monitors mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When ShowOnAllMonitors() creates windows for additional monitors it
used a hardcoded neutral-white gradient, ignoring the colour temperature
the user had already dialled in. The fix calls UpdateAdditionalMonitorWindows()
immediately after all windows are shown so they inherit the current
opacity and colour temperature from the start.

Reproducer: set a warm colour temperature, then toggle
'Show on All Monitors' — secondary monitor windows now match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 WindowsEdgeLight/MainWindow.xaml.cs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/WindowsEdgeLight/MainWindow.xaml.cs b/WindowsEdgeLight/MainWindow.xaml.cs
index c24a3c7..87a3824 100644
--- a/WindowsEdgeLight/MainWindow.xaml.cs
+++ b/WindowsEdgeLight/MainWindow.xaml.cs
@@ -971,6 +971,9 @@ Version {version}";
                 monitorCtx.Window.Show();
             }
         }
+
+        // Apply current colour temperature and brightness to the newly created windows
+        UpdateAdditionalMonitorWindows();
     }
 
     private void HideAdditionalMonitorWindows()
-- 
2.54.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions