fix(basius): [OPE-1816] Aerodrome branding + msUSD token logo#114
Conversation
Basius runs on Base, where the agent reports its Velodrome-fork DEX as
`velodrome`. Normalize that to `aerodrome` for display so the Operating
protocols icon, Pool column logo, and Details text read "Aerodrome".
Also rename msUSD.png -> msusd.png: token logos are resolved lowercased
(`/logos/tokens/${asset.toLowerCase()}.png`), so the uppercase file 404'd
on the case-sensitive Linux-served agent, rendering a gray fallback.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📦 Bundle sizes
Compared against the latest successful |
ReviewVerified each item against the branch. ✅ Correctly fixed
Designer's 3 logos — all present and wired:
Token logos are resolved dynamically by symbol, so they render whenever the backend returns those assets. ❌ One place the fix was missedThe chat "Operating protocols updated:" message is NOT normalized.
Result: with live data the chat still shows the Velodrome logo + "Velodrome" text — the same bug this PR fixes elsewhere. It only looks fixed because Fix: normalize
|
…pers Address review on #114: - OperatingProtocols (SystemChat) rendered PROTOCOLS_MAP[protocol] from the raw backend value, so live Basius data still showed Velodrome in the chat (masked in mock mode by mockChat.ts hardcoding aerodrome). Apply normalizeProtocol like the Strategy card / Allocation table. - Add unit tests for normalizeProtocol/normalizeDetails (basius, modius, optimus branches) restoring agentMap.ts to 100% coverage, plus a regression spec for the chat message wiring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the review in cd69d9a: ❌ Chat message fix —
Verified locally: |
bennyjo
left a comment
There was a problem hiding this comment.
Verified all PROTOCOLS_MAP render sites are normalized for basius, aerodrome exists in the type union and map, and the env-driven test branches are genuinely exercised. One non-blocking note: git history shows msusd.png is a new file, not a rename — msUSD.png never existed on any branch here — so the ticket's root cause is likely a missing file rather than case sensitivity. Fix is correct either way.
What & why
Fixes three cosmetic issues in the Basius agent UI (Base network). All are display-only and gated on
agentType === 'basius', so Modius (Mode) and Optimus (Optimism) are untouched.1–2. Aerodrome branding (Operating protocols icon + Pool column logo + chat message)
Aerodrome is a Velodrome fork sharing the same contract ABIs, so the agent backend (
liquidity_trader_abci) reports its DEX asvelodrome— there is noaerodromeDexType. That string does double duty: contract routing and UI label, so renaming it backend-side would ripple through ~10dex_type == "velodrome"routing checks. Since Basius runs only on Base (Base == Aerodrome), we normalize the protocol for display instead.normalizeProtocol()inutils/agentMap.tsmapsvelodrome → aerodromefor Basius.Strategy.tsx(Operating protocols),AllocationTable.tsx(Pool column), andSystemChat.tsx(chat "Operating protocols updated:" message — caught in review; mock data had masked it). Theaerodromeentry +aerodrome.pngalready existed inPROTOCOLS_MAP/public/logos/protocols/.3. "Details" text: "Velodrome pool" → "Aerodrome pool"
The Details column renders
allocation.details, a raw backend string, not aPROTOCOLS_MAPlookup. New helpernormalizeDetails()relabelsvelodrome → Aerodromein that string for Basius.4. msUSD token logo not loading (gray circle)
Token logos resolve lowercased:
`/logos/tokens/${asset.toLowerCase()}.png`. The file was committed asmsUSD.png; it 404'd on the case-sensitive Linux-served agent (worked locally on case-insensitive Windows). Renamed →msusd.png.Files
apps/babydegen-ui/src/utils/agentMap.ts—normalizeProtocol(),normalizeDetails()apps/babydegen-ui/src/components/Strategy/Strategy.tsxapps/babydegen-ui/src/components/Allocation/AllocationTable.tsxapps/babydegen-ui/src/components/Chat/SystemChat.tsxapps/babydegen-ui/public/logos/tokens/msusd.png(renamed frommsUSD.png)apps/babydegen-ui/__tests__/utils/agentMap.spec.ts— branch coverage for both new helpers (basius / modius / optimus)apps/babydegen-ui/__tests__/components/Chat/SystemChat.basius.spec.tsx— regression spec: backend-reportedvelodromerenders as Aerodrome in the chat messageTesting
nx test babydegen-ui --coverage— 27 suites / 132 tests pass;agentMap.tsat 100% lines/branches/functions/statementsnx lint babydegen-ui— cleanREACT_APP_AGENT_NAME=basius; confirm Operating protocols + Pool logos show Aerodrome, Details reads "Aerodrome pool", chat protocols message shows Aerodrome, msUSD icon loads.REACT_APP_AGENT_NAME=modius; confirm Velodrome branding unchanged.Downstream
Once this is released as a new
vX.Y-basiustag and theoptimusagent is repackaged with the new UI bundle,olas-operate-appneeds matching bumps (Basius servicehash/service_version/agent_release.versioninservice/babydegen.ts+AGENT_UI_RELEASESinagentUiReleases.ts). Tracking PR: valory-xyz/olas-operate-app#2063.🤖 Generated with Claude Code