Skip to content

feat: Android background task progress and result notifications - #25

Merged
sugarforever merged 5 commits into
mainfrom
codex/background-notifications
Oct 23, 2026
Merged

sugarforever merged 5 commits into
mainfrom
codex/background-notifications

Conversation

@sugarforever

@sugarforever sugarforever commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Android background work now shows committed running, retry, network-wait and approval states in the existing shared foreground-service notification. Once work settles, Moose reads the persisted final view before releasing the service and posts one conversation-specific completion/failure alert while the Activity is hidden. Tapping an individual notification selects the saved chat without submitting work. Cold links arriving before React bootstrap are retained by a small MainActivity config plugin.

Preserves the existing notification-permission admission, Stop-all action, cancellation acknowledgement, 30-minute budget and iOS suspension scope. Overlapping leases are deduplicated; multiple chats share an untargeted count notification and receive separate result targets. Fixed failure categories avoid exposing provider bodies or credentials. Unchanged historical outcomes never alert. Includes version 0.7.1; no dependencies, executor, scheduler or generic notification framework were added.

Validation:

  • Rebased onto the independently merged iSH change. Complete npm run verify passed: 245 tests, 37 skipped (including the environment-gated iSH native suite), 3 real bootstrap tests, strict types, portable Pi/SQLite smoke, and both Hermes exports. Expo Doctor 20/20; modified files passed Prettier and diff checks.
  • Android API 35 arm64 debug and standalone release compilation and installation. Controlled on-device SSE, file write, second model round and SQLite settlement passed in background. Completion/failure alerts, credential-safe text, network retry progress/recovery, concurrent-chat attribution, Stop-all persistence, permission denial and foreground alert suppression were checked.
  • A real single failure notification switched the already-running normal UI to its persisted chat. The standalone cold-route regression failed before the fix and passed after it (367 → 379, no execution service), using the notification-equivalent activity intent while offline. The development launcher intercepted a literal cold notification tap, so that is not reported as a passing development-client test.
  • Independent review found and fixed observer cleanup leaks. Native compilation found and fixed a Context/ReactContext mismatch. A first bootstrap lock test timed out; its rerun and full subsequent verify passed unchanged.

No real credentials, billable model requests, new Xiaomi/physical-device or Doze/full-budget acceptance, iOS native build, or IPA publication. The emulator's unrelated saved Termux selection showed its existing connection error in the normal UI; persisted chat selection remained testable. Detailed evidence and reproduction steps are in docs/background-recovery.md.

@sugarforever
sugarforever force-pushed the codex/background-notifications branch from 665c2f9 to 34459c8 Compare October 23, 2026 01:07
@sugarforever
sugarforever merged commit 2449417 into main Oct 23, 2026
1 check passed
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