Skip to content

feat: add vault overview accordions#617

Open
Seranged wants to merge 6 commits into
developmentfrom
feature/lite-215-convert-vault-page-sections-to-accordion-style
Open

feat: add vault overview accordions#617
Seranged wants to merge 6 commits into
developmentfrom
feature/lite-215-convert-vault-page-sections-to-accordion-style

Conversation

@Seranged

@Seranged Seranged commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Convert vault overview cards into collapsible sections so long vault pages are easier to scan.
  • Apply the same accordion treatment across standard vault, borrow pair, and Securitize overview variants.

Changes

  • Add a reusable vault overview accordion wrapper with configurable default-open state and native button accessibility.
  • Keep high-signal overview and statistics sections open by default while collapsing deeper technical sections by default.
  • Preserve existing inline tooltips and modal triggers by avoiding clipping around accordion content.

Test plan

  • Run Nuxt typecheck.
  • Run focused ESLint over changed overview files.
  • Run git diff --check.
  • Smoke a vault deep link on the local dev server and confirm it returns 200 OK.

Summary by CodeRabbit

  • New Features
    • Vault overview pages now use accessible accordion sections for Overview, Statistics, Risk parameters, Addresses, Oracles, and interest-rate-model details.
    • Sections can be configured to open/close by default, with “auto-open” behavior when only one section is present.
    • Action content (tags/badges and related controls) is now placed in dedicated accordion action areas.
  • Style
    • Improved layout consistency and responsive spacing within vault overview pair layouts.
    • Updated hover styling for key controls.

Wrap vault overview sections in reusable accordion cards with configurable default open states across standard, pair, and Securitize views.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-617 June 24, 2026 11:46 Destroyed
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: euler-xyz/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8419614d-1118-4e24-89eb-24cb4db6d12a

📥 Commits

Reviewing files that changed from the base of the PR and between dccb4d0 and e08286b.

📒 Files selected for processing (1)
  • components/entities/vault/overview/VaultOverviewAccordionSection.vue

📝 Walkthrough

Walkthrough

A reusable VaultOverviewAccordionSection component was added, and vault overview block components, pair block components, and parent overview containers were updated to render through it with explicit default-open values.

Changes

Vault Overview Accordion Refactor

Layer / File(s) Summary
New VaultOverviewAccordionSection component
components/entities/vault/overview/VaultOverviewAccordionSection.vue
Adds the accordion section component with typed props, open/close state, ARIA panel wiring, a toggle control, and an optional actions slot.
Core vault blocks migrated to accordion
components/entities/vault/overview/VaultOverviewBlockGeneral.vue, VaultOverviewBlockStats.vue, VaultOverviewBlockRiskParameters.vue, VaultOverviewBlockAddresses.vue, VaultOverviewBlockBorrow.vue, VaultOverviewBlockIRM.vue, VaultOverviewBlockCyclicalIRM.vue, VaultOverviewBlockOracleAdapters.vue
Each block adds defaultOpen and wraps its existing content in VaultOverviewAccordionSection; the IRM-related blocks move their auxiliary UI into the section actions slot.
Pair blocks migrated to accordion
components/entities/vault/overview/VaultOverviewPairBlockGeneral.vue, VaultOverviewPairBlockTypes.vue, SecuritizeVaultOverviewPairBlockGeneral.vue
Each pair block adds defaultOpen and replaces its outer wrapper with VaultOverviewAccordionSection; the Securitize pair general block also updates the swap button hover color.
Parent containers wire default-open states
components/entities/vault/overview/VaultOverview.vue, VaultOverviewPair.vue, SecuritizeVaultOverviewPair.vue, SecuritizeVaultOverview.vue
Parent components pass explicit default-open values to child blocks, and SecuritizeVaultOverview.vue converts its inline sections into accordion sections.

Possibly Related PRs

  • euler-xyz/euler-lite#167: Overlaps with the same vault overview UI templates, especially VaultOverviewBlockGeneral.vue, but changes a different layout path.
  • euler-xyz/euler-lite#470: Touches VaultOverviewPairBlockTypes.vue, which this PR also restructures.
  • euler-xyz/euler-lite#542: Touches VaultOverviewPairBlockGeneral.vue, the same component migrated here to the accordion wrapper.

Suggested reviewers

  • kasperpawlowski

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hop, hop, the vaults now fold and sway,
Each panel opens in a tidy way.
With little ears and toggle cheer,
The rabbit says, “Click here, click here!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding accordion sections to vault overview pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/lite-215-convert-vault-page-sections-to-accordion-style

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


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

@railway-app

railway-app Bot commented Jun 24, 2026

Copy link
Copy Markdown

🚅 Deployed to the euler-lite-pr-617 environment in euler-lite

Service Status Web Updated (UTC)
dev-build ✅ Success (View Logs) Web Jun 24, 2026 at 2:04 pm

