Skip to content

ux(community): split Agent Supermarket into LLM and Open Agent shelves - #427

Open
Allan-Feng wants to merge 2 commits into
Open-Finance-Lab:mainfrom
Allan-Feng:ux/supermarket-two-shelves
Open

ux(community): split Agent Supermarket into LLM and Open Agent shelves#427
Allan-Feng wants to merge 2 commits into
Open-Finance-Lab:mainfrom
Allan-Feng:ux/supermarket-two-shelves

Conversation

@Allan-Feng

Copy link
Copy Markdown
Collaborator

Summary

  • Split Agent Supermarket into two shelves: LLMs (the seven contest models) and Open Agents (extensible; AI Hedge Fund first), with market search kept and vendor chips removed.
  • LLM cards reuse GET /api/v1/leaderboard?period=contest (2026-04-15 → 2026-05-15) for rank, cumulative return, and an agent-vs-DJIA mini chart. Open Agent cards stay unranked and show a short description plus the GitHub repo.
  • Compact ATL-styled tiles: cyan rank badge, green/red Return, Add to My Agents unchanged. Competition Leaderboard APIs and page are untouched.

Test plan

  • Open Community → Agent Supermarket: two shelves, LLMs sorted by contest rank
  • Each LLM card shows #N of 12, green/red Return, model-named curve vs DJIA, and DJIA 30 · Apr 15–May 15 · $10K
  • AI Hedge Fund has no rank/return/chart; description and virattt/ai-hedge-fund are visible; Add still clones
  • Search and All / U.S. / China A-Share filters still apply to both shelves
  • Competition Leaderboard page still loads the same contest window and curves
  • pytest dashboard/backend/tests/test_frontend_model_facets.py dashboard/backend/tests/test_frontend_shelves.py dashboard/backend/tests/test_marketplace_catalog_models.py dashboard/backend/tests/test_agents_api.py -q

Made with Cursor

Replace mixed strategy tiles with compact leaderboard-first cards that reuse the contest board's rank, return, and DJIA equity curves.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@Allan-Feng is attempting to deploy a commit to the allan-feng's projects Team on Vercel.

A member of the Team first needs to authorize it.

Correctness:
- formatMarketplaceReturnPct: null/'' is "no data", not 0% — Number(null)
  is 0, so a failed leaderboard fetch painted every LLM card with a green
  "0.0%" instead of the muted em-dash; sign now chosen after rounding so
  -0.04% renders "0.0%", not "-0.0%".
- Mini chart: scale the DJIA path by its own point count — reusing the
  agent-length x-scale drew the benchmark past the plot edge whenever the
  two downsampled curves differed in length (align_equity_curve_asof can
  legitimately return shorter curves).
- loadMarketplaceLeaderboard: only reuse the shared leaderboardPayload
  when it is the CONTEST board (js/leaderboard.js writes the same global
  for period=live), and reset the cache to null on a failed fetch so the
  next Community visit retries instead of pinning blank stats; the
  catalog docstring this PR displaced moves back onto loadMarketplace.
- marketplace.json: rename gemini-3-1-pro -> gemini-3-1-pro-preview so
  the entry_id fallback join ('-'->'_') actually matches the board's
  gemini_3_1_pro_preview; scope the DeepSeek "only model that beat the
  baselines" claim to the fixed April 2026 contest window.

Tests:
- Pin the REAL join key: catalog names must equal the board entries'
  `model` strings (the API never exposes `name`), plus a new guard that
  every llms template_id maps onto its leaderboard entry_id.
- Pin the 7 LLM card prompts to DEFAULT_STARTER_INSTRUCTION.
- Bump app.js/styles.css cache-busters (v125/v131) and their four pins.

Cleanup (dead code this redesign orphaned):
- Remove the vendor-chip subsystem left wired to the deleted container:
  marketplaceVendorFilter/setMarketplaceVendorFilter/
  renderMarketplaceVendorChips, the dead listener, the unreachable
  both-filters empty state, and formatModelProviderLabel; guard tests
  now assert the machinery stays gone.
- Drop orphaned CSS (vendor chips, licence badge, clone-split/model
  menu, card-body/meta/tag rows) and the no-op 1280px breakpoint.
- marketplace.py: the sort-key fallback branch was unreachable;
  templateMarketplaceShelf uses the generic runtime fallback instead of
  a per-runtime special case; drop never-read stats fields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ww26Uycvhrf4C5jShgQ6r
@FlyM1ss

FlyM1ss commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Review pass + fixes pushed as a4a617a8 (+146/−379, 11 files). Fixed: fabricated green "0.0%" return on leaderboard fetch failure/unmatched entry; DJIA mini-chart line x-scaled to the agent curve's length (drew past the plot edge on length mismatch); period-unchecked reuse of the shared leaderboardPayload global (now guarded on period === 'contest'); leaderboard-stats cache pinning [] forever after one failed fetch (now retries next visit); catalog↔board parity test now also pins the model field the JS join actually keys on; gemini template_id renamed so the entry_id fallback join actually resolves (+ pin test); cache-busters bumped (v=125/v=131); orphaned vendor-chip subsystem removed (~60 JS + ~100 CSS lines, incl. the dead licence-badge CSS pin test). Backend suite 3864 passed / 0 failed; CI green on the new head; CodeQL merge ref clean (0 alerts before and after).

Two review findings deliberately left to the author:

  1. China A-Share chip is now a permanent empty state — the catalog is 100% us_stocks after this PR, but the chip row is hardcoded from MARKET_LABELS. Kept as-is since the PR body keeps the filter row; drop vs. keep is a product call.
  2. Minor per-keystroke full card re-render + unmemoized rank comparator — negligible at today's catalog size, deferred as not worth the test churn.

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.

2 participants