Skip to content

refactor(frontend): extract DetailRow for transaction details dialog#2269

Merged
im-adithya merged 1 commit into
masterfrom
refactor/transaction-detail-rows
Apr 30, 2026
Merged

refactor(frontend): extract DetailRow for transaction details dialog#2269
im-adithya merged 1 commit into
masterfrom
refactor/transaction-detail-rows

Conversation

@reneaaron
Copy link
Copy Markdown
Member

Summary

Cleans up the transaction details dialog by extracting a single DetailRow component to replace ~16 hand-written rows with the same shape. Moves inter-row spacing to the parent (gap-6), dropping the duplicated mt-6 / mt-8 margins (the mt-8 rows looked accidental).

DetailRow takes a copyable prop for rows that should show a copy icon (BOLT-12 Offer Id, Preimage, Hash, Invoice, Failure Reason, Metadata).

No behavioral change.

Test plan

  • Open a transaction's details and visually compare against master — spacing and copy icons should match
  • Verify each row renders for transactions of different shapes (incoming, outgoing, failed, with metadata, with bolt12 offer)
  • Confirm copy icons still work

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@reneaaron has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 30 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a0ad209-e7bc-481c-befc-ca365389dd8a

📥 Commits

Reviewing files that changed from the base of the PR and between 30ef3c2 and 5427e4e.

📒 Files selected for processing (4)
  • frontend/src/components/OnchainTransactionItem.tsx
  • frontend/src/components/TransactionDetailRow.tsx
  • frontend/src/components/TransactionItem.tsx
  • frontend/src/components/TransactionLabels.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/transaction-detail-rows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 37 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@reneaaron reneaaron force-pushed the refactor/transaction-detail-rows branch from 18a948e to 6e673a7 Compare April 30, 2026 11:17
@reneaaron reneaaron marked this pull request as ready for review April 30, 2026 11:19
@reneaaron reneaaron force-pushed the refactor/transaction-detail-rows branch 3 times, most recently from 9096250 to b698f7f Compare April 30, 2026 12:48
Pulls the repeated `<div><label/><value+copy/></div>` shape out of
TransactionItem and OnchainTransactionItem into a shared component with
an optional `copyable` prop. Replaces ~16 hand-written rows in the
lightning dialog and 4 in the on-chain dialog. Lightning also gets
parent-driven `gap-6` spacing in place of per-row `mt-6` / `mt-8`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@reneaaron reneaaron force-pushed the refactor/transaction-detail-rows branch from b698f7f to 5427e4e Compare April 30, 2026 12:57
@reneaaron
Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

✅ Actions performed

Full review triggered.

@reneaaron reneaaron added this to the v1.22.0 milestone Apr 30, 2026
Copy link
Copy Markdown
Member

@im-adithya im-adithya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, nice 🙌

@im-adithya im-adithya merged commit 925cba4 into master Apr 30, 2026
12 checks passed
@im-adithya im-adithya deleted the refactor/transaction-detail-rows branch April 30, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants