From 3f41353d4c88a4965c036ac7d1f120a1ae65e203 Mon Sep 17 00:00:00 2001 From: Montana Wong Date: Thu, 23 Jul 2026 12:59:13 -0400 Subject: [PATCH] fix(vibenet): fix mobile overflow in account demo Long hex addresses/hashes overflowed their cards on narrow screens: - account hero address: the copy button was w-fit, so it sized to the full address and defeated the code's truncate. Make it min-w-0/max-w-full so truncate engages; label shrink-0. - tx ResultPanel (explorer/basescan + raw-tx rows): flex-wrap + break-all so the hash + label wrap instead of overflowing. - ConfigView config-tx 'landed' row and AppsView spending-account copy button: same treatment (wrap/break/shrink-0) for consistency. typecheck/lint/build pass. --- app/vibenet/demos/account/AccountDemo.tsx | 12 ++++++------ app/vibenet/demos/account/components/AppsView.tsx | 6 +++--- app/vibenet/demos/account/components/ConfigView.tsx | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/vibenet/demos/account/AccountDemo.tsx b/app/vibenet/demos/account/AccountDemo.tsx index 0618680..00175f4 100644 --- a/app/vibenet/demos/account/AccountDemo.tsx +++ b/app/vibenet/demos/account/AccountDemo.tsx @@ -3718,10 +3718,10 @@ function ResultPanel({ result, chain, copied, copy }: ResultPanelProps) { href={native ? `${VIBENET_EXPLORER_PATH}/tx/${result.txHash}` : basescanTx(result.txHash)} target={native ? undefined : '_blank'} rel="noopener" - className="flex items-center gap-2 font-mono text-[13px] text-base-blue hover:underline dark:text-bds-blue-20" + className="flex flex-wrap items-center gap-2 font-mono text-[13px] text-base-blue hover:underline dark:text-bds-blue-20" > - {short(result.txHash, 16, 12)} - + {short(result.txHash, 16, 12)} + {native ? 'Explorer ↗' : 'Basescan ↗'} @@ -3729,10 +3729,10 @@ function ResultPanel({ result, chain, copied, copy }: ResultPanelProps) { diff --git a/app/vibenet/demos/account/components/AppsView.tsx b/app/vibenet/demos/account/components/AppsView.tsx index 87c8bc2..ac1b609 100644 --- a/app/vibenet/demos/account/components/AppsView.tsx +++ b/app/vibenet/demos/account/components/AppsView.tsx @@ -173,12 +173,12 @@ function SpendingAccountLive({ type="button" onClick={() => copy(sub.address, 'vault')} title="Copy account address" - className="flex w-fit items-center gap-2 text-left" + className="flex min-w-0 max-w-full items-center gap-2 text-left" > - + {short(sub.address)} - + {copied === 'vault' ? 'copied!' : 'tap to copy'} diff --git a/app/vibenet/demos/account/components/ConfigView.tsx b/app/vibenet/demos/account/components/ConfigView.tsx index 7e6a4bb..9bd9e81 100644 --- a/app/vibenet/demos/account/components/ConfigView.tsx +++ b/app/vibenet/demos/account/components/ConfigView.tsx @@ -148,12 +148,12 @@ export function ConfigView(p: ConfigViewProps) { type="button" onClick={() => p.copy(acct.address, 'cfg')} title="Copy address" - className="flex w-fit items-center gap-2 text-left" + className="flex min-w-0 max-w-full items-center gap-2 text-left" > - + {acct.address} - + {p.copied === 'cfg' ? 'Copied' : 'copy'} @@ -467,10 +467,10 @@ function OwnersTab({ p }: { p: ConfigViewProps }) { {p.configTx && TX_HASH_RE.test(p.configTx.hash) ? ( ✓ {p.configTx.label} landed - {short(p.configTx.hash, 14, 12)} + {short(p.configTx.hash, 14, 12)} ) : null}