Skip to content

fix: empty state#2123

Merged
jeremy-babylonlabs merged 5 commits into
mainfrom
fix/empty-state
Jul 24, 2026
Merged

fix: empty state#2123
jeremy-babylonlabs merged 5 commits into
mainfrom
fix/empty-state

Conversation

@jeremy-babylonlabs

Copy link
Copy Markdown
Contributor

unfied empty state UI for vault loan and activity tab

All three Figma empty-state frames (vaults 11716:54592, loans 10044:14068,
activity 10044:13346) are one spec, so the shared EmptyState now owns it:

- the document-with-magnifier illustration is the Figma geometry, inlined with
  currentColor so it resolves text/secondary in both themes (the previous
  hand-drawn EmptyStateIcon was a different shape, and the /vaults <img> was
  pinned to the dark-theme grey in light mode)
- 24px gaps, 4px title/body gap, 600px-capped centered copy, large orange CTA
- /vaults gets the missing card surface (background/secondary, 16px radius,
  24/40 padding, no border)

Drops the now-redundant `icon` and `descriptionVariant` props and the
public/images/vaults-empty.svg asset.
…empty states

Both tabs reused the connected copy while disconnected, claiming the depositor
had no loans / no BTC Vaults before any address had been read. They now show a
title-only connect prompt, matching what the Activity tab already did; one
`connectToView` builder in copy.ts keeps the three from drifting.

On /vaults the deposits-paused notice still outranks the prompt, so a pause is
visible without connecting first.
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

🔐 Commit Signature Verification

All 5 commit(s) passed verification

Commit Author Signature Key Type Key Check
654cbcbc485a jeremy-babylonlabs sk-ssh-ed25519
ea233a059ac3 jeremy-babylonlabs sk-ssh-ed25519
32159b3b03e0 jeremy-babylonlabs sk-ssh-ed25519
d1e06f7a1e14 jeremy-babylonlabs sk-ssh-ed25519
302a9412545d jeremy-babylonlabs sk-ssh-ed25519

Summary

  • Commits verified: 5
  • Signature check: ✅ All passed
  • Key type enforcement: ✅ All sk-ssh-ed25519

Required key type: sk-ssh-ed25519 (FIDO2 hardware key)

Last verified: 2026-07-23 19:31 UTC

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR unifies empty states across the Vaults, Loans, and Activity views. The main changes are:

  • Shared document illustration, spacing, card styling, and CTA sizing.
  • Wallet-disconnected copy for the Vaults and Loans views.
  • Updated tests for the shared component and page-level empty states.
  • Removal of the obsolete public SVG and icon exports.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • Updated call sites match the shared component API changes.
  • Tests cover the new disconnected and deposits-paused empty states.

Important Files Changed

Filename Overview
services/vault/src/components/shared/EmptyState.tsx Unifies the default illustration, typography, spacing, card treatment, and CTA dimensions.
services/vault/src/components/pages/VaultsPage.tsx Adds connection-aware empty copy and adopts the shared card presentation.
services/vault/src/components/pages/Loans.tsx Shows a wallet prompt when disconnected while retaining the connected no-loans state.
services/vault/src/components/shared/icons/EmptyStateIcon.tsx Replaces the previous icon geometry with the shared Figma illustration.
services/vault/src/copy.ts Centralizes the new wallet connection prompts for the affected tabs.

Reviews (1): Last reviewed commit: "fix(vault): prompt for a wallet on the d..." | Re-trigger Greptile

gbarkhatov
gbarkhatov previously approved these changes Jul 23, 2026

@gbarkhatov gbarkhatov 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.

Approving — a clean, well-scoped consolidation of the v3 empty state onto a single surface. Dead code (the icon / descriptionVariant props, the standalone vaults-empty.svg, the barrel re-exports) is fully removed, and the disconnected copy is centralized via the connectToView builder. All comments below are non-blocking.

Verified as non-issues: the .bbn-card padding/border override works (core-ui's CSS is @imported before the app's @tailwind utilities, so equal-specificity app utilities win by source order); the disconnected-vs-paused precedence on Vaults is correct and newly tested; and every shared-EmptyState caller passes withCard, so dropping the non-card py-16 strands nothing.

The one thing worth confirming before merge is the first comment: the illustration is now always-on for icon-less callers, which pulls LiquidationAnalysisSection (out of scope, untested) into the new look.

Comment thread services/vault/src/components/shared/EmptyState.tsx Outdated
Comment thread services/vault/src/components/shared/EmptyState.tsx Outdated
Comment thread services/vault/src/components/pages/__tests__/Loans.test.tsx Outdated
Comment thread services/vault/src/components/pages/Loans.tsx
Comment thread services/vault/src/components/shared/icons/EmptyStateIcon.tsx Outdated
Comment thread services/vault/src/components/pages/VaultsPage.tsx Outdated
Review caught that dropping the `icon` / `descriptionVariant` props leaked the
v3 look into surfaces this PR never meant to touch: the overview liquidation
panel gained the 94x101 illustration and a large CTA, and the reserve-detail
connect prompt gained the filled card and 16px description.

An explicit `variant` ("v3" default, "compact") restores both to what they
rendered before, with a test pinning the compact path so the default can't leak
again. Also: export ACTION_WIDTH_CLASS instead of re-inlining it in VaultsPage,
assert the Loans disconnected copy via COPY rather than a literal, and drop the
now-unused `className` prop from EmptyStateIcon.
That file declares its own local EmptyState — it never consumed the shared one,
so applying `variant="compact"` there passed an unknown prop and failed
`tsc -p tsconfig.lib.json`. The shared component is untouched by that surface,
so there was nothing to restore; the file is now back to its pre-PR state.

`compact` still covers the one real out-of-scope caller, the v2 reserve-detail
connect prompt.
@gbarkhatov

Copy link
Copy Markdown
Contributor

@jeremy-babylonlabs are comments resolved?

Reconciles this branch with #2126 (pending-deposit vaults empty state),
which extracted VaultsEmptyState and reused it via renderEmptyState in two
placements. Conflict resolution:

- VaultsEmptyState is rewritten onto this branch's new EmptyState API: it
  drops the removed `icon`/`descriptionVariant` props and the deleted
  vaults-empty.svg (the shared EmptyState now renders the Figma
  document illustration), uses the large CTA + shared ACTION_WIDTH_CLASS, and
  gains the disconnected title-only "Connect your wallet to view your BTC
  Vaults" copy.
- The `withCard` param becomes `sectionPlacement`: the whole-page state renders
  on the standalone v3 empty-state card (the "missing div" this branch fixes,
  matching Loans/Activity), while #2126's pending-section placement keeps its
  bordered sibling-card surface untouched.

@jonybur jonybur 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.

Well-scoped consolidation. The icon prop and descriptionVariant are cleanly retired in favour of the variant split (v3 / compact), and every caller is updated. Dead assets go too: vaults-empty.svg deleted and EmptyStateIcon dropped from both the icons barrel and the shared re-export. EmptyStateIcon remains reachable only via direct import from EmptyState.tsx, its one consumer. The disconnected-vs-paused precedence on VaultsEmptyState is right — pause outranks the connect prompt so a depositor learns deposits are off without connecting first, pinned down by a dedicated test. Disconnected-title-only copy is centralised via connectToView(...) so the three tabs can't drift.

@jeremy-babylonlabs
jeremy-babylonlabs merged commit 37f24ef into main Jul 24, 2026
8 checks passed
@jeremy-babylonlabs
jeremy-babylonlabs deleted the fix/empty-state branch July 24, 2026 05:13
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.

4 participants