feat: Landing page with live community embed (bd-landing-001)#296
feat: Landing page with live community embed (bd-landing-001)#296khaliqgant wants to merge 2 commits intomainfrom
Conversation
- Add card-based grid layout for community rooms - Implement activity indicators (simulated, updates every 3s) - Structure ready for real API integration - Update App.tsx to include landing page route Note: Requires bd-viral-001 (public rooms) and bd-agent-public-001 (agents) to be complete for full functionality. Implements bd-landing-001 marketing feature.
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 3 files reviewed • 2 high risk • 4 need attention 🚨 High Risk:
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
| return { | ||
| ...room, | ||
| lastActivityAt: new Date(Date.now() - Math.random() * 5 * 60 * 1000), | ||
| onlineCount: room.onlineCount + (Math.random() > 0.5 ? 1 : -1), |
There was a problem hiding this comment.
🟡 onlineCount can become negative due to unbounded decrement
The simulated activity update for community rooms can cause onlineCount to become negative over time.
Click to expand
Issue
In LandingPage.tsx:486, the online count is updated randomly:
onlineCount: room.onlineCount + (Math.random() > 0.5 ? 1 : -1),This randomly adds or subtracts 1 from the count every 3 seconds (when shouldUpdate is true). Since there's no lower bound check, over time the count can become negative.
Example Scenario
- Room starts with
onlineCount: 15 - After several unlucky decrements:
onlineCount: -3 - UI displays "-3 online" which is nonsensical
Impact
- Users see negative online counts (e.g., "-5 online") which looks like a bug
- Damages credibility of the landing page's "live" community feature
Recommendation: Add a lower bound check: onlineCount: Math.max(0, room.onlineCount + (Math.random() > 0.5 ? 1 : -1))
Was this helpful? React with 👍 or 👎 to provide feedback.
| /** Show notification badge on mobile menu button */ | ||
| hasUnreadNotifications?: boolean; | ||
| /** Whether WebSocket is attempting to reconnect */ | ||
| isReconnecting?: boolean; |
There was a problem hiding this comment.
🟡 isReconnecting prop added to HeaderProps but not destructured or used
The isReconnecting prop is defined in HeaderProps interface and passed from App.tsx, but it is never destructured in the Header function parameters, making the reconnection state indicator feature non-functional.
Click to expand
How it happens
At packages/dashboard/ui/react-components/layout/Header.tsx:48, isReconnecting is added to HeaderProps:
isReconnecting?: boolean;At packages/dashboard/ui/react-components/App.tsx:2475, it's passed to Header:
isReconnecting={isReconnecting}But in the Header function (lines 51-71), isReconnecting is NOT in the destructured parameters, so the prop is silently ignored.
Impact
The intended feature to show WebSocket reconnection status in the header will not work. Users won't see any indication when the app is attempting to reconnect after a connection drop.
Recommendation
Add isReconnecting to the destructured parameters and implement the UI to display reconnection state.
Recommendation: Destructure isReconnecting in the Header function parameters (around line 70) and implement UI to display the reconnection state to users.
Was this helpful? React with 👍 or 👎 to provide feedback.
Adds landing page with live community rooms embed.
Note: Requires bd-viral-001 (public rooms) and bd-agent-public-001 (agents) to be complete for full functionality.
Implements bd-landing-001 marketing feature.