-
Notifications
You must be signed in to change notification settings - Fork 37
Export chat #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export chat #474
Conversation
This commit introduces a new endpoint for exporting session chat data in JSON format. The export includes AG-UI events and legacy messages, if available. The frontend has been updated to support this feature, allowing users to download the exported data directly from the session details modal. Key changes: - Added `HandleExportSession` function in the websocket package to handle export requests. - Created a new API route for exporting sessions in `routes.go`. - Implemented frontend logic to trigger the export and handle file downloads in `session-details-modal.tsx`. - Updated session header component to pass project name for export functionality. This enhancement improves data accessibility for users, enabling them to save session data for further analysis or record-keeping.
This commit replaces the use of `oc patch` commands with `oc set env` for updating environment variables in the GitHub workflows for frontend, backend, and operator deployments. This change simplifies the syntax and improves readability. Additionally, the frontend session details modal has been enhanced to manage export functionality more effectively, including loading export data and handling multiple export options for AG-UI events and legacy messages.
This comment has been minimized.
This comment has been minimized.
This commit adds security measures to the session export process in the backend, including user authentication, permission verification, and session name validation to prevent path traversal attacks. The frontend has been updated to utilize a new React Query hook for fetching export data, streamlining the export process in the session details modal. Additionally, the code has been refactored for better readability and maintainability.
Claude Code ReviewSummaryThis PR adds session export functionality, allowing users to download chat data as JSON. The implementation includes backend security measures, proper RBAC validation, React Query integration, and enhanced workflow deployment scripts. Overall implementation is strong with excellent security practices, though there are a few areas for improvement. Issues by Severity🚫 Blocker IssuesNone - code is safe to merge after addressing critical issues below. 🔴 Critical Issues1. Missing splitLines function in export.go
2. Type safety issue in frontend export response
3. Missing error handling in frontend proxy
if (!resp.ok) {
return new Response(data, { status: resp.status })
}🟡 Major Issues4. Potential XSS in filename
5. Memory efficiency concern
6. Error propagation in modal
} catch (error) {
errorToast('Failed to export chat')
throw error
} finally {🔵 Minor Issues7. Inconsistent error logging
8. Unused sessionName parameter check
9. React Query cache time
Positive Highlights✅ Excellent Security Implementation
✅ Clean Architecture
✅ React Query Best Practices
✅ User Experience
✅ Code Quality
RecommendationsPriority 1 (Must Fix)
Priority 2 (Should Fix) Priority 3 (Nice to Have) Security Review Checklist✅ User token authentication required Testing RecommendationsBefore merging, verify:
Overall Assessment: Strong implementation with excellent security practices. Fix the compilation error and type safety issues, then this is ready to merge. The backend security implementation is exemplary and follows all project patterns correctly. 🔍 View AI decision process (logs available for 90 days) 📋 View memory system files loaded (click to expand)What Amber Loaded for Code ReviewAmber automatically loaded these repository standards from the memory system:
Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines. |
No description provided.