Skip to content

feat(consent): log where the consent window was opened - #107

Merged
stormer78 merged 1 commit into
mainfrom
feat/log-consent-window-bounds
Aug 5, 2026
Merged

feat(consent): log where the consent window was opened#107
stormer78 merged 1 commit into
mainfrom
feat/log-consent-window-bounds

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

#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.

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.

Both consent surfaces now log the window id and the computed bounds, which makes "I see no popup" answerable by elimination:

Console Meaning
no line at all never reached window creation — look upstream (arrival, verification, dedup)
could not open the consent window (#106) creation failed; the logged lastError says why
consent window opened id=… bounds={…} the window is real — check those coordinates against the actual displays

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.

#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>
@stormer78
stormer78 merged commit fb8a0de into main Aug 5, 2026
3 checks passed
@stormer78
stormer78 deleted the feat/log-consent-window-bounds branch August 5, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant