π Bug Report
Area: Chat Page β Username Input
Type: Bug β Poor Authentication UX
Priority: High
π Description
The Chat page (/chat) shows a plain text input
asking users to manually type their name before
they can chat. This is broken UX because:
- The app already has a full authentication
system (Supabase login)
- The logged-in user's name is already
available in the session
- Asking authenticated users to type their
name again is confusing and amateur
This is a real authentication integration
gap that affects every user of the chat feature.
π Proof β Manual Input in Source Code
In frontend/app/chat/page.tsx:
const [username, setUsername] = useState("");
And in the JSX:
<input
value={username}
onChange={(e) => setUsername(e.target.value)}
placeholder="Enter name"
className="w-full rounded-2xl border..."
/>
The username is completely empty by default
and requires manual entry even though the
user is already authenticated via Supabase.
β Current Behaviour
- User logs in successfully
- Navigates to
/chat
- Sees an empty "Enter name" input box
- Must manually type their name to use chat
- If they type wrong name, messages appear
under wrong identity
β
Expected Behaviour
- User logs in successfully
- Navigates to
/chat
- Username is automatically filled from
Supabase session (user_metadata.full_name
or email)
- User can start chatting immediately
- Username input can be hidden or shown
as read-only display
π‘ Proposed Fix
In frontend/app/chat/page.tsx:
Replace empty useState("") with session fetch:
const [username, setUsername] = useState("");
useEffect(() => {
const getUsername = async () => {
if (!supabase) return;
const { data: { session } } =
await supabase.auth.getSession();
if (session?.user) {
const name =
session.user.user_metadata?.full_name ||
session.user.email?.split("@")[0] ||
"User";
setUsername(name);
}
};
getUsername();
}, []);
This auto-fills the username from the
authenticated session so users don't need
to type their name manually.
π File to Change
frontend/app/chat/page.tsx β only this file
@Shriii19
I'd like to work on this issue.
Could you please assign it to me?
nsoc26
π Bug Report
Area: Chat Page β Username Input
Type: Bug β Poor Authentication UX
Priority: High
π Description
The Chat page (
/chat) shows a plain text inputasking users to manually type their name before
they can chat. This is broken UX because:
system (Supabase login)
available in the session
name again is confusing and amateur
This is a real authentication integration
gap that affects every user of the chat feature.
π Proof β Manual Input in Source Code
In
frontend/app/chat/page.tsx:And in the JSX:
The username is completely empty by default
and requires manual entry even though the
user is already authenticated via Supabase.
β Current Behaviour
/chatunder wrong identity
β Expected Behaviour
/chatSupabase session (
user_metadata.full_nameor email)
as read-only display
π‘ Proposed Fix
In
frontend/app/chat/page.tsx:Replace empty
useState("")with session fetch:This auto-fills the username from the
authenticated session so users don't need
to type their name manually.
π File to Change
frontend/app/chat/page.tsxβ only this file@Shriii19
I'd like to work on this issue.
Could you please assign it to me?
nsoc26