Skip to content

feat(portfolio-management): Portfolio Management subtab with the recorded rebalancing demo - #709

Merged
FlyM1ss merged 6 commits into
mainfrom
feat/portfolio-management-demo
Nov 5, 2026
Merged

FlyM1ss merged 6 commits into
mainfrom
feat/portfolio-management-demo

Conversation

@FlyM1ss

@FlyM1ss FlyM1ss commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

DO NOT MERGE until the manual pass (plan Task 4 Step 4, 9 items) is done in a real browser. Merging deploys prod.

Adds a Portfolio Management subtab before My Agents. It plays the recorded weekly-rebalancing run (case 2, run 20261104T050945Z-3a2f26) for the 2026-11-06 demo. My Agents stays the default tab.

  • js/portfolio-management-data.js: the recording, byte-identical to the source payload.
  • js/portfolio-management.js: the standalone demo ported into a Shadow DOM root on #playgroundPortfolioManagementPanel. Styles and markup stay inside the root. Keys are taken only while the panel is visible and focus is not in a form control. Leaving the tab stops autoplay, settles pending timers and removes the listeners. The fake ATL header and Stage view are dropped; ATL's real header and ticker stay.
  • app.html / app.js: the subtab, panel, ?view=portfolio-management routing, and hide-on-leave wiring. app.js?v=165; the two new scripts are ?v=1.
  • Spec and plan: docs/superpowers/specs/2026-11-04-portfolio-management-demo-design.md, docs/superpowers/plans/2026-11-05-portfolio-management-demo.md.

Tests: test_frontend_portfolio_management.py adds 21 tests (wiring, nothing registered on other tabs, the key table, listener and timer teardown, banned copy). The cache-buster pins are bumped in 4 files. Local full suite: 7713 passed, 12 failed. All 12 are the known local-only failures in test_report_pdf.py and test_robinhood_mcp_transport.py, which also fail on clean main.

Before merge

  • Draft TradingAgents Hosted Runtime Integration #676 pins app.js?v=166. If it lands first, bump this branch to v=167.
  • Manual pass: items 3, 6 and 8 first (keys and focus inside the shadow root, the About panel over the real header, Back/Forward).

Rehearsal notes (deferred, not code): Space on a focused button presses that button; use the arrows or PageDown, or click ▶ Play. Open the talk tab from a clean /app?view=portfolio-management, since a #pm-step-* link stays on later URLs.

Follow-up: docs/source/lab/getting_started.rst is now stale on the My Agents subtabs.

🤖 Generated with Claude Code

FlyM1ss and others added 5 commits November 5, 2026 09:50
…re My Agents

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hadow-root panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e load failure in the shadow root

Esc re-rendered even with About closed, collapsing any opened "show all"
block or certificate tree and replaying step 3's row reveal; it now renders
only to close About. A first show() that threw after attachShadow wrote the
failure message into light DOM the slotless root hides; it now goes into
the root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentic-trading-lab Ready Ready Preview Nov 5, 2026 3:58pm UTC

…ubtab

- goto() cancels a queued send, so a Next/Prev inside the 350 ms after typing
  no longer blanks the composer and replays the chat on the new step
- keys: with About open only Esc is ours; an open .auth-modal owns every key
- a first build that throws is retried (the root is reused; attachShadow would
  throw a second time) instead of leaving a dead panel with live listeners
- hide() settles state without drawing into the display:none panel; show()
  redraws once laid out
- resize redraws the evidence chart with the lanes, one frame at a time
- About and Details clicks no longer rebuild the page (chat scroll, open
  blocks and the step-3 reveal survive); aria-live written only on change
- narrative counts (stocks, D1 days, HON items, runs, orders, fill checks,
  return floors) come from the recording; tests pin the facts they assert
- analytics: page view portfolio_management on both sides (analytics.js v=2)
@FlyM1ss
FlyM1ss merged commit e27b5eb into main Nov 5, 2026
10 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1588e3de Deployed Nov 5, 2026 by vercel[bot]
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