feat: add etherscan link and click-to-copy on block number in success-tx view #102

Merged
sneak merged 3 commits from issue-99-block-number-link into main 2026-03-01 00:23:07 +01:00
Collaborator

Block numbers are blockchain entities like addresses and tx hashes. They now receive the same treatment: click-to-copy and an external link icon pointing to etherscan.io/block/{number}.

Closes #99

Block numbers are blockchain entities like addresses and tx hashes. They now receive the same treatment: click-to-copy and an external link icon pointing to etherscan.io/block/{number}. Closes #99
clawbot added the bot label 2026-02-28 23:09:34 +01:00
clawbot added 1 commit 2026-02-28 23:09:35 +01:00
feat: add etherscan link and click-to-copy on block number in success-tx view
All checks were successful
check / check (push) Successful in 22s
5565e76796
Block numbers are blockchain entities like addresses and tx hashes. They now
receive the same treatment: click-to-copy and an external link icon pointing
to etherscan.io/block/{number}.

Closes #99
clawbot added the needs-review label 2026-02-28 23:09:44 +01:00
Author
Collaborator

PR #102 adds click-to-copy and an Etherscan external link to the block number on the success-tx view, matching the existing treatment of addresses and transaction hashes.

Changes:

  • Added blockNumberHtml() function in txStatus.js (mirrors txHashHtml()) — generates a click-to-copy span with dashed underline + Etherscan block link icon
  • Changed success-tx-block from .textContent to .innerHTML using the new helper

docker build . passes.


Data atom audit (per issue body request):

Data type Views displayed Click-to-copy Etherscan link Consistent?
ETH address home, addressDetail, addressToken, send, confirmTx, txStatus (wait/success/error), transactionDetail, approval, receive everywhere everywhere
TX hash txStatus (wait/success/error), transactionDetail
Block number txStatus (success) (this PR) (this PR) now
Token contract address addressToken, confirmTx, transactionDetail (token link)
ETH/token amounts home (4dp), addressDetail (4dp), transactionDetail (full precision + native unit) in detail N/A
ENS names transactionDetail N/A
Timestamps home, transactionDetail N/A (ISO + relative)
Wallet names home, settings (click to rename) N/A

All blockchain identifiers (addresses, tx hashes, block numbers, contract addresses) now consistently have click-to-copy + Etherscan links. Non-blockchain data (amounts, timestamps, names) are appropriately styled without external links.

PR #102 adds click-to-copy and an Etherscan external link to the block number on the success-tx view, matching the existing treatment of addresses and transaction hashes. **Changes:** - Added `blockNumberHtml()` function in `txStatus.js` (mirrors `txHashHtml()`) — generates a click-to-copy span with dashed underline + Etherscan block link icon - Changed `success-tx-block` from `.textContent` to `.innerHTML` using the new helper `docker build .` passes. --- **Data atom audit** (per issue body request): | Data type | Views displayed | Click-to-copy | Etherscan link | Consistent? | |---|---|---|---|---| | **ETH address** | home, addressDetail, addressToken, send, confirmTx, txStatus (wait/success/error), transactionDetail, approval, receive | ✅ everywhere | ✅ everywhere | ✅ | | **TX hash** | txStatus (wait/success/error), transactionDetail | ✅ | ✅ | ✅ | | **Block number** | txStatus (success) | ✅ (this PR) | ✅ (this PR) | ✅ now | | **Token contract address** | addressToken, confirmTx, transactionDetail | ✅ | ✅ (token link) | ✅ | | **ETH/token amounts** | home (4dp), addressDetail (4dp), transactionDetail (full precision + native unit) | ✅ in detail | N/A | ✅ | | **ENS names** | transactionDetail | ✅ | N/A | ✅ | | **Timestamps** | home, transactionDetail | ❌ | N/A | ✅ (ISO + relative) | | **Wallet names** | home, settings | ❌ (click to rename) | N/A | ✅ | All blockchain identifiers (addresses, tx hashes, block numbers, contract addresses) now consistently have click-to-copy + Etherscan links. Non-blockchain data (amounts, timestamps, names) are appropriately styled without external links.
Owner

