Skip to content

fix: restore explore button on transfers#1037

Merged
jvsena42 merged 3 commits into
masterfrom
fix/transfer-activity-explore-button
Jun 26, 2026
Merged

fix: restore explore button on transfers#1037
jvsena42 merged 3 commits into
masterfrom
fix/transfer-activity-explore-button

Conversation

@jvsena42

@jvsena42 jvsena42 commented Jun 22, 2026

Copy link
Copy Markdown
Member

This PR restores access to the on-chain details for transfer activities, including force closes. Ports synonymdev/bitkit-ios#597.

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 detail screen: the transfer layout replaced the Explore button with a Connection button, and Connection only opens the channel, not the transaction.

  • Keeps the Explore button in the shared Boost/Explore row for every activity, so the on-chain transaction details stay reachable.
  • Moves the transfer-only Connection button to its own full-width row below, shown only for transfers.
  • Leaves regular on-chain and Lightning activities unchanged. The Explore row 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.

Figma Designs:

Preview

connection-oppened.webm
regular-ln.webm
regular-receive.webm
connection-closed.webm

QA Notes

Manual Tests

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

Automated Checks

  • ActivityDetailViewModelTest.kt is unaffected (no button-layout assertions); it still passes.
  • Ran locally: just compile and just lint.
  • CI: standard compile, unit test, and detekt checks run by the PR bot.

@jvsena42 jvsena42 self-assigned this Jun 22, 2026
jvsena42 and others added 2 commits June 22, 2026 10:05
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jvsena42 jvsena42 marked this pull request as ready for review June 26, 2026 15:05
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown

Greptile Summary

This PR restores the Explore button for transfer activities (channel opens/closes, including force closes) by removing the mutually-exclusive if/else that previously swapped Explore for Connection on transfers. Both buttons now appear: Explore in the shared Boost/Explore row, and Connection as a new full-width row shown only for transfers.

  • The old if (isTransfer) … Connection else … Explore branch is replaced by always rendering Explore in the shared row, then conditionally rendering Connection below it when isTransfer && channelId != null && onChannelClick != null.
  • The Connection button's modifier changes from Modifier.weight(1f) (it was inside the same Row) to Modifier.fillMaxWidth() since it now occupies its own row.

Confidence Score: 5/5

Safe to merge — a small, well-scoped UI layout change with no logic regressions and a clear fix for a missing navigation path.

The change simply removes a conditional that was suppressing the Explore button on transfer activities, and moves the Connection button into its own always-visible row. All existing activity types (on-chain, Lightning, transfer) retain their correct buttons; the only new visible element is the Connection row for transfers, which was already implemented and tested. No data, state, or business logic is touched.

No files require special attention.

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/ui/screens/wallets/activity/ActivityDetailScreen.kt Layout refactored: Explore button always shown in the Boost/Explore row; Connection button moved to its own full-width row, conditionally rendered for transfers. Change is correct and isolated.
changelog.d/next/1037.fixed.md New changelog entry accurately describing the fix.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Activity Detail Screen] --> B[Boost / Explore Row]
    B --> C[Boost Button]
    B --> D[Explore Button always shown]
    A --> E{isTransfer && channelId != null && onChannelClick != null?}
    E -- Yes --> F[Connection Button full-width row]
    E -- No --> G[Nothing rendered]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Activity Detail Screen] --> B[Boost / Explore Row]
    B --> C[Boost Button]
    B --> D[Explore Button always shown]
    A --> E{isTransfer && channelId != null && onChannelClick != null?}
    E -- Yes --> F[Connection Button full-width row]
    E -- No --> G[Nothing rendered]
Loading

Reviews (1): Last reviewed commit: "Merge branch 'master' into fix/transfer-..." | Re-trigger Greptile

@jvsena42 jvsena42 requested review from ovitrif and piotr-iohk June 26, 2026 16:26
@jvsena42 jvsena42 enabled auto-merge June 26, 2026 17:47

@ovitrif ovitrif left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

tAck

@jvsena42 jvsena42 merged commit 4deacd5 into master Jun 26, 2026
27 checks passed
@jvsena42 jvsena42 deleted the fix/transfer-activity-explore-button branch June 26, 2026 18:23
@ovitrif ovitrif added this to the 2.4.0 milestone Jun 26, 2026
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