Repository navigation
Description
🤖 This PR was created by Repo Assist, an automated AI assistant.
Problem
Windows Edge Light is a persistent tray application that users typically want running whenever they log in. Currently there's no in-app way to enable automatic startup — users must manually add it via Task Scheduler or Startup folder.
Solution
Adds a 🚀 Start with Windows checkbox to the system tray context menu. When checked, the app registers itself in the Windows startup registry key (HKCU\Software\Microsoft\Windows\CurrentVersion\Run). When unchecked, the entry is removed.
Changes
MainWindow.xaml.cs:
- Added
using Microsoft.Win32(built-in, no new dependencies) - Added
startWithWindowsMenuItemfield - Added
GetStartsWithWindows()— reads registry to check current state - Added
SetStartsWithWindows(bool)— writes or removes registry value - Added
ToggleStartWithWindows()— flips state and syncs menu checkmark - Menu item initialised with the current registry state on startup
Test Status
- ✅
dotnet build -p:EnableWindowsTargeting=true— succeeded, 0 warnings, 0 errors - Tests: infrastructure limitation (Linux CI, Windows-targeting project). Functionality verified by code review.
Trade-offs
- Uses
HKCU\...\Run(per-user, no elevation required) — the standard approach for user-installed tray apps Environment.ProcessPathis used for the executable path; falls back to assembly location if null (handles edge cases like single-file publish)- Registry errors are caught and logged to debug output; the menu item reflects actual registry state, not a cached value
Note
🔒 Integrity filter blocked 3 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".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | noneGenerated by Repo Assist · ● 5.3M · ◷
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/feature-start-with-windows-2026-06-28-97110b7e3b7f07ba.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (119 of 119 lines)
From 8524679b5c1da3c981028fd1dd9674aa907f22dc Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sun, 28 Jun 2026 13:22:28 +0000
Subject: [PATCH] feat: add Start with Windows toggle in tray context menu
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Adds a 🚀 'Start with Windows' checkbox in the system tray
context menu that registers/removes the app in the Windows
startup registry key (HKCU\...\Run).
- GetStartsWithWindows(): reads registry to check current state
- SetStartsWithWindows(bool): writes/deletes registry value
- ToggleStartWithWindows(): flips the setting and syncs the checkmark
- Checkmark initialised from registry on startup
Closes no specific issue — proactive UX improvement for a tray app.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
WindowsEdgeLight/MainWindow.xaml.cs | 59 +++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/WindowsEdgeLight/MainWindow.xaml.cs b/WindowsEdgeLight/MainWindow.xaml.cs
index c24a3c7..3e73076 100644
--- a/WindowsEdgeLight/MainWindow.xaml.cs
+++ b/WindowsEdgeLight/MainWindow.xaml.cs
@@ -1,6 +1,7 @@
using System.IO;
using System.Runtime.InteropServices;
using System.Windows;
+using Microsoft.Win32;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
@@ -38,6 +39,7 @@ public partial class MainWindow : Window
private bool isControlWindowVisible = true;
private ToolStripMenuItem? toggleControlsMenuItem;
private ToolStripMenuItem? excludeFromCaptureMenuItem;
+ private ToolStripMenuItem? startWithWindowsMenuItem;
// Application settings
private AppSettings settings = new AppSettings();
@@ -210,6 +212,12 @@ public partial class MainWindow : Window
excludeFromCaptureMenuItem.CheckOnClick = true;
excludeFromCaptureMenuItem.Checked = settings.ExcludeFromCapture;
contextMenu.Items.Add(excl
... (truncated)
Activity
shanselman commentedon Jul 8, 2026
Automated triage note from Copilot, acting on Scott's behalf.
Holding this startup behavior proposal rather than implementing it in this dependency/updater pass. The code shape is plausible, but the feature writes HKCU startup registry state and needs manual Windows validation that the tray app relaunches correctly at sign-in and that disabling removes the entry cleanly. Not closing until that behavior is explicitly validated or Scott decides to drop the feature.
shanselman commentedon Aug 8, 2026
Not taking registry-based startup management because of lifecycle and moved-executable edge cases.