Skip to content

Show display username instead of email handle on dashboard - #11

Merged
Emmyt24 merged 1 commit into
mainfrom
feat/username-display
Aug 12, 2026
Merged

Show display username instead of email handle on dashboard#11
Emmyt24 merged 1 commit into
mainfrom
feat/username-display

Conversation

@Macnelson9

Copy link
Copy Markdown
Contributor

Why

The dashboard greeting used the local-part of the user's email (e.g. "Good morning, lateeftosin1999") instead of a real name, and there was no way for a user to set one.

What changed

  • `User` type gains `username: string | null`; added a `displayName()` helper that falls back to the email handle until a username is set.
  • Dashboard greeting and sidebar account name use `displayName()`.
  • While no username is set, a subtle "Set a username →" link appears next to the greeting, pointing at a new Settings page.
  • New `/dashboard/settings` page with a Profile section to set/update the username, calling the backend's `PATCH /v1/auth/me`.
  • `DashboardShell`/`Sidebar` now take the full `user` object (previously just `email`) so they can resolve the display name.

Where

  • `src/lib/auth.ts` — `User` type, `displayName()`, `updateUsername()`
  • `src/app/dashboard/page.tsx` — greeting + "Set a username" nudge
  • `src/components/dashboard/Sidebar.tsx`, `src/components/dashboard/DashboardShell.tsx` — prop change from `email` to `user`
  • `src/app/dashboard/settings/page.tsx` — new Settings page
  • `src/app/dashboard/audit/page.tsx`, `src/app/dashboard/sponsorship/page.tsx`, `src/app/dashboard/wallets/new/NewWalletClient.tsx` — updated `DashboardShell` call sites

Solution

Falls back to the current email-handle behavior everywhere until a username is set, so nothing breaks for existing users before the backend field is populated. Verified end-to-end in a browser against a local instance of the companion backend PR (Octo-Protocol#210): set a username on the Settings page, confirmed the sidebar updates immediately, and confirmed a fresh page load of the dashboard shows "Good afternoon, " fetched from the real API.

Depends on the backend PR (Octo-Protocol-org/Octo-Protocol#210) for the `username` field and `PATCH /v1/auth/me` endpoint to actually persist a value — without it, this PR is functionally a no-op (email-handle fallback only).

Dashboard greeting and sidebar now show the user's chosen username
(falling back to the email handle until they set one), with a new
Settings page to set it. Backed by the Octo-Protocol PATCH /v1/auth/me
endpoint.
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octo-frontend Ready Ready Preview Aug 11, 2026 11:19pm

@Emmyt24
Emmyt24 merged commit 338c39e into main Aug 12, 2026
2 checks 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