Skip to content

fix: restore Explore button on transfers#597

Open
CypherPoet wants to merge 1 commit into
synonymdev:masterfrom
CypherPoet:fix/transfer-activity-explore-button
Open

fix: restore Explore button on transfers#597
CypherPoet wants to merge 1 commit into
synonymdev:masterfrom
CypherPoet:fix/transfer-activity-explore-button

Conversation

@CypherPoet

@CypherPoet CypherPoet commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #361

This PR restores access to the on-chain details for transfer activities, including force closes.

Description

A force close, like any channel close, settles on-chain, so Bitkit already stores it as an on-chain activity with a transaction id, inputs, outputs, and a block explorer link. Those details had become unreachable from the activity screen: the transfer detail layout replaced the "Explore" button with a "Connection" button, and "Connection" only opens the channel, not the transaction. Issue #361 shows a force close where there is no way to see the transaction id.

This adds a dedicated full-width "Explore" row for transfer activities, shown alongside the existing "Connection" button, so the on-chain transaction details are reachable again. Regular on-chain and Lightning activities are unchanged. The behavior applies to every transfer because a stored on-chain activity does not record whether a close was cooperative or forced, and both are real on-chain transactions with a transaction id worth surfacing.

Linked Issues/Tasks

#361 - [Bug] Force Close TX showing in the LN activity template

Screenshot / Video

Before (issue #361) on the left, after on the right:

issue361-before-after

QA Notes

Manual Tests

  • 1. open a connection → close it → Activity → tap the From Spending transfer → Activity Item: shows Boost, Connection, and a new full-width Explore button.
  • 2. Activity Item (transfer) → Explore → Activity Explorer: shows transaction id, inputs, outputs, and Open Block Explorer.
  • 3. Activity Item (transfer) → Connection: still opens the connection detail.
  • 4. regression: received on-chain activity → Activity Item: Explore appears in its usual slot, with no extra row.
  • 5. regression: LN payment → Activity Item: unchanged; Explore opens preimage and invoice details.

Automated Checks

  • BitkitTests unit suite passes locally (activity storage and the other unit suites, 0 failures). Two AddressTypeIntegrationTests fail only because the live Blocktank regtest deposit endpoint returns 404; they depend on that external service and are unrelated to this change.
  • Verified the full flow live on the iOS simulator against regtest: opened a connection, closed it, and confirmed the From Spending activity now reaches the transaction details through Explore.

Channel closes (including force closes) and other transfers are stored as
on-chain transactions, but the activity detail screen replaced the Explore
button with Connection for transfers. That left no way to reach the on-chain
details (transaction id, inputs and outputs, block explorer) for a force
close, which is what issue synonymdev#361 reports.

Add a dedicated full-width Explore row for transfer activities, alongside the
existing Connection button, so the on-chain details are reachable again.

Fixes synonymdev#361
@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a regression where transfer activities (including force closes) had no path to on-chain transaction details. The Connection button replaced the Explore button for transfers, making the transaction ID and block explorer unreachable.

  • Extracts exploreButton into a reusable private var and adds a dedicated full-width Explore row below the Boost/Connection HStack for transfer activities that have a channelId.
  • The condition if isTransfer, transferChannelId != nil mirrors the existing Connection-button guard exactly, so the new Explore row appears if and only if the Connection button is present — no duplication is possible.
  • A changelog entry is added under changelog.d/next/.

Confidence Score: 5/5

Safe to merge — a tightly scoped UI fix with no data-layer changes.

The change is small and self-contained: one computed property extracted, one conditional row added. The condition guarding the new Explore row (isTransfer, transferChannelId != nil) is logically identical to the Connection-button guard directly above it, so the two buttons are always shown together and the Explore button is never duplicated in the UI. All other activity types (plain on-chain, Lightning) are unaffected by the new branch.

No files require special attention.

Important Files Changed

Filename Overview
Bitkit/Views/Wallets/Activity/ActivityItemView.swift Extracts exploreButton into a computed property and adds a full-width Explore row for transfers; conditions are mutually exclusive with the existing HStack logic, no duplication possible.
changelog.d/next/361.fixed.md Standard changelog entry describing the fix; content accurately reflects the change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Activity Item View — buttons] --> B{isTransfer?}

    B -- No --> C[HStack: Boost + Explore]
    B -- Yes --> D{transferChannelId != nil?}

    D -- No --> E[HStack: Boost + Explore\nno extra row]
    D -- Yes --> F[HStack: Boost + Connection]
    F --> G[Full-width Explore row\nnew in this PR]

    C --> H[navigate .activityExplorer]
    E --> H
    G --> H
    F --> I[navigate .connectionDetail channelId]
Loading

Reviews (1): Last reviewed commit: "fix(activity): restore Explore button on..." | Re-trigger Greptile

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.

[Bug] Force Close TX showing in the LN activity template

1 participant