why aren't timestamps click to copy?

why aren't timestamps click to copy?
clawbot self-assigned this 2026-02-28 23:20:04 +01:00
Author
Collaborator

Review: needs-rework

Code quality: The blockNumberHtml() implementation is clean, correctly mirrors the txHashHtml() pattern, uses escapeHtml() for XSS prevention, and the Etherscan link format (/block/{num}) is correct. docker build . passes.

However, sneak raised an unresolved question on this PR: "why aren't timestamps click to copy?" — referring to the data audit table showing timestamps without click-to-copy. This needs to be addressed before the PR can proceed:

  1. Either add click-to-copy to timestamps (in this PR or explain why it should be a separate issue)
  2. Or respond to sneak's question with a rationale

Since sneak's comment is unaddressed, moving to needs-rework. The rework agent should:

  • Add click-to-copy functionality to timestamp displays (home view + transactionDetail view)
  • Update the data audit table in the PR description accordingly
## Review: needs-rework **Code quality:** ✅ The `blockNumberHtml()` implementation is clean, correctly mirrors the `txHashHtml()` pattern, uses `escapeHtml()` for XSS prevention, and the Etherscan link format (`/block/{num}`) is correct. `docker build .` passes. **However**, sneak raised an unresolved question on this PR: *"why aren't timestamps click to copy?"* — referring to the data audit table showing timestamps without click-to-copy. This needs to be addressed before the PR can proceed: 1. Either add click-to-copy to timestamps (in this PR or explain why it should be a separate issue) 2. Or respond to sneak's question with a rationale Since sneak's comment is unaddressed, moving to `needs-rework`. The rework agent should: - Add click-to-copy functionality to timestamp displays (home view + transactionDetail view) - Update the data audit table in the PR description accordingly
clawbot added needs-rework and removed needs-review labels 2026-02-28 23:21:17 +01:00
clawbot removed their assignment 2026-02-28 23:21:18 +01:00
clawbot self-assigned this 2026-02-28 23:37:57 +01:00
clawbot added 1 commit 2026-02-28 23:40:13 +01:00
feat: add click-to-copy on timestamps in all transaction list views
All checks were successful
check / check (push) Successful in 9s
3005813f2c
Adds click-to-copy (copies ISO date string) to timestamp displays in:
- home view (relative time ago)
- addressDetail view (relative time ago)
- addressToken view (relative time ago)
- transactionDetail view (full ISO date)

All timestamps now show dashed underline to indicate copyability,
matching the existing UX pattern for addresses, tx hashes, and
block numbers.
clawbot added needs-review and removed needs-rework labels 2026-02-28 23:40:25 +01:00
Author
Collaborator

Rework: timestamps now click-to-copy

Added click-to-copy functionality to all timestamp displays across the codebase:

  • home view — relative time ("2h ago") copies full ISO date on click
  • addressDetail view — same treatment
  • addressToken view — same treatment
  • transactionDetail view — ISO date string is now copyable via the existing copyableHtml() pattern

All timestamps show dashed underline to indicate copyability, matching the UX pattern used for addresses, tx hashes, and block numbers. Click handlers use stopPropagation() so clicking the timestamp copies without navigating to the transaction.

docker build . passes

## Rework: timestamps now click-to-copy Added click-to-copy functionality to all timestamp displays across the codebase: - **home view** — relative time ("2h ago") copies full ISO date on click - **addressDetail view** — same treatment - **addressToken view** — same treatment - **transactionDetail view** — ISO date string is now copyable via the existing `copyableHtml()` pattern All timestamps show dashed underline to indicate copyability, matching the UX pattern used for addresses, tx hashes, and block numbers. Click handlers use `stopPropagation()` so clicking the timestamp copies without navigating to the transaction. `docker build .` passes ✅
clawbot removed their assignment 2026-02-28 23:40:42 +01:00
clawbot added merge-ready and removed needs-reviewbot labels 2026-02-28 23:57:08 +01:00
Author
Collaborator

Review: merge-ready

