Skip to content

feat(inbox): Visual Notification Inbox overlay (integration / build distribution) - #769

Open
mahmoud-elmorabea wants to merge 20 commits into
mainfrom
feat/overlay-inbox
Open

feat(inbox): Visual Notification Inbox overlay (integration / build distribution)#769
mahmoud-elmorabea wants to merge 20 commits into
mainfrom
feat/overlay-inbox

Conversation

@mahmoud-elmorabea

@mahmoud-elmorabea mahmoud-elmorabea commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Draft integration PR for the Visual Notification Inbox overlay. Opened primarily to publish sample-app builds to Firebase App Distribution so another team can test the feature end-to-end.

Aggregates the already-reviewed sub-PRs: module skeleton, data layer, overlay UI, interaction/web-parity, message actions + branding colors, dismiss-resurrection guard, and sample-app listener demo.

Firebase App Distribution builds (java_layout + kotlin_compose) are posted as a comment on this PR once CI completes.

🤖 Generated with Claude Code


Note

Medium Risk
Large surface across inbox state, SSE/HTTP ordering, and a new public Compose module; behavior is well-tested but race between SSE and backfill fetch is documented as unresolved.

Overview
Introduces the visual notification inbox end-to-end: a server-driven enablement gate (X-CIO-Inbox-Enabled), parallel fetch/cache of templates and branding, visibility rules (hidden when not fully renderable—no UI error state), and a VisualInbox facade over existing headless inbox mutations.

messaginginapp gains InboxEventListener (build-time + runtime override), trackMessageClicked overload with actionValue for web-parity metrics, delete tombstones so dismissed messages are not resurrected by stale polls, and SSE backfill moved to the server connected event (foreground no longer fires fetchUserMessages immediately). The gist queue reuses its OkHttp client for inbox GETs and triggers template/branding loads on enablement or cache miss.

Adds publishable module messaginginbox: Compose NotificationInboxOverlay / bell / list, Jist + Material3 sheet, workspace bell SVG parsing and corner positioning, plus manifest queries for URL resolution. CI lint/unit-test matrices include messaginginbox; buildSrc pins Jist and new Compose deps.

Reviewed by Cursor Bugbot for commit 519032b. Bugbot is set up for automated code reviews on this repo. Configure here.

mahmoud-elmorabea and others added 9 commits July 3, 2026 17:22
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, selection) (#744)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…747)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tes, no-template skip, hovering panel) (#751)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e, desugaring docs) (#752)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… poll (#758)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
  • java_layout: Build failed. See CI job logs to determine the issue and try re-building.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
  • kotlin_compose: Build failed. See CI job logs to determine the issue and try re-building.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 49.08425% with 556 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.97%. Comparing base (b5cf24d) to head (519032b).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
...ustomer/messaginginbox/NotificationInboxOverlay.kt 0.00% 381 Missing ⚠️
...tomer/messaginginapp/inbox/data/InboxRepository.kt 79.05% 9 Missing and 22 partials ⚠️
...customer/messaginginbox/VisualInboxOverlayState.kt 81.16% 14 Missing and 15 partials ⚠️
.../io/customer/messaginginapp/inbox/data/InboxApi.kt 34.14% 26 Missing and 1 partial ⚠️
...va/io/customer/messaginginapp/inbox/VisualInbox.kt 0.00% 24 Missing ⚠️
...n/java/io/customer/messaginginbox/InboxBellIcon.kt 59.61% 11 Missing and 10 partials ⚠️
...ava/io/customer/messaginginbox/InboxJistDecoder.kt 66.10% 9 Missing and 11 partials ⚠️
...ustomer/messaginginapp/di/DIGraphMessagingInApp.kt 14.28% 6 Missing ⚠️
...stomer/messaginginapp/gist/data/listeners/Queue.kt 79.31% 4 Missing and 2 partials ⚠️
...io/customer/messaginginapp/ModuleMessagingInApp.kt 25.00% 3 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #769      +/-   ##
============================================
- Coverage     69.07%   65.97%   -3.10%     
- Complexity      838     1293     +455     
============================================
  Files           149      224      +75     
  Lines          4601     7685    +3084     
  Branches        628     1234     +606     
============================================
+ Hits           3178     5070    +1892     
- Misses         1189     2220    +1031     
- Partials        234      395     +161     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1783341984)

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1783341976)

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

