Skip to content

Add Android foreground work queue for long-running work - #2445

Draft
hahn-kev-bot wants to merge 5 commits into
developfrom
android-long-running-work-queue
Draft

Add Android foreground work queue for long-running work#2445
hahn-kev-bot wants to merge 5 commits into
developfrom
android-long-running-work-queue

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a reusable ILongRunningWorkQueue with an Android foreground-service host and partial wake lock so user-started long work (starting with project download) can keep running when the screen turns off.
  • Publish fail-open UserNotificationEvent toasts when foreground protection fails to start, so downloads continue but users get a copyable error for bug reports.
  • Add a monochrome MDI notification icon for the Android foreground service.

Test plan

  • dotnet test backend/FwLite/FwLiteShared.Tests --filter FullyQualifiedName~InProcessLongRunningWorkQueueTests
  • dotnet build backend/FwLite/FwLiteMaui/FwLiteMaui.csproj -f net10.0-android
  • Manual Android: start a large project download, turn the screen off for >30s, verify download completes or surfaces a real error (see �ackend/FwLite/FwLiteMaui/Platforms/Android/README.md)
  • Manual Android: verify foreground notification appears during download and dismisses when done

Important

I added a new event UserNotification which let's the backend publish notifications (in this case about an error), however those messages won't be translated (only happens in the frontend), should we change how this works? or just leave it as an escape hatch but avoid using it most of time?

hahn-kev and others added 4 commits June 30, 2026 13:17
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the Android work-queue wiring and take develop's stronger project-delete path (#2392). Also drain the work host while still holding the queue lock so StopService cannot race the next StartForegroundService.

Co-authored-by: Cursor <cursoragent@cursor.com>
Publish a general user-notification event when Android foreground protection fails to start, keeping downloads fail-open while surfacing a copyable error toast. Add a monochrome notification icon for the foreground service.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 922bb91e-858c-4517-8763-0ae2af72d6dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch android-long-running-work-queue

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 16, 2026
@argos-ci

argos-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 20, 2026, 8:48 AM
e2e (Inspect) ✅ No changes detected - Jul 20, 2026, 8:55 AM

Comment thread backend/FwLite/FwLiteShared/Services/LongRunningWorkQueue.cs Dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants