feat: add export private key from address detail view #31

Merged
sneak merged 12 commits from feat/export-private-key into main 2026-02-28 21:10:17 +01:00
Collaborator

Adds an "Export Private Key" button to the address detail view. Clicking it opens a password confirmation screen; after verification, the derived private key is displayed in a copyable field with a security warning. The key is cleared when navigating away.

Closes #19

make check output

  • 14 tests passed
  • Prettier clean
Adds an "Export Private Key" button to the address detail view. Clicking it opens a password confirmation screen; after verification, the derived private key is displayed in a copyable field with a security warning. The key is cleared when navigating away. Closes #19 ## make check output - 14 tests passed - Prettier clean
clawbot added 1 commit 2026-02-28 10:19:45 +01:00
feat: add export private key from address detail view
All checks were successful
check / check (push) Successful in 22s
ca78da2e07
Adds an 'Export Private Key' button to the address detail view.
Clicking it opens a password confirmation screen; after verification,
the derived private key is displayed in a copyable field with a
security warning. The key is cleared when navigating away.

Closes #19
sneak was assigned by clawbot 2026-02-28 10:19:49 +01:00
Owner

the "export private key" box is too prominent, it's nowhere near frequent/important enough to occupy that position on screen. additionally when clicking it i get a blank/empty export-privkey view.

the "export private key" box is too prominent, it's nowhere near frequent/important enough to occupy that position on screen. additionally when clicking it i get a blank/empty `export-privkey` view.
sneak removed their assignment 2026-02-28 10:36:00 +01:00
clawbot was assigned by sneak 2026-02-28 10:36:00 +01:00
clawbot closed this pull request 2026-02-28 10:36:24 +01:00
Author
Collaborator

Closing as duplicate — complete implementation is in #32.

Closing as duplicate — complete implementation is in #32.
Author
Collaborator

Fixed both issues in 41794f8:

  1. Blank view: export-privkey was missing from the VIEWS array in helpers.js. showView() hides all known views but only unhides the one in the list — since export-privkey wasn't listed, it stayed hidden. Added it.

  2. Too prominent: Moved from a full-width bordered button in "actions row 2" to a small muted text link (text-xs text-muted underline decoration-dashed) at the very bottom of the address detail view, below the transaction list.

make check passes.

Fixed both issues in `41794f8`: 1. **Blank view**: `export-privkey` was missing from the `VIEWS` array in `helpers.js`. `showView()` hides all known views but only unhides the one in the list — since `export-privkey` wasn't listed, it stayed hidden. Added it. 2. **Too prominent**: Moved from a full-width bordered button in "actions row 2" to a small muted text link (`text-xs text-muted underline decoration-dashed`) at the very bottom of the address detail view, below the transaction list. `make check` passes.
clawbot removed their assignment 2026-02-28 10:38:01 +01:00
sneak was assigned by clawbot 2026-02-28 10:38:01 +01:00
sneak reopened this pull request 2026-02-28 13:07:31 +01:00
Owner

@clawbot why are you doing work on a closed PR? if you do work on this PR, you should close the other, and open this one. if this one is closed, you shouldn't do work on it. read the comment history before working. this one has my feedback on it and your rework, so i'm reopening this one and closing the other, but remember in the future (checklist-pr or checklist-git or whatever you use) to reopen a PR if you're going to work on it, and to make sure there aren't two open ones at the same time for the same issue.

@clawbot why are you doing work on a closed PR? if you do work on this PR, you should close the other, and open this one. if this one is closed, you shouldn't do work on it. read the comment history before working. this one has my feedback on it and your rework, so i'm reopening this one and closing the other, but remember in the future (checklist-pr or checklist-git or whatever you use) to reopen a PR if you're going to work on it, and to make sure there aren't two open ones at the same time for the same issue.
sneak removed their assignment 2026-02-28 13:11:19 +01:00
clawbot was assigned by sneak 2026-02-28 13:11:20 +01:00
Author
Collaborator

Acknowledged — rule added to my PR checklist: if doing rework on a closed PR, reopen it first; never have two open PRs for the same issue.

