Skip to content

Feat/redesign hyperliquid tile#497

Merged
aldin4u merged 4 commits intostagingfrom
feat/redesign-hyperliquid-tile
Jan 20, 2026
Merged

Feat/redesign hyperliquid tile#497
aldin4u merged 4 commits intostagingfrom
feat/redesign-hyperliquid-tile

Conversation

@aldin4u
Copy link
Collaborator

@aldin4u aldin4u commented Jan 20, 2026

Description

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary by CodeRabbit

  • New Features
    • Added an account selector dropdown to the portfolio header for switching between wallet account types, showing balances, truncated addresses, copy-to-clipboard, and quick account details.
    • Added a Perps tile to the home feed promoting perpetuals trading (up to 50x leverage) with CTAs and responsive layout for desktop and mobile.

✏️ Tip: You can customize this high-level summary in your review settings.

- Created new PerpsTile component with gradient background
- Added tile to homefeed after WalletPortfolioTile
- Tile navigates to /perps app
- Fixed WalletPortfolioBalance tests (mocked AccountSelector)
- Fixed lint errors (button type, unused imports)
- Updated test snapshots
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Adds an AccountSelector component for switching between Smart Account and EOA, inserts a new PerpsTile into the home feed, and adds activeAccountMode to wallet portfolio Redux state with a setActiveAccountMode action.

Changes

Cohort / File(s) Summary
Account selector component
src/apps/pillarx-app/components/AccountSelector/AccountSelector.tsx
New React TSX component: dropdown UI for Smart Account vs EOA, queries portfolio data for both addresses, memoizes balances, shows truncated addresses, copy-to-clipboard, info popovers, outside-click closing, dispatches setActiveAccountMode.
Perpetuals promo tile
src/apps/pillarx-app/components/PerpsTile/PerpsTile.tsx
New responsive tile component with Hyperliquid branding, promotional copy, feature tags, and navigation to /perps.
Feed integration
src/apps/pillarx-app/index.tsx
Imports and renders <PerpsTile /> after WalletPortfolioTile in the home feed.
Portfolio header update
src/apps/pillarx-app/components/WalletPortfolioBalance/WalletPortfolioBalance.tsx
Replaces previous header/icon with AccountSelector component; removes WalletPortfolioIcon import; preserves balance/loading logic.
Redux slice update
src/apps/pillarx-app/reducer/WalletPortfolioSlice.ts
Adds `activeAccountMode: 'eoa'
Tests adjusted
src/apps/pillarx-app/components/WalletPortfolioBalance/test/WalletPortfolioBalance.test.tsx
Adds a module mock for AccountSelector (renders a stub with data-testid="account-selector") and removes an assertion checking for the previous wallet-portfolio-icon image.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User
participant AccountSelector as "AccountSelector (UI)"
participant Redux as "Redux Store\nWalletPortfolioSlice"
participant API as "Portfolio APIs"
participant Clipboard as "Clipboard"

User->>AccountSelector: Opens dropdown / clicks account row
AccountSelector->>API: Fetch portfolio data for SmartAccount & EOA (parallel queries)
API-->>AccountSelector: Return balances
AccountSelector->>Redux: dispatch setActiveAccountMode('smart'|'eoa')
Redux-->>AccountSelector: state update (activeAccountMode)
AccountSelector->>User: Close dropdown, highlight active account
User->>AccountSelector: Click copy icon
AccountSelector->>Clipboard: writeAddressToClipboard
Clipboard-->>User: address copied

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • RanaBug
  • IAmKio

Poem

🐰 A dropdown wiggles, two accounts in sight,
Smart or EOA — hop, choose what's right,
A Perps tile beams with leverage cheer,
Redux keeps the mode close and near,
Clipboard in paw — copy, and delight! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is completely empty, containing only the template structure with no actual content in any sections. Fill in the Description section with a summary of changes, add testing details in 'How Has This Been Tested', include any relevant screenshots, and select appropriate change types (likely 'New feature').
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title references a Hyperliquid tile redesign, which aligns with the main addition of PerpsTile component and AccountSelector integration, though it doesn't fully convey all changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 20, 2026

Deploying pillarx-debug with  Cloudflare Pages  Cloudflare Pages

Latest commit: 078141a
Status: ✅  Deploy successful!
Preview URL: https://49d523ef.pillarx-debug.pages.dev
Branch Preview URL: https://feat-redesign-hyperliquid-ti.pillarx-debug.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 20, 2026

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 078141a
Status: ✅  Deploy successful!
Preview URL: https://dc4dbf5c.x-e62.pages.dev
Branch Preview URL: https://feat-redesign-hyperliquid-ti.x-e62.pages.dev

View logs

@github-actions github-actions bot temporarily deployed to Preview (feat/redesign-hyperliquid-tile) January 20, 2026 19:50 Inactive
@aldin4u aldin4u merged commit 5027c57 into staging Jan 20, 2026
5 of 7 checks passed
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.

1 participant