Part of: #23
What to build
Two small, independent pieces that the rest of #23 and #25 rely on.
- In
AccountContext.tsx:
- Stop
addAccount from auto-switching the current tab (drop its internal switchAccount(id) call).
- On mount, check the URL for
?account=<id> first, before falling back to the stored "active account" — so a freshly opened tab knows which account it belongs to.
- A small helper,
src/nonview/core/openAccountInNewTab.ts:
export function openAccountInNewTab(accountId: string): void {
const url = new URL(import.meta.env.BASE_URL, window.location.origin);
url.searchParams.set("account", accountId);
window.open(url.toString(), `quicksilver-${accountId}`);
}
Use import.meta.env.BASE_URL, not a bare "/" — the app is served under /quicksilver/.
- A reusable
src/view/atoms/ConfirmDialog.tsx — the first confirm dialog in the app, used later for "Sign out of all accounts?" and "Remove this account?".
Done when
- Reloading a tab opened with
?account=<id> still shows that account.
ConfirmDialog goes full-screen on mobile, centered on desktop (same pattern as ComposeDialog).
Depends on
Nothing beyond #28 — start any time.
Part of: #23
What to build
Two small, independent pieces that the rest of #23 and #25 rely on.
AccountContext.tsx:addAccountfrom auto-switching the current tab (drop its internalswitchAccount(id)call).?account=<id>first, before falling back to the stored "active account" — so a freshly opened tab knows which account it belongs to.src/nonview/core/openAccountInNewTab.ts:import.meta.env.BASE_URL, not a bare"/"— the app is served under/quicksilver/.src/view/atoms/ConfirmDialog.tsx— the first confirm dialog in the app, used later for "Sign out of all accounts?" and "Remove this account?".Done when
?account=<id>still shows that account.ConfirmDialoggoes full-screen on mobile, centered on desktop (same pattern asComposeDialog).Depends on
Nothing beyond #28 — start any time.