feat: tables & event-feed polish (ui-ux 05, closes the epic)#163
Merged
Conversation
…n % (ui-ux 05) Closes the ui-ux-overhaul epic: Strategies/Overview/Orders tables skip a DOM rebuild when the polled payload is unchanged and never rebuild while a control inside the table has focus; order statuses render as colour-coded badges shared via base.html; a history read at the server's default cap shows a muted "showing the most recent 200" caption; the Fills table gains a seconds-precision timestamp with a relative tooltip; the Logs feed stamps lines with the event's own server ts, tags them with the emitting strategy, and gains type + min-level filters over a raw ring buffer; the PnL stats table gains a Return column (realised PnL / v0) and a starting-capital note.
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
Implements leaf 05 (
doc/dev/plans/ui-ux-overhaul/05-tables-polish.md), the last leaf of theui-ux-overhaulepic:JSON.stringifycompare) and skip the DOM rebuild when unchanged; a table never rebuilds whiledocument.activeElementsits inside it (e.g. an open mode<select>), deferring the "updated" stamp too since the visible rows aren't verified current in that case. Shared via a newtbRefreshGuard()helper inbase.html.statusas a colour-coded badge (muted for new/submitted/open, amber for partially_filled, green for filled, dimmed for cancelled, red for rejected), via a sharedstatusBadge()helper +.badge-status-*CSS inbase.html. Covers the domain's actualOrderStatusvalues plus a few defensive synonyms.?limit=200cap.YYYY-MM-DD HH:mm:ssvisible, relative ("3m ago") on hover.ts(leaf 01), a muted strategy chip appears when the frame names the emitting unit, and All/Orders/Fills/Logs filter chips + a min-level select (info/warning/error) apply to both incoming and already-buffered events (a raw ring buffer, re-rendered on filter change; 500-line cap kept).realised_pnl / v0viatbFmt.pct, "—" whenv0isn't a non-zero finite number) and a muted starting-capital (v0) note. Y-axis money-formatted ticks were already in place from an earlier leaf.dashboard.html/app.jsuntouched — already consistent with leaf 02's formatting, no new features added there per spec.Closes the
ui-ux-overhaulepic:doc/dev/plans/ui-ux-overhaul/00-plan.mdflips tostatus: done, the roadmap's "Dashboard UX overhaul" line is removed, anddoc/dev/06-status.mdgains a summary paragraph. The plan tree itself is left in place (archived locally after merge, per the repo's workflow).Test plan
python -m pytest— 1165 passed, 9 deselected (network E2E)ruff check trading_bot/— cleanruff format --check trading_bot/— cleanmypy trading_bot/— cleaninterrogate trading_bot/— 100%statusBadgehelper present on every page, history-cap caption nodes + text, Logs filter chips (data-type=) + min-level select, PnL Return column header + v0 note/api/orders?history=true&limit=Ncaps to exactly N rows (the real payload shape the caption logic keys on)TestClientand grepped for the new markup🤖 Generated with Claude Code