Skip to content

Clear push notifications when one is opened - #741

Open
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/clear-notifications-428
Open

Clear push notifications when one is opened#741
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/clear-notifications-428

Conversation

@caydyan

@caydyan caydyan commented Jun 14, 2026

Copy link
Copy Markdown

Fixes #428

Summary

  • Add clearAllNotifications() to the Sphinx notification manager abstraction and Android implementation.
  • Clear the app notification tray when MainActivity is launched or re-opened from a push notification intent.
  • Consume the chat_id extra after handling it so the notification navigation is not processed again later, and accept string/int/long chat IDs.

Validation

  • git diff --check
  • JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:application:data:concepts:concept-sphinx-notification-manager:compileKotlin --no-daemon
  • JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:application:data:features:feature-sphinx-notification-manager:compileDebugKotlin --no-daemon
  • Attempted JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:activity:main:activitymain:compileDebugKotlin --no-daemon; the local build repeatedly progressed through the modified notification modules and into activitymain/dashboard data binding, then failed while resolving remote runtime dependencies because Maven/Google/GitHub raw downloads intermittently terminated TLS handshakes. No source compile error was observed before those dependency-resolution failures.

Bounty payout address: bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc

@caydyan

caydyan commented Jun 14, 2026

Copy link
Copy Markdown
Author

Current-head validation rerun on 2f34a4c6d9f8caf6f26548411cc54275eb9c2a2d:

  • git diff --check origin/master...HEAD
  • JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:application:data:concepts:concept-sphinx-notification-manager:compileKotlin --no-daemon (build successful)
  • JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:application:data:features:feature-sphinx-notification-manager:compileDebugKotlin --no-daemon (build successful)

I also retried :sphinx:activity:main:activitymain:compileDebugKotlin; it progressed through 767 tasks and failed while downloading androidx.lifecycle:lifecycle-viewmodel:2.2.0 from dl.google.com because the remote host terminated the TLS handshake, not from a source compile error in this PR. Local worktree is clean after the rerun.

@caydyan

caydyan commented Jun 14, 2026

Copy link
Copy Markdown
Author

Follow-up validation on 2f34a4c6d9f8caf6f26548411cc54275eb9c2a2d: the broader activity module compile now passes locally.

Additional validation:

  • git diff --check origin/master...HEAD passed after fetching origin/master.
  • JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home ANDROID_HOME=/tmp/codex-android-sdk-real ./gradlew :sphinx:activity:main:activitymain:compileDebugKotlin --no-daemon --stacktrace --console=plain -Pkapt.use.worker.api=false -Dkotlin.compiler.execution.strategy=in-process -Dorg.gradle.jvmargs=... passed.
  • Result: BUILD SUCCESSFUL in 2m 47s; 1504 actionable tasks: 276 executed, 33 from cache, 1195 up-to-date.

The extra Gradle flags are local toolchain flags for this checkout's older KAPT setup on JDK 17; no source changes were needed, and the local worktree is clean.

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.

clear all notifications after one is clicked - @$750000

1 participant