Skip to content

UI/UX: Deliver background feedback through regular notifications - #6204

Closed
eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:fix/background-operation-feedback
Closed

eliotcougar wants to merge 1 commit into
2dust:masterfrom
eliotcougar:fix/background-operation-feedback

Conversation

@eliotcougar

Copy link
Copy Markdown
Contributor

Keep foreground snackbar presentation intact and replace its platform-toast fallback with one permission-aware notification that opens the app on tap and expires after ten seconds on Android 8+.

Send terminal service events through acknowledged, package-scoped broadcasts. A resumed snackbar host acknowledges the presentation handoff; repository, widget and tile state consumers do not suppress the notification fallback. Remove duplicate ViewModel messages, clear stale feedback after foreground delivery, report VPN setup failures and avoid successful-stop feedback during failed-start cleanup.

@eliotcougar

Copy link
Copy Markdown
Contributor Author

@2dust: With this PR, the out-of-scope code extraction from the ongoing accessibility work is complete.
If these small PRs are merged, the remaining accessibility PRs can become more focused on their limited accessibility/TalkBack scope.
Tell me if you see any problems with the proposed PRs.

@eliotcougar

Copy link
Copy Markdown
Contributor Author

Compatibility note for #6195: the two branches currently have a content conflict in NotificationHelper.kt because both implement localized notification-channel creation.

Preferred reconciliation: merge/rebase #6195 first, then simplify this PR's transient-message channel setup to call #6195's ensureNotificationChannel(...) with R.string.notification_channel_other. Keep this PR's permission checks, notification posting, timeout, and cancellation behavior. The locale XML changes already merge cleanly, so this should be a small follow-up rebase rather than a redesign.

Extract the non-accessibility delivery layer from the all-10 branch. Keep foreground snackbar presentation intact and replace its platform-toast fallback with one permission-aware notification that replaces previous feedback, opens the app on tap and expires after ten seconds on Android 8+.

Send terminal service events through acknowledged, package-scoped broadcasts. A resumed snackbar host acknowledges the presentation handoff; repository, widget and tile state consumers do not suppress the notification fallback. Remove duplicate ViewModel messages, clear stale feedback after foreground delivery, report VPN setup failures and avoid successful-stop feedback during failed-start cleanup.

Reuse all nine locale variants for the new Other notifications channel and terminal Service stopped wording. Existing-channel localization, live regions, TalkBack semantics, connection-test ownership and native lifecycle redesign remain outside this branch.

Validation: 72 JVM tests, Kotlin compilation and x86_64 debug assembly passed. Final-APK emulator probes covered visible foreground acknowledgement, background replacement and expiry, channel preservation, denied notification permission, and stale-notification clearing. Real Lab VPN notification restart and stop produced the expected background feedback. Lint remains blocked by four unchanged upstream NewApi errors in root process waiting and navigation-bar themes; broader root/proxy-only and handover runtime matrices were not run.
@eliotcougar
eliotcougar force-pushed the fix/background-operation-feedback branch from db26c93 to a903355 Compare September 10, 2026 07:41
@2dust

2dust commented Sep 11, 2026

Copy link
Copy Markdown
Owner

先不说这个 pr
有想法吧 Toast 移除掉,全部改成用 Snackbar ,或者反过来,全部用 Toast 移除 Snackbar 。
现在 两个并存体验和代码都非常的不好。

@eliotcougar

Copy link
Copy Markdown
Contributor Author

先不说这个 pr 有想法吧 Toast 移除掉,全部改成用 Snackbar ,或者反过来,全部用 Toast 移除 Snackbar 。 现在 两个并存体验和代码都非常的不好。

I was going to suggest that as well... The main problem is that toasts work only when the app is in foreground. Some actions can happen in the background and may benefit from showing a notification to the user.

@eliotcougar

Copy link
Copy Markdown
Contributor Author

Superseded by #6227

@eliotcougar
eliotcougar deleted the fix/background-operation-feedback branch September 15, 2026 17:17
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