Skip to content

Conversation

halsk
Copy link
Contributor

@halsk halsk commented Apr 20, 2025

Summary

Test plan

  • Verify all new routes are accessible
  • Check that analyze button appears in channel list
  • Confirm navigation works between all analysis pages
  • Test form submission on analysis page
  • Verify tabs on results page display content correctly

Fixes #175

🤖 Generated with Claude Code

halsk and others added 26 commits April 20, 2025 23:05
Implements routes for team-based channel analysis as requested in issue #175:
- Added channel analysis page for initiating analysis
- Added analysis result page with tabbed interface
- Added analysis history page for viewing past analyses
- Updated App.tsx with the new routes
- Modified TeamChannelSelector to include analyze button

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

Co-Authored-By: Claude <[email protected]>
This commit addresses the issue where channel analyses were showing 0 messages, participants, threads, and reactions. The issue was that messages weren't being properly synchronized from Slack before analysis.

Key changes:
1. Added a dedicated message sync endpoint for team integrations
2. Updated frontend to call this endpoint before analysis
3. Made apiUrl and getAuthHeaders public in IntegrationService for custom endpoint access
4. Improved error handling in both frontend and backend
5. Added proper logging for debugging purposes

The solution ensures messages are explicitly fetched from Slack API and stored in the database before analysis is performed.
Ensures channel name is properly displayed in the analysis results page by:
1. Adding proper formatting for the channel name with # prefix
2. Providing fallbacks to analysis.channel_name if resource data is missing
3. Adding a default display as '#channel' if both sources are unavailable
4. Fixing the badge to show 'channel' when type is missing
…el selector

- Fixed URL construction in TeamChannelAnalysisHistoryPage to avoid duplicate /api/v1 in path
- Added history button to TeamChannelSelector component
- Fixed TypeScript errors in integrationService.ts
- Removed unused imports and variables
- Used integrationService directly for API calls instead of manual fetch
- Add nullable handling to analysis fields to prevent errors with undefined properties
- Add proper type casting for API responses
- Update ApiError interface to include 'detail' property
- Add workspace_id to Integration interface
- Add analysis_type to AnalysisOptions interface
- Improve type safety in formatText function
- Fixed duplicate datetime import and sorting in integration router
- Updated analyzeChannel method in IntegrationContext to use the new analyzeResource method instead
- Updated tests to match the new API
- Fix isort errors in integration router.py
- Fix missing SlackApiError import
- Remove unused datetime import and analysis_date variable
- Mock useNavigate hook in TeamChannelSelector tests
- Add analyzeResource mock in IntegrationContext tests
- Update analyzeChannel to use analyzeResource
Auto-formatting changes from Black
@halsk halsk merged commit 5a1d99c into main Apr 21, 2025
3 checks passed
@halsk halsk deleted the feature/team-channel-analysis branch April 21, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Phase 1] Implement Routes for Team-based Channel Analysis
1 participant