fix: approval windows open as wide as the page (closes #518) #555

Open
clawbot wants to merge 1 commits from issue-518-approval-window-width into next
Collaborator

Fixes #518.

openApprovalWindow() created approval windows 360 pixels wide while the page is a fixed 396 (body in src/popup/styles/main.css), so the page scrolled sideways and cut off the Reject button and the Settings gear.

  • The window now opens 396 wide.
  • Both browsers count the window's frame in the width given to windows.create(), and only the page can see its frame, so on load the approval page widens its own window by however far it would scroll sideways. It does so only when its window is a popup window: the connection prompt can also show in the toolbar popup, whose window is the user's browser window.
  • The Firefox suite now checks that the sign prompt does not scroll sideways. The Chrome suite cannot see this: there every approval window opens at 1280x720 whatever size is asked, which README now lists among that suite's limits.
  • README Visual Style said 360x600; it now gives the page's real width.

Two centring tests in tests/backgroundApproval.test.js change only because the centred left edge follows the new width.

Disclosures:

  • Unverified: the widening on a window with a real frame. Neither browser suite draws one, so two unit tests in tests/approvalWindow.test.js cover it.
  • Judgement call: the window is widened from the page rather than opened wider by a guessed frame allowance, because the frame differs between systems.
  • Left as is: POPUP_VIEWPORT in tests/e2e/run.js and two comments in src/popup/index.html still name 360x600.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/518. `openApprovalWindow()` created approval windows 360 pixels wide while the page is a fixed 396 (`body` in `src/popup/styles/main.css`), so the page scrolled sideways and cut off the Reject button and the Settings gear. - The window now opens 396 wide. - Both browsers count the window's frame in the width given to `windows.create()`, and only the page can see its frame, so on load the approval page widens its own window by however far it would scroll sideways. It does so only when its window is a popup window: the connection prompt can also show in the toolbar popup, whose window is the user's browser window. - The Firefox suite now checks that the sign prompt does not scroll sideways. The Chrome suite cannot see this: there every approval window opens at 1280x720 whatever size is asked, which README now lists among that suite's limits. - README Visual Style said `360x600`; it now gives the page's real width. Two centring tests in `tests/backgroundApproval.test.js` change only because the centred left edge follows the new width. Disclosures: - Unverified: the widening on a window with a real frame. Neither browser suite draws one, so two unit tests in `tests/approvalWindow.test.js` cover it. - Judgement call: the window is widened from the page rather than opened wider by a guessed frame allowance, because the frame differs between systems. - Left as is: `POPUP_VIEWPORT` in `tests/e2e/run.js` and two comments in `src/popup/index.html` still name 360x600. Model: opus-5-5
clawbot added the needs-review label 2026-10-14 14:00:33 +02:00
clawbot self-assigned this 2026-10-14 14:00:33 +02:00
clawbot added 1 commit 2026-10-14 14:00:34 +02:00
fix: approval windows open as wide as the page (closes #518)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
01dce26807
The approval window was opened 360 pixels wide while the page is 396, so
it scrolled sideways and cut off the Reject button. It now opens at 396.
Both browsers count the window's frame in that width, so the approval
page also widens its own window by however far it would scroll sideways;
the toolbar popup's window is left alone. The Firefox suite checks that
the sign prompt does not scroll sideways. The Chrome suite cannot: its
approval windows open at 1280x720 whatever size is asked. README's Visual
Style line, which still said 360x600, now gives the page's real width.

Model: opus-5-5
Author
Collaborator

FAIL (needs-rework)

  1. src/popup/index.js, lines 243-249: at browser zoom above 100%, the approval window still cuts off the Reject button and the Settings gear. At 150%, whether set as the browser's default zoom or on the extension, about 34 pixels are cut in Chrome and 24 in Firefox. At 125%, about 8 pixels are cut in Chrome. The page measures its sideways overflow in page pixels and adds that number to the window width, which is in screen pixels, so at 150% the window grows by only two thirds of what is needed. The page also measures before the approval screen is shown, so it misses the vertical scrollbar (15 pixels in Chrome) that a screen taller than the window gets afterwards. Acceptable: once the approval screen is up, its window is wide enough to show it whole at any zoom, scrollbar included. One way is to scale the overflow by the page's zoom and check again after the screen is shown. Add a unit test at a zoom other than 100%.

Judgement call: I read "shows the whole approval screen" in #518 as covering browser zoom above 100%.

Model: opus-5-5

**FAIL** (needs-rework) 1. `src/popup/index.js`, lines 243-249: at browser zoom above 100%, the approval window still cuts off the Reject button and the Settings gear. At 150%, whether set as the browser's default zoom or on the extension, about 34 pixels are cut in Chrome and 24 in Firefox. At 125%, about 8 pixels are cut in Chrome. The page measures its sideways overflow in page pixels and adds that number to the window width, which is in screen pixels, so at 150% the window grows by only two thirds of what is needed. The page also measures before the approval screen is shown, so it misses the vertical scrollbar (15 pixels in Chrome) that a screen taller than the window gets afterwards. Acceptable: once the approval screen is up, its window is wide enough to show it whole at any zoom, scrollbar included. One way is to scale the overflow by the page's zoom and check again after the screen is shown. Add a unit test at a zoom other than 100%. Judgement call: I read "shows the whole approval screen" in https://git.eeqj.de/sneak/AutistMask/issues/518 as covering browser zoom above 100%. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-14 14:49:51 +02:00
Some checks are pending
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-518-approval-window-width:issue-518-approval-window-width
git checkout issue-518-approval-window-width
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#555