Back walks through the sign-in page and every folder visited #96

Closed
opened 2026-11-16 15:16:11 +00:00 by jcoffey-dev · 1 comment
Owner

Reported on the forum (https://community.coffeylabs.org/t/232, post 27): in the webmail installed as an app on Android, Back goes to the login page and back through folders browsed earlier; on the inbox it should leave the app.

  • The catch-all <Redirect to="/mail" /> in web/src/App.tsx pushes (wouter's default), so does the OAuth start in web/src/views/Login.tsx:69 (location.assign).
  • Folder links (MailboxTree.tsx), go-to-folder and the mobile tab bar (AppShell.tsx) all push, so every folder visited is a Back step.

Fix: replace on those redirects and location.replace for the sign-in start; for folders, push only when leaving the inbox and replace otherwise, so the stack is at most inbox → folder → thread (optionally only in display-mode: standalone). A pageshow listener that re-checks the session when event.persisted covers a login screen restored from the back/forward cache. The server sign-in page's own entry is inbuxa/inbuxa-server#403.

Reported on the forum (https://community.coffeylabs.org/t/232, post 27): in the webmail installed as an app on Android, Back goes to the login page and back through folders browsed earlier; on the inbox it should leave the app. - The catch-all `<Redirect to="/mail" />` in `web/src/App.tsx` pushes (wouter's default), so does the OAuth start in `web/src/views/Login.tsx:69` (`location.assign`). - Folder links (`MailboxTree.tsx`), go-to-folder and the mobile tab bar (`AppShell.tsx`) all push, so every folder visited is a Back step. Fix: `replace` on those redirects and `location.replace` for the sign-in start; for folders, push only when leaving the inbox and replace otherwise, so the stack is at most inbox → folder → thread (optionally only in `display-mode: standalone`). A `pageshow` listener that re-checks the session when `event.persisted` covers a login screen restored from the back/forward cache. The server sign-in page's own entry is inbuxa/inbuxa-server#403.
jcoffey-dev added the
priority
p3
bug
labels 2026-11-16 15:16:11 +00:00
jcoffey-dev self-assigned this 2026-11-16 15:16:11 +00:00
jcoffey-dev added this to the 27.1 milestone 2026-11-16 15:23:17 +00:00
Author
Owner

Fixed in #99. Sign-in and the redirects to /mail replace the page, and in the installed app moving between folders and sections replaces it too, except when leaving the inbox, so Back goes inbox, folder, message and then closes the app. Thanks to khashmeshab (https://community.coffeylabs.org/t/232). In the next webmail RC, with the server side in the next server RC.

Fixed in #99. Sign-in and the redirects to /mail replace the page, and in the installed app moving between folders and sections replaces it too, except when leaving the inbox, so Back goes inbox, folder, message and then closes the app. Thanks to khashmeshab (https://community.coffeylabs.org/t/232). In the next webmail RC, with the server side in the next server RC.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-webmail#96