Skip to content

Improve turn completion notifications#2

Open
siddheshkothadi wants to merge 1 commit intomainfrom
codex/improve-task-completion-notifications
Open

Improve turn completion notifications#2
siddheshkothadi wants to merge 1 commit intomainfrom
codex/improve-task-completion-notifications

Conversation

@siddheshkothadi
Copy link
Owner

Motivation

  • Ensure completed-turn notifications appear as heads-up popups and are easier to identify in the notification shade by using the app artwork and stronger channel importance.

Description

  • Raise the completed-turn notification channel to IMPORTANCE_HIGH and recreate the channel when an existing channel has lower importance to enable heads-up behavior and stronger alerts.
  • Enable vibration and notification lights on the turn channel and set sensible defaults for per-notification alerts.
  • Use the app launcher artwork for the notification by switching the small icon to ic_launcher_foreground and loading the app icon as the large icon via packageManager.getApplicationIcon(...).toBitmap().
  • Increase per-notification priority to PRIORITY_HIGH and set DEFAULT_ALL so pre-Oreo devices also receive popup-style behavior; added androidx.core.graphics.drawable.toBitmap import and updated CodexDroidNotifications.kt.

Testing

  • Attempted to run bash ./gradlew :app:compileDebugKotlin to validate Kotlin compilation, but the build could not run in the environment due to a missing Android SDK configuration (ANDROID_HOME / local.properties sdk.dir), so compilation could not be verified here.

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5dcb121d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +31 to +33
if (existing != null && existing.importance >= NotificationManager.IMPORTANCE_HIGH) return
if (existing != null) {
manager.deleteNotificationChannel(TURN_CHANNEL_ID)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid deleting and recreating the turn channel with the same ID

On Android 8+ this migration does not actually raise existing users to IMPORTANCE_HIGH. NotificationManager.createNotificationChannel() preserves the prior settings for an existing/deleted channel ID, so when turn_events was already created at IMPORTANCE_DEFAULT (or the user later lowered/blocked it), deleting and recreating it here restores the same lower importance instead of enabling heads-up alerts. That means the new behavior never takes effect for those installs, and ensureTurnChannel() will keep deleting/recreating the channel on every completed-turn notification, which also increments Android's visible "deleted channels" counter in Settings.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant