feat(miner-ui): render Ledgers route through ui-kit StateBoundary + skeletons - #6577
Closed
nghetienhiep wants to merge 1 commit into
Closed
feat(miner-ui): render Ledgers route through ui-kit StateBoundary + skeletons#6577nghetienhiep wants to merge 1 commit into
nghetienhiep wants to merge 1 commit into
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
nghetienhiep
force-pushed
the
fix/issue-6512
branch
2 times, most recently
from
July 16, 2026 14:58
b813450 to
4e5777d
Compare
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 LoopOver is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
…keletons Wrap the ledger-summary read and the governor pause/resume read in their own independent @loopover/ui-kit StateBoundary boundaries, replacing the hand-rolled plain-text loading/error branches with LoadingState/ErrorState and content-shaped Skeleton placeholders. Restyle the governor-control section into an organized, bordered panel using existing ui-kit tokens. The pause/resume write path (lib/governor.ts, lib/ledgers.ts, the Button click handlers) is untouched. Closes JSONbored#6512
nghetienhiep
force-pushed
the
fix/issue-6512
branch
from
July 16, 2026 15:03
4e5777d to
709c178
Compare
JSONbored
reviewed
Jul 16, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
Not a fan of the redesign at all, overall the miner app looks...like junk.
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
Redesigns the miner-ui Ledgers route (
apps/loopover-miner-ui/src/routes/ledgers.tsx) to render both of its async flows through the shared@loopover/ui-kitStateBoundary/LoadingState/ErrorStateprimitives (ported into ui-kit by #6506 / PR #6539) instead of hand-rolled inline JSX, and adopts the previously-unusedSkeletonfor content-shaped loading placeholders.CountTables, recent-eventsTable) is wrapped in its ownStateBoundary. The plain"Loading local ledgers…"text is replaced by aSkeletonshaped to the eventual card-grid + table layout; the fetch-error branch now renders ui-kit'sErrorState, still surfacing the raw error string. The fresh-install case rendersEmptyStatewith the same "No ledger activity yet" copy.StateBoundary(with its ownSkeleton), so a governor-state fetch failure no longer affects the ledger summary below it — and vice-versa (see the two error screenshots).Input+Buttonrow into an organized, bordered panel: a status line with a success/warning state dot, above the input/button group — using only existing@loopover/ui-kitprimitives and design tokens (rounded-token,border-border,text-token-sm,text-[var(--success)]/--warning).The write path is deliberately untouched:
lib/ledgers.ts,lib/governor.ts, and the pause/resumeButtonclick handlers (onClick={onResume},onClick={() => onPause(reason || undefined)}) and the reasonInputare byte-for-byte unchanged — only the rendering/layout around them changed, so there remains exactly one write path into the governor.Closes #6512.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6512).Validation
git diff --checknpm run typecheck(miner-uitsc --noEmit) — clean.npm run ui:lintequivalent (eslint .+prettier --check) for miner-ui — no errors; only the pre-existingreact-refresh/only-export-componentswarning shared by every route file.Why no
codecov/patchcheck appears:apps/loopover-miner-ui/**is outsidesrc/**, which is the only tree Codecov's patch-coverage gate measures — so the 99%+ branch-counted requirement does not numerically gate this change. Verification is the miner-ui vitest suite (which already has a route test harness —src/ledgers.test.tsx/src/governor.test.tsx, extended here) plus the mandatory screenshots below.Safety
/api/ledgersand/api/governor/pause-stateendpoints — the screenshots below drive those real states (request blocking / 500), no production mock fallback.UI Evidencesection below (GitHub-hosted PNG thumbnails).Tests
Extended the existing route test harness for the new
StateBoundary-driven branches of both flows:ledgers.test.tsx— the loading branch now asserts content-shapedSkeletonplaceholders (animate-pulse) render and the old plain text is gone; the error branch asserts the ui-kitErrorState(role="alert") still surfaces the raw error; the empty branch asserts theEmptyState.governor.test.tsx— the governor loading branch likewise asserts theSkeleton(replacing the old"Loading governor state…"text); the existing error/paused/not-paused/pending-disabled tests continue to pass against the restyled panel.UI Evidence
Both async flows, each shown independently in loading / success / error. The two error shots demonstrate the separate boundaries — one flow can fail while the other renders fully.
/api/ledgers500)Notes
@loopover/ui-kit) landed via PR feat(ui-kit): port state-views.tsx primitives into @loopover/ui-kit #6539 (merged 2026-07-16);StateBoundaryis imported from@loopover/ui-kit/components/state-viewsper the ui-kit convention (same asapps/loopover-miner-ui/src/components/chat/message-list.tsx), not fromapps/loopover-ui, and no local copy was hand-rolled.