Skip to content

observability: give every liquidity board tab the SPA header and recovery guide [RAI-3097] - #1689

Open
JuaniRios wants to merge 1 commit into
rai-2998-recovery-clientfrom
rai-2998-board-header
Open

JuaniRios wants to merge 1 commit into
rai-2998-recovery-clientfrom
rai-2998-board-header

Conversation

@JuaniRios

@JuaniRios JuaniRios commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Part of RAI-3097.

Every liquidity board tab gets the SPA header as one Business Text panel: settings pills, Config, the CLI recovery guide, the commit, uptime, and the Bot light. Item 6a of the RAI-2998 stack, part 3 of 6. Ported from #1654 and #1662.

Live effect: the header row on all five tabs · Risk: low (read-only queries, a revert undoes it) · Ships: on merge, through the observability workflow

Why

The stat pills could not show the bands, the Config dialog, or the recovery guide. The header is the first piece of #1654 that does not need the DTO changes in #1657.

Decisions

  • header.js, header.css, and recovery-guide.json live in observability/liquidity-panels/, and the generator inlines them. Never edit the board JSON by hand.
  • The Bot light has 3 states: Connected (1), Disconnected (0), and No data when the source is not reporting.
  • recovery-guide.json is the SPA's RECOVERY_GUIDE in client form. dashboard/src/lib/transfer-board.test.ts fails when it drifts. Its Base to Alpaca fail-usdc-transfer text is the feat: show the SPA's recovery commands for the operations client [RAI-3096] #1688 text, which follows the docs: check WithdrawV2 too before failing a Base to Alpaca USDC transfer [RAI-3125] #1704 runbook. It runs in CI inside the dashboard build (nix build .#st0x-dashboard runs bun run test:run with the whole repo as source).
  • The PR check's throwaway Grafana does not have the Business Text plugin, so it loads the header as "Panel plugin not found" and still passes. The real box has it.

Proof

  • gen-t0-liquidity.py --check passes. The drift test fails when I change one command in recovery-guide.json and passes again when I revert it.
  • feat: SPA layout as Grafana tables on the liquidity board #1654 was checked on a preview board in prod Grafana.
  • Not verified: this exact header on live Grafana. Follow-up: after a restart that changes the wallet or orderbook, the Config dialog can show the old liq_settings_info labels for a few minutes.

Merge conditions

Same as the stack below. The board deploys on merge to master through the observability workflow, not with a bot release. That is safe before the bot releases: Source defaults to exporter, so the published board reads the same series as today.

@linear-code

linear-code Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RAI-2998

RAI-3062

RAI-3097

JuaniRios commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label add-to-gt-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@JuaniRios

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 8dadd4bd-ce0f-4956-813f-36ac6c0a3cb5

📥 Commits

Reviewing files that changed from the base of the PR and between 81cb2d2 and 8a30d42.


📒 Files selected for processing (6)
  • observability/dashboards/liquidity/t0-liquidity.json
  • observability/dashboards/liquidity/tabs/t0-liquidity-logs.json
  • observability/dashboards/liquidity/tabs/t0-liquidity-orders.json
  • observability/dashboards/liquidity/tabs/t0-liquidity-performance.json
  • observability/dashboards/liquidity/tabs/t0-liquidity-pnl.json
  • observability/liquidity-panels/recovery-guide.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.



Walkthrough

The liquidity dashboards replace separate status and configuration panels with a dynamic header that displays connection status, deployment details, settings, and recovery guidance. A generator embeds the header assets and recovery-guide catalog in the dashboard panels. The change also adds a catalog parity test and documentation, updates navigation titles, and renumbers remaining panels.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 8a30d

Every liquidity board tab now uses one generated header for status, configuration, and recovery commands. The change is observability-only and deploys on merge, but it has not been confirmed on live Grafana. Owners should check that the header and recovery guide still appear when the bot stops reporting data.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: adding the SPA header and recovery guide to every liquidity board tab.
Description check Passed The description directly explains the header, recovery guide, affected tabs, implementation, validation, deployment, and known verification limits.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. (6 skipped: 6 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@JuaniRios
JuaniRios marked this pull request as ready for review October 8, 2026 23:56
@JuaniRios
JuaniRios force-pushed the rai-2998-board-header branch from e053b94 to 23f1f68 Compare October 10, 2026 03:14
@JuaniRios
JuaniRios force-pushed the rai-2998-recovery-client branch from 5790b7b to 9bea021 Compare October 10, 2026 04:11
@JuaniRios
JuaniRios force-pushed the rai-2998-board-header branch from 23f1f68 to 8a30d42 Compare October 10, 2026 04:11
@JuaniRios

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@JuaniRios

Copy link
Copy Markdown
Collaborator Author

@rain-marvin review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rain-marvin

rain-marvin Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

🔎 Reviewing 8a30d42, started by @JuaniRios. The review will appear here when it's done.

@rain-marvin rain-marvin Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR replaces the stat-pill row at the top of all five liquidity board tabs with one Business Text panel that ports the SPA header: the settings pills with their bands, a Config dialog, the CLI recovery guide, a UTC clock, the deployed commit, uptime, and a three-state Bot light. The generator inlines header.js, header.css and recovery-guide.json into the board JSON, and a dashboard test fails when the guide copy drifts from the SPA's RECOVERY_GUIDE. Since the last review, only the guide text changed (the resume-usdc converting note and the fail-usdc-transfer steps from #1688).

Overall read: no blockers. gen-t0-liquidity.py --check passes at this head (5 boards match), the query goes through promql() so the Source pin still applies, every value is escaped before it goes into innerHTML, and the new guide text matches the SPA strings. The earlier threads (info-row selection, drift-test scope, plugin pin, uptime while down, narrow width, source of truth, re-render, docs) are deferred by the author and I do not repeat them. Two minor points below: the header can show past state next to a live clock, and the board guide deploys on merge while the bot it describes deploys on release.

claude-opus-5-5 · high · 12 min

Comment thread observability/liquidity-panels/header.js
Comment thread observability/README.md
@JuaniRios

Copy link
Copy Markdown
Collaborator Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

This was referenced Oct 10, 2026
@rain-marvin

rain-marvin Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

@JuaniRios 🔔 Follow-up: a day after my review

@JuaniRios, #1689 hasn't moved since my approval of 8a30d42. CodeRabbit and I have both approved that head and every review thread is resolved. The one red backend test entry is a cancelled run from an older push; the current CI run passed. It is waiting on two things: a human approval (human/reviewed is failing), and the PRs below it in the stack, starting with #1688. The next step is to get an engineer to approve, then merge it as part of the stack from Graphite once the PRs below it can go in.

claude-opus-5-5 · high · 14 min

This branch has not been deployed

No deployments
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