Reviewed the diff and ran make check (14 tests pass, prettier clean). Code looks solid:

  • Export button is a subtle muted text link at the bottom of address detail ✓
  • Password confirmation before revealing key ✓
  • Key cleared on back navigation ✓
  • export-privkey view registered in VIEWS array ✓
  • Mergeable, rebased on main ✓

Ready for merge.

Acknowledged — rule added to my PR checklist: if doing rework on a closed PR, reopen it first; never have two open PRs for the same issue. Reviewed the diff and ran `make check` (14 tests pass, prettier clean). Code looks solid: - Export button is a subtle muted text link at the bottom of address detail ✓ - Password confirmation before revealing key ✓ - Key cleared on back navigation ✓ - `export-privkey` view registered in VIEWS array ✓ - Mergeable, rebased on main ✓ Ready for merge.
clawbot removed their assignment 2026-02-28 13:12:41 +01:00
sneak was assigned by clawbot 2026-02-28 13:12:41 +01:00
Owner

that's a bad place for the export link, too. also a muted piece of text violates our UI policy in README.md. propose (do not implement) a few other options for where this action button can live.

that's a bad place for the export link, too. also a muted piece of text violates our UI policy in `README.md`. propose (do not implement) a few other options for where this action button can live.
sneak removed their assignment 2026-02-28 13:20:01 +01:00
clawbot was assigned by sneak 2026-02-28 13:20:02 +01:00
Author
Collaborator

You're right — text-muted violates the clickable affordance policy ("If it does something when you click it, it must look like it does something"). Here are a few placement options:

  1. Settings screen — Add an "Export Private Key" action in Settings under a per-wallet or per-address section. Keeps it out of the daily-use flow entirely. Downside: requires navigating away from the address context.

  2. AddressDetail action row — Add it as a normal bordered button alongside Send/Receive/+Token, but smaller (text-xs with standard border+hover). It's discoverable but doesn't dominate since it's visually smaller than the primary actions.

  3. Context menu or overflow — Add a "···" or "More" button on AddressDetail that reveals secondary actions (export key, rename, remove). Keeps the main view clean while making it discoverable. Matches the "flat navigation" pattern already used.

  4. Long-press or double-click on the address itself — Conceptually elegant but violates discoverability (hidden gesture).

My recommendation: option 3 — it scales to future secondary actions and keeps AddressDetail focused on the primary workflow. Option 2 is simpler if you want to avoid adding a new UI pattern.

You're right — `text-muted` violates the clickable affordance policy ("If it does something when you click it, it must look like it does something"). Here are a few placement options: 1. **Settings screen** — Add an "Export Private Key" action in Settings under a per-wallet or per-address section. Keeps it out of the daily-use flow entirely. Downside: requires navigating away from the address context. 2. **AddressDetail action row** — Add it as a normal bordered button alongside Send/Receive/+Token, but smaller (`text-xs` with standard border+hover). It's discoverable but doesn't dominate since it's visually smaller than the primary actions. 3. **Context menu or overflow** — Add a "···" or "More" button on AddressDetail that reveals secondary actions (export key, rename, remove). Keeps the main view clean while making it discoverable. Matches the "flat navigation" pattern already used. 4. **Long-press or double-click on the address itself** — Conceptually elegant but violates discoverability (hidden gesture). My recommendation: **option 3** — it scales to future secondary actions and keeps AddressDetail focused on the primary workflow. Option 2 is simpler if you want to avoid adding a new UI pattern.
clawbot removed their assignment 2026-02-28 13:20:37 +01:00
sneak was assigned by clawbot 2026-02-28 13:20:37 +01:00
Owner

@clawbot yeah i like 3. update the PR please.

@clawbot yeah i like 3. update the PR please.
Owner

@clawbot please perform this task

@clawbot please perform this task
clawbot added 1 commit 2026-02-28 13:27:59 +01:00
refactor: move Export Private Key into overflow menu
Some checks are pending
check / check (push) Waiting to run
91c3b4e394
Replace the muted text link at the bottom of AddressDetail with a
'···' overflow/more button in the action button row. Clicking it
opens a dropdown with 'Export Private Key' as an option. Clicking
outside closes the dropdown. The pattern is reusable for future
secondary actions.
Author
Collaborator

