Skip to content

[web] Session identity: profile · mode · equity-state switcher chip and a no-CTA paper banner #704

Description

@eaitbrahim

Context (verified)

  • /api/config carries auto_trade.mode, re-read per request (keel/web/api.py:172-189); the header mode badge renders from it (render.js:1926-1939 — paper muted, confirm accented).
  • equity_state_mode (paper/live) lives in agent_state, set on mode flips (agent.py:513/581); Status shows the pairing as kv cards.
  • The DBs are one-per-profile; the profile identity is visible today only in the badge tooltip (db + config paths).

Alpaca's single best organizing idea is the account switcher as session identity — paper/live is visible on every page, not buried in settings. Take the spine; refuse what rides on it (their paper banner carries an "Open Live Account" CTA — a growth funnel wrapped around real money).

Scope

  1. Switcher chip in the header: profile · mode badge · equity_state_mode — display and navigation only. It never mutates: switching profile or mode is a config change plus typed CLI ceremony, and the chip explains where that happens (Setup & Gates runbook already documents it).
  2. Persistent paper banner: in paper mode, a calm banner states PAPER — no real money is involved on every view. No CTA attached, ever. In confirm mode, the banner states the mode/equity-state pairing (the configuration the operator is about to verify against the venue UI).
  3. The mode-badge tooltip keeps naming db + config paths (existing behaviour — keep).

Refusals

  • No "Open Live Account", no "Go live", no upgrade prompt on the banner or chip. Going live is a ceremony with a runbook; the UI may explain it, never funnel it.

Acceptance

  • Chip present on all views, correct pairing of auto_trade.mode × equity_state_mode; banner text exact; zero buttons inside either.

Sprint 2 (context & history), after the timeline (#703). Small, self-contained.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew capability (groups under Features)toolingDev/release tooling (Docs, CI & tooling)

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions