Compare commits
base: sneak:next
sneak:main
sneak:issue-259-e2e-in-ci
sneak:issue-275-site-approval-race
sneak:issue-188-dod-assertions
sneak:issue-152-eslint
sneak:next
sneak:issue-271-concurrent-nonce
sneak:issue-280-handlerpc-catch
sneak:fix/issue-153-browser-api-compat
sneak:chore/token-list-enrichment
sneak:feat/issue-131-transaction-view-layout
sneak:fix/116-timestamps-include-timezone
sneak:feature/expanded-warnings
sneak:fix/cross-wallet-duplicate-detection
sneak:feature/copy-flash-feedback
sneak:feature/issue-82-new-address-warning
sneak:feature/82-warn-new-address
sneak:issue-99-block-number-external-link
sneak:issue-99-block-number-styling
sneak:feature/82-zero-history-warning
sneak:fix/issue-99-block-number-link-copy
sneak:fix/99-block-number-clickable
sneak:fix/87-consistent-error-display-v2
sneak:fix/87-consistent-error-display
sneak:fix/consistent-error-display
sneak:fix/77-confirm-tx-persist
sneak:fix/issue-72-address-token-tx-history
sneak:fix/70-confirm-tx-contract-display
sneak:fix/issue-58-receive-address-consistency
sneak:fix/59-transaction-view-ui-policies
sneak:fix/55-swap-show-own-address
sneak:feature/show-private-key
sneak:feat/message-signing
..
compare: sneak:588d5fd8bd929b8fb571109ffd5da210b5d7e963
sneak:issue-259-e2e-in-ci
sneak:issue-275-site-approval-race
sneak:issue-188-dod-assertions
sneak:issue-152-eslint
sneak:next
sneak:issue-271-concurrent-nonce
sneak:issue-280-handlerpc-catch
sneak:fix/issue-153-browser-api-compat
sneak:main
sneak:chore/token-list-enrichment
sneak:feat/issue-131-transaction-view-layout
sneak:fix/116-timestamps-include-timezone
sneak:feature/expanded-warnings
sneak:fix/cross-wallet-duplicate-detection
sneak:feature/copy-flash-feedback
sneak:feature/issue-82-new-address-warning
sneak:feature/82-warn-new-address
sneak:issue-99-block-number-external-link
sneak:issue-99-block-number-styling
sneak:feature/82-zero-history-warning
sneak:fix/issue-99-block-number-link-copy
sneak:fix/99-block-number-clickable
sneak:fix/87-consistent-error-display-v2
sneak:fix/87-consistent-error-display
sneak:fix/consistent-error-display
sneak:fix/77-confirm-tx-persist
sneak:fix/issue-72-address-token-tx-history
sneak:fix/70-confirm-tx-contract-display
sneak:fix/issue-58-receive-address-consistency
sneak:fix/59-transaction-view-ui-policies
sneak:fix/55-swap-show-own-address
sneak:feature/show-private-key
sneak:feat/message-signing
1 Commits
next
...
588d5fd8bd
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 588d5fd8bd |
fix: render the view "Back" lands on after the popup is reopened (closes #268)
All checks were successful
check / check (push) Successful in 55s
goBack() only unhid its target. A reopened popup renders the wallet list and the one view restoreView() lands on, so every other view is still the blank static template from index.html: pressing Back from Settings onto an address showed an empty address line and no balances, and the same held for address-token, receive, confirm-tx and transaction. The per-view dispatch and its data guards move out of restoreView() into src/popup/viewRouter.js, and goBack() now routes a popped view through the same code by way of a renderer index.js registers with setBackRenderer(). A view whose backing state is gone falls back to Home the way the restore does, rather than showing an empty template. The Back path renders only a view this page load has not rendered yet. viewRouter.js keeps a page-load-scoped set of rendered views, written by showView() — the last thing every render path runs, forward navigation and the restore alike, so a view added later registers itself rather than needing to be remembered. Back onto a view already in that set unhides it and nothing more, exactly as it does for a view outside RESTORABLE_VIEWS: rendering a second time would re-fetch and overwrite what the view holds, such as an edit typed into Settings and not yet saved. Home stays the exception and is re-rendered on every Back, as it was when goBack() called the renderWalletList() registered through setRenderMain(), so the wallet list reflects what changed while the user was away from it. tests/backNavigation.test.js drives the real goBack() over the reproduction and over each of address-token, receive, confirm-tx, transaction, success-tx and error-tx, with and without their backing state, and pins that a view this page load already rendered — a live-session view, or Settings revisited — is only unhidden, while Home still re-renders. tests/e2e/run.js adds three cases against the real popup in a real browser, because make check cannot see a blank view: a real close and reopen then Back onto the address screen and onto Receive, and an in-session Back onto Settings that must keep unsaved input. All three were demonstrated failing first. |