fix(popup): report split-tunneling state on the collapsed row - #117
Merged
Conversation
The Split tunneling row rendered a toggle switch that only opened and
closed the editor. Its state lived in a module-level variable that resets
every time the popup document is recreated, so reopening the popup showed
an off-looking switch styled exactly like the Shields Up and MagicDNS
preference toggles — while the saved rules were still in force.
Replace it with a disclosure row modelled on Exit Node: a summary value
plus a chevron that rotates when expanded, with aria-expanded and
aria-controls. The summary reports the saved rules ("Off",
"Bypass · 2 domains", "Only · 1 domain") and refreshes both optimistically
on save and from state in updateConnected.
"Only" with an empty domain list is deliberately not reported as "Off":
that combination routes nothing through the exit node, so calling it off
would trade one wrong state for another.
The e2e scenario now expands the row through a new expandDisclosureRow
helper and reopens the popup after saving to assert the row still reports
the saved rules.
Closes #116
dantraynor
marked this pull request as draft
August 27, 2026 03:52
dantraynor
marked this pull request as ready for review
August 27, 2026 19:47
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.
What
The Split tunneling row rendered a toggle switch that only opened and closed the editor, with its state in a module-level variable that resets whenever the popup document is recreated — so reopening the popup showed an off-looking switch styled exactly like the Shields Up and MagicDNS preference toggles while the saved rules were still in force. It is now a disclosure row modelled on Exit Node: a summary value (
Off,Bypass · 2 domains,Only · 1 domain) plus a chevron that rotates when expanded, witharia-expanded/aria-controls, refreshed both optimistically on save and from state inupdateConnected.Onlywith an empty domain list is deliberately not reported asOff, since that combination routes nothing through the exit node.Why
Closes #116
How to Test
Bypass · 1 domaininstead of an off-looking switchOff; switch to Only with an empty list and confirm it readsOnly · no domainsChecklist
Verification:
pnpm typecheckclean, 571 unit tests pass (4 new inconnected.test.ts), and the full e2e suite passes in Chrome (26 cases) and Firefox (20 cases). Thesplit-tunnelinge2e scenario now reopens the popup after saving to assert the row still reports the saved rules — the exact regression reported in the issue.