oliver-zehentleitner / maity
clean-up: hub + web: the hub still links /account/sessions; then drop the web's old-address redirects
tsk-qy1y0j8sszxp Open
From the clean-up audit tsk-hgnbapyw7hnh, a cross-area finding (hub area 12 plus web area 17) that the per-area cards left to one shared card. Read at main 80647565; every line number is at that SHA, so check it against current main first.
Kind: debt (compatibility path in an alpha). Effort: S. Risk: low.
Order:
- Hub first (step 1), then web (step 2) after a deploy.
- notifications/preferences.py:875 sits in
_tell_old_address, which tsk-y5hkg2ztvwq9 item 9 moves into the catalog and tsk-xx108ajy287x item 16 moves out of preferences.py. Change the link in whichever version is current, or let item 9 write the new address into the catalog text. - notifications/mailer.py:515: tsk-y5hkg2ztvwq9 item 13 reshapes the same builder (
_sign_in_mail). - web/js/account.js: tsk-eed6xxgbssxn #53 edits account.js too; no overlap in lines.
What is wrong
- The hub still writes the address from before the account tabs,
/account/sessions, in 4 places: - notifications/mailer.py:515 (the sign-in mail's
sessionslink) - notifications/preferences.py:875 (the notice to the old address)
- account_deletion.py:242 (the deletion mail)
- notifications/items.py:797 (the bell item's
url) - Every other address the hub emits is a current one (
/account/security,/account/notifications,/settings/forge,/account/pending). - web/js/account.js:315-328 keeps
MOVED, a redirect map for 8 old addresses (picture, preferences, theme, password, sessions, sign-in-device, forge, data). Onlysessionsis still emitted by the hub. Nothing emits the other 7./settings/forgeis handled separately at account.js:516 and does not needMOVED.forge. - web/js/notify.js:79 already rewrites a session item to
/account/security/sessionson the client, which shows the hub link is out of date.
Proposal
- Hub: emit
/account/security/sessionsat the 4 places. Update the tests that assert the old link. - Web, after that deploy:
- delete
MOVEDand its branch inM.views.account(account.js:315-328, :520-529); - set the views.md decision "The account is in tabs, each at an address of its own; the addresses before them lead to their tab" (web/context/views.md:5784, the old-address list at :5812-5813 and the rejected alternative at :5830-5831) to superseded, or rewrite it;
- fix web/README.md:209;
- delete the e2e and smoke cases for the old addresses: web/tools/e2e.py:4050-4058 (the table), :2723, :2792, :3142 and :7699-7705; web/tools/smoke.js:1791-1796 (
#/account/theme), :9169, :9425, :9471 (#/account/picture), :10335, :10345, :10350 and :10381 (#/account/sign-in-device). Point each one at the current tab instead of deleting it where it tests the tab itself, not the redirect. - web/js/device-sign-in.js:263-266 still names the old address
/account/sign-in-devicein a comment.
Open question
- Mails already sent. views.md:5830-5831 rejected "letting the hub send the new addresses" partly because "mails already sent carry the old addresses anyway". Dropping
MOVEDbreaks those old links: they would land on the profile (the unknown-address fallback at account.js:527) instead of the right tab. The alpha rule (no compatibility layers before launch, views.md:718) argues for dropping it. Should the web wait some days after step 1 (for example the 30 days of the bell window) before step 2, or drop it at once?
Left out as duplicates: none. Searched: /account/sessions, old address, MOVED.
Effort: S = 1 point.