You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): preserve permissions for every live main window #79
Each main window replaces permission handlers on the shared Electron session with handlers capturing only that window's webContents ID. Creating a second window denies the first window's notification/clipboard permission requests; closing the second leaves the handler tied to the wrong owner.
Priority: medium. Reviewed CookieMonster CM-Split-v2 at dafdcd4171466050c984d524ca0d1a09d31f100e; links use the identical remote V2 source on Ubuntu 26.04.1 x64, Bun 1.4.2.
Steps to reproduce and evidence
Executed production allowRendererPermissions with two synthetic WebContents sharing one session. A notifications request from the first returned true before registering the second and false afterward. The production window factories call this helper for each window. This is a boundary test, not a live OS notification test.
Acceptance criteria and verification
Install session-wide handlers once and validate against the live registered main windows.
Preserve origin/frame validation and deny unrelated browser/worker contents.
Add first/second-window and closed-window tests, then verify notifications/clipboard in Electron.
Merged into CM-Split-v2 as 290d7d6353c0c7a4a356af780b5687f2dcfe5cfc through PR #96. Its tree exactly matches reviewed source 68ab9205709350385471eb2d383b3cff3c18e678.
Implemented in PR #96, reviewed source 68ab9205709350385471eb2d383b3cff3c18e678.
Session-wide permission handlers now consult the live main-window registry instead of capturing the most recently registered window. Origin/frame restrictions still deny unrelated contents. Real Electron 44.4.5 checks exercised notification/clipboard permission handling in both main windows and after the second window closed. Those local native checks used --no-sandbox; OS sandbox qualification is not claimed.
Final verification is deferred at the user's explicit request to finish and close the implementation issues before one final test pass. This closure records implementation completion, not a claim that the final combined/platform checks have passed. Any failure in that pass will be recorded against the relevant issue.
Activity
trmosala commentedon Oct 21, 2026
Merged into
CM-Split-v2as290d7d6353c0c7a4a356af780b5687f2dcfe5cfcthrough PR #96. Its tree exactly matches reviewed source68ab9205709350385471eb2d383b3cff3c18e678.Implemented in PR #96, reviewed source
68ab9205709350385471eb2d383b3cff3c18e678.Session-wide permission handlers now consult the live main-window registry instead of capturing the most recently registered window. Origin/frame restrictions still deny unrelated contents. Real Electron 44.4.5 checks exercised notification/clipboard permission handling in both main windows and after the second window closed. Those local native checks used --no-sandbox; OS sandbox qualification is not claimed.
Final verification is deferred at the user's explicit request to finish and close the implementation issues before one final test pass. This closure records implementation completion, not a claim that the final combined/platform checks have passed. Any failure in that pass will be recorded against the relevant issue.