Conversation
|
Claude finished @kixelated's task —— View job PR Review: Switch over to using a token for demoTodo List:
🔍 Review SummaryThis PR introduces JWT token authentication for demo broadcasts, but has several issues that need addressing. 🐛 Critical Issues1. Confirmed Routing Bug (as identified by cursor bot)Location: Problem: In development, if (props.token) { // Empty string is falsy!
url = new URL(`${import.meta.env.PUBLIC_RELAY_URL}/demo?jwt=${props.token}`);
} else {
url = new URL(`${import.meta.env.PUBLIC_RELAY_URL}/anon`);
}Impact: Demo functionality is broken in development environment. Fix: Change condition to check for meaningful token: if (props.token && props.token.trim()) {
// Use demo path
} else {
// Use anon path
}
|
There was a problem hiding this comment.
Bug: Demo Path Error Due to Empty Token
The demo page incorrectly uses the /anon path instead of /demo in the development environment. This occurs because PUBLIC_RELAY_TOKEN is an empty string in .env.development, causing the if (props.token) condition to evaluate as false. As a result, demo functionality does not work as intended.
src/components/watch.tsx#L10-L16
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.