Skip to content

feat: pool-centric position view and aggregated account health (#297)#324

Open
johdanike wants to merge 1 commit into
Dgetsylver:mainfrom
johdanike:feat/pool-centric-position-view
Open

feat: pool-centric position view and aggregated account health (#297)#324
johdanike wants to merge 1 commit into
Dgetsylver:mainfrom
johdanike:feat/pool-centric-position-view

Conversation

@johdanike

Copy link
Copy Markdown

Closes #297

Summary

Description:

This PR reframes the position view around the Pool/Account model as specified in #297. It replaces per-asset card displays with a unified PositionPanel for each pool.
Key Changes

    Data Model: Shifted from asset-scoped positions to PoolAccount aggregation using the computePoolHF() formula.

    UI Implementation:

        Added PositionPanel card component in dashboard.ts using the V3 design system tokens (pp-* classes).

        Created assetBreakdownTable to handle the display of assets, roles (Loop/Collateral/Borrow), and leverage factors within a pool.

        Added logic for fmtLiqDays with conditional color coding (green/amber/red).

    Cleanup: Removed unused ROLE_COLOR variable and successfully refactored dashboard styles for responsive pp-table layout.

Verification

    Lint: 0 errors (Biome).

    Build: Passed (Vite/0 errors).

    Compatibility: Single-loop positions remain identical to previous behavior (no regression).

Checklist

    [x] Aggregate health calculated per-pool.

    [x] Liquidation gauge and days-to-liquidation implemented.

    [x] Cross-collateral explainer implemented for multi-asset pools.

    [x] Cleaned up unused legacy styles and variables.

How to post this:

If using the GitHub CLI:
Bash

gh pr create --title "feat: pool-centric position view (#297)" --body-file pr_description.txt

Manually: Copy the description above into the "Open a pull request" form on your GitHub repository.

Related Issue

Closes #

Checks

  • I read the [contribution guide][contribution-guide].
  • I kept this pull request scoped to the linked issue.
  • I ran the relevant local checks or explained why they were skipped.
  • For Drips wave issues, I claimed the issue before opening this pull request.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@johdanike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

feat: pool-centric position view (account health per pool, assets as breakdown)

1 participant