-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
When doing multiple swaps in one message (e.g. "badger and req sell for usdc"), the UI renders artifact/duplicate quote boxes. Swaps execute serially (correct) but all cards render simultaneously, and failed cards stay fully expanded.
tk ticket: sa-lgqo
Repro: Request 2+ swaps in one message. Observe redundant quote boxes.
Root Cause (3 factors)
- Simultaneous card rendering with serial execution — Both
InitiateSwapUImount at once but execution is serialized viawithWalletLock. Second card shows full quote but stepper is stuck waiting. - Failed swaps leave full cards visible — No collapsed/minimized state for completed or failed swaps.
- LLM retries in multi-step loop — With
stepCountIs(5), LLM may retry failed swaps, producing a third card.
Proposed Fix
Option C (minimal): Auto-collapse completed/failed swap cards to single-line summary so only active swap shows full detail.
Key Files
apps/agentic-chat/src/components/tools/InitiateSwapUI.tsx— needs collapsed stateapps/agentic-chat/src/components/tools/useSwapExecution.tsxapps/agentic-chat/src/lib/walletMutex.ts— serializes ops but UI unawareapps/agentic-chat/src/components/AssistantMessage.tsx— renders tool parts independently
Acceptance Criteria
- Multi-swap doesn't show redundant artifact quote boxes
- Each swap shows appropriate visual state (pending/active/complete/failed)
- Failed swaps visually de-emphasized when others still executing
- Single-swap behavior unchanged
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog