Commit Graph

27 Commits

Author SHA1 Message Date
root
5453bb4922 refactor(ui): close residual theme audit debt 2026-05-07 06:21:32 +00:00
root
a1a63cc945 feat(simple): add long-term hold mode 2026-05-06 17:37:04 +00:00
root
bff0a4d931 build(web): clean split warnings and monaco loading 2026-05-06 16:28:50 +00:00
root
3d505db8d8 feat(simple): add amount sizing and runtime status 2026-05-06 07:04:48 +00:00
root
266b367322 feat(web): add shared light dark theme system 2026-05-06 02:56:27 +00:00
root
90e733b46c feat(simple): save dip-buy and profit-exit setups 2026-05-06 02:14:32 +00:00
root
39456473cb feat(settings): add per-user fmp api key 2026-05-05 23:08:31 +00:00
root
5ba315fd02 fix(web): prevent public bundle localhost api fallback 2026-05-05 22:04:06 +00:00
e8b3c9cf69 fix(E3): bundle Monaco workers locally 2026-05-04 18:10:18 -07:00
70db4c9a04 fix(B9): surface builder strategies in strategies tab 2026-05-04 17:21:18 -07:00
938ed86044 feat: live data wiring (Alpaca/FMP) + strategy builder + screener
Wires the new dashboard to real market data and adds the strategy
builder & screener UIs that were stubbed in the previous commit.

Frontend (web/src/):
- lib/marketApi.ts: authenticated fetch helpers for chart bars,
  market indices, news, and FMP research endpoints
- views/HomeView.tsx: StockChart now fetches live OHLCV via
  fetchChartBars on symbol/period change with loading/error states;
  ResearchCards replaces the static placeholder with live FMP
  profile/metrics/earnings (next-earnings + last 3 historical)
- components/layout/Header.tsx: live SPY/DIA/QQQ price + change%
  via fetchMarketIndices, refreshing every 60s; removed unused
  static sparkline placeholder
- components/strategy/VisualRuleBuilder.tsx: drag-and-drop IF/THEN
  rule composer using @dnd-kit (RSI/MACD/EMA/Price/Volume,
  above/below/crosses, BUY/SELL with shares or % of capital);
  saves via POST /api/profiles
- components/strategy/CodeStrategyEditor.tsx: Monaco editor with
  JS strategy template; "Run Backtest" posts to /api/backtest and
  renders return/win-rate/Sharpe/drawdown plus trade log
- views/ResearchView.tsx: adds "Visual Builder" and "Code Editor"
  sub-tabs alongside Strategies / Signals / Backtesting
- views/ScreenerView.tsx: live FMP screener with market-cap and
  sector filters, sortable columns, click-to-load-symbol routing
- index.css: light theme background; @keyframes spin for loaders
- App.dom.test.tsx: rewritten for router-based AppShell (was
  asserting on the removed tab UI; fixes 5 prior failures)

Backend (backend/src/services/apiServer.ts):
- /api/chart/bars: detects crypto symbols (contains "/") and
  routes to Alpaca v1beta3/crypto/us/bars; equities use
  v2/stocks/{symbol}/bars with iex feed
- (existing) /api/news, /api/market/indices, /api/research/{
  profile,metrics,earnings}, /api/screener proxy endpoints

Build/config:
- web/vite.config.ts: dedupe react / react/jsx-runtime /
  react-router-dom so the vendored react-auth dist resolves the
  same React instance (fixes "Cannot resolve react/jsx-runtime"
  Rollup error)
- web/tsconfig.app.json: exclude shared/platform-clients.ts and
  shared/platform-mobile.ts (mobile-only, missing RN SDK)
- web/package.json: add react-router-dom, @monaco-editor/react,
  @dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities

Verification: `npm run build` in web/ → clean (✓ built in 3s);
backend tsc --noEmit → clean. Test suite: 151/155 pass; the 4
remaining failures are pre-existing (3 useTabFeatureFlags module
cache leaks, 1 EntryForm), not introduced here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 06:16:46 -07:00
root
e2008f70b9 fix: web + mobile pre-beta audit — real APIs, socket routing, empty states
Web:
- runtime.ts: use import.meta.env (process.env is undefined in Vite browser bundle)
- tradingApiUrl local fallback: drop /api suffix (API libs already append /api/*)
- useWebSocket: deriveSocketParams() — correctly splits origin + socket path for
  Caddy handle_path /invttrdg/* proxy (io(origin, {path}), not io(url-with-path))
- App.tsx: pass socket prop to AdminTab; pass connected prop to SignalsTab
- AdminTab: remove duplicate useWebSocket; accept socket as prop
- SignalsTab: connection-aware empty state message
- backtest/flags: default to disabled when VITE_BACKTEST_ENABLED unset
- EntryForm: NaN guard before live trade execution
- MarketplaceTab: null-safety on symbols.rules access
- Tests: pass socket prop to AdminTab; update empty state assertion

Mobile:
- TradingDataProvider: same deriveSocketParams fix — EXPO_PUBLIC_SOCKET_PATH
  overrides auto-derived path from tradingApiUrl
- strategies: replace mock data with real GET /api/profiles + PATCH active toggle
- chat: wire to real POST /api/chat; remove hardcoded mock reply
- marketplace: fetch GET /api/marketplace-presets; USE STRATEGY calls POST /api/profiles
- settings: sign-out confirmation dialog; execution mode read-only hint;
  version from expo-constants instead of hardcoded v2.3
- positions/history: empty state UI when no data
- CustomTabBar: always show tab labels (not only when focused)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 04:50:51 +00:00
d99cb94d19 feat: standardize request ids across operator flows 2026-04-04 18:07:43 -07:00
ffa60fcfb7 refactor: remove live web supabase dependency 2026-04-04 18:03:49 -07:00
f73f855eb0 fix: align web verification with platform session contracts 2026-04-04 18:00:30 -07:00
77c7b32ac0 refactor: seed cosmos stores and standardize request ids 2026-04-04 17:16:18 -07:00
6c39b9b185 refactor: move web auth onto platform session helpers 2026-04-04 17:07:42 -07:00
b433686776 refactor: move web trading data behind backend apis 2026-04-04 16:49:18 -07:00
ebaabaed47 feat: move manual entries behind backend api 2026-04-04 16:09:21 -07:00
44f3171783 refactor: route settings and config through backend apis 2026-04-04 15:50:44 -07:00
535e0a88a9 refactor: move profile reads onto backend api 2026-04-04 15:36:54 -07:00
42420687f9 feat: move core web profile flows behind backend api 2026-04-04 15:02:15 -07:00
b551ab2a4f feat: move dynamic config behind backend control plane 2026-04-04 14:26:12 -07:00
a4fce709f0 refactor: move web auth onto shared platform provider 2026-04-04 13:59:13 -07:00
d78aeeffc2 feat: adopt platform auth and cosmos trading control 2026-04-04 13:13:08 -07:00
c9aadfae8e feat: add mobile websocket sync 2026-04-04 11:39:47 -07:00
3cbbd6ccaa feat: scaffold trading monorepo foundation 2026-04-04 11:18:21 -07:00