baic_dashboard/frontend
michael 908053def2 Fix data filtering race condition and allow all assistants to display
This fixes the critical bug where all conversations and messages were being filtered out (0 results) despite successfully fetching data from the API.

Root causes fixed:
1. Race condition: window.validAssistantIds was undefined when filtering logic ran
2. Overly restrictive filtering: Only assistants with friendly names were shown
3. Assistant ID mismatch: Hardcoded IDs didn't match actual data

Changes in Dashboard.jsx:
- Replaced window global variables with React state (validAssistantIds, assistantDisplayToIdMap, etc.)
- Added guard to prevent filtering until validAssistantIds is initialized
- Removed filter that required friendly names - now all assistants display
- Use raw Assistant_ID as fallback if no friendly name exists
- Fixed useEffect dependencies to properly track state changes

Changes in assistantMapping.js:
- Added mapping for asst_eECsc64ZG3t6HHuvqR9FvoPt (Copy Assistant)
- Kept existing mappings for backwards compatibility

Result: All 469 conversations and 2471 messages now display correctly in the dashboard.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:32:12 -06:00
..
public initial commit 2025-11-12 15:55:59 -06:00
src Fix data filtering race condition and allow all assistants to display 2025-11-18 14:32:12 -06:00
.gitignore initial commit 2025-11-12 15:55:59 -06:00
baic-logo.png initial commit 2025-11-12 15:55:59 -06:00
eslint.config.js initial commit 2025-11-12 15:55:59 -06:00
index.html initial commit 2025-11-12 15:55:59 -06:00
package-lock.json initial commit 2025-11-12 15:55:59 -06:00
package.json initial commit 2025-11-12 15:55:59 -06:00
README.md initial commit 2025-11-12 15:55:59 -06:00
vite.config.js extracted all domains, URLS, secrets, etc. to .env and wrote a deploy script to deploy on server 2025-11-12 16:27:59 -06:00

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.