fix: an open popup follows a network switch the background saves (closes #650)
When the background saves a network switch after the user approves a site's request, or another popup page saves one, an open popup now notices the stored record change and takes the new network from it, holding the lock, inside a save. It then leaves the page as a switch in Settings does: the stack is cut, every screen counts as not yet rendered, and the screen on top is drawn again. The cut and the redraw are now two functions in the Settings view that both paths call. A record already on the popup's network, such as its own Settings switch, changes nothing. The popup never switches the network itself. Model: opus-5-5
This commit is contained in:
@@ -145,7 +145,8 @@ test("a refresh that returns after the background switched the network writes no
|
||||
|
||||
const refresh = await holdRefresh(page);
|
||||
// The background writes the switch to Sepolia, as its updateState() does
|
||||
// once the user approves a site's request. This page is not told.
|
||||
// once the user approves a site's request. This page is not told of it
|
||||
// yet.
|
||||
const record = page.storage.read("autistmask");
|
||||
applyChainSwitchFields(record, "sepolia");
|
||||
page.storage.write("autistmask", record);
|
||||
|
||||
Reference in New Issue
Block a user