Reworked the Export Private Key trigger per feedback:

  • Removed the muted text link from the bottom of AddressDetail
  • Added a ··· overflow button at the end of the action button row (Send / Receive / + Token / ···)
  • Clicking ··· opens a dropdown with "Export Private Key" as an option
  • Click outside to dismiss; dropdown pattern is reusable for future secondary actions
  • All existing export-privkey view logic unchanged — only the trigger moved
  • make check passes (tests + lint + fmt)
Reworked the Export Private Key trigger per feedback: - Removed the muted text link from the bottom of AddressDetail - Added a `···` overflow button at the end of the action button row (Send / Receive / + Token / ···) - Clicking `···` opens a dropdown with "Export Private Key" as an option - Click outside to dismiss; dropdown pattern is reusable for future secondary actions - All existing export-privkey view logic unchanged — only the trigger moved - `make check` passes (tests + lint + fmt)
Owner

@clawbot looking good, but the popup menu under the ... isn't wide enough, "export private key" wraps. it should be wide enough to not wrap any items in it.

@clawbot looking good, but the popup menu under the ... isn't wide enough, "export private key" wraps. it should be wide enough to not wrap any items in it.
clawbot added 1 commit 2026-02-28 13:39:49 +01:00
fix: make overflow menu auto-width to prevent text wrapping
All checks were successful
check / check (push) Successful in 22s
68bd909345
Author
Collaborator

Fixed — changed dropdown from min-w-[10rem] to whitespace-nowrap so menu items never wrap regardless of text length. make check passes (14 tests, prettier clean).

Fixed — changed dropdown from `min-w-[10rem]` to `whitespace-nowrap` so menu items never wrap regardless of text length. `make check` passes (14 tests, prettier clean).
Owner

We're getting warmer. The dropdown menu from the "..." button is improving, but the thing that drops down just looks like a badly placed button. I'd like it to drop down a list-like menu, with each menu item going slightly grey on mouseover. a small margin after the last item shows that it's a list, even if there's only one item. what do you think?

We're getting warmer. The dropdown menu from the "..." button is improving, but the thing that drops down just looks like a badly placed button. I'd like it to drop down a list-like menu, with each menu item going slightly grey on mouseover. a small margin after the last item shows that it's a list, even if there's only one item. what do you think?
sneak removed their assignment 2026-02-28 17:28:06 +01:00
clawbot was assigned by sneak 2026-02-28 17:28:07 +01:00
clawbot added 1 commit 2026-02-28 17:29:15 +01:00
style: dropdown menu with subtle grey hover and list padding
All checks were successful
check / check (push) Successful in 22s
70a8ac6f99
Use bg-hover token for grey mouseover instead of full fg/bg
inversion. Add py-1 padding to dropdown container and px-4 to
items for proper list appearance with margin around items.
Author
Collaborator

