Skip to content

feat: overview — group positions by strategy + summary strip (ui-ux 03)#161

Merged
ArthurBernard merged 2 commits into
developfrom
feat/ui-overview-groups
Jul 4, 2026
Merged

feat: overview — group positions by strategy + summary strip (ui-ux 03)#161
ArthurBernard merged 2 commits into
developfrom
feat/ui-overview-groups

Conversation

@ArthurBernard

Copy link
Copy Markdown
Owner

Summary

  • Adds the "By strategy" positions grouping to the Overview page and makes it the default (POS_GROUP = 'strategy'), consuming the server's already-supported ?group_by=strategy bucketed shape.
  • Drops the redundant Strategy column from both the <thead> and row cells when grouped by strategy (the group header already names it), by rebuilding the positions <thead> per grouping mode in JS so colspans (6 vs 7) always match the visible columns.
  • Persists POS_GROUP / KPI_LEVEL in localStorage (tb.overview.posGroup / tb.overview.kpiLevel), restored on load and tolerant of an absent/invalid stored value.
  • Adds a summary strip above the KPI card: running/total strategies (/api/strategies), open-orders count (reusing the already-fetched /api/orders payload — no extra round trip), total realised PnL from /api/kpi?level=total rendered via tbFmt.moneyCell (server-exact, quote: null → "mixed quote currencies" tooltip, no client-side money arithmetic), and a static "next check" label from /api/health.next_tick_ts (the live countdown lands in leaf 04).
  • Extends the Overview shell smoke test for the new toggle, its default-active state, the summary strip's container id, and the persisted-preference keys.

Plan leaf: doc/dev/plans/ui-ux-overhaul/03-overview-groups.md (ui-ux-overhaul epic).

Test plan

  • python -m pytest — 1154 passed
  • ruff check trading_bot/ — clean
  • ruff format --check trading_bot/ — clean
  • mypy trading_bot/ — clean
  • Manual TestClient check of /api/positions?group_by=strategy, /api/kpi?level=total, /api/health, /api/strategies, /api/orders against the shapes the new JS consumes
  • Visual pass by the maintainer

🤖 Generated with Claude Code

Positions default to grouping by strategy (server already supported
?group_by=strategy), dropping the redundant Strategy column from the
header and rows in that view. Adds a summary strip above the KPI card
(running/total strategies, open orders, total realised PnL via
tbFmt.moneyCell, next-tick label) and persists the group-by/KPI-level
choices in localStorage across reloads.
@ArthurBernard ArthurBernard merged commit f616362 into develop Jul 4, 2026
3 checks passed
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