Skip to content

feat(frontend): polish paper sim read-only labels - #306

Merged
Melly-999 merged 1 commit into
mainfrom
feature/paper-sim-ui-polish-001
Jun 15, 2026
Merged

feat(frontend): polish paper sim read-only labels#306
Melly-999 merged 1 commit into
mainfrom
feature/paper-sim-ui-polish-001

Conversation

@Melly-999

@Melly-999 Melly-999 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Scope

Frontend display copy + docs only. No backend/API, scripts, workflows, package, config, or Docker/Tauri changes.

  • Baseline SHA: a10b76a5c8c61c0d0b08e646f0152da93c777905
  • Commit SHA: 27aba352ac0c1ed1fbd0de48f32887db92352d4d

Files changed

  • frontend/src/components/terminal/IBKRBrokerCard.tsx
  • docs/tasks/paper_sim_ui_polish_001.md

UI polish summary

Added a single display-only caption to IBKRBrokerCard (the broker card rendered on the terminal dashboard view and the /brokers route):

Paper / simulated — read-only preview. No live execution, no credentials, not live trading.

Reuses the existing panel-note class already used by the adjacent AlpacaPaperReadOnlyCard, so styling is consistent. No other UI changes.

Components reviewed

  • IBKRBrokerCard — rendered on terminal dashboard + /brokers. Gap found (no plain-language "simulated/not live" caption) → polished.
  • AlpacaPaperReadOnlyCard — already labelled ("PAPER ONLY", "Advisory / demo status only — not live trading"). No change.
  • PaperRunPreviewPanel (/terminal/paper-run-preview) — already strongly labelled (READ ONLY / DRY RUN / LIVE ORDERS BLOCKED / HUMAN REVIEW REQUIRED / EXECUTION OFF chips; "GET-only · display-only"; GET-only Load Preview button). No change.
  • SafetyBadges — global safety posture chips. No change.
  • BrokerCard / DashboardPage — see dead-code observation below.

Dead-code observation (no change made)

  • DashboardPage (and therefore components/BrokerCard.tsx) appears dead / unrouted: App.tsx redirects /dashboard/terminal, and DashboardPage is not imported anywhere. Confirmed via bundle analysis — BrokerCard's strings are not present in the production build.
  • BrokerCard was intentionally left unchanged to avoid editing non-rendered/dead code.
  • Any cleanup or re-routing should be a separate scoped task.

Validation summary

  • git diff --check origin/main...HEAD → clean
  • python scripts/validate_safety_config.py → OVERALL: PASS
  • npm run build (tsc -b && vite build) → success in the originating task (typecheck clean; caption confirmed in the built bundle). Dependencies are not installed in this clean worktree; per scope, package files were not modified to install deps here.

Static scan summary

  • No secrets / token-shaped strings / DB URLs / API keys / broker credentials / account IDs / emails / phones / Neon identifiers.
  • No safety-flip values (autotrade=true, dry_run=false, read_only=false, live_orders_blocked=false, execution_enabled=true).
  • No placeOrder / submitOrder / executeTrade / cancelOrder / enableAutotrade / "connect live"; no <button> / <form> / <input> / onClick added.
  • No profit / ROI / win-rate / live-trading assertions. The only matches are in the doc's denylist/negation text and the new prohibition-context caption.
  • buy/sell/order/execution terms in IBKRBrokerCard are pre-existing read-only permission/flag displays plus the new safety caption.

Safety confirmation

  • frontend display copy + docs only ✅
  • no backend/API changes ✅
  • no script changes ✅
  • no workflows ✅
  • no package changes ✅
  • no broker credentials ✅
  • no env vars touched ✅
  • no broker API calls ✅
  • no order/execution routes added ✅
  • no Buy/Sell/Order/Execute UI added ✅
  • no credential UI ✅
  • no connect-live UI ✅
  • no secrets ✅
  • no live-trading claims ✅
  • no profit/ROI/win-rate claims ✅
  • safety posture unchanged (autotrade=false, dry_run=true, read_only=true, live_orders_blocked=true, max risk <= 1%) ✅

🤖 Generated with Claude Code

Summary by Sourcery

Clarify read-only, simulated status for the IBKR broker paper-sim surfaces and document the safety-focused UI polish task.

New Features:

  • Add a read-only, paper/simulated status caption to the IBKR broker card in the terminal UI.

Documentation:

  • Add a task document describing the paper-sim UI polish scope, reviewed components, safety checks, and validation steps.

Add a display-only safety caption to IBKRBrokerCard (the broker card rendered on
the terminal dashboard and the /brokers route): "Paper / simulated — read-only
preview. No live execution, no credentials, not live trading." Reuses the
existing panel-note style for consistency with the adjacent Alpaca paper card.

The other rendered demo surfaces (AlpacaPaperReadOnlyCard, PaperRunPreviewPanel,
SafetyBadges) were reviewed and already clearly labelled. BrokerCard
(components/BrokerCard.tsx) is left unchanged because its host DashboardPage is
not routed (/dashboard redirects to /terminal), so it is not rendered.

Add docs/tasks/paper_sim_ui_polish_001.md documenting the review and change.