📏 SDK Binary Size Comparison Report

Module Last Recorded Size Current Size Change in Size
core 45.65 KB 45.65 KB ✅ No Change
datapipelines 42.63 KB 42.63 KB ✅ No Change
messagingpush 31.45 KB 31.45 KB ✅ No Change
messaginginapp 123.88 KB 148.53 KB ⬆️ +24.65KB
messaginginbox null 60.46 KB ⬆️ +60.46KB
tracking-migration 22.89 KB 22.89 KB ✅ No Change
location 18.93 KB 18.93 KB ✅ No Change
geofence 78.55 KB 78.55 KB ✅ No Change

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Build available to test
Version: feat-overlay-inbox-SNAPSHOT
Repository: https://central.sonatype.com/repository/maven-snapshots/

@mahmoud-elmorabea
mahmoud-elmorabea marked this pull request as ready for review July 6, 2026 13:03
@mahmoud-elmorabea
mahmoud-elmorabea requested a review from a team as a code owner July 6, 2026 13:03
…pty inbox) (#771)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1783353755)

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1783353743)

…EventListener (#772)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1783429189)

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1783429180)

…rity actions (#776)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1784209701)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1784209675)

…nts (#782)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1784585608)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1784585616)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1784677622)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1784677624)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1784899897)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1784899901)

mahmoud-elmorabea and others added 2 commits July 28, 2026 08:13
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolves the four conflicts, all caused by geofencing (#763) registering a new
module in the same lists the inbox module uses. Each takes the union of both
sides rather than either one:

- settings.gradle: keep include ':geofence' alongside the note explaining why
  :messaginginbox needs no local include (it consumes Jist from Maven Central).
- scripts/sdk-binary-size.gradle, lint.yml, test.yml: module lists now carry
  messaginginbox plus location and geofence.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 84d2989. Configure here.

@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1785216904)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1785216879)

#800)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1785219742)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1785219742)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
  • java_layout: feat/overlay-inbox (1785326107)

@github-actions

Copy link
Copy Markdown
  • kotlin_compose: feat/overlay-inbox (1785326109)

*/
private fun backfillOnConnect() {
sseLogger.logSseConnectionConfirmedBackfill()
gistQueue.fetchUserMessages()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we track a follow-up to prevent the HTTP backfill from overwriting newer inbox state received through SSE? If an SSE update arrives while the backfill request is still running, the older HTTP response can replace it, and the inbox may stay stale until another SSE event or reconnect. I don’t think this needs to block this PR, but linking the follow-up here would make the remaining limitation clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The window is too narrow and it exceptionally unlikely that these two responses have different messages. I suggest we take as a follow up to sequence the two calls or have some kind of logic to merge them

if (inAppMessagingManager.getCurrentState().sessionId == sessionAtFetchStart && hasServableAssets) {
hasRevalidatedAssetsThisSession.set(true)
} else if (!hasServableAssets) {
logger.debug("$LOG_TAG revalidation produced nothing servable: gate stays open for the next poll")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks non-blocking and could be followed up separately. If the initial asset fetch exhausts its retries while SSE remains connected, there is no independent retry, so the inbox can stay hidden until a later lifecycle or connection event. Could we track that follow-up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, what do you suggest? I don't think we should keep retrying for the entire session or maybe only if its network related issue

// User became identified and SSE is enabled - start SSE connection
sseLogger.logEnablingSseForIdentifiedUser()
sseConnectionManager.startConnection()
startSseConnection()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we handle a direct switch from one identified user to another by observing the actual user ID, clearing the previous inbox state, and reconnecting SSE? For A → B, isUserIdentified stays true, so this callback never runs. The existing stream remains authenticated as A while the SDK treats B as current, and later events from A can replace B’s inbox state. Since this can expose one user’s inbox to another, I think it should block the release. A focused A → B test would help cover the fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this is the whole of in-app, not just inbox. Maybe if we want to formally support that login while a user already logged in path we could. I suggest handling that as a follow up as well

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.

3 participants