fix(send): stop Send dashboard self-closing when opened from accounts dashboard - #945
Merged
Merged
Conversation
… 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>
radishmouse
approved these changes
Jun 29, 2026
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ranwindow.close()+ a/closeredirect, 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=trueand relies on the auto-close) falls through to closing. The "outside Thunderbird" and explicitshowDashboard=truecases are unchanged.useSendConfig.ts—queryAddonLoginStatedocumented a 5-second timeout it never implemented; its promise could hang forever and block the/send/profilerouter guard when the token-bridge doesn't respond. Implemented the missingsetTimeout/clearTimeoutso it rejects after 5s and the guard's existingcatchlets navigation continue.ProfileView.test.ts(new) — covers outside-TB shows dashboard,showDashboard=trueshows, the regression case (web tab inside TB with no flags → shows, nowindow.close()), and theisExtension=truepopup 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
showDashboardflag 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
?showDashboard=trueto 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.queryAddonLoginStatetimeout 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/profileguard 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