Skip to content

Add rename modal and persistent identity with connect update - #2

Open
noahfraiture wants to merge 1 commit into
mainfrom
codex/add-username-rename-feature-with-daisyui-3ywxze
Open

Add rename modal and persistent identity with connect update#2
noahfraiture wants to merge 1 commit into
mainfrom
codex/add-username-rename-feature-with-daisyui-3ywxze

Conversation

@noahfraiture

Copy link
Copy Markdown
Owner

Motivation

  • Provide a simple, pretty place in the UI for users to rename themselves and persist that identity across sessions.
  • Leverage the backend behavior that accepts a new connect request with the same token to update the name for an existing identity.

Description

  • Add a daisyUI-styled rename modal and compact avatar to the top bar, exposing a displayName and onRename API (file frontend/src/TopBar.tsx).
  • Persist client identity (token + name) in localStorage and expose helpers to load/save identity and create a token (file frontend/src/main.tsx).
  • Send a connect request over the WebSocket on load and when the name is changed using the existing useWsRequest helper (file frontend/src/main.tsx).
  • Wire the current display name into local message echoes so sent messages reflect the chosen name (file frontend/src/App.tsx).

Testing

  • Installed dependencies with pnpm install and the install step completed successfully.
  • Started the dev server (vite) and confirmed the app served locally (HTTP 200 response), which succeeded.
  • Automated Playwright script opened the app, clicked the Rename button and captured a screenshot of the modal (artifacts/rename-modal.png), which succeeded.
  • No unit or CI tests were run as part of this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant