Skip to content

feat(web): global account switcher in admin sidebar - #254

Merged
ajianaz merged 2 commits into
developfrom
feat/account-switcher
Sep 8, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/account-switcher

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

  • Global active-account selector in the admin sidebar (Phase 3)
  • Persisted in localStorage; pages listen to the titen:account-changed event to default their filters
  • Null-guard two copyUrl calls on media page (pre-existing svelte-check errors)

Why

Web dashboard now matches the mobile apps multi-account UX: pick an account once, every page defaults to it. Threads web is single-session; Titen is the multi-account console, and the switcher makes that explicit in the UI.

Testing

  • svelte-check: 0 errors (was 2)
  • bun run build: clean

Adds an active-account selector to the admin sidebar (persisted in
localStorage, dispatched via titen:account-changed event) so Schedules,
Posts, and Calendar pages can default their filters to the selected
account instead of each managing its own. Also null-guards two
copyUrl calls on the media page that svelte-check flagged.

svelte-check: 0 errors. bun run build: clean.
Comment thread web/src/routes/admin/+layout.svelte Outdated
}

$effect(() => {
if (!authed || accounts.length > 0) return;
@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

CodeCora review: the effect keyed on accounts.length could not
distinguish not-yet-loaded from loaded-and-empty, so a user with zero
connected accounts would refetch in an infinite loop. A dedicated
accountsLoaded flag runs the fetch exactly once per session.
@ajianaz
ajianaz merged commit cb81923 into develop Sep 8, 2026
12 checks passed
@ajianaz
ajianaz deleted the feat/account-switcher branch September 8, 2026 07:33
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.

2 participants