Skip to content

fix(send): stop Send dashboard self-closing when opened from accounts dashboard - #945

Merged
aaspinwall merged 1 commit into
mainfrom
fix/944-send-dashboard-self-close
Jun 29, 2026
Merged

fix(send): stop Send dashboard self-closing when opened from accounts dashboard#945
aaspinwall merged 1 commit into
mainfrom
fix/944-send-dashboard-self-close

Conversation

@aaspinwall

@aaspinwall aaspinwall commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

What changed?

Fixes the Send dashboard self-closing when opened from the Thundermail (accounts.tb.pro) account dashboard inside Thunderbird.

  • ProfileView.vue — the dashboard route auto-closed itself whenever it loaded inside Thunderbird without ?showDashboard=true. The accounts.tb.pro Send link doesn't append that flag, so the page briefly rendered then ran window.close() + a /close redirect, appearing to "fail to load". The condition is inverted: a genuine web-app tab inside Thunderbird now renders the dashboard, and only the post-login extension popup (which always carries ?isExtension=true and relies on the auto-close) falls through to closing. The "outside Thunderbird" and explicit showDashboard=true cases are unchanged.
  • useSendConfig.tsqueryAddonLoginState documented a 5-second timeout it never implemented; its promise could hang forever and block the /send/profile router guard when the token-bridge doesn't respond. Implemented the missing setTimeout/clearTimeout so it rejects after 5s and the guard's existing catch lets navigation continue.
  • ProfileView.test.ts (new) — covers outside-TB shows dashboard, showDashboard=true shows, the regression case (web tab inside TB with no flags → shows, no window.close()), and the isExtension=true popup still auto-closing.

AI disclosure: This change was written by Claude (Opus 4.8) acting as a coding agent, driven and reviewed interactively by the author. The author identified the root cause (the missing showDashboard flag triggering the self-close); the agent implemented the fix, tests, and this description. All code was reviewed by the author before submission.

Why?

Mirrors Bugzilla bug 2051092: clicking the Send icon in the Thundermail account dashboard showed the Send dashboard briefly, then the page failed to load and redirected back to the accounts dashboard. Root cause was the in-app self-close path firing for a legitimate user-facing tab.

Limitations and Notes

  • A complementary fix could live in the accounts.tb.pro repo (append ?showDashboard=true to the Send link, or point it at /send). This change makes the Send app robust regardless of how it's entered, and is compatible with that source-side change if it also lands.
  • The queryAddonLoginState timeout is a latent-robustness fix, not the cause of this specific report (the reporter has the add-on installed and the bridge responding); it's folded in because it sits on the same /send/profile guard path.

Applicable Issues

Closes #944

Screenshots

N/A — behavior fix; no visual changes beyond the dashboard now remaining visible instead of closing.

🤖 Generated with Claude Code

… dashboard

ProfileView auto-closed itself whenever it loaded inside Thunderbird
without ?showDashboard=true. The accounts.tb.pro Send link does not append
that flag, so clicking it briefly showed the dashboard and then ran
window.close() + a fallback redirect, appearing to "fail to load".

Invert the condition: a genuine web-app tab inside Thunderbird now renders
the dashboard, and only the post-login extension popup (which always carries
?isExtension=true and relies on the auto-close) falls through to closing.

Also implement the 5s timeout that queryAddonLoginState already documented but
never had, so its promise can no longer hang forever and block the
/send/profile router guard when the token-bridge does not respond.

Adds ProfileView tests covering the regression and the popup auto-close path.

Closes #944

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aaspinwall
aaspinwall requested a review from radishmouse June 29, 2026 17:19
@aaspinwall
aaspinwall merged commit c3ae0a5 into main Jun 29, 2026
20 checks passed
@aaspinwall
aaspinwall deleted the fix/944-send-dashboard-self-close branch June 29, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send icon in Thundermail account dashboard self-closes instead of loading Send dashboard

2 participants