fix: a network switch in Settings updates the testnet banner at once (closes #511) #619

Merged
clawbot merged 1 commits from issue-511-settings-testnet-banner into next 2026-10-19 22:53:12 +02:00
Collaborator

Fixes #511.

The Settings network handler now redraws the red banner once the switch is saved. On Settings, a switch to Sepolia puts up the [TESTNET] banner and a switch back to mainnet takes it down. Before, only showView() and popup start redrew the banner, so it stayed wrong until the user left Settings.

The Chrome browser suite gains one test, right after the Settings section in tests/e2e/run.js. It switches to Sepolia and back on Settings and reads the banner after each switch. It reads the banner only once the switch's "Switched to ..." flash is up: the flash is the handler's last step and any screen change clears it, so the banner it reads is the one the switch left on Settings. Without the change to settings.js the test fails at the first switch.

Worth knowing:

  • The test expects exactly [TESTNET] because the suite runs a release build with runtime debug mode off.
  • If the test fails it leaves the wallet on Sepolia, and later tests that expect mainnet fail with it.
  • README: one paragraph in End-to-End Tests names the new test. The Screen Map already says the banner follows the active network, so it is unchanged.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/511. The Settings network handler now redraws the red banner once the switch is saved. On Settings, a switch to Sepolia puts up the `[TESTNET]` banner and a switch back to mainnet takes it down. Before, only `showView()` and popup start redrew the banner, so it stayed wrong until the user left Settings. The Chrome browser suite gains one test, right after the Settings section in `tests/e2e/run.js`. It switches to Sepolia and back on Settings and reads the banner after each switch. It reads the banner only once the switch's "Switched to ..." flash is up: the flash is the handler's last step and any screen change clears it, so the banner it reads is the one the switch left on Settings. Without the change to `settings.js` the test fails at the first switch. Worth knowing: - The test expects exactly `[TESTNET]` because the suite runs a release build with runtime debug mode off. - If the test fails it leaves the wallet on Sepolia, and later tests that expect mainnet fail with it. - README: one paragraph in End-to-End Tests names the new test. The Screen Map already says the banner follows the active network, so it is unchanged. Model: opus-5-5
clawbot added the needs-review label 2026-10-19 21:35:46 +02:00
clawbot self-assigned this 2026-10-19 21:35:46 +02:00
clawbot added 1 commit 2026-10-19 21:35:46 +02:00
fix: a network switch in Settings updates the testnet banner at once (closes #511)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
03b54b674a
The Settings network handler now redraws the red banner once the switch
is saved, so it appears on a switch to Sepolia and goes on a switch back
to mainnet while Settings is still on screen. Before, the banner changed
only when the next screen came up. The Chrome browser suite switches
both ways on Settings and reads the banner each time.

Model: opus-5-5
Author
Collaborator

Review: PASS
Model: opus-5-5

**Review: PASS** Model: opus-5-5
clawbot merged commit 96446f4661 into next 2026-10-19 22:53:12 +02:00
clawbot deleted branch issue-511-settings-testnet-banner 2026-10-19 22:53:12 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#619