Spaces:
Sleeping
Sleeping
Commit History
-
Add clear chat functionality with redesigned UX
findEthics- Add /api/clear-chat endpoint for both authenticated and anonymous users - Implement ChatSession.clear_user_history() method for database clearing - Add compact circular × button integrated with input controls - Remove confirmation dialog for instant clearing - Support mobile-responsive design with proper touch targets - Clear both UI messages and backend session/database data - Reset message counter for anonymous users410a397
-
Fix mobile header layout and change buttons to text
findEthics- Keep all header elements (Chatty, Login, Register) on same row for mobile - Remove vertical stacking on small screens (≤480px) - Change Login/Register buttons from emoji icons to text labels - Improve button padding and sizing for text content - Maintain proper alignment: Chatty left, buttons rightf998846 -
Update anonymous mode message for mobile to minimal design
findEthics- Hide full description and info icon on mobile devices - Show only "Login for higher limits" text and message counter - Responsive design for small mobile devices (480px and below)c9b3ee8
-
Optimize UI for mobile devices with minimal design
findEthics- Add responsive mobile navigation with icon buttons - Implement rounded corners throughout UI (1-2rem radius) - Remove all animations for instant, clean transitions - Create PWA manifest and app icons for mobile experience - Reorganize header: removed hamburger menu, simplified layout - Change "Create Account" to "Register" for consistency - Ensure single-row header layout across all screen sizes - Mobile: Show icon buttons (👤 for Login, ➕ for Register) - Desktop: Show text buttons for Login and Register - Improve touch targets (min 48px) and spacing on mobile - Add mobile-first responsive breakpoints - Black & white minimal design maintained throughoutb4487f6 -
Fix API call for tracked/logged in users
findEthicsc658e00
-
Merge branch 'main' of https://huggingface.co/spaces/findEthics/Chatty
findEthics6d1ad15 -
Fix anonymous sessions and clean up codebase
findEthics- Fixed anonymous session JWT verification for HF Spaces - Changed redirect from /anonymous to / (homepage) - Improved session restoration with automatic fallback - Removed debug/test code (session-test endpoint, console.logs) - Cleaned up unused imports (removed hashlib) - Changed verbose logs to DEBUG level - Added security documentation for CSRF settings - Updated CLAUDE.md with recent fixes and troubleshooting infof77d8aa -
Delete .env
Verified signatureDelete .env8a41594 -
Fix logout functionality and cookie clearing issues
findEthics- Properly clear JWT and session cookies on logout with matching parameters - Set cookie values to 'deleted' instead of empty for better tracking - Update token validation to ignore deleted cookies - Improve before_request hook to prevent auto-login after logout - Fix session expiry check TypeError with proper datetime handling - Adjust anonymous info banner layout (vertical stacking)2831bcb -
Refactor anonymous chat as default homepage with stateless JWT sessions
findEthicsMajor changes: - Homepage now directly opens anonymous chat interface - Implemented JWT-based stateless sessions for anonymous users (6-hour expiry) - Added info banner showing message limits and remaining messages - Login/register buttons remain accessible in header - Added cleanup script to reset anonymous data on startup - Removed choose.html template (no longer needed) Features: - Anonymous users land directly on chat without extra clicks - Clear visual indication of anonymous status and limitations - Message counter with color-coded warnings as limit approaches - Stateless operation handles Hugging Face Spaces load balancing - Automatic cleanup of anonymous sessions on app restart This fixes session expiration issues on Hugging Face Spaces deployment385121f -
Simplify UI to minimal black and white design
findEthics- Remove all feature lists and checkmarks from choose page - Remove privacy notice and footer text - Remove session warning banner for anonymous users - Convert all colors to black and white only - Remove gradients, shadows, and rounded corners - Simplify buttons to flat black/white design - Remove animations and transitions - Keep only essential UI elementsedabc80 -
Add anonymous chat access feature
findEthics- Allow users to chat without creating an account - Add choice page for selecting access mode (anonymous vs authenticated) - Implement session-based chat storage for anonymous users - Add rate limiting (20 messages/hour) for anonymous users - Add message length limits (2000 chars) for anonymous users - Update UI to show anonymous user indicators and session warnings - Maintain backward compatibility with existing authenticated flow6ec566b -
Implement stateless JWT authentication for Hugging Face Spaces
findEthics- Add PyJWT dependency for JWT token handling - Create JWT token functions: create_auth_token, verify_auth_token - Implement stateless authentication using JWT cookies - Update hf_login_required to use JWT tokens instead of sessions - Set auth_token cookie on login with 48-hour expiry - Clear auth_token cookie on logout - Use very permissive cookie settings for HF Spaces iframe compatibility This solves the load balancing issue where sessions are not shared between different servers in Hugging Face Spaces by using stateless JWT tokens stored in cookies instead of server-side sessions.dcffe87 -
Fix Hugging Face Spaces load balancing session issues
findEthics- Create custom hf_login_required decorator to handle load balancing - Store user_id, email, and login_time in session as backup - Attempt to restore user session when Flask-Login fails due to load balancing - Add IP address logging to track load balancing between servers - Replace @login_required with @hf_login_required for all protected routes This fixes the issue where users are authenticated on one server but redirected to login when load balanced to a different server in Hugging Face Spaces environment.dcf19b1 -
Fix session persistence issues for Hugging Face Spaces
findEthics- Make sessions permanent and use remember=True for iframe compatibility - Set SESSION_COOKIE_SAMESITE=None and HTTPONLY=False for HF Spaces - Extend session lifetime to 48 hours for iframe environments - Add comprehensive session debugging in login and chat routes - Add /session-test route to diagnose session issues - Force session.permanent=True before login_user call This should resolve the issue where users are redirected back to login after successful authentication due to session not persisting in the Hugging Face Spaces iframe environment.020f362 -
Disable CSRF protection for Hugging Face Spaces
findEthics- Add WTF_CSRF_ENABLED=False to HuggingFaceConfig - Conditionally enable/disable CSRF protection in app.py - Update templates to conditionally include CSRF tokens - Update deployment checklist with CSRF disabled settings - Add security note about HF Spaces iframe limitations This fixes the 'CSRF session token is missing' error that occurs due to Hugging Face Spaces' iframe/proxy environment where sessions don't work reliably for CSRF token validation.5c85005 -
Fix CSRF token issues for Hugging Face Spaces deployment
findEthics- Add HuggingFaceConfig class with relaxed CSRF/session settings - Disable SESSION_COOKIE_SECURE and WTF_CSRF_SSL_STRICT for HF Spaces - Add enhanced CSRF error handling with debugging - Remove duplicate error handlers - Update deployment checklist with HF-specific configuration - Set FLASK_ENV=huggingface for optimal HF Spaces compatibilitybcc5440 -
Complete user authentication system implementation
findEthics- Add comprehensive user authentication with registration and login - Implement secure password hashing and session management - Add CSRF protection and rate limiting for security - Create MongoDB integration for user accounts and chat history - Add personalized chat history per user - Implement production-ready configuration system - Add comprehensive documentation and deployment guides - Update UI with authentication forms and navigation - Add environment-based configuration management - Include security features: rate limiting, secure sessions, CSRF tokens - Add deployment tools and production readiness checks - Update requirements and documentation for production deploymentf6278c5
-
Bug fix
findEthicsfb0dac2 -
UI Changes
findEthics241d956
-
Transform Gradio chatbot to Flask web app with findEthics-Atlas API integration
findEthics293381a -
initial commit
Verified signature53c90b2 -
Duplicate from gradio-templates/chatbot
Verified signatureCo-authored-by: Pete <pngwn@users.noreply.huggingface.co>c6af5a8