Skip to content

fix: remove app from recents on close#822

Merged
ovitrif merged 4 commits intomasterfrom
fix/remove-app-from-recents
Mar 5, 2026
Merged

fix: remove app from recents on close#822
ovitrif merged 4 commits intomasterfrom
fix/remove-app-from-recents

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Mar 4, 2026

Description

This PR fixes the "Close App" button in the foreground service notification so it actually removes the app from the Android recents drawer.

The previous approach used App.currentActivity?.value?.finishAffinity() which had two problems: the activity reference is always null when the app is backgrounded (making it a no-op), and finishAffinity() doesn't remove from recents anyway.

The fix uses ActivityManager.appTasks to finish and remove all app tasks directly from the service context, after gracefully stopping the LDK node first.

Also fixes the Claude Code Review workflow never posting comments — adds missing --comment flag and --allowedTools for gh CLI (reviews were silently discarded since inception). We can only verify claude[bot] posts review comments on the next PR opened (after merge).

Preview

Before After
before.mp4
after.mp4

QA Notes

  1. Open the app and background it
  2. Pull down the notification shade and tap the "Close App" button on the Bitkit service notification
  3. Open the Android recents/app drawer
  4. Verify the app is no longer listed in recents
  5. Repeat step 1-4 with the app in the foreground (activity visible) to confirm it works in both states

@ovitrif ovitrif marked this pull request as draft March 4, 2026 18:08
@ovitrif ovitrif force-pushed the fix/remove-app-from-recents branch from d63eaf1 to 9d36acd Compare March 4, 2026 20:29
@ovitrif ovitrif marked this pull request as ready for review March 4, 2026 20:29
@ovitrif ovitrif requested review from ben-kaufman, jvsena42 and piotr-iohk and removed request for ben-kaufman and piotr-iohk March 4, 2026 22:20
ovitrif and others added 3 commits March 4, 2026 23:32
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Ack

@ovitrif ovitrif merged commit 1e27538 into master Mar 5, 2026
17 of 18 checks passed
@ovitrif ovitrif deleted the fix/remove-app-from-recents branch March 5, 2026 09: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.

2 participants