Fixes#133. Reported on the forum (t/232, post 40).
After #129, switching accounts replaced the page, so Back from a group had nothing to return to and closed the installed app.
What changes
Every page the app adds to the history records the account it was showing (history.state, written in the router's aroundNav, which links, redirects and navigate() all pass through).
Switching accounts adds a page again. Back or Forward onto a page that showed another account switches to it. From a group, Back goes to your own mail first, then out of the app.
A page with no record, such as the one the app opened on, means your own account. So does a page whose account is gone since.
While a message is being written, the account stays, as with the switch in the menu.
Order matters. The account has to change before the router renders the new address. Otherwise the mail view looks for one account's folder in the other's list and says the folder no longer exists. Listeners on window run in the order they were added, and capture doesn't change that (checked in headless Chromium), so lib/accountHistory adds its listener when the module loads, before the router's.
Tests: 11 new in lib/__tests__/accountHistory.test.ts. Full suite 1632 passing; typecheck, build and i18n:check clean. Not tried against a live server in a browser.
Fixes #133. Reported on the forum (t/232, post 40).
After #129, switching accounts replaced the page, so Back from a group had nothing to return to and closed the installed app.
**What changes**
- Every page the app adds to the history records the account it was showing (`history.state`, written in the router's `aroundNav`, which links, redirects and `navigate()` all pass through).
- Switching accounts adds a page again. Back or Forward onto a page that showed another account switches to it. From a group, Back goes to your own mail first, then out of the app.
- A page with no record, such as the one the app opened on, means your own account. So does a page whose account is gone since.
- While a message is being written, the account stays, as with the switch in the menu.
**Order matters.** The account has to change before the router renders the new address. Otherwise the mail view looks for one account's folder in the other's list and says the folder no longer exists. Listeners on `window` run in the order they were added, and capture doesn't change that (checked in headless Chromium), so `lib/accountHistory` adds its listener when the module loads, before the router's.
**Tests:** 11 new in `lib/__tests__/accountHistory.test.ts`. Full suite 1632 passing; typecheck, build and i18n:check clean. Not tried against a live server in a browser.
jcoffey-dev
added this to the 27.1 milestone 2026-11-20 22:45:39 +00:00
The account in view isn't part of the address, so after #129 an account
switch replaced the page and left nothing to go back to: in the installed
app, Back from a group closed the app.
Each page the app puts in the history now carries the account it was
showing (history.state, written in the router's aroundNav, which every
link, redirect and navigate() passes through). A switch pushes a page
again, and Back or Forward onto a page that showed another account
switches to it; from a group, Back goes to your own mail first, then out
of the app. A page with no mark, such as the one the app opened on, is
your own account; one whose account is gone since falls back to it.
While a message is being written the account stays, as for the switch
in the menu.
The listener goes in when lib/accountHistory loads, ahead of the
router's: listeners on window run in the order they were added (checked
in Chromium; capture doesn't change it), and the account has to change
before the new address renders, or the mail view looks up one account's
folder in the other's list and says it no longer exists.
Reported on the forum (t/232, post 40).
Fixes#133
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #133. Reported on the forum (t/232, post 40).
After #129, switching accounts replaced the page, so Back from a group had nothing to return to and closed the installed app.
What changes
history.state, written in the router'saroundNav, which links, redirects andnavigate()all pass through).Order matters. The account has to change before the router renders the new address. Otherwise the mail view looks for one account's folder in the other's list and says the folder no longer exists. Listeners on
windowrun in the order they were added, and capture doesn't change that (checked in headless Chromium), solib/accountHistoryadds its listener when the module loads, before the router's.Tests: 11 new in
lib/__tests__/accountHistory.test.ts. Full suite 1632 passing; typecheck, build and i18n:check clean. Not tried against a live server in a browser.