Spaces:
Sleeping
Sleeping
Commit History
-
fix: retrospective agent evaluated wrong month and crashed; persist its analysis to Reports tab
Bibhu Mishra +1: Claude Sonnet 5The retrospective always evaluated (current month - 1), so when trading went live mid-June it kept evaluating an empty May instead of June where the real trades were, silently skipping strategy tuning. Now falls back to the current in-progress month when trading started after the naive previous month. Also fixes a MultipleResultsFound crash once a month has more than one portfolio snapshot, and a "^SPY" ticker typo (the caret prefix is for indices, not the SPY ETF) that made get_spy_monthly_return always return None. Also adds a retrospective_reports table + /retrospective-reports API + a "Monthly Retrospective" tab on the Reports page, so the pattern analysis, tuning rationale, and PDF that the agent already produces are persisted and visible in the UI instead of living only inside the PDF and the raw run log. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>a381fc9
-
fix: reduce mobile transaction card size by ~50%
Bibhu Mishra +1: Claude Sonnet 4.6Halve card padding (12/14px → 6/8px), section divider spacing (8px → 4px), column gap (10px → 6px), all font sizes (0.82rem → 0.72rem, symbol 1.1rem → 0.88rem, P&L 0.9rem → 0.78rem, label 0.57rem → 0.5rem), and badge padding. Cards are visibly more compact without losing readability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e4b642b -
fix: correct legend colors and SPY% missing in monthly P&L chart
Bibhu Mishra +1: Claude Sonnet 4.6SPY%: switch Yahoo Finance fetch from 1mo to 1d interval so incomplete current months still resolve to the latest available daily close. Legend colors: add explicit series-level color to each series so ECharts uses the right color in the legend icon (bar series was falling through to the default palette instead of green). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1edbe67 -
fix: show Trigger close reason only on SELL rows, not BUY rows
Bibhu Mishra +1: Claude Sonnet 4.6BUY rows of closed positions were inheriting the position's close_reason (stop_loss / profit_target) making them look like they triggered an exit. Now: SELL rows show the close reason, BUY rows show Watching (if open) or —. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>af5ff01 -
fix: tighten desktop transaction table row padding
Bibhu Mishra +1: Claude Sonnet 4.6Reduce th/td vertical padding (10px → 7px/5px) to eliminate excessive row gaps in the desktop grid view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3b79566 -
feat: overlay portfolio % vs SPY % on monthly realized P&L chart
Bibhu Mishra +1: Claude Sonnet 4.6API: monthlyPnl() now also returns portfolio_pct (cumulative % gain from initial $5000 using portfolio snapshots) and spy_pct (cumulative SPY % from portfolio start date, fetched from Yahoo Finance monthly data). UI: adds a right y-axis for %, a legend, and two line series (Portfolio % in blue, SPY % in dashed amber) over the existing P&L bars. Chart height bumped to 260px to accommodate the legend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b61efdf
-
feat: switch mobile tx cards to 3-column grid to reduce card height
Bibhu Mishra +1: Claude Sonnet 4.6Collapses 4-row 2-col layout into 3-row 3-col: row1 = Symbol(span2)+Action, row2 = Exec Price|Qty|Mkt Price, row3 = P&L|Trigger|Date. One fewer row per card reduces scroll length. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5ccf4bb -
feat: redesign transaction tiles for mobile — card layout with color accents
Bibhu Mishra +1: Claude Sonnet 4.64-row CSS grid card per transaction on mobile (<768px): symbol/action header with green/red left-border accent, exec price + qty row, market price + P&L row, trigger/date footer — secondary columns (Entry, Target, Stop Loss, Strategy) hidden. Frosted-glass background with section dividers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>10f6cc7 -
feat: fix portfolio chart — time axis, P&L lines, live today point
Bibhu Mishra +1: Claude Sonnet 4.6Three issues fixed on 'Portfolio Value Over Time': 1. Category x-axis spaced dates equally regardless of real time gaps; switched to ECharts time axis so spacing reflects actual calendar gaps. 2. No P&L data — backend now enriches each snapshot with cumulative realized P&L (from SELL transactions) and derived unrealized P&L (total_value - 5000 - realized_pnl). Dual right Y-axis shows P&L scale separately from the ~$5000 portfolio value scale. 3. No current-state point — a live 'today' data point is appended using the already-loaded portfolio/summary/price data once prices finish loading, so the chart always reaches the present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1cc69ca
-
fix: PDF proxy, 0-qty positions, portfolio chart dedup, SQLite UTC dates
Bibhu Mishra +1: Claude Sonnet 4.6- PDF: remove partial select in getPdfPath (TypeORM select:{} quirk returned null even when row exists); fall back to GH_TOKEN env var in addition to GITHUB_TOKEN so HuggingFace secret naming doesn't matter - Positions: filter quantity > 0 in portfolio service so 0-qty open positions are hidden from dashboard and the open-positions table - Portfolio chart: deduplicate snapshots to one per calendar day (last value wins) to avoid repeated X labels and a cluttered line; rotate labels when many days; proper $ formatter on Y axis - SQLite dates: add SqliteDateSubscriber that undoes the local-timezone shift Node applies when parsing bare "YYYY-MM-DD HH:MM:SS" strings, so local dev times match the PostgreSQL pg-type-parser fix in production Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>73e0e3c -
feat: add Clear Cache & Reload button to Profile page for PWA hard-refresh
Bibhu Mishra +1: Claude Sonnet 4.6Unregisters all service workers, wipes every cache bucket, then reloads — so users can force-update to the latest deployed version without needing browser DevTools or Ctrl+Shift+R. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>85298d4 -
feat: PDF proxy, 0-qty filter, dashboard unrealized P&L, compact mobile cards
Bibhu Mishra +1: Claude Sonnet 4.6- Reports: proxy PDF through API with GITHUB_TOKEN instead of bare redirect (fixes private-repo PDFs that 401'd in the browser) - Transactions: filter quantity > 0 at query level to hide bad 0-qty records - Dashboard: add 6-card KPI row (portfolio value, unrealized P&L, realized P&L, buying power, win rate, open positions), live open-positions table with current price/unrealized P&L/target/stop/age, improved chart options - TransactionsView: tighten mobile card padding (12→8px) and font (0.85→0.78rem) so cards are visibly more compact Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d932d1d -
fix: correct UTC timestamp parsing — pg treated bare timestamps as local time
Bibhu Mishra +1: Claude Sonnet 4.6Root cause: PostgreSQL's pg driver returns TIMESTAMP WITHOUT TIME ZONE (OID 1114) as a bare string like "2026-06-19 14:45:00" with no timezone indicator. Node's Date constructor then treated it as *local* time, baking the server's TZ offset into the JSON before the browser saw it. A CDT user would see "02:45 PM" instead of "9:45 AM" for a value stored as 14:45 UTC. Fix: register pg type parsers in app.module.ts that append 'Z' before constructing the Date, so timestamps are always interpreted as UTC. Also tighten format.ts to use the same normalisation as a defence-in-depth for the local SQLite dev path and any remaining edge cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b2f5bb7 -
feat: flashy mobile bottom nav with per-route colored bubbles
Bibhu Mishra +1: Claude Sonnet 4.6Each nav item now has a floating pill bubble that lifts, scales, and glows when active — with a distinct gradient per route: Dashboard → blue, Trades → emerald, Reports → amber, Strategy → violet, Admin → slate, Profile → rose Darker, higher-contrast nav bar background with stronger blur. Tap-press scales the bubble down for tactile feel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>268a66c -
fix: local time, 0-qty guard, mobile card fields, glass UI
Bibhu Mishra +1: Claude Sonnet 4.6- All timestamps now show in browser local time via new format.ts utility (Dashboard, Transactions, Reports, Admin, Strategies all updated) - Guard against 0-quantity buy orders in trade_executor; skip with log message - Mobile transaction card now shows Qty and Mkt Price (4-row card layout) - Glass UI: frosted cards with backdrop-filter across Dashboard, Transactions, Reports; glass topbar; gradient body background; 13px base font Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a269f65
-
fix: mobile-friendly reports and transactions views; remove How It Works from nav
Bibhu Mishra +1: Claude Sonnet 4.6Reports: switch to grid-area card layout on tablet/mobile, modal becomes a bottom sheet with a wrapping price ribbon on small screens. Transactions: add data-label to every <td> and replace horizontal-scroll table with labeled 2-column cards on mobile, showing Symbol, Action, Exec Price, P&L, Trigger, and Date only. Also removes How It Works from sidebar/bottom-nav (dashboard banner is the only entry point now). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f85c927 -
feat: add How It Works banner to dashboard home page
Bibhu Mishra +1: Claude Sonnet 4.6Prominent link card at the top of the dashboard directs users to the /how-it-works explainer page. Also in sidebar and mobile bottom nav. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>972126c -
feat: add How It Works page explaining all three agent flows
Bibhu Mishra +1: Claude Sonnet 4.6New /how-it-works route with layman-language explanations and visual step-by-step flow diagrams for Market Analyst, Paper Trader, and Retrospective agents. Includes a Key Concepts section and schedule info. Nav link added to sidebar and mobile bottom nav. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e8123b0 -
fix: make strategy params show as formatted JSON; prompts full-width edge-to-edge
Bibhu Mishra +1: Claude Sonnet 4.6- Parameters section replaced with a dark monospace pre block showing JSON.stringify(params, null, 2) — easy to read and copy - Prompts section uses negative margins to break out of the card's side padding, so each prompt pre block runs true edge-to-edge of the card - Prompt rows use consistent 20px horizontal padding on header/body - Mobile breakpoint adjusted to match 14px card padding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>bbbacd9 -
feat: define SPY-beating prompts, lock strategy to retrospective agent only
Bibhu Mishra +1: Claude Sonnet 4.6Agent prompts (all 5 agents rewritten with explicit SPY-outperformance goals): - fundamental_analyst: favour revenue growth >15%, EPS beats, positive revisions; penalise index-correlated plays with no re-rating catalyst - technical_analyst: require relative strength vs SPY, golden cross, RSI 50-70; reject stocks below SMA200 or showing relative weakness - sentiment_analyst: weight analyst upgrades, earnings beats, institutional buying; penalise downgrades, guidance cuts, insider selling - synthesizer: explicit SPY-beating mission; reject <15% expected return picks; require 2:1 risk/reward, sector diversification, and named catalysts - trade_decision: prioritise by confidence_pct, tighten entry to 2% of analyst price, prefer 3 high-conviction trades over 5 mediocre ones DB / seed: - Seed strategy renamed to "SPY Outperformance v1" with matching description - _backfill_strategy_prompts: 'initial' strategies always sync to current code defaults so prompt improvements take eff…d1f75a1 -
fix: lift mobile bottom nav clear of screen corners and home indicator
Bibhu Mishra +1: Claude Sonnet 4.6- Add left/right safe-area padding (min 10px) so corner items aren't clipped by the phone's rounded screen edges - Add bottom padding (min 6px) above the home indicator - Frosted-glass background with blur + shadow for visual lift - Active item gets a pill highlight instead of colour-only change - Increase content padding-bottom to 88px to match taller nav Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9785a59
-
fix: correct v-else/v-else-if adjacency in DashboardView and TransactionsView
Bibhu Mishra +1: Claude Sonnet 4.6v-else-if/v-else directives must be on immediate sibling elements. Moved conditionals from inner <table> to the outer <div class="table-scroll"> wrapper in both views to satisfy Vue's template compiler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1deac60 -
feat: mobile-first responsive layout
Bibhu Mishra +1: Claude Sonnet 4.6- AppLayout: sidebar hidden on mobile; fixed bottom nav bar replaces it. Topbar shows brand name on mobile, hides user name text. - Dashboard: KPI grid 4→2 cols on mobile, charts stack to single column, recent-transactions table gets horizontal scroll wrapper. - Transactions: table wrapped in overflow-x:auto scroll container. - Admin: agent-tile grid 3→2→1 cols as viewport narrows, users table gets scroll wrapper, settings form stacks label+input on mobile. - Strategies: header flex-wraps on narrow screens. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b38abb9
-
feat: add per-page browser tab titles
Bibhu Mishra +1: Claude Sonnet 4.6Each route gets a meta.title; an afterEach guard sets document.title to "Page | AlphaForge" so tabs are identifiable when multiple are open. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e25cb01 -
Add persistent dispatched state on agent tiles after trigger
Bibhu Mishra +1: Claude Sonnet 4.6After dispatch: tile turns blue, shows pulsing dot + "GitHub Action starting — waiting for run...", button stays disabled with spinner. Polls every 3s for up to 3 minutes instead of 500ms × 10s. State clears automatically once a pending/running run appears. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d4d99f2 -
Make all agent run buttons consistent regardless of marketGated flag
Bibhu Mishra +1: Claude Sonnet 4.6Button style and tile border now follow market open/closed state for all agents — retrospective showed green while others showed amber Force Run, since all admin triggers are force runs the visual should be uniform. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2376c6b -
Fix SPA refresh 500 and agent trigger error handling
Bibhu Mishra +1: Claude Sonnet 4.6- ServeStaticModule: fix exclude pattern from glob '/api*' to path-to-regexp '/api/(.*)' and add renderPath '/*' for SPA fallback; v5 uses path-to-regexp so the old glob was silently not matching - Agent trigger: throw InternalServerErrorException instead of returning 200 with error message when GITHUB_TOKEN is missing or dispatch fails - AdminView: surface the server error message in the error toast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6bc99c7 -
Add confirmation modal before triggering agents from admin
Bibhu Mishra +1: Claude Sonnet 4.6All admin triggers are force runs (dispatched to GitHub Actions with force=true regardless of market hours). A confirmation modal now appears before dispatching, showing the agent name and a warning when the market is closed for market-gated agents. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d28fef8 -
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
Bibhu Mishra +1: Claude Sonnet 4.6- Dockerfile (multi-stage Node build, port 7860 for HuggingFace) - .github/workflows/deploy-hf.yml — force-push to HF Space on every main push - .github/workflows/market_analyst.yml — cron 9:30 AM CST Mon–Fri + workflow_dispatch - .github/workflows/paper_trader.yml — crons 10 AM / 12 PM / 2:45 PM CST Mon–Fri - .github/workflows/retrospective.yml — cron Mon 5 AM UTC (Sun 11 PM CST), no market gate - agents/core/market_hours.py — check_or_exit() exits cleanly when market is closed; FORCE_RUN=true bypasses (set automatically on workflow_dispatch from admin) - Market Analyst and Paper Trader call check_or_exit() at startup - api/src/app.module.ts — ServeStaticModule serves ui/dist when present (production) - api/src/main.ts — add HuggingFace Space origin to CORS - api/src/agent-runs/agent-runs.service.ts — trigger() now dispatches GitHub Actions workflow_dispatch with force=true instead of spawning local shell scripts - ui/src/views/AdminView.vue — live market-hours banner + market tag…abc493d