feat: add etherscan link and click-to-copy on block number in success-tx view #102
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/AutistMask#102
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue-99-block-number-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 #99PR #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:
blockNumberHtml()function intxStatus.js(mirrorstxHashHtml()) — generates a click-to-copy span with dashed underline + Etherscan block link iconsuccess-tx-blockfrom.textContentto.innerHTMLusing the new helperdocker build .passes.Data atom audit (per issue body request):
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.
why aren't timestamps click to copy?
Review: needs-rework
Code quality: ✅ The
blockNumberHtml()implementation is clean, correctly mirrors thetxHashHtml()pattern, usesescapeHtml()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:
Since sneak's comment is unaddressed, moving to
needs-rework. The rework agent should:Rework: timestamps now click-to-copy
Added click-to-copy functionality to all timestamp displays across the codebase:
copyableHtml()patternAll 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 ✅Review: ✅ merge-ready
Code review passed. All changes are clean:
blockNumberHtml()) — correctly mirrorstxHashHtml()pattern, usesescapeHtml()for XSS prevention, Etherscan/block/{num}link is correct, click-to-copy works via existingattachCopyHandlers().data-copywith ISO date +stopPropagation()to avoid row navigation. transactionDetail uses existingcopyableHtml()helper.docker build .passes ✅ (lint + prettier + build all clean).Labeled
merge-ready, assigned @sneak for merge.Review: ✅ merge-ready
Fresh review confirms all changes are clean:
blockNumberHtml()— correctly mirrorstxHashHtml()pattern, XSS-safe viaescapeHtml(), correct Etherscan/block/{num}URL.data-copy+stopPropagation(). transactionDetail uses existingcopyableHtml()helper.docker build .passes ✅Labeled
merge-ready, assigned @sneak for merge.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.
Review: needs-rework
Block number changes (txStatus.js): ✅ Correct —
blockNumberHtml()is clean, mirrorstxHashHtml(), 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:
data-copy/underline decoration-dashed cursor-pointerfrom timestamp span, remove the[data-copy]click handler blockRework 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)docker build .passes. Ready for review.