Skip to content

fix(web): send logged-out visitors to login, chip picker, full Daylight theme - #144

Merged
zVapor-Dev merged 1 commit into
v3from
fix/web-beta-feedback
Oct 29, 2026
Merged

zVapor-Dev merged 1 commit into
v3from
fix/web-beta-feedback

Conversation

@zVapor-Dev

Copy link
Copy Markdown
Member

Fixes four things from the first beta feedback.

Logged-out access

Opening /dashboard?platform=discord&space=… in a private window still showed the settings page. The API was already refusing the data: values, stream and spaces all return 401, which values.test.ts covers. The page only showed schema defaults, because /api/schema is public. But it looked like access.

  • The app pages wait for the session (/api/auth/me, one shared request) and send logged-out visitors to /login. A skeleton shows while that check runs.
  • If the values request returns 401 or 403, the page says "You can't manage this server" instead of showing an editable form.
  • The "Live sync" chip now reflects whether the stream actually connected.

"Admin" in the top bar

The fixed "Admin" chip is replaced by the signed-in user's name and Discord avatar, plus a Log out button. Signed-out visitors see a Log in button. /api/auth/me now also returns the session's platform, so the web app knows which CDN serves the avatar.

Multi-select

Multi-value fields (channel and role pickers with multiple, and multiSelect) used a native select[multiple] that rendered as a small list box. They now use a searchable picker:

  • removable chips
  • a filterable dropdown with checkmarks
  • keyboard support: arrow keys, Enter, Esc, and Backspace to remove the last chip
  • a 260px scrolling list

All colors come from theme tokens.

Daylight theme

The daylight preset only overrode bg, surface and primary, so cards, inputs and text kept their dark-theme colors. It now sets every surface, text, semantic, shadow and gradient token. A new color-scheme token (--dd-color-scheme) drives the native color-scheme, so scrollbars and native controls go light too. The default theme and tokens.css carry the new token.

The theme choice is now remembered in localStorage. Reads and writes are wrapped in try/catch so blocked storage doesn't break anything.

Checks

  • pnpm lint, pnpm turbo run typecheck, pnpm test (264 passed), sdk-py pytest (13 passed) and pnpm build all pass.
  • Checked in Chromium against the static build with a mocked API:
    • The logged-out direct URL ends on /login.
    • The top bar shows the user and Log out.
    • The chip picker renders in both themes.
    • Daylight persists across a reload.

Requested by zVapor


Generated by Claude Code

…ht theme

- The dashboard pages wait for the session and send logged-out visitors to
  /login. The API already refused their data; the page just showed schema
  defaults. A server the user can't manage shows a message instead of a form.
- The top bar shows the signed-in user's name and avatar with a log out
  button, or a Log in button, instead of a fixed "Admin" chip.
  /api/auth/me now also returns the session's platform.
- Multi-value fields use a searchable picker with removable chips, keyboard
  support and a scrolling list, instead of a native select[multiple].
- Daylight now sets every surface, text, depth and gradient token, so cards
  and text switch too. A new color-scheme token drives native controls, and
  the theme choice is remembered in localStorage.
- The live sync chip reflects whether the stream is connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017JdKJpQQK3XuLZTBiZ4gns
@zVapor-Dev
zVapor-Dev marked this pull request as ready for review October 29, 2026 15:01
@zVapor-Dev
zVapor-Dev merged commit 660d614 into v3 Oct 29, 2026
1 check passed
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