Repository navigation
fix(fe): words for a cross-chain quote step, and Builder pinch follow-ups - #282
Conversation
The engine's crosschain_quote (#278) had no words in the FE, so its step row fell back to "Using a tool". It now reads "Getting a cross-chain quote", then "Got a cross-chain quote" with what would arrive where ("9.97 USDC on Base"), adding "signed by NEAR Intents" only when the engine checked the quote's signature. Tests: typecheck, eslint, vitest 276/276 (new expectations in chat-steps for a signed and an unsigned quote). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Any new press, a mouse one too, forgets the last pinch, so a click on empty canvas after a pinch closes the settings again. - A pinch starts from the view on screen, not where an easing zoom was heading, so it no longer jumps once. - The second finger and the pinch's moves stop at the canvas, so they don't reach the card under them. - A finger lifted outside the canvas is still let go (pointerup on the window), so no stale touch starts a pinch later. Tests: typecheck, eslint, vitest 276/276. Not checked on a phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"9.97 USDC on Base, signed by NEAR Intents" was cut off on a phone's line (about 343 px). The step now reads "Got a cross-chain quote 9.97 USDC on Base"; the Mind states the quote's proof in its reply (#278), and the opened step still shows it. Tests: typecheck, vitest tests/chat-steps.test.ts 16/16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@AncungAulia thanks, both parts look right. Tests:
One change before merge, the chain name. Checked in Chrome on a local stack with a real 1Click quote, the step reads "Got a cross-chain quote 49.984601 USDC on Arb". const CHAIN_NAMES: Record<string, string> = {
eth: "Ethereum", arb: "Arbitrum", base: "Base", sol: "Solana", pol: "Polygon", bsc: "BNB Chain", op: "Optimism",
avax: "Avalanche", tron: "Tron", ton: "TON", sui: "Sui", aptos: "Aptos", stellar: "Stellar", gnosis: "Gnosis",
scroll: "Scroll", monad: "Monad", xlayer: "X Layer", hypercore: "Hyperliquid",
}Fall back to the id itself for anything not listed. Maybe also trim the amount to a few decimals (49.984601 → 49.98), as the Mind's reply does. After that I'll merge. |
|
@AncungAulia reminder for this one: the step still reads "… on Arb". The chain id → name map from my comment above (Arbitrum, Solana, BNB Chain, …) and a few decimals on the amount, then I'll merge. |
Axel checked #282 with a real 1Click quote: the step read "49.984601 USDC on Arb", since to.chain is 1Click's chain id. Ids now map to names (Arbitrum, Solana, BNB Chain, …; CHAIN_NAMES, from Axel's list), an unknown id shows as it is, and the amount is cut, never rounded up, to two decimals (shortAmount: 49.984601 -> 49.98, 0.004512 -> 0.0045): "49.98 USDC on Arbitrum". Tests: typecheck, eslint, vitest tests/chat-steps.test.ts 16/16 (new expectations for chain names and amounts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Lexirieru Done in
Tests: typecheck, eslint, 🤖 Generated with Claude Code |
|
Merged with Axel's approval; |
|
Live on the hosted demo:
|
@Lexirieru Two small FE follow-ups: words for the new cross-chain quote (#278), and your four notes on the Builder pinch (#274).
Cross-chain quote step (#273, #278)
crosschain_quotehad no words in the FE, so its step row read "Using a tool".runs/data/tools.ts,runs/data/steps.ts). Its live view bubble is "Cross-chain quote".proof.Builder pinch, your notes on #274 (
useCanvasView.ts)stopPropagation), so they don't reach the card under them.pointerup/pointercancellistener on the window.current), not where an easing zoom was heading (target), so it no longer jumps once.apps/fe/CLAUDE.mdupdated for both.Tests (local, on
main8579686)bun run typecheck, eslint on the changed files: pass.bun run test: 276/276 (new expectations inchat-stepsfor the quote line).next build(CI runs it), and integration and load tests (the FE has none).🤖 Generated with Claude Code