Skip to content

Header: Console Live only when the status check passes; human chain labels + chain on Home - #3

Open
secsovereign wants to merge 1 commit into
mainfrom
fix/console-live-and-chain-labels
Open

secsovereign wants to merge 1 commit into
mainfrom
fix/console-live-and-chain-labels

Conversation

@secsovereign

Copy link
Copy Markdown
Member

Fixes UI UX's Commons UI audit P1-1 ("Console Live" always shown) and the chain-label items (P1-3, P3-1).

Console Live

  • Before: the header always read "Console Live". Only the 8px dot changed colour, and ui.live starts true before any check has run.
  • Now "Console Live" shows only after /api/status has answered (settled && ui.live). If the check fails, it reads "Console offline, retrying…" with a red light. Before the first answer, nothing shows. The text is in a role="status" span, so the state no longer depends on colour alone. The Umbrel "Node agent offline" branch is unchanged.

Chain labels

  • New chainLabel() in networks.ts maps the RPC chain to the label the wizard already uses: main → Mainnet, test → Testnet3, testnet4 → Testnet4, signet, regtest. It's used on the Insights chip, the Network panel chip, Settings → About "Chain", the "node is running but RPC is not answering" sentence, and the unused NodePanel. Before, these showed raw main / test.
  • Home now shows the chain. A chip next to "Console Live" in the header shows on every page, but only while the console is live.
  • The peer and ban input placeholders used 1.2.3.4:48333 (the testnet4 port) on every chain. They now use the P2P port of the chain the node is on, or 8333 if the chain is unknown.

No node or consensus code touched; web only.

Tests

The repo has no test runner. npm ci, vite build and tsc --noEmit pass.
Smoke in headless Chrome:

  • With mock/server.mjs, the header shows the "Mainnet" chip and "Console Live".
  • With dist/ served with no API, the header shows "Console offline, retrying…" and no chain chip.

Live recheck: on an Umbrel or local install, the header shows the right chain chip ("Testnet3" on the Umbrel BLVM Node app) and "Console Live". Stop the console host or block /api/status, and within a few seconds the header switches to "Console offline, retrying…".
Donate: n/a (no donate flow in this app).

@review default scope. @ui UX

… every page; chain labels say Mainnet/Testnet3, not main/test
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