Updated the dropdown: subtle grey hover (bg-hover token = #eeeeee) instead of full fg/bg inversion, py-1 padding on the container and px-4 on items so it reads as a proper list with margin even with a single item. make check passes.

Updated the dropdown: subtle grey hover (`bg-hover` token = `#eeeeee`) instead of full fg/bg inversion, `py-1` padding on the container and `px-4` on items so it reads as a proper list with margin even with a single item. `make check` passes.
clawbot removed their assignment 2026-02-28 17:29:22 +01:00
sneak was assigned by clawbot 2026-02-28 17:29:22 +01:00
Owner

The items in the menu list should be slightly smaller type and weight than the text on the pushbuttons, and the menu "..." button should stay inverted while the menu is open, to make it clear it's a toggleable open/closed thing. The menu items should not look like buttons, and vice versa.

The items in the menu list should be slightly smaller type and weight than the text on the pushbuttons, and the menu "..." button should stay inverted while the menu is open, to make it clear it's a toggleable open/closed thing. The menu items should not look like buttons, and vice versa.
sneak removed their assignment 2026-02-28 17:34:41 +01:00
clawbot was assigned by sneak 2026-02-28 17:34:42 +01:00
clawbot added 1 commit 2026-02-28 17:40:00 +01:00
style: rework overflow menu to look like menu items, not buttons
All checks were successful
check / check (push) Successful in 21s
3daba279d2
- Menu items now use text-xs font-light for smaller, lighter type
  that's clearly distinct from the pushbuttons in the action row
- The ··· button stays visually inverted (bg-fg text-bg) while the
  dropdown menu is open, reverting when closed
- Menu items styled as plain text rows with subtle hover background,
  no borders or button-like appearance
Author
Collaborator

Pushed overflow menu styling fixes (3daba27):

  1. Menu items use smaller, lighter type — changed from text-sm to text-xs font-light text-muted, clearly distinct from the pushbuttons which remain bold with borders.

  2. ··· button stays visually inverted while menu is open — toggles bg-fg text-bg classes when dropdown opens, reverts on close (click-away or menu item selection).

  3. Menu items no longer look like buttons — plain text rows with subtle hover background (hover:bg-hover), no borders or button-like styling. Pushbuttons in the action row remain visually distinct.

make check passes with zero failures.

Pushed overflow menu styling fixes (3daba27): 1. **Menu items use smaller, lighter type** — changed from `text-sm` to `text-xs font-light text-muted`, clearly distinct from the pushbuttons which remain bold with borders. 2. **··· button stays visually inverted while menu is open** — toggles `bg-fg text-bg` classes when dropdown opens, reverts on close (click-away or menu item selection). 3. **Menu items no longer look like buttons** — plain text rows with subtle hover background (`hover:bg-hover`), no borders or button-like styling. Pushbuttons in the action row remain visually distinct. `make check` passes with zero failures.
Owner

@clawbot

on view export-privkey you are violating our consistency guidelines on address display. please fix

@clawbot on view `export-privkey` you are violating our consistency guidelines on address display. please fix
sneak added 1 commit 2026-02-28 18:08:35 +01:00
Merge branch 'main' into feat/export-private-key
All checks were successful
check / check (push) Successful in 22s
676109860a
sneak added 1 commit 2026-02-28 20:31:52 +01:00
Merge branch 'main' into feat/export-private-key
All checks were successful
check / check (push) Successful in 22s
16f9e98b25
Owner

@clawbot work to be done

@clawbot work to be done
clawbot added 1 commit 2026-02-28 20:41:32 +01:00
fix: export-privkey view address display consistency
All checks were successful
check / check (push) Successful in 22s
d3d9f9a8b0
Add blockie identicon, wallet/address title, and color dot with full
address display to the export-privkey view, matching the pattern used
by AddressDetail and other views. Address is click-to-copy.
Author
Collaborator

Fixed address display consistency on the export-privkey view (d3d9f9a):

  • Added blockie identicon (48px, centered) matching AddressDetail/AddressToken views
  • Added wallet name + address number title
  • Added color dot + full address with click-to-copy
  • Removed the plain "Exporting key for:" text label

docker build . passes.

Fixed address display consistency on the `export-privkey` view (d3d9f9a): - Added blockie identicon (48px, centered) matching AddressDetail/AddressToken views - Added wallet name + address number title - Added color dot + full address with click-to-copy - Removed the plain "Exporting key for:" text label `docker build .` passes.
clawbot added the
needs-review
label 2026-02-28 20:41:45 +01:00
sneak added 1 commit 2026-02-28 20:44:22 +01:00
Merge branch 'main' into feat/export-private-key
All checks were successful
check / check (push) Successful in 22s
72a4dd3382
Owner

it's good but the "click to copy" text instruction is stupid. make it look like every other bit of click-to-copy text we have. also, what's with the dashed border? i think it should be in a light red well, with rounded corners, and be styled just like all of the other click-to-copy things like addresses.

it's good but the "click to copy" text instruction is stupid. make it look like every other bit of click-to-copy text we have. also, what's with the dashed border? i think it should be in a light red well, with rounded corners, and be styled just like all of the other click-to-copy things like addresses.
Author
Collaborator

Review — issues found

docker build . passes. The feature works correctly (password verification, key derivation, copy-to-clipboard, cleanup on nav away). However, sneak's latest feedback is not yet addressed:

  1. Dashed border on private key display: export-privkey-value uses border-dashed border-border — should be a light red well with rounded corners, styled like other click-to-copy elements (addresses, etc.).

  2. "Click to copy." text instruction: The explicit <p>Click to copy.</p> below the key should be removed. The element should look clickable on its own per the clickable affordance policy in README.md.

Setting needs-rework.

**Review — issues found** `docker build .` passes. The feature works correctly (password verification, key derivation, copy-to-clipboard, cleanup on nav away). However, sneak's latest feedback is not yet addressed: 1. **Dashed border on private key display**: `export-privkey-value` uses `border-dashed border-border` — should be a light red well with rounded corners, styled like other click-to-copy elements (addresses, etc.). 2. **"Click to copy." text instruction**: The explicit `<p>Click to copy.</p>` below the key should be removed. The element should look clickable on its own per the clickable affordance policy in README.md. Setting `needs-rework`.
clawbot added
needs-rework
and removed
needs-review
labels 2026-02-28 20:50:33 +01:00
clawbot added 1 commit 2026-02-28 20:54:22 +01:00
fix: style private key as red well, remove explicit copy text
All checks were successful
check / check (push) Successful in 22s
0c1150ac4d
- Replace dashed border with light red well (bg-danger-well) and rounded corners
- Remove redundant 'Click to copy.' paragraph
- Add --color-danger-well theme token
clawbot added
needs-review
and removed
needs-rework
labels 2026-02-28 20:54:44 +01:00
Author
Collaborator

Reworked private key display styling (0c1150a):

  1. Removed dashed border — replaced with a light red well (bg-danger-well / #fef2f2) with rounded corners, making it visually distinct as a sensitive value.
  2. Removed explicit "Click to copy." text — the element now uses cursor-pointer + title="Click to copy" like all other copyable elements in the extension.
  3. Added --color-danger-well theme token for reuse.

docker build . passes.

Reworked private key display styling (0c1150a): 1. **Removed dashed border** — replaced with a light red well (`bg-danger-well` / `#fef2f2`) with rounded corners, making it visually distinct as a sensitive value. 2. **Removed explicit "Click to copy." text** — the element now uses `cursor-pointer` + `title="Click to copy"` like all other copyable elements in the extension. 3. **Added `--color-danger-well` theme token** for reuse. `docker build .` passes.
Author
Collaborator

Review — clean

docker build . passes. All of sneak's feedback addressed:

  1. Overflow menu (···) with dropdown for secondary actions — reusable pattern
  2. Menu items use smaller/lighter type, distinct from pushbuttons
  3. ··· button stays inverted while menu is open
  4. Dropdown uses whitespace-nowrap — no text wrapping
  5. Subtle grey hover on menu items
  6. Address display consistency (blockie, wallet name, color dot, full address)
  7. Private key in bg-danger-well rounded well (no dashed border)
  8. No explicit "Click to copy" text — uses title attribute like all other copyable elements
  9. Password required every time, key+password cleared on back navigation
  10. export-privkey registered in VIEWS array

Setting merge-ready.

**Review — clean ✅** `docker build .` passes. All of sneak's feedback addressed: 1. ✅ Overflow menu (···) with dropdown for secondary actions — reusable pattern 2. ✅ Menu items use smaller/lighter type, distinct from pushbuttons 3. ✅ ··· button stays inverted while menu is open 4. ✅ Dropdown uses `whitespace-nowrap` — no text wrapping 5. ✅ Subtle grey hover on menu items 6. ✅ Address display consistency (blockie, wallet name, color dot, full address) 7. ✅ Private key in `bg-danger-well` rounded well (no dashed border) 8. ✅ No explicit "Click to copy" text — uses `title` attribute like all other copyable elements 9. ✅ Password required every time, key+password cleared on back navigation 10. ✅ `export-privkey` registered in VIEWS array Setting `merge-ready`.
clawbot added
merge-ready
and removed
needs-review
labels 2026-02-28 21:02:50 +01:00
clawbot removed their assignment 2026-02-28 21:02:50 +01:00
sneak was assigned by clawbot 2026-02-28 21:02:50 +01:00
sneak added 1 commit 2026-02-28 21:10:07 +01:00
Merge branch 'main' into feat/export-private-key
All checks were successful
check / check (push) Successful in 21s
2bb7fc5786
sneak merged commit 0e68279037 into main 2026-02-28 21:10:17 +01:00
sneak deleted branch feat/export-private-key 2026-02-28 21:10:17 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
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: sneak/AutistMask#31
No description provided.