Code review passed. All changes are clean:

  1. Block number (blockNumberHtml()) — correctly mirrors txHashHtml() pattern, uses escapeHtml() for XSS prevention, Etherscan /block/{num} link is correct, click-to-copy works via existing attachCopyHandlers().
  2. Timestamps click-to-copy — added across all 4 list views (home, addressDetail, addressToken) using data-copy with ISO date + stopPropagation() to avoid row navigation. transactionDetail uses existing copyableHtml() helper.
  3. sneak's feedback ("why aren't timestamps click to copy?") is fully addressed.

docker build . passes (lint + prettier + build all clean).

Labeled merge-ready, assigned @sneak for merge.

## Review: ✅ merge-ready Code review passed. All changes are clean: 1. **Block number** (`blockNumberHtml()`) — correctly mirrors `txHashHtml()` pattern, uses `escapeHtml()` for XSS prevention, Etherscan `/block/{num}` link is correct, click-to-copy works via existing `attachCopyHandlers()`. 2. **Timestamps click-to-copy** — added across all 4 list views (home, addressDetail, addressToken) using `data-copy` with ISO date + `stopPropagation()` to avoid row navigation. transactionDetail uses existing `copyableHtml()` helper. 3. sneak's feedback ("why aren't timestamps click to copy?") is fully addressed. `docker build .` passes ✅ (lint + prettier + build all clean). Labeled `merge-ready`, assigned @sneak for merge.
clawbot added needs-reviewbot and removed merge-ready labels 2026-02-28 23:57:17 +01:00
clawbot self-assigned this 2026-03-01 00:01:53 +01:00
clawbot added merge-ready and removed needs-reviewbot labels 2026-03-01 00:03:12 +01:00
clawbot removed their assignment 2026-03-01 00:03:16 +01:00
sneak was assigned by clawbot 2026-03-01 00:03:17 +01:00
Author
Collaborator

Review: merge-ready

Fresh review confirms all changes are clean:

  1. blockNumberHtml() — correctly mirrors txHashHtml() pattern, XSS-safe via escapeHtml(), correct Etherscan /block/{num} URL.
  2. Timestamp click-to-copy — added consistently across home, addressDetail, and addressToken views using data-copy + stopPropagation(). transactionDetail uses existing copyableHtml() helper.
  3. No linter/config/Makefile changes.
  4. docker build . passes
  5. sneak's feedback ("why aren't timestamps click to copy?") fully addressed.

Labeled merge-ready, assigned @sneak for merge.

## Review: ✅ merge-ready Fresh review confirms all changes are clean: 1. **`blockNumberHtml()`** — correctly mirrors `txHashHtml()` pattern, XSS-safe via `escapeHtml()`, correct Etherscan `/block/{num}` URL. 2. **Timestamp click-to-copy** — added consistently across home, addressDetail, and addressToken views using `data-copy` + `stopPropagation()`. transactionDetail uses existing `copyableHtml()` helper. 3. No linter/config/Makefile changes. 4. `docker build .` passes ✅ 5. sneak's feedback ("why aren't timestamps click to copy?") fully addressed. Labeled `merge-ready`, assigned @sneak for merge.
Owner

Wait, does this make the timestamps in the recent transaction lists click-to-copy as well? The entire transaction row in any recent transaction list should go to the 'transaction' view with the details for that transaction. None of the data shown on the list of transactions is supposed to be clickable - only the whole transaction row in the list itself. The detail view 'transaction' is where the individual data elements are click-to-copy.

Wait, does this make the timestamps in the recent transaction lists click-to-copy as well? The entire transaction row in any recent transaction list should go to the 'transaction' view with the details for that transaction. None of the data shown on the *list* of transactions is supposed to be clickable - only the whole transaction row in the list itself. The detail view 'transaction' is where the individual data elements are click-to-copy.
sneak added needs-reviewbot and removed merge-ready labels 2026-03-01 00:18:18 +01:00
sneak was unassigned by clawbot 2026-03-01 00:18:57 +01:00
clawbot self-assigned this 2026-03-01 00:18:57 +01:00
Author
Collaborator

Review: needs-rework

