Skip to content

feat: platform overhaul — indigo design system, Command Palette, Approval Drawer, Toast#8

Merged
rogerdigital merged 20 commits intomainfrom
feat/platform-overhaul
Apr 15, 2026
Merged

feat: platform overhaul — indigo design system, Command Palette, Approval Drawer, Toast#8
rogerdigital merged 20 commits intomainfrom
feat/platform-overhaul

Conversation

@rogerdigital
Copy link
Copy Markdown
Owner

Summary

  • P2-4 to P2-7: Indigo color migration — replaced all cyan/blue accent colors (rgba(0,212,255,...), rgba(40,120,220,...)) with indigo (#6366f1 / rgba(99,102,241,...)) across 8 style files and 3 chart components (EquityChart, CandlestickChart, SignalBarChart)
  • P3-1: Command Palette — global Cmd+K / Ctrl+K modal with fuzzy search, keyboard navigation (↑↓/Enter/Esc), and locale-aware hints; wired into ConsoleChrome.tsx Layout
  • P3-2: Approval Drawer — fixed bottom slide-up panel for pending live broker orders with per-order Approve/Reject actions; wired into Layout with approveLiveIntent / rejectLiveIntent
  • P3-3: Toast systemToastProvider / useToast() hook, auto-dismiss, slide-in/out animations, mounted in AppProviders
  • Bug fixes — removed circular ESM import shims (analysis-service.ts, intent-service.ts, planning-service.ts) that caused Detected cycle at gateway startup; fixed missing await on executeAgentTool; added request_execution_prep rule to intent fallback; added Summarizing status message to analysis loop; listAgentTools() now returns only read tools

Test plan

  • All 134 API tests pass
  • All 62 web tests pass
  • All 20 worker tests pass
  • Full npm run verify pipeline green (lint, typecheck, build)
  • Indigo palette visible in charts, sidebar, panels
  • Cmd+K opens Command Palette and keyboard navigation works
  • Approval Drawer appears when live orders are pending

- Add OhlcvBar type and externalBars optional field to BacktestConfig
- Update backtest engine to use externalBars when provided, fallback to synthetic
- Add fetchAlpacaBarsForBacktest() to workflow engine for parallel symbol fetch
- Wire real Alpaca bars into executeBacktestRunWorkflow via externalBars injection
- Add hero section with title, subtitle, and quick-prompt chips row
- Add 3-step analysis stepper (Intent → Planning → Analysis) with pulse animation
- Rebuild chat transcript with indigo accent colors replacing deep cyan
- Add analysis insight card as primary right-rail view: thesis, rationale
  list, warning pills, recommended-next-step, Paper/Live/Backtest action buttons
- Simplify composer: clean textarea, ⌘Enter shortcut, indigo send button
- Remove legacy hero-grid and verbose info panels from top of page
- Governance section moved below main workspace, session list always visible
- Update tests to match new UI structure and labels
- Add parameters-service.js with in-memory risk config store
  (maxPositionWeight 5%, maxDrawdownPct 12%, dailyLossStop 5%,
  sharpeFloor 0.9, liveOrderRequiresApproval true defaults)
- Wire assessment-service to read dynamic params instead of hard-coded values
- Add GET/POST /api/risk/parameters and POST /api/risk/parameters/reset endpoints
- Add fetchRiskParameters/saveRiskParameters/resetRiskParametersToDefaults API helpers
- Add RiskParametersPanel to SettingsPage with editable numeric fields and checkbox
- Add overviewResultsBanner section above hero grid with 5 KPI cards:
  Total NAV, Daily P&L (colored green/red), Open Positions, Buy Signals, Pending Approvals
- New kpi-value uses clamp(24px–36px) font for prominent display
- Daily P&L and buy/sell count use semantic buy/sell/hold colors
- Banner renders before the existing command-card hero section
Replace all hardcoded cyan (#00d4ff / rgba 0,212,255) with indigo (#6366f1 / rgba 99,102,241) across the design system to align with the consumer-facing platform direction. Updated: theme.css.ts (tokens), panels.css.ts, base.css.ts, tables.css.ts, layout.css.ts, settings.css.ts.
Clean up remaining legacy cyan/blue color values in chips, tables, layout, panels, and settings. Update order-status-open, badge-info, log-tag.info, and panel-badge.accent to use indigo tones consistent with the new design system. All 6 style modules now free of cyan/old-blue hardcodes.
Migrate EquityChart and CandlestickChart from cyan (#00d4ff) to indigo (#6366f1) for grid lines, crosshair, price scale borders, and volume histogram. Paper equity series line now uses indigo to match platform accent. Candlestick up/down colors unchanged (semantic green/red).
Introduce a full-screen command palette triggered by Cmd+K or Ctrl+K. Features instant fuzzy search across all console pages, keyboard navigation (↑↓ to move, Enter to navigate, Esc to close), bilingual labels/hints (zh/en), and indigo-themed glassmorphism panel with backdrop blur. Implemented as a standalone component mounted in the Layout root.
Introduce a slide-up bottom panel that appears globally whenever approvalQueue is non-empty, letting users approve or reject live order intents from any page. Features: amber-themed glassmorphism panel, pulsing indicator dot, per-order cards with symbol/side/qty, approve/reject buttons. Mounted in Layout root alongside CommandPalette.
Introduce ToastProvider/useToast for app-wide success/error/info/warn notifications. Toasts appear bottom-right with slide-in animation, auto-dismiss after 4s, and support manual close. ToastProvider wraps the app in AppProviders. Exports useToast() hook for page-level feedback.
analysis-service.ts, intent-service.ts, planning-service.ts were thin shims re-exporting from their .js counterparts. Under Node ESM + tsx, this caused a SyntaxError cycle. All consumers already import the .js files directly, so the shims are safe to delete.
SignalBarChart was missed in the P2-7 chart color migration. Updated grid lines, crosshair, price scale borders and textColor to match the indigo design system.
- Merge duplicate type imports in ApprovalDrawer
- Sort imports in CommandPalette, ConsoleChrome, AgentPage
- Replace div[role=option] with button for keyboard accessibility
- Add biome-ignore comment on overlay backdrop div
- agent-router: add missing await on executeAgentTool (was returning
  a Promise, causing result.ok to be undefined and all tool-execute
  calls to return 403)
- tools-service: listAgentTools() now filters to read-only tools so
  GET /api/agent/tools satisfies the every(access==='read') assertion
- intent-service: add request_execution_prep rule to the rule-based
  fallback; extracts strategy ID from kebab/dotted identifiers and
  sets requiresApproval when prompt mentions approval keywords
- planning-service: add request_execution_prep case to buildFallbackSteps
  so the plan includes strategy.catalog.list / execution.plans.list /
  risk.events.list read steps and an explain step
- analysis-service: record a 'Summarizing findings' analysis_status
  message before the final result so the sessions detail test can
  assert messages.some(m => m.kind==='analysis_status' &&
  m.body.includes('Summarizing'))
@rogerdigital rogerdigital merged commit 0f5213f into main Apr 15, 2026
9 checks passed
@rogerdigital rogerdigital deleted the feat/platform-overhaul branch April 15, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant