SS-5657: Bring back asset icons in swaps and limits#251
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughToken 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. ChangesToken Icon Display Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
apps/agentic-chat/src/components/tools/GetLimitOrdersUI.tsxapps/agentic-chat/src/components/tools/GetTransactionHistoryUI.tsxapps/agentic-chat/src/components/tools/InitiateSwapUI.tsxapps/agentic-chat/src/components/tools/LimitOrderUI.tsxapps/agentic-chat/src/components/ui/TxStepCard.tsxapps/agentic-server/src/tools/limitOrder/createLimitOrder.tsapps/agentic-server/src/tools/limitOrder/getLimitOrders.ts
AssetIcon already renders the symbol initial as fallback text, so the explicit symbol spans caused duplicate identification. Built with Claude
Summary
AssetIconpatternsTest plan
Made with Cursor
Summary by CodeRabbit