Wallet chip dropdown: copy address, explorer link, switch wallet #185

Closed
opened 2026-05-25 02:13:25 +00:00 by PlasticDigits · 12 comments
PlasticDigits commented 2026-05-25 02:13:25 +00:00 (Migrated from gitlab.com)

Summary

Complete the connected wallet dropdown standard affordances from #140 (scope B). Native LUNC balance is already on main (WalletLuncBalance); this issue covers the remaining menu items.

Required UX (dropdown)

  • Copy address — one-click full bech32 (uses #183 CopyButton).
  • View on explorer — opens address page (uses explorer-address helper issue).
  • Switch wallet — disconnect current + open connect modal (no full-page flow).
  • Keep existing Trader profile and Disconnect.

Implementation notes

Dependencies

  • #183 CopyButton
  • Explorer address URL helper (sibling issue)

Relates to: #140

cc @totdking @Brouie

## Summary Complete the **connected wallet dropdown** standard affordances from [#140](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/140) (scope **B**). **Native LUNC balance** is already on `main` (`WalletLuncBalance`); this issue covers the remaining menu items. ## Required UX (dropdown) - [ ] **Copy address** — one-click full bech32 (uses [#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183) `CopyButton`). - [ ] **View on explorer** — opens address page (uses explorer-address helper issue). - [ ] **Switch wallet** — disconnect current + open connect modal (no full-page flow). - [ ] Keep existing **Trader profile** and **Disconnect**. ## Implementation notes - Primary file: [`WalletButton.tsx`](frontend-dapp/src/components/wallet/WalletButton.tsx). - Playwright: extend header/wallet E2E when present. - Update [`docs/frontend.md#connected-wallet-chip-lunc-balance`](docs/frontend.md#connected-wallet-chip-lunc-balance) and [`skills/AGENTS_FRONTEND_WALLET_CHIP.md`](skills/AGENTS_FRONTEND_WALLET_CHIP.md). ## Dependencies - [#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183) CopyButton - Explorer address URL helper (sibling issue) **Relates to:** [#140](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/140) cc @totdking @Brouie
PlasticDigits commented 2026-05-25 02:13:26 +00:00 (Migrated from gitlab.com)

marked as related to #140

marked as related to #140
PlasticDigits commented 2026-05-25 02:13:26 +00:00 (Migrated from gitlab.com)

marked as related to #183

marked as related to #183
PlasticDigits commented 2026-05-25 02:14:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #140

mentioned in issue #140
PlasticDigits commented 2026-05-25 02:20:14 +00:00 (Migrated from gitlab.com)

mentioned in issue #184

mentioned in issue #184
PlasticDigits commented 2026-05-25 02:21:17 +00:00 (Migrated from gitlab.com)

mentioned in commit a4d16f7bbf

mentioned in commit a4d16f7bbf30fa3a71db94d76c858b6afc0e64d0
PlasticDigits commented 2026-05-25 02:21:32 +00:00 (Migrated from gitlab.com)

mentioned in issue #183

mentioned in issue #183
PlasticDigits commented 2026-05-25 02:34:04 +00:00 (Migrated from gitlab.com)

mentioned in commit f81f620f6b

mentioned in commit f81f620f6b7d55e63b17df816fd133f8561f49b7
PlasticDigits commented 2026-05-25 02:34:04 +00:00 (Migrated from gitlab.com)

mentioned in commit 9ba65aafef

mentioned in commit 9ba65aafef9e5c30cad0f7e979ca137d35f6400c
PlasticDigits commented 2026-05-25 02:34:21 +00:00 (Migrated from gitlab.com)

Implementation summary (GitLab #185)

Merged to main in commit f81f620.

Completed the connected wallet dropdown affordances from #140 scope B, building on existing AddressRow (#188), Esc/dismiss (#187), and network chip (#186):

  • Copy address — labeled menu row via CopyButton (menuLabel); full bech32 copied to clipboard
  • View on explorer — menu link from getExplorerAddressUrl (hidden when URL is null)
  • Switch wallet — disconnect() then opens connect modal in-place (no full-page navigation)
  • Trader profile and Disconnect unchanged

Code / docs

Area Path
Menu rows frontend-dapp/src/components/wallet/WalletDropdownMenuItems.tsx
Orchestration frontend-dapp/src/components/wallet/WalletButton.tsx
CopyButton menu variant frontend-dapp/src/components/ui/CopyButton.tsx (menuLabel)
Invariants docs/frontend.md § Connected wallet dropdown
Agent playbooks skills/AGENTS_FRONTEND_WALLET_CHIP.md, AGENTS_FRONTEND_COPY_BUTTON.md, AGENTS_FRONTEND_TERRA_EXPLORER.md

Tests run locally

  • Vitest: WalletButton, WalletDropdownMenuItems, CopyButton (14 tests)
  • Playwright: navigation.spec.ts → Wallet Connection (6 tests, REQUIRE_LOCALTERRA=0)

Verification checklist

  • Connect simulated/dev wallet → open header wallet menu
  • Copy address writes full terra1… to clipboard; screen reader announces success
  • View on explorer opens correct Finder/LCD URL for active VITE_NETWORK
  • Switch wallet disconnects and shows Connect Wallet modal without route change
  • Trader profile navigates to /trader/{addr}
  • Disconnect returns to Connect control
  • Escape and backdrop dismiss still close the menu (#187)
  • Desktop chip still shows network short label (#186)

@Brouie — please verify on a local main build when you have a moment. Leaving this issue open until sign-off.

/cc @totdking

## Implementation summary (GitLab #185) Merged to `main` in commit `f81f620`. Completed the connected wallet dropdown affordances from #140 scope **B**, building on existing **AddressRow** (#188), **Esc/dismiss** (#187), and **network chip** (#186): - **Copy address** — labeled menu row via `CopyButton` (`menuLabel`); full bech32 copied to clipboard - **View on explorer** — menu link from `getExplorerAddressUrl` (hidden when URL is null) - **Switch wallet** — `disconnect()` then opens connect modal in-place (no full-page navigation) - **Trader profile** and **Disconnect** unchanged ### Code / docs | Area | Path | |------|------| | Menu rows | `frontend-dapp/src/components/wallet/WalletDropdownMenuItems.tsx` | | Orchestration | `frontend-dapp/src/components/wallet/WalletButton.tsx` | | CopyButton menu variant | `frontend-dapp/src/components/ui/CopyButton.tsx` (`menuLabel`) | | Invariants | [docs/frontend.md § Connected wallet dropdown](docs/frontend.md#connected-wallet-dropdown) | | Agent playbooks | `skills/AGENTS_FRONTEND_WALLET_CHIP.md`, `AGENTS_FRONTEND_COPY_BUTTON.md`, `AGENTS_FRONTEND_TERRA_EXPLORER.md` | ### Tests run locally - Vitest: `WalletButton`, `WalletDropdownMenuItems`, `CopyButton` (14 tests) - Playwright: `navigation.spec.ts` → Wallet Connection (6 tests, `REQUIRE_LOCALTERRA=0`) --- ## Verification checklist - [ ] Connect simulated/dev wallet → open header wallet menu - [ ] **Copy address** writes full `terra1…` to clipboard; screen reader announces success - [ ] **View on explorer** opens correct Finder/LCD URL for active `VITE_NETWORK` - [ ] **Switch wallet** disconnects and shows Connect Wallet modal without route change - [ ] **Trader profile** navigates to `/trader/{addr}` - [ ] **Disconnect** returns to Connect control - [ ] `Escape` and backdrop dismiss still close the menu (#187) - [ ] Desktop chip still shows network short label (#186) @Brouie — please verify on a local `main` build when you have a moment. Leaving this issue **open** until sign-off. /cc @totdking
Brouie commented 2026-05-25 04:05:48 +00:00 (Migrated from gitlab.com)

fully verified per checklist — f81f620 is in main HEAD on QA stack with vite dev server hitting QA LocalTerra via SSH tunnel.

source: wallet dropdown via WalletDropdownMenuItems.tsx orchestrated by WalletButton.tsx. uses CopyButton (#183) menuLabel variant, getExplorerAddressUrl (#184), AddressRow (#188) header. Switch wallet calls disconnect() then opens connect modal in-place.

unit tests:

  • WalletButton.test.tsx 8/8 PASS
  • CopyButton.test.tsx 4/4 PASS
  • AddressRow.test.tsx 4/4 PASS
  • terraExplorer.test.ts 6/8 PASS — mainnet + testnet address URL paths PASS; 2 local-build tests env-fragile (test stubs VITE_NETWORK but does not override VITE_TERRA_LCD_URL, picks up real env value). worth a small followup but does not block.

browser walk on QA stack via local vite + tunnel (all 8 checklist items confirmed):

  1. wallet chip click opens menu with full bech32 address + copy + explorer icons in header + Copy address / View on explorer / Switch wallet / Trader profile / Disconnect rows
  2. Copy address row present with sr-friendly icons
  3. View on explorer opens new tab with correct LCD account URL (cosmos/auth/v1beta1/accounts/{address}) on the active local port
  4. Switch wallet disconnects and opens Connect Wallet modal in-place (no route change), all wallet options listed
  5. Trader profile navigates to /trader/terra17ks3ncgx...vx0wnt
  6. Disconnect returns the header to "Connect Wallet" button
  7. Escape closes the menu
  8. "LOCAL" network short label visible on the connected chip

@PlasticDigits — good to close. terraExplorer.test.ts local-build fragility is a separate followup (stub both VITE_NETWORK and VITE_TERRA_LCD_URL together) but not blocking.

fully verified per checklist — `f81f620` is in main HEAD on QA stack with vite dev server hitting QA LocalTerra via SSH tunnel. source: wallet dropdown via `WalletDropdownMenuItems.tsx` orchestrated by `WalletButton.tsx`. uses `CopyButton` (#183) menuLabel variant, `getExplorerAddressUrl` (#184), `AddressRow` (#188) header. Switch wallet calls `disconnect()` then opens connect modal in-place. unit tests: - `WalletButton.test.tsx` 8/8 PASS - `CopyButton.test.tsx` 4/4 PASS - `AddressRow.test.tsx` 4/4 PASS - `terraExplorer.test.ts` 6/8 PASS — mainnet + testnet address URL paths PASS; 2 local-build tests env-fragile (test stubs VITE_NETWORK but does not override VITE_TERRA_LCD_URL, picks up real env value). worth a small followup but does not block. browser walk on QA stack via local vite + tunnel (all 8 checklist items confirmed): 1. wallet chip click opens menu with full bech32 address + copy + explorer icons in header + Copy address / View on explorer / Switch wallet / Trader profile / Disconnect rows 2. Copy address row present with sr-friendly icons 3. View on explorer opens new tab with correct LCD account URL (`cosmos/auth/v1beta1/accounts/{address}`) on the active local port 4. Switch wallet disconnects and opens Connect Wallet modal in-place (no route change), all wallet options listed 5. Trader profile navigates to `/trader/terra17ks3ncgx...vx0wnt` 6. Disconnect returns the header to "Connect Wallet" button 7. Escape closes the menu 8. "LOCAL" network short label visible on the connected chip @PlasticDigits — good to close. `terraExplorer.test.ts` local-build fragility is a separate followup (stub both VITE_NETWORK and VITE_TERRA_LCD_URL together) but not blocking.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-25 04:09:42 +00:00
PlasticDigits commented 2026-08-26 04:22:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #671

mentioned in issue #671
PlasticDigits commented 2026-08-26 04:22:42 +00:00 (Migrated from gitlab.com)

marked as related to #671

marked as related to #671
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#185
No description provided.