Block number changes (txStatus.js): Correct — blockNumberHtml() is clean, mirrors txHashHtml(), XSS-safe.

Timestamp in transactionDetail.js: Correct — this is a detail view where individual data elements should be click-to-copy.

Timestamp click-to-copy in list views (home.js, addressDetail.js, addressToken.js): Must be reverted. Per sneak's feedback: the entire transaction row in list views navigates to the detail view. Individual data elements in list rows should not be independently clickable. Only the detail view (transactionDetail) should have click-to-copy on individual fields.

Required changes:

  1. Revert home.js — remove data-copy/underline decoration-dashed cursor-pointer from timestamp span, remove the [data-copy] click handler block
  2. Revert addressDetail.js — same as above
  3. Revert addressToken.js — same as above
  4. Keep txStatus.js changes (block number) — correct
  5. Keep transactionDetail.js changes (timestamp copy in detail view) — correct
## Review: needs-rework **Block number changes (txStatus.js):** ✅ Correct — `blockNumberHtml()` is clean, mirrors `txHashHtml()`, XSS-safe. **Timestamp in transactionDetail.js:** ✅ Correct — this is a detail view where individual data elements should be click-to-copy. **Timestamp click-to-copy in list views (home.js, addressDetail.js, addressToken.js):** ❌ Must be reverted. Per sneak's feedback: the entire transaction row in list views navigates to the detail view. Individual data elements in list rows should not be independently clickable. Only the detail view (`transactionDetail`) should have click-to-copy on individual fields. ### Required changes: 1. **Revert home.js** — remove `data-copy`/`underline decoration-dashed cursor-pointer` from timestamp span, remove the `[data-copy]` click handler block 2. **Revert addressDetail.js** — same as above 3. **Revert addressToken.js** — same as above 4. **Keep txStatus.js** changes (block number) — correct 5. **Keep transactionDetail.js** changes (timestamp copy in detail view) — correct
clawbot added needs-rework and removed needs-review labels 2026-03-01 00:19:44 +01:00
clawbot removed their assignment 2026-03-01 00:19:48 +01:00
clawbot self-assigned this 2026-03-01 00:20:38 +01:00
clawbot added 1 commit 2026-03-01 00:21:32 +01:00
fix: remove click-to-copy from timestamps in list views
All checks were successful
check / check (push) Successful in 22s
811c125cb9
List view rows (home, addressDetail, addressToken) should only be clickable
as a whole to navigate to the detail view. Click-to-copy on individual
elements belongs only in the transaction detail view.

Reverts timestamp click-to-copy changes in list views per review feedback.
Keeps blockNumberHtml() and detail-view timestamp changes.
clawbot added needs-review and removed needs-rework labels 2026-03-01 00:21:44 +01:00
Author
Collaborator

Rework complete

Reverted: Click-to-copy on timestamps in list views (home, addressDetail, addressToken). Per review feedback, list view rows should only be clickable as a whole to navigate to the detail view — individual elements should not be independently clickable.

Kept:

  • blockNumberHtml() with etherscan link and click-to-copy in txStatus success view (original PR purpose)
  • Click-to-copy on timestamp in transactionDetail view (detail view is where individual elements are clickable)

docker build . passes. Ready for review.

## Rework complete **Reverted:** Click-to-copy on timestamps in list views (home, addressDetail, addressToken). Per review feedback, list view rows should only be clickable as a whole to navigate to the detail view — individual elements should not be independently clickable. **Kept:** - `blockNumberHtml()` with etherscan link and click-to-copy in txStatus success view (original PR purpose) - Click-to-copy on timestamp in transactionDetail view (detail view is where individual elements are clickable) `docker build .` passes. Ready for review.
clawbot removed their assignment 2026-03-01 00:21:53 +01:00
clawbot self-assigned this 2026-03-01 00:22:30 +01:00
sneak merged commit 812fc01a98 into main 2026-03-01 00:23:07 +01:00
clawbot removed their assignment 2026-03-01 00:23:23 +01:00
sneak deleted branch issue-99-block-number-link 2026-03-01 00:23:24 +01:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#102