Display-only: no backend/API/workflow/package changes, no new controls, no
mutating calls, no Buy/Sell/Order/Execute UI. Safety posture unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Melly-999
Melly-999 temporarily deployed to feature/paper-sim-ui-polish-001 - alpha_data_scraper_ai PR #306 June 15, 2026 09:28 — with Render Destroyed
@sourcery-ai

sourcery-ai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds an explicit read-only, paper/simulated trading caption to the IBKR broker card UI and documents the scoped frontend-only safety polish task for broker/paper labelling.

Flow diagram for IBKRBrokerCard read-only caption rendering

flowchart TD
  AppRoutes[App.tsx routes]
  TerminalShell[TerminalShell]
  IBKRBrokerCard[IBKRBrokerCard]
  DiagnosticsList[Diagnostics ul]
  PanelNoteCaption[p.panel-note Paper / simulated — read-only preview...]

  AppRoutes --> TerminalShell
  TerminalShell --> IBKRBrokerCard
  IBKRBrokerCard --> DiagnosticsList
  IBKRBrokerCard --> PanelNoteCaption
Loading

File-Level Changes

Change Details Files
Add an explicit paper/simulated, read-only caption to the IBKR broker card UI.
  • Render a new static

    element under the diagnostics list in the IBKR broker card component.

  • Use the existing panel-note class to match styling with other broker cards.
  • Clarify that the card represents a paper/simulated, read-only preview with no live execution, no credentials, and not live trading.
frontend/src/components/terminal/IBKRBrokerCard.tsx
Document the paper/simulated UI labelling review and safety validation as an internal task doc.
  • Create a new task markdown document describing the purpose and scope of the paper/simulated UI labelling polish.
  • Record which components were reviewed, what change was made to IBKRBrokerCard, and which surfaces were intentionally left unchanged.
  • Capture validation steps, static scan notes, and safety confirmations to justify that the change is frontend-only and non-mutating.
docs/tasks/paper_sim_ui_polish_001.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Melly-999
Melly-999 marked this pull request as ready for review June 15, 2026 09:32
@Melly-999
Melly-999 merged commit c4f3fdf into main Jun 15, 2026
7 checks passed

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider extracting the new safety caption string into a shared constant or helper so IBKR and Alpaca broker cards (and any future paper/sim surfaces) can reuse consistent wording from a single source.
  • Since this caption is user-facing and safety-critical, it may be worth aligning the language more tightly with existing labels (e.g., mirroring phrases like "No broker execution, no order placement" or "PAPER ONLY") to avoid subtle wording drift between broker cards.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider extracting the new safety caption string into a shared constant or helper so IBKR and Alpaca broker cards (and any future paper/sim surfaces) can reuse consistent wording from a single source.
- Since this caption is user-facing and safety-critical, it may be worth aligning the language more tightly with existing labels (e.g., mirroring phrases like "No broker execution, no order placement" or "PAPER ONLY") to avoid subtle wording drift between broker cards.

Fix all in Cursor


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Melly-999 added a commit that referenced this pull request Jun 15, 2026
Add a docs/images-only screenshot evidence pack for the read-only simulated
broker preview after the paper-sim UI label polish (#306):

- docs/assets/screenshots/broker-sim/broker-sim-terminal-safety.png
- docs/assets/screenshots/broker-sim/broker-sim-brokers-readonly-card.png
- docs/assets/screenshots/broker-sim/broker-sim-paper-run-preview.png
- docs/tasks/broker_sim_screenshot_evidence_001.md (inventory, public-safety
  review, what the shots prove / do not prove, safety posture, what-not-to-claim)

Screenshots captured against main running locally in safe degraded/fallback
mode. Each was reviewed: no secrets, credentials, account IDs, real broker data,
or Buy/Sell/Order/Execute controls; all demo/fallback data. The /terminal shot
is cropped to exclude the unrelated backtest sample widget.

Docs/images only. No runtime/frontend/backend/API/scripts/workflow/package/config
changes. Safety posture unchanged.

Co-authored-by: Melly <Melly-999@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Melly-999 added a commit that referenced this pull request Jun 15, 2026
Add docs/portfolio/broker_sim_demo_summary.md, a concise portfolio/demo summary
of the broker-sim arc (#302 audit → #303 read-only smoke → #304 walkthrough →
#305 closeout → #306 UI polish → #307 screenshot evidence). Covers what was
built, the safety-first design, GET-only smoke proof (47 PASS / 0 SAFETY-FAIL /
0 WARN / 0 SKIP), embedded screenshots, technical scope, what it does not do,
what it demonstrates, a recruiter-friendly summary, and next steps.

Add a one-row note in docs/roadmap/current_status_after_neon_cleanup.md.

Docs-only. No script/runtime/frontend/backend/API/workflow/package/config
changes. Read-only/paper-only framing; no live trading, profit/ROI/win-rate, or
financial-advice claims. Safety posture unchanged.

Co-authored-by: Melly <Melly-999@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@Melly-999
Melly-999 temporarily deployed to feature/paper-sim-ui-polish-001 - alpha_data_scraper_ai PR #312 June 16, 2026 06:54 — with Render Destroyed
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