Commit graph

9 commits

Author SHA1 Message Date
michael
882cd4dc0d Update assistant friendly names with current production assistants
Updated assistantMapping.js with friendly names for all active assistants:
- Banner & Ad Server Assistant (updated from Copy Assistant)
- Social Assistant
- SEM Assistant
- Email Assistant
- Free Chat

This improves UX by showing descriptive names in the assistant filter dropdown instead of raw IDs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:56:13 -06:00
michael
421961afc3 Add Timestamp field to enriched messages using conversation StartTime fallback
Messages from Make.com webhook have blank timestamp fields, preventing graph aggregation. This fix adds a Timestamp field during message enrichment using the parent conversation's StartTime as a fallback.

Logic:
- First checks if message has native Timestamp field from webhook
- If missing/blank, falls back to parent conversation's StartTime
- Ensures all messages have timestamps for proper date aggregation in VolumeGraph

This fixes the issue where messages mode shows blank graph despite 2473 messages being filtered successfully.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:50:16 -06:00
michael
83451212da Add debug logging to inspect raw message structure from webhook
Added logging to output a sample raw message from Make.com webhook to verify if messages have native timestamp fields (Timestamp, Created_At, etc.). This will help identify the correct field name for message timestamps.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:42:33 -06:00
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
michael
a5c0e86927 Fix authentication redirect handling for popup-based login
Added proper MSAL initialization and redirect handling to ensure popup authentication works correctly. The app now:
- Initializes MSAL instance before rendering
- Handles redirect responses from popup authentication
- Properly processes authentication tokens and updates state

This fixes the issue where users were redirected back to login after successful authentication.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 09:44:46 -06:00
michael
4d918ed037 Fix Vite environment variable loading during production build
Updated deploy.sh to copy .env file to frontend directory before building, ensuring Vite can access environment variables (including VITE_REDIRECT_URI) during the production build process. The temporary .env is cleaned up after build completes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 09:30:44 -06:00
michael
117a68a223 Configure MSAL redirect URI explicitly via environment variables
Added VITE_REDIRECT_URI and VITE_REDIRECT_URI_DEV environment variables to provide explicit control over Azure AD redirect URIs. Updated authConfig.js to use these variables with automatic environment detection (development vs production).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 09:27:13 -06:00
michael
bd857ae015 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
michael
b972f024db initial commit 2025-11-12 15:55:59 -06:00