feat: Frontend Conversation-based Chat UI (#60) #66

Open
shoko wants to merge 2 commits from fix/issue-60 into main
Owner

Summary

Implement frontend conversation-based chat UI following the spec in issue #60:

New Components Created

  • ChatLayout - Main layout with left/right panes and chat area
  • ConversationList - Left pane showing all conversations with New Chat button
  • ChatArea - Main chat area displaying messages with candlestick loading animation
  • ChatInput - Message input component
  • BotInfoPanel - Right pane showing bot info
  • AnonymousBanner - Warning banner for non-logged users (shows at 40+ messages)
  • CandlestickLoader - Animated loading indicator

API Client Updates

  • Added Conversation, Message, ConversationWithMessages types
  • Added conversations API methods: list, create, get, delete, chat, setBot

New Routes

  • /home - Conversation list page
  • /chat - No conversation selected (placeholder)
  • /chat/:conversationId - Active chat with conversation

Rate Limiting Handling

  • Anonymous users: warning at 40 messages, blocked at 50
  • System rate limit (429): shows Rate limited from the agent service message
  • Auth limit (403): redirects to login

Closes #60

## Summary Implement frontend conversation-based chat UI following the spec in issue #60: ### New Components Created - **ChatLayout** - Main layout with left/right panes and chat area - **ConversationList** - Left pane showing all conversations with New Chat button - **ChatArea** - Main chat area displaying messages with candlestick loading animation - **ChatInput** - Message input component - **BotInfoPanel** - Right pane showing bot info - **AnonymousBanner** - Warning banner for non-logged users (shows at 40+ messages) - **CandlestickLoader** - Animated loading indicator ### API Client Updates - Added `Conversation`, `Message`, `ConversationWithMessages` types - Added `conversations` API methods: list, create, get, delete, chat, setBot ### New Routes - `/home` - Conversation list page - `/chat` - No conversation selected (placeholder) - `/chat/:conversationId` - Active chat with conversation ### Rate Limiting Handling - Anonymous users: warning at 40 messages, blocked at 50 - System rate limit (429): shows Rate limited from the agent service message - Auth limit (403): redirects to login --- Closes #60
shoko added 1 commit 2026-04-14 08:37:42 +02:00
- Add Conversation, Message, ConversationWithMessages types
- Add conversations API client methods (list, create, get, delete, chat, setBot)
- Create conversationStore for state management
- Create ChatLayout component with left/right panes
- Create ConversationList component for left pane
- Create ChatArea component for messages display
- Create ChatInput component for message input
- Create BotInfoPanel component for right pane
- Create AnonymousBanner component for non-logged users
- Create CandlestickLoader animation component
- Add /home and /chat routes
- Handle anonymous user rate limits (40 warning, 50 max)
- Handle system rate limits (429) and auth limits (403)
shoko added 1 commit 2026-04-15 17:20:50 +02:00
Backend:
- Fixed auth issue where get_optional_user wasn't properly extracting tokens
- Added user_id to conversational agent for proper auth context
- Fixed DCA buy logic to support multiple buys on dips
- Fixed sell logic to use amount_percent
- Added comprehensive backtest engine tests
- Fixed kline data validation for bad price data
- Fixed chained tool calls handling

Frontend:
- BotCard now links to chat page instead of bot page
- Chat page handles direct bot loading from dashboard
- Various UI improvements and fixes

Tests:
- Added test_agent.py with mock client tests
- Added test_backtest_engine.py with 7 comprehensive tests
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/issue-60:fix/issue-60
git checkout fix/issue-60
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#66