Skip to content

Attach the options listeners before reading storage - #831

Merged
zakius merged 1 commit into
stagingfrom
fix/options-listeners-before-storage
Sep 12, 2026
Merged

zakius merged 1 commit into
stagingfrom
fix/options-listeners-before-storage

Conversation

@zakius

@zakius zakius commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

The extension options page opened with await chrome.storage.sync.get("instance") and only wired up its inputs once that resolved. load fires when the script starts, not when that read lands, so a change arriving in between reached no listener and was dropped in silence -- the field kept a value the page had already decided to reject, with nothing said.

Too narrow for a person to hit by typing. Wide enough for a test: extension-popup.spec.ts:47 failed on it the first time the suite ran on a GitHub-hosted runner (#830), waiting 5s for a role="alert" that never got its text.

Listeners now attach synchronously; the stored values fill in afterwards. A change in the window before hydration reverts the field to empty rather than to the stored address -- which is what the field already shows at that instant, so nothing visible changes.

Verified locally: all 3 specs in extension-popup.spec.ts pass.

🤖 Generated with Claude Code

The options page opened by reading chrome.storage.sync, and only wired up
its inputs once that resolved. `load` fires when the script starts, not
when the read lands, so a change arriving in that window reached no
listener and was dropped in silence -- the field kept a value the page
had already decided to reject, with nothing said.

Too narrow for a person to hit by typing, wide enough for a test: the
browser suite failed on it the first time it ran on a runner with
different timing.

Listeners now attach synchronously and the stored values fill in
afterwards. A change in the window before hydration reverts to an empty
field rather than the stored address, which is what the field already
shows at that instant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@zakius
zakius merged commit b62c9e9 into staging Sep 12, 2026
18 checks passed
@zakius
zakius deleted the fix/options-listeners-before-storage branch September 12, 2026 21:39
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