…15-convert-vault-page-sections-to-accordion-style

# Conflicts:
#	components/entities/vault/overview/SecuritizeVaultOverview.vue
#	components/entities/vault/overview/VaultOverview.vue
#	components/entities/vault/overview/VaultOverviewBlockGeneral.vue
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-617 June 24, 2026 12:03 Destroyed
@Seranged Seranged marked this pull request as ready for review June 24, 2026 12:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
components/entities/vault/overview/VaultOverviewBlockIRM.vue (1)

615-622: 🚀 Performance & Scalability | 🔵 Trivial | 🏗️ Heavy lift

Lazy-load the IRM chart when this section starts collapsed.

This accordion only hides the panel DOM; it does not stop the existing onMounted/watch-driven VaultLens and UtilsLens reads from running immediately. That turns a default-collapsed technical section into eager off-screen RPC + chart work. Consider wiring the fetch/render path to the expanded state, or hoisting the accordion above this component so the IRM body mounts only after expansion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/entities/vault/overview/VaultOverviewBlockIRM.vue` around lines
615 - 622, The Interest rate model section currently mounts its
VaultLens/UtilsLens data and chart work even when the accordion starts
collapsed, so make the IRM body lazy by tying the fetch/render path to the
expanded state in VaultOverviewBlockIRM and the accordion section around
hasValidIRM/defaultOpen. Update the onMounted/watch-driven reads so they only
run after expansion, or move the conditional mounting above this component so
the IRM content does not mount until the section is opened.
components/entities/vault/overview/VaultOverviewBlockOracleAdapters.vue (1)

305-309: 🚀 Performance & Scalability | 🔵 Trivial | 🏗️ Heavy lift

Keep oracle adapter loading behind expansion for collapsed views.

After this refactor the section can start closed, but loadOracleAdapter(...) and useOracleAdapterPrices(...) still fan out as soon as the component mounts. In the pair overview this block is explicitly default-closed, so users still pay the metadata/price-loading cost before opening it. Please gate that work on the accordion’s open state, or move the accordion above this component so the expensive body mounts lazily.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/entities/vault/overview/VaultOverviewBlockOracleAdapters.vue`
around lines 305 - 309, The Oracle adapters section still triggers eager
metadata/price loading on mount even when the accordion is collapsed. Gate the
expensive work in VaultOverviewBlockOracleAdapters.vue behind the accordion’s
open state, or restructure so the body that calls loadOracleAdapter(...) and
useOracleAdapterPrices(...) only mounts when the VaultOverviewAccordionSection
is expanded. Keep the change centered on the accordion/open-state logic and the
Oracle adapters loading flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@components/entities/vault/overview/VaultOverviewBlockIRM.vue`:
- Around line 615-622: The Interest rate model section currently mounts its
VaultLens/UtilsLens data and chart work even when the accordion starts
collapsed, so make the IRM body lazy by tying the fetch/render path to the
expanded state in VaultOverviewBlockIRM and the accordion section around
hasValidIRM/defaultOpen. Update the onMounted/watch-driven reads so they only
run after expansion, or move the conditional mounting above this component so
the IRM content does not mount until the section is opened.

In `@components/entities/vault/overview/VaultOverviewBlockOracleAdapters.vue`:
- Around line 305-309: The Oracle adapters section still triggers eager
metadata/price loading on mount even when the accordion is collapsed. Gate the
expensive work in VaultOverviewBlockOracleAdapters.vue behind the accordion’s
open state, or restructure so the body that calls loadOracleAdapter(...) and
useOracleAdapterPrices(...) only mounts when the VaultOverviewAccordionSection
is expanded. Keep the change centered on the accordion/open-state logic and the
Oracle adapters loading flow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: euler-xyz/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d411ddb6-2ec1-428a-8f06-c8cbb521b894

📥 Commits

Reviewing files that changed from the base of the PR and between c61a9af and dccb4d0.

📒 Files selected for processing (16)
  • components/entities/vault/overview/SecuritizeVaultOverview.vue
  • components/entities/vault/overview/SecuritizeVaultOverviewPair.vue
  • components/entities/vault/overview/SecuritizeVaultOverviewPairBlockGeneral.vue
  • components/entities/vault/overview/VaultOverview.vue
  • components/entities/vault/overview/VaultOverviewAccordionSection.vue
  • components/entities/vault/overview/VaultOverviewBlockAddresses.vue
  • components/entities/vault/overview/VaultOverviewBlockBorrow.vue
  • components/entities/vault/overview/VaultOverviewBlockCyclicalIRM.vue
  • components/entities/vault/overview/VaultOverviewBlockGeneral.vue
  • components/entities/vault/overview/VaultOverviewBlockIRM.vue
  • components/entities/vault/overview/VaultOverviewBlockOracleAdapters.vue
  • components/entities/vault/overview/VaultOverviewBlockRiskParameters.vue
  • components/entities/vault/overview/VaultOverviewBlockStats.vue
  • components/entities/vault/overview/VaultOverviewPair.vue
  • components/entities/vault/overview/VaultOverviewPairBlockGeneral.vue
  • components/entities/vault/overview/VaultOverviewPairBlockTypes.vue

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

Leonard review — PR #617

Verdict: COMMENT — no blocking issues found on the reviewed head dccb4d0c31afc7b9eb51b307f93e2dfeb56b5c12.

Walkthrough

This PR converts the vault overview surfaces into shared accordion sections:

  • Standard lend vault overview: Overview/Statistics remain open; deeper technical sections default closed.
  • Borrow pair overview: pair Overview remains open; Vault types and Oracles default closed.
  • Securitize vault and pair variants receive the same accordion treatment.
  • VaultOverviewAccordionSection centralizes the section chrome, native button toggling, aria-expanded, and optional action slot handling.

Risk assessment

The changed surface is user-visible but mostly layout/state presentation rather than transaction logic. The main risks I checked were:

  • hidden/closed sections accidentally dropping important risk data;
  • mobile overview drawer behavior diverging from desktop;
  • section actions/footnotes being swallowed by the accordion button;
  • accessibility regressions around the accordion trigger state;
  • one-off accordion wrappers creating inconsistency across sibling overview variants.

No blocking regression found.

Validation performed

  • npm run test:run — 95 files / 958 tests passed.
  • npm run typecheck — passed.
  • npm run build — passed; only existing-style Vite/Rollup chunk/dynamic-import warnings observed.
  • npx eslint <changed vault overview files> — passed.
  • Headed/Xvfb Playwright browser visual smoke against the PR preview:
    • desktop lend vault deep link: KPK VBILL/USDC lend vault, accordion headers/content present.
    • desktop borrow pair deep link: KPK VBILL/USDC borrow/multiply pair, pair overview and oracle accordion present.
    • mobile lend vault deep link: opened the Vault information drawer and verified the accordion content is reachable there.
    • desktop accordion interaction check: default-open/default-closed aria-expanded states matched intent; expanding Risk parameters changed aria-expanded from false to true.

Smoke coverage: browser visual smoke + mobile smoke. Wallet/signing smoke: not run; this PR does not change transaction preparation or wallet signing paths.

Visual evidence

Screenshots are from the public PR preview and contain only public app UI:

Desktop lend vault accordion smoke

Desktop borrow pair accordion smoke

Mobile lend vault information drawer smoke

Scalability / maintainability hygiene pass

I searched the sibling overview surfaces that consume the same vault overview data and UI concept:

  • covered by this PR: standard vault overview, standard borrow pair overview, Securitize vault overview, Securitize pair overview, addresses/stats/risk/IRM/oracle/type blocks;
  • genuinely out of scope: Earn overview blocks under components/entities/vault/overview/earn, which are a separate Earn-specific overview surface and not mentioned by the PR intent;
  • reusable abstraction: the shared VaultOverviewAccordionSection is the right direction and avoids per-block button/chrome duplication;
  • focused tests: there is no dedicated component-level accordion test, but the wrapper is small, uses native button semantics, and the repo’s current test suite is not component-render focused. I do not think this is a blocker for this layout refactor.

One non-blocking follow-up worth keeping in mind: CodeRabbit’s performance note is valid. VaultOverviewBlockIRM and VaultOverviewBlockOracleAdapters can still do chart/oracle loading while their accordion sections start collapsed, because the accordion hides the panel body inside an already-mounted component. That does not break correctness, and I would not block this PR on it, but if the product goal includes reducing first-load work rather than only reducing visual density, the next clean step is to hoist lazy mounting above those expensive bodies or expose accordion open state to gate those fetches.

Bot/reviewer feedback pass

I inspected the active CodeRabbit review. Its two notes about eager IRM/oracle loading behind collapsed accordions are materially valid but non-blocking performance/architecture follow-ups; I did not duplicate them as inline Leonard findings.

Comment lifecycle

No prior Leonard-authored top-level comments, reviews, or inline review comments were present for this PR head, so there was nothing to edit or clean up.

@Seranged Seranged marked this pull request as draft June 24, 2026 13:29
Collapse a vault overview accordion by default when it is the only accordion section in its parent view.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-617 June 24, 2026 13:48 Destroyed
Force a lone vault overview accordion section open after mount so single-section views show their content by default.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-617 June 24, 2026 13:55 Destroyed
Keep accordion actions before a far-right chevron so sections with badges retain the same expand affordance as other rows.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-617 June 24, 2026 14:01 Destroyed
Make the full vault overview accordion header toggle the section while keeping header actions independently clickable.
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.

2 participants