Skip to content

Account menu on a guild's public pages - #308

Merged
Musiker15 merged 2 commits into
mainfrom
feat/public-account-menu
Oct 30, 2026
Merged

Musiker15 merged 2 commits into
mainfrom
feat/public-account-menu

Conversation

@Musiker15

Copy link
Copy Markdown
Member

What

Signed in on a guild's public pages (hub at /g/<id>, a handle like /msk-forms, a custom domain, forms and status pages), you only got a sign-out button. There was no way from there into the dashboard.

Those pages now show the same account menu as the site header: Dashboard, My submissions, Log out and the appearance switch. It takes the guild's colour like the rest of the frame. On a phone the button shows only the avatar, so the guild name keeps its room.

How

  • AccountMenu and AccountSections move from header-bar.tsx into components/site/account-menu.tsx, so the site header and PublicFrame share them. The panel id now comes from useId.
  • components/site/account.ts holds the copy and the dashboard links. From a custom domain the links point to APP_URL, since the dashboard only lives on the primary host. Same rule SiteHeader already had.
  • Signed out, the public pages keep the direct one-click Discord login. Applicants should get to the form fast.
  • Graph refreshed in a separate commit.

Checked

  • apps/web: typecheck, lint, 347 tests green.
  • Production build with a local session on /g/<id> at 1440 px light and dark and at 375 px: menu opens, both links right, Escape closes and returns focus, no console errors, panel stays inside the viewport.
  • With a foreign Host header both links lead to APP_URL.

Note: on a custom domain the session cookie belongs to that domain, so the dashboard on the primary host may ask for a sign-in once. That follows from #146 (no cross-domain session handoff).

The hub, handle, custom domain, form and status pages only had a sign-out
button once someone was signed in, so there was no way from there into the
dashboard. They now get the same account menu as the site header: dashboard,
my submissions, sign out and the appearance switch, in the guild's colour.
On a phone the button shows only the avatar so the guild name keeps its room.

The menu moves out of header-bar.tsx into account-menu.tsx so both headers
share it, and account.ts holds the copy and the dashboard links. From a
custom domain the links lead to the primary host, where the dashboard lives.
Signed out, the public pages keep the direct one-click Discord login.
@Musiker15
Musiker15 merged commit 681e1f3 into main Oct 30, 2026
4 checks passed
@Musiker15
Musiker15 deleted the feat/public-account-menu branch October 30, 2026 15:25
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.

1 participant