Skip to content

feat: tappable dashboard stats and notifications that land on the right item - #41

Open
gajjug004 wants to merge 3 commits into
bwhtech:developfrom
gajjug004:feat/notification-focus-and-dashboard-filters
Open

feat: tappable dashboard stats and notifications that land on the right item#41
gajjug004 wants to merge 3 commits into
bwhtech:developfrom
gajjug004:feat/notification-focus-and-dashboard-filters

Conversation

@gajjug004

@gajjug004 gajjug004 commented Sep 9, 2026

Copy link
Copy Markdown

Two fixes, one per commit.

Dashboard quick stats open the filtered list (#40)

Open, Resolved today and Overdue were counts with no way through. Each card is now a tappable Surface (so it ripples) and navigates to tickets?preset=…; the list shows a clearable chip for the preset.

The count and the list read the same predicate, TicketPreset, and MetricsCalculator counts with it too, so a card can never claim a number the list it opens does not show. TicketPresetTest locks that down, including the Overdue/Analytics mismatch I noticed while reproducing.

Notifications land on the item they are about (#39)

helpdesk_push already sends type in the data payload. That now becomes a focus and travels both paths a notification can arrive by:

  • FCM tray tap (notification-payload message, app backgrounded): type comes in as an intent extra, MainActivity turns it into a PendingTicket.
  • App-drawn notification (NotificationHelper): the deep link becomes helpdesk://ticket/<id>?focus=comment|reply.

TicketDetailScreen then opens the matching tab, scrolls to the newest item in it, and outlines that item for 2.5s.

Scope limit worth knowing: the payload carries no comment or communication id, so "the item" resolves to the newest one in that tab. Exact-item targeting needs kaulith/helpdesk-push to send the id alongside ticketId.

Testing

Not built locally: no JDK or Android SDK on the machine I worked from, so this PR's CI run is the first compile. Repro evidence for both issues is in #39 and #40.

One caveat on the #39 repro: the phone I reproduced on runs a com.example.helpdeskanalytics build that predates this repo's first commit, so its "tap lands on Dashboard" behaviour does not prove develop's tray-extras path is broken. The part this PR adds, landing on the right item, was missing on develop either way.

The Open, Resolved today and Overdue cards were inert: a count with no way
through to the tickets behind it. Each card now navigates to the ticket list
filtered to exactly what it counted, and shows a clearable chip there.

Both sides read one predicate, TicketPreset, so a card's count and the list
it opens cannot drift apart. MetricsCalculator counts with it too.

Closes bwhtech#40
Tapping a ticket notification opened the ticket at the top, leaving the user
to hunt for the comment or email that triggered it. The push payload already
carries type, so carry it through as a focus: the deep link gains ?focus=,
the tray-extras path reads it from the type extra, and the ticket screen
opens the matching tab, scrolls to the newest item there and outlines it for
2.5s.

helpdesk_push sends no comment or communication id, so the focus resolves to
the newest item in that tab. Targeting an exact item needs a payload change
on the server side.

Closes bwhtech#39
@gajjug004
gajjug004 requested a review from kaulith as a code owner September 9, 2026 07:53
detekt's MatchingDeclarationName: NavGraph.kt held a single top-level class
declaration under a different name.
@gajjug004
gajjug004 force-pushed the feat/notification-focus-and-dashboard-filters branch from c06f2be to 68ed866 Compare September 9, 2026 07:59
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