Skip to content

SS-5657: Bring back asset icons in swaps and limits#251

Open
twblack88 wants to merge 2 commits into
mainfrom
ss-5657-asset-icons
Open

SS-5657: Bring back asset icons in swaps and limits#251
twblack88 wants to merge 2 commits into
mainfrom
ss-5657-asset-icons

Conversation

@twblack88
Copy link
Copy Markdown
Contributor

@twblack88 twblack88 commented May 4, 2026

Summary

  • restore asset icons in the shared swap pair header UI used by swap and limit-related cards
  • plumb icon metadata through limit-order tool outputs so limit cards and order history can render token icons consistently
  • keep scope tight to swap/limit presentation and existing AssetIcon patterns

Test plan

  • bun run lint
  • bun run type-check
  • bun test

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Token icons now appear alongside asset symbols across limit order lists, transaction cards, swap/initiate flows, and summary views for clearer visual identification of buy/sell assets.
    • Backend outputs now include optional asset icon data so UI can consistently render token images where available.

Review Change Stack

Bring back token icon rendering in swap and limit order cards by reusing existing AssetIcon patterns and plumbing icon metadata through limit order outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shapeshift-agentic Ready Ready Preview, Comment May 20, 2026 10:03pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 276ab54b-a27f-4aca-86b6-32314af44ec8

📥 Commits

Reviewing files that changed from the base of the PR and between 9b9cf1d and 1f455b3.

📒 Files selected for processing (1)
  • apps/agentic-chat/src/components/ui/TxStepCard.tsx

📝 Walkthrough

Walkthrough

Token icon display support is added across the agentic platform. Server-side tools now populate optional icon metadata in order and swap data structures. Client-side components receive and render these icons alongside existing token symbols throughout limit order and swap UIs.

Changes

Token Icon Display Support

Layer / File(s) Summary
Data Shape Extensions & Population
apps/agentic-server/src/tools/limitOrder/createLimitOrder.ts, apps/agentic-server/src/tools/limitOrder/getLimitOrders.ts
LimitOrderSummary and OrderInfo now include optional icon fields for sell/buy assets; resolveTokenMetadata returns icon?: string and creation/listing logic populates sellAsset.icon / buyAsset.icon and sellTokenIcon / buyTokenIcon.
Core Icon Rendering
apps/agentic-chat/src/components/ui/TxStepCard.tsx
TxStepCard.SwapPair adds optional fromIcon and toIcon props and renders AssetIcon for each token alongside symbols.
Feature Component Integration
apps/agentic-chat/src/components/tools/GetLimitOrdersUI.tsx, apps/agentic-chat/src/components/tools/LimitOrderUI.tsx, apps/agentic-chat/src/components/tools/InitiateSwapUI.tsx, apps/agentic-chat/src/components/tools/GetTransactionHistoryUI.tsx
Tool UIs now accept icon fields and pass them as fromIcon/toIcon to TxStepCard.SwapPair or as sellTokenIcon/buyTokenIcon to OrderListItem.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Icons now dance beside each swap,
From limit orders to transaction taps,
Token emblems grace the UI so bright,
Seven files coordinated in delight!
A rabbit's hop through data and display. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'SS-5657: Bring back asset icons in swaps and limits' directly and clearly summarizes the main change: restoring asset icons in swap and limit order UI components.
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 ss-5657-asset-icons

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@apps/agentic-chat/src/components/ui/TxStepCard.tsx`:
- Around line 154-168: The JSX currently renders both AssetIcon and a separate
<span> for the symbol (fromSymbol/toSymbol) causing duplicate text when
AssetIcon falls back to rendering the first character; remove the explicit
symbol spans in the TxStepCard render (the two occurrences that show
{fromSymbol} and {toSymbol}) and rely on AssetIcon's fallback text for
identification, or alternatively update AssetIcon if you want a separate label
(but do not keep both). Ensure you keep the surrounding layout (the div groups
and ChevronRight) and only delete the two span elements that render the full
symbol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d569057e-2a08-4fef-9de0-67a737cef361

📥 Commits

Reviewing files that changed from the base of the PR and between 113fed0 and 9b9cf1d.

📒 Files selected for processing (7)
  • apps/agentic-chat/src/components/tools/GetLimitOrdersUI.tsx
  • apps/agentic-chat/src/components/tools/GetTransactionHistoryUI.tsx
  • apps/agentic-chat/src/components/tools/InitiateSwapUI.tsx
  • apps/agentic-chat/src/components/tools/LimitOrderUI.tsx
  • apps/agentic-chat/src/components/ui/TxStepCard.tsx
  • apps/agentic-server/src/tools/limitOrder/createLimitOrder.ts
  • apps/agentic-server/src/tools/limitOrder/getLimitOrders.ts

Comment thread apps/agentic-chat/src/components/ui/TxStepCard.tsx
AssetIcon already renders the symbol initial as fallback text, so the
explicit symbol spans caused duplicate identification.

Built with Claude
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