Skip to content

fix: channel detail black screen#838

Merged
jvsena42 merged 11 commits intomasterfrom
fix/channel-screen-nav-668
Mar 12, 2026
Merged

fix: channel detail black screen#838
jvsena42 merged 11 commits intomasterfrom
fix/channel-screen-nav-668

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Mar 10, 2026

Fixes #668

This PR:

  1. Fixes the channel detail screen black screen caused by shared ViewModel state loss during navigation
  2. Fixes predictive back gesture animations
  3. Fixes wallet screens (savings & spending) transition animations
  4. Refactor: extracts ChannelDetailViewModel and CloseConnectionViewModel from the monolithic LightningConnectionsViewModel

Description

The channel detail and close connection screens previously depended on a shared parent ViewModel (LightningConnectionsViewModel) to hold the selected channel state. This caused black screens when navigating back and forth, since the shared state could be lost during back-stack restoration or recomposition.

The fix converts Routes.ChannelDetail and Routes.CloseConnection from data object to data class with a channelId parameter, making each screen self-contained. Each screen now has its own ViewModel that loads channel data independently using the passed ID.

Additional improvements:

  • Added a loading state with spinner while channel data loads
  • Added handling with toast and automatic back navigation for the "not found" cases

Preview

Before After
before_1.75x.mp4
after_1.75x.mp4

QA Notes

Tests

  1. Verify intermittent bug of "black channel details screen" is fixed [Bug]: Black screen on "Lightning Connection" screen #668
  2. Try to break back nav gesture as seen in 1st video → should be impossible now
  3. Activity Detail (LN transfer) → Connection button → should land on ChannelDetail → back → should return to Activity Detail

Regression Tests (pick a few randomly)

  • Settings → Lightning Connections → tap channel → should still open
  • ChannelDetail → back → returns to connections list
  • ChannelDetail → Close Connection → should still work
  • Pull-to-refresh on channel detail

github-actions bot and others added 4 commits March 10, 2026 21:09
- Change Routes.ChannelDetail to accept channelId parameter
- Update ChannelDetailScreen to fetch channel on initialization
- Replace early return with loading state when channel is null
- Navigate directly to detail screen with channelId
- Remove intermediate navigation through list screen
- Fix predictive back gesture by eliminating blank composable state

Fixes #668

Co-authored-by: Ovi Trif <ovitrif@users.noreply.github.com>
@ovitrif ovitrif changed the title fix: resolve channel detail black screen fix: channel detail black screen Mar 11, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ovitrif ovitrif force-pushed the fix/channel-screen-nav-668 branch from a7fe03a to 20eb8f5 Compare March 11, 2026 01:27
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ovitrif
Copy link
Collaborator Author

ovitrif commented Mar 11, 2026

@claude Summarize the changes for reviewers.

@ovitrif ovitrif added this to the 2.2.0 milestone Mar 11, 2026
@claude

This comment has been minimized.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code review

Found 1 issue. Checked for bugs and CLAUDE.md compliance.

ovitrif and others added 2 commits March 12, 2026 11:14
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

Tested on sim, LGTM.

Copy link
Member

@jvsena42 jvsena42 left a comment

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 7c7f54b into master Mar 12, 2026
19 checks passed
@jvsena42 jvsena42 deleted the fix/channel-screen-nav-668 branch March 12, 2026 15:57
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]: Black screen on "Lightning Connection" screen

3 participants