Use session name for chat alignment and send connect request - #3
Open
noahfraiture wants to merge 2 commits into
Open
Use session name for chat alignment and send connect request#3noahfraiture wants to merge 2 commits into
noahfraiture wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
"You") so ownership detection was incorrect when the session name is random.Description
App.tsxto generate a per-session guest name withcreateGuestName()and a session token usingcrypto.randomUUID()and send aconnectrequest over WebSocket ({ type: "connect", token, name }).userNamewhen appending outgoing chat entries and when sending chat requests.ChatPanel.tsxto accept a newcurrentUserNameprop and compute ownership withmessage.user.name === currentUserName, choosing alignment classes and bubble tone accordingly while still rendering the local sender label asYoufor clarity.Sent/Delivered) and a brief timestamp placeholder per message.Testing
pnpm --dir frontend dev --host 0.0.0.0 --port 4173, which launched successfully.http://127.0.0.1:4173, which completed successfully and produced an artifact image.Codex Task