Skip to content

fix: borrow filter and matrix UX#628

Merged
Seranged merged 2 commits into
developmentfrom
fix/borrow-filter-matrix-nits
Jun 30, 2026
Merged

fix: borrow filter and matrix UX#628
Seranged merged 2 commits into
developmentfrom
fix/borrow-filter-matrix-nits

Conversation

@Seranged

@Seranged Seranged commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Make the default borrow liquidity filter visible so users can see and remove the active filter.
  • Keep unavailable discovery matrix cells passive while relying on the matrix-level notice for Max ROE and multiplier availability.

Changes

  • Initialize custom filters with any default filters, and reset back to those defaults when clearing page-level filters.
  • Remove the hover-only tooltip from unavailable discovery matrix dashes to avoid oversized repeated popovers in dense tables.
  • Add focused coverage for initial custom filters and expose Vue readonly in the shared Vitest setup.

Test plan

  • npx eslint components/entities/vault/discovery/DiscoveryMarketMatrix.vue composables/useCustomFilters.ts tests/setup.ts tests/composables/useCustomFilters.test.ts
  • npx vitest run tests/composables/useCustomFilters.test.ts
  • Manually opened /borrow and /explore on localhost:3007 to inspect the active filter chip and matrix unavailable-cell behavior.

Summary by CodeRabbit

  • Bug Fixes
    • Filter controls now reset back to their original starting selections instead of clearing everything.
    • Unavailable metrics now display a simple placeholder without a hover hint.
  • Tests
    • Added coverage for custom filter initialization, reset behavior, and matching logic.

Surface default borrow filters in the active filter chips and keep unavailable discovery matrix cells passive.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-628 June 25, 2026 14:26 Destroyed
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 3a34d9fc-30f5-423b-ac9c-a352f5c3fc5b

📥 Commits

Reviewing files that changed from the base of the PR and between 1f7c076 and 7960914.

📒 Files selected for processing (2)
  • components/entities/vault/discovery/DiscoveryMarketMatrix.vue
  • composables/useCustomFilters.ts
 ______________________________________________________________________________________________________________________
< Adapting old programs to fit new machines usually means adapting new machines to behave like old ones. - Alan Perlis >
 ----------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
📝 Walkthrough

Walkthrough

The PR removes the unavailable-metric hover tooltip in the discovery matrix and changes useCustomFilters to seed, reset, and match from initialFilters. A new test suite covers the composable behavior, and the Vue test setup now provides readonly.

Changes

Discovery matrix cell rendering

Layer / File(s) Summary
Unavailable placeholder render
components/entities/vault/discovery/DiscoveryMarketMatrix.vue
The unavailable metric cell now renders - directly instead of wrapping it in UiHoverPreviewTooltip with the “Max ROE unavailable” label.

Custom filter initial state

Layer / File(s) Summary
Seed and reset from initial filters
composables/useCustomFilters.ts, tests/setup.ts, tests/composables/useCustomFilters.test.ts
useCustomFilters initializes and clears customFilters from initialFilters, matches against the active list, and the test suite covers the seeded state, filter removal, add, and reset behavior with readonly added to Vue test globals.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • euler-xyz/euler-lite#605: Also changes DiscoveryMarketMatrix.vue cell rendering and indicator/legend behavior in the discovery matrix.
  • euler-xyz/euler-lite#610: Also adjusts unavailable-metric tooltip and label handling in the discovery matrix.
  • euler-xyz/euler-lite#620: Also updates unavailable-cell handling in DiscoveryMarketMatrix.vue, including placeholder behavior.

Suggested reviewers

  • dglowinski
  • LeonardEulerXYZ

Poem

Hop, hop—- now gleams on the grid,
No tooltip flap where the placeholder hid.
Filters wake up right where they start,
Then reset home, neat as a carrot cart.
Tiny Vue stars sparkle in bunny delight. 🐇

🚥 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 is clearly related to the main changes: borrow filters and discovery matrix UX.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/borrow-filter-matrix-nits

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

@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 #628

Verdict: COMMENT — no blocking findings found on the current head 1f7c076781bad7fc1191a2dd4182cd375fb6fb06.

What changed:

  • useCustomFilters now treats initialFilters as visible/removable active filters and resets back to them on clear.
  • Borrow’s default Avail. liquidity > $1K filter is now visible to users instead of being an invisible hard filter.
  • Discovery matrix unavailable ROE/multiplier cells now render as a quiet -, with the matrix-level correlation notice carrying the explanation.

Scalability / maintainability hygiene:

  • I checked the sibling filter consumers (borrow, lend, earn, explore) and the shared UiCustomFilterChips path. This keeps the initial-filter behavior in the shared composable rather than a borrow-page local helper, and the new focused composable test covers the reusable behavior.
  • I checked sibling ROE/unavailable display surfaces. The matrix change is scoped to the matrix cell display, while the broader explanation remains shared at the matrix-view level and the ROE modal still has its own contextual explanation. I did not find a missed sibling component carrying the old visible-tooltip behavior.
  • Active bot/reviewer feedback: I did not find active non-Leonard review comments on this PR to verify/refute.

Validation performed:

  • npx eslint components/entities/vault/discovery/DiscoveryMarketMatrix.vue composables/useCustomFilters.ts tests/composables/useCustomFilters.test.ts tests/setup.ts — passed.
  • npm run test:run -- tests/composables/useCustomFilters.test.ts — passed, 1 test.
  • npm run build — passed. Build emitted existing-style bundler warnings, but no PR-specific build failure.
  • Local production server smoke: /borrow?network=1 and /api/euler-chains returned 200.
  • Browser visual smoke, headed Chromium under Xvfb:
    • Borrow desktop and mobile: default liquidity chip and Add filter visible; page rendered market rows, no loading/error state.
    • Explore matrix desktop and mobile: expanded a market, switched to Matrix → Max ROE, verified the correlation notice and ROE matrix state.

Smoke coverage: browser visual smoke + mobile smoke. No wallet/signing coverage was run. Local smoke used a blank AppKit project id, so wallet/Reown console warnings were treated as local-env noise rather than PR evidence.

Screenshot evidence:

Borrow desktop — default liquidity filter visible:
Borrow desktop

Borrow mobile — filter controls visible:
Borrow mobile

Explore matrix mobile — Matrix + Max ROE selected with correlation notice:
Explore matrix mobile

Explore matrix desktop — Matrix + Max ROE selected:
Explore matrix desktop

@railway-app

railway-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

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

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

@Seranged Seranged requested a review from kanvgupta June 29, 2026 08:08
kanvgupta
kanvgupta previously approved these changes Jun 30, 2026
Merge current development into the borrow filter matrix nits branch and resolve the custom filters clash.
@railway-app railway-app Bot temporarily deployed to euler-lite / euler-lite-pr-628 June 30, 2026 11:58 Destroyed
@Seranged Seranged requested a review from kanvgupta June 30, 2026 11:58
@Seranged Seranged merged commit 76effad into development Jun 30, 2026
1 of 2 checks passed
@Seranged Seranged deleted the fix/borrow-filter-matrix-nits branch June 30, 2026 12:03
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

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