feat(consent): log where the consent window was opened - #107
Merged
Conversation
#106 made a window that cannot be created a logged denial. The remaining blind spot is the opposite case: creation succeeds, a window id comes back, and the user still sees nothing. Those two are indistinguishable from the outside -- "no popup, no errors" -- and that ambiguity is exactly what made the silent hang take days to find. A window id proves creation succeeded; it does not prove the window is visible. consentWindowBounds derives left/top from chrome.windows.getLastFocused(), so a minimised window, a second display, or an undocked DevTools window can place the prompt somewhere the user never looks. Logging the id and the computed bounds makes "I see no popup" answerable: either no line (never reached creation), the #106 error (creation failed), or a line naming coordinates that can be checked against the actual displays. Logging only; no behaviour change. Both consent surfaces. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#106 made a consent window that cannot be created into a logged denial. The remaining blind spot is the opposite case: creation succeeds, a window id comes back, and the user still sees nothing.
From the outside those are indistinguishable — "no popup, no errors" — and that exact ambiguity is what made the silent hang in #106 take days to localise.
A window id proves creation succeeded. It does not prove the window is visible.
consentWindowBoundsderivesleft/topfromchrome.windows.getLastFocused(), so a minimised window, a second display, or an undocked DevTools window can place the prompt somewhere the user never looks.Both consent surfaces now log the window id and the computed bounds, which makes "I see no popup" answerable by elimination:
could not open the consent window(#106)lastErrorsays whyconsent window opened id=… bounds={…}Logging only; no behaviour change. Lint clean, 223 tests pass.
Deliberately not done here: clamping the bounds to the visible display. That would be a speculative fix for a cause not yet confirmed, and this PR exists to confirm it first.