feat: overview — group positions by strategy + summary strip (ui-ux 03)#161
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POS_GROUP = 'strategy'), consuming the server's already-supported?group_by=strategybucketed shape.<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.POS_GROUP/KPI_LEVELinlocalStorage(tb.overview.posGroup/tb.overview.kpiLevel), restored on load and tolerant of an absent/invalid stored value./api/strategies), open-orders count (reusing the already-fetched/api/orderspayload — no extra round trip), total realised PnL from/api/kpi?level=totalrendered viatbFmt.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).Plan leaf:
doc/dev/plans/ui-ux-overhaul/03-overview-groups.md(ui-ux-overhaul epic).Test plan
python -m pytest— 1154 passedruff check trading_bot/— cleanruff format --check trading_bot/— cleanmypy trading_bot/— cleanTestClientcheck of/api/positions?group_by=strategy,/api/kpi?level=total,/api/health,/api/strategies,/api/ordersagainst the shapes the new JS consumes🤖 Generated with Claude Code