Skip to content

Clean up the Hyperliquid panes: book ladder, ticket, board and states - #2

Merged
vincelwt merged 9 commits into
feat/hyperliquid-v1from
polish/hyperliquid-ui
Oct 4, 2026
Merged

vincelwt merged 9 commits into
feat/hyperliquid-v1from
polish/hyperliquid-ui

Conversation

@vincelwt

@vincelwt vincelwt commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

UI cleanup and review pass for the Hyperliquid plugin (GLO-217). Presentation only: every change is in src/ui/*. Trading, signing, risk, order building, market and account data, storage, builder fee and region gating are untouched.

Why

After the build, the panes worked but read like a first draft: resting orders buried the chart, the book had no spread row and an always-highlighted first ask, the ticket showed leverage and size unit twice, numbers had ragged decimals and red -0.00%, loading states looked like empty states (which also made screenshots capture too early), and several labels were truncated or repeated.

Changes

  • Shared formatting (format.ts): fixed-decimal abbreviations, signed amounts, rounding-aware percentages and colours, tick-aware price differences, funding in four decimals, lot-size decimals, fixed-width funding countdown.
  • Market view: muted order lines behind the candles (entry and liquidation stay bright), Volume BTC legend, clearer header figures, two-column Info tab without truncation, single-candle flash shown as loading, positions strip with loading state and the current market first.
  • Order book: ladder with one mid/spread row, cursor only while the book has the keyboard, one cumulative depth bar per row in theme colours (no solid blocks in the terminal), ticks named by price step (1, 2, 5, 10), Total USD in the full book, loading state instead of "Waiting".
  • Trades: Buy/Sell, whole-dollar values, numeric export values.
  • Ticket: one-row leverage slider, size unit as the field suffix, prices in market precision, empty TP/SL shown as --, estimates and the builder-fee disclosure visible without scrolling, average fill and slippage only for market orders, content-width buttons.
  • Board: trader column order (price, change, funding, depth first; class and venue last), frozen market column, no 24/7 on every row, aligned favourites, --class honoured.
  • Account: kit loading and error states, consistent figure labels, signed PnL and payments, 4-decimal fees, coloured sides, widths that fit, dated tabs newest first, proper empty sentences.
  • Analytics: no retry where it cannot help, no raw state ids in the footer, predicted funding loading state, venue names, interval as 8h, normalised Rate /8h.
  • Wallet setup: network bar in the header zone (Settings selectors merged into it), content-width buttons, settings in their own units (50 bp, 10,000 USD, Random), inline address label, trimmed Advanced copy, deduplicated footer.
  • Footers: show only changing status; no connecting when nothing connects.
  • Account tables: statuses as words (Margin canceled), plain order ids.

Before/after screenshots for every view at 1280x540 and 720x360 (desktop) and 160x30 / 90x20 (terminal) are in ~/.local/state/gloom-pm/hyperliquid/ui-pass/{before,after}/, with the full issue list in ui-pass/CHANGES.md.

Found, not fixed

Behaviour outside src/ui, left for the owners of those files:

  • Live candle before history (src/market/service.ts, MarketSession): the candle WebSocket update can land before the candleSnapshot response, so snapshot.candles briefly holds one candle and the chart drew a single bar in a one-day window. Reproduce: fresh profile, gloomberb shot HLP BTC --tab Chart --width 720 --height 360 a few times; one capture showed a lone candle. The chart now treats one candle as loading, but the session still publishes it.
  • Watch-only account rate limits (src/trading/account.ts polling, message from src/market/transport.ts): each watch-only account store polls many info endpoints, so a few account panes opened in quick succession get Hyperliquid clearinghouseState: 429 null / userAbstraction: 429 null, and the raw status and null body reach the pane as the error text. Reproduce: run about ten gloomberb shot HLA --watch-address 0x010461c14e146ac35fe42271bdc1134ee31c703a --tab <tab> back to back.
  • --days / --resolution not applied to panes (src/headless.ts): these two report options have no settingKey, so shot HLP BTC --tab Funding --days 30 still opens the 1W range in the pane (the headless report itself uses them).
  • Cloud failure copy lives in src/market/cloud-history.ts ("This version of Gloom cannot share your Cloud login with plugins. Pro history is unavailable here."), so it was not shortened here.

Verification

  • bun run typecheck: passed; each commit also typechecks on its own.
  • bun test: 81 passed, 0 failed (7 new tests for the formatting math: tick labels, rounding to zero, fixed decimals, countdown).
  • gloomberb plugin doctor hyperliquid from an isolated host checkout (cf82012a) and throwaway profile: all 10 checks ok, desktop browser build 350 KB (was 343 KB).
  • gloomberb fn HLP --limit 3 --json: ok.
  • Desktop: every view captured with gloomberb shot at 1280x540 and 720x360, before and after, and read.
  • Terminal: every view run in tmux at 160x30 and 90x20 (same cell grid), including the board's embedded market detail; footers checked in the text captures (live/stale, TESTNET, Watch-only 0x…, Read-only, hints). No React, listener or update-depth warnings in 38 stderr logs; no tmux sessions left.
  • Read-only mainnet data and the public watch-only vault 0x010461c14e146ac35fe42271bdc1134ee31c703a only. No signed request, key or wallet was used.

Historical analytics (funding/OI/premium history and rankings) could only be checked in their unavailable state, because the cloud routes are not reachable from this host.

Fixed-decimal abbreviations, signed amounts, tick-aware price differences,
funding rates in four decimals, lot-size decimals, a fixed-width funding
countdown and book tick labels named by price step. Values that round to
zero read as zero and stay uncoloured.
Loading and failure use the kit states, figures get one naming scheme, PnL
and payments are signed, fees read in four decimals, sides are coloured,
dated tabs list newest first and footers stop claiming a connection that is
not happening.
The book is a ladder with one mid and spread row, a single cumulative depth
bar in theme colours and a cursor only while it has the keyboard. Resting
orders draw as muted lines behind the candles, the info tab fits its labels
in two columns, and the chart and positions strip show loading instead of a
lone candle or a connect prompt.
One-row leverage slider instead of a slider plus a duplicate field, the size
unit beside the size, prices and sizes in market precision, unset TP/SL shown
as empty, and estimates and the builder fee line visible without scrolling.
Price, change, funding and depth come first, venue and class last, the market
column stays put while scrolling, favorites keep names aligned, empty tabs
say what is missing and the class option picks the initial tab.
Retry appears only where it can help, footers no longer print internal state
names, and predicted funding loads instead of claiming none, with venue
names and a normalised 8h rate.
The network bar sits in the header zone with the settings selectors, buttons
take their own width, settings read in their units and the body keeps one
row of spacing between sections.
Exchange ids such as marginCanceled read as Margin canceled.
Order and TWAP ids lose their thousands separators so they fit and can be
searched, and the approval port setting reads Wallet port so the terminal
form does not cut it off.
@vincelwt
vincelwt merged commit b2cde14 into feat/hyperliquid-v1 Oct 4, 2026
1 check 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