Skip to content

fix: remove app from recents on close#822

Open
ovitrif wants to merge 4 commits intomasterfrom
fix/remove-app-from-recents
Open

fix: remove app from recents on close#822
ovitrif wants to merge 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>
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.

1 participant