Skip to content

Bugfix/2.0.3#1041

Merged
tunjid merged 5 commits intoreleasesfrom
bugfix/2.0.3
Feb 24, 2026
Merged

Bugfix/2.0.3#1041
tunjid merged 5 commits intoreleasesfrom
bugfix/2.0.3

Conversation

@tunjid
Copy link
Owner

@tunjid tunjid commented Feb 24, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @tunjid, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the application's notification infrastructure, focusing on more robust and secure handling of push notification tokens and improving the resolution of incoming notifications across multiple user profiles. It introduces a more flexible session context for data access and streamlines the display behavior of notifications on Android, aiming for a more reliable and user-friendly notification experience.

Highlights

  • Enhanced Push Notification Registration: The push notification token registration process has been significantly updated to include authentication via getServiceAuth and to send otherDids (other signed-in profile IDs) along with the primary DID, improving multi-profile notification handling and security.
  • Refactored Session Management for Notifications: The internal session management utilities (inCurrentProfileSession, inPastSession) have been refactored to pass the SessionContext directly to the execution block, and a new inProfileSession function was introduced to streamline accessing data for both current and past user profiles.
  • Added Target DID to Push Notifications: Incoming push notifications now include a targetDid field, allowing for more precise routing and processing of notifications to the correct user profile within the application.
  • Simplified Android Notification Display: The Android-specific notification display logic was simplified by removing the lifecycle state check, ensuring notifications are always displayed in the tray for now, with a TODO for future in-app notification support.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • data/core/src/commonMain/kotlin/com/tunjid/heron/data/repository/NotificationsRepository.kt
    • Added new imports for authentication and time utilities.
    • Modified NotificationsQuery.Push to include a targetDid field.
    • Refactored registerPushNotificationToken to use getServiceAuth for authentication and include otherDids in the request body.
    • Updated the resolvePushNotification method to use the new inProfileSession utility and pass targetDid.
    • Adjusted the retrieval logic for notificationPreferences.
    • Modified SaveNotificationTokenRequest data class to include an otherDids list.
  • data/core/src/commonMain/kotlin/com/tunjid/heron/data/repository/SavedStateDataSource.kt
    • Modified inCurrentProfileSession to pass the SessionContext.Current instance to the block.
    • Modified inPastSession to pass the SessionContext.Previous instance to the block.
    • Added a new inProfileSession function to provide a unified way to access session context for any profile ID.
  • scaffold/src/androidMain/kotlin/com/tunjid/heron/scaffold/notifications/AndroidNotifier.kt
    • Removed the lifecycle state check that prevented notifications from being displayed when the app was in the foreground, adding a TODO for future in-app notification handling.
  • scaffold/src/commonMain/kotlin/com/tunjid/heron/scaffold/notifications/NotificationStateHolder.kt
    • Added logic to extract targetDid from the notification payload.
    • Removed the condition action.token != state.notificationToken from the token registration mutation.
    • Updated handleNotificationMutations to require and use targetDid when resolving push notifications.
    • Added NotificationAtProtoTargetDid as a new constant for payload key.
  • ui/timeline/src/commonMain/kotlin/com/tunjid/heron/timeline/state/Timeline.kt
    • Increased the EMPTY_STATE_DELAY constant from 1.4 seconds to 2.2 seconds.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a bugfix for push notifications, particularly for multi-account support. The key changes involve passing a targetDid with push notification payloads to correctly identify the recipient profile, and updating the push token registration process to include all signed-in DIDs. This ensures notifications are routed and processed correctly in a multi-account environment. The session handling has also been refactored for better clarity and safety.

My review includes a couple of points. One is about a change that affects user experience by showing system notifications while the app is in the foreground. The other is about a potential inefficiency in the push token registration logic. Overall, the core logic for the bugfix seems correct and well-implemented.

@tunjid tunjid merged commit 089ec44 into releases Feb 24, 2026
6 checks 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