Commit Graph

12 Commits

Author SHA1 Message Date
ahmet guzererler 2a05e4b5a9
Merge branch 'main' into feature/portfolio-resumability-and-cleanup 2026-03-24 03:32:09 +01:00
Ahmet Guzererler 860968835c feat: add Reset Decision button to clear portfolio stage and re-run
- ReportStore.clear_portfolio_stage(date, portfolio_id): deletes pm_decision
  (.json + .md) and execution_result files for a given date/portfolio
- DELETE /api/run/portfolio-stage endpoint: calls clear_portfolio_stage
  and returns list of deleted files
- Dashboard: 'Reset Decision' button calls the endpoint, then user can
  run Auto to re-run Phase 3 from scratch while skipping Phase 1 & 2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 00:34:53 +01:00
Ahmet Guzererler 2a17ea0cca feat: add Force re-run checkbox to dashboard params
Adds a 'Force re-run' checkbox that passes force=True to the backend,
bypassing all date-based skip checks (scan, pipeline, portfolio, execution).

Also fixes auto run: ticker is not required (scan discovers tickers),
portfolio_id is the correct required field instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 00:31:16 +01:00
copilot-swe-agent[bot] 8e48bb4906 Add stop_loss and take_profit fields to Trade entries in database, API, and UI
Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/3b6a6fcc-30ac-48fa-970f-995a3bed80ed
2026-03-23 21:12:01 +00:00
copilot-swe-agent[bot] 6999da0827 feat: button states, full prompt extraction, portfolio viewer, param inputs
1. Run buttons: only the triggered button shows spinner, others disabled
2. Backend: enhanced prompt extraction with multiple fallback paths
   (data.messages, data.input.messages, data.input, data.kwargs.messages)
   and raw dump fallback; improved response extraction for edge cases
3. Portfolio viewer: new PortfolioViewer component with holdings table,
   trade history, and summary tabs; portfolio dropdown with auto-load;
   Wallet sidebar icon now navigates to portfolio page
4. Parameter inputs: collapsible panel with date/ticker/portfolio_id;
   validation prevents running without required fields per run type

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/ffa268c8-e97c-4335-9bce-19bba583bea9
2026-03-23 08:46:34 +00:00
copilot-swe-agent[bot] b08ce7199e feat: fix prompt display, add event detail modal, run buttons, and node animations
Backend:
- Extract full prompt from all LLM messages (not just first)
- Add prompt/response fields to streamed event payloads
- Improve model name extraction with multiple fallback strategies
- Add run_portfolio and run_auto streaming methods
- Wire portfolio/auto in websocket router
- New tool_result event type for tool completion

Frontend:
- Add full event detail modal with tabs (Prompt, Response, Summary, Metrics)
- Show actual prompt content in drawer instead of "Prompting unknown..."
- Add Scan, Pipeline, Portfolio, Auto buttons to control panel
- Fix node animation: completed nodes never revert to running
- Handle tool_result type for marking tool nodes as done
- Drawer events have "Full Detail →" button to open modal

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/7997c579-ab7e-4071-afd0-18703a8e5618
2026-03-23 08:04:53 +00:00
copilot-swe-agent[bot] cf2df83c38 feat: clickable terminal events, node inspector drawer, stop animation on complete, vite 8
1. Terminal: remove inline prompts/full text; show short summary per event;
   click any event to open detail drawer with full request/response/model/metrics
2. Fix node "thinking" animation: shimmer only when status=running;
   on_chat_model_end (result) transitions node to completed, animation stops
3. Link nodes to events: clicking a graph node opens the drawer showing
   all events for that node (prompts, tool calls, results)
4. Upgrade Vite 5→8.0.1, @vitejs/plugin-react→5.2.0;
   update tsconfig moduleResolution to "bundler" for Vite 8 compat

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/93c31c35-9509-4254-96fd-6f47aad07927
2026-03-23 07:03:48 +00:00
copilot-swe-agent[bot] e9be24600f fix: AgentOS backend logging/prompts, frontend node persistence, package updates
Backend:
- Replace bare print() with structured logging module
- Include LLM prompt snippets and response content in streamed events
- Extract proper node names from LangGraph metadata (langgraph_node)
- Add latency tracking (start/end time per node)
- Add tool input/output content in events
- Add system log event type for informational messages
- Stream on_tool_end events for tool results

Frontend:
- Fix node disappearing/reappearing: use useNodesState/useEdgesState + useEffect
  for incremental updates instead of useMemo that rebuilt all nodes on each event
- Fix duplicate node creation: use useRef to track seen node IDs persistently
- Fix useAgentStream reconnection loop: remove stale `status` from connect deps
- Use statusRef to avoid stale closure in onclose handler
- Add auto-scroll to terminal, event count, type labels/colors
- Show prompt snippets, tool I/O, and response content in terminal
- Handle 'log' event type

Packages:
- Update all npm deps to latest compatible minor versions
- Remove node_modules from git tracking, add to .gitignore

Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/aguzererler/TradingAgents/sessions/5c511c4e-5172-4eda-b6de-aefa1859e8ac
2026-03-23 00:51:29 +00:00
Ahmet Guzererler 2116c14d07 fix: prevent multiple run triggers from button clicks
- add isTriggering state to Dashboard
- disable button immediately upon click
- update isLoading prop to include trigger state
2026-03-22 22:51:35 +01:00
Ahmet Guzererler 7dd7a5c0b6 fix: migrate backend to port 8088 and use 127.0.0.1 to avoid macOS system conflicts
- move backend port from 8001 to 8088
- update frontend to use 127.0.0.1 explicitly instead of localhost
- add request/response logging middleware to backend
- fix explicit CORS origin matching for browser compatibility
2026-03-22 22:51:09 +01:00
Ahmet Guzererler d5df6b93a4 feat: connect Top 3 Metrics to real data from Supabase and macro scans
- add /api/portfolios/{id}/summary endpoint to backend
- parse Sharpe and Drawdown from latest portfolio snapshots
- parse Market Regime from macro_scan/scan_summary.json
- update MetricHeader to fetch real-time metrics with polling
- pass portfolio_id to dashboard and trigger methods
2026-03-22 22:14:27 +01:00
Ahmet Guzererler 078d7e2f2a feat: implement AgentOS frontend and live backend integration
- scaffold Vite + React + TypeScript frontend with Chakra UI and React Flow
- implement AgentGraph, MetricHeader, and Dashboard components
- connect FastAPI to live LangGraph events via astream_events
- implement real-time event mapping for 'scan' and 'pipeline'
- refactor run storage for shared access between REST and WebSockets
2026-03-22 22:12:33 +01:00