You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(notifications): notification topics, real badge count and Catch up in the Huddle inbox (#914) - #931
Implements docs/notification-inbox-frontend-plan.md: notifications appear as topics in the Huddle inbox, the app badge shows the real unread total, and a Catch up view walks through unread cards. Nothing new is stored: no collections, fields or migrations. Server changes are code plus one index (notifications{ userId, read }, droppable with dropIndex('unread_by_user')).
Demo
Member, on a phone
Owner, on a phone
Open Catch up, Mark read, Undo, then walk through the cards to "You're all caught up"
Approve in the Requests topic, switch teams from the chips, and the Personal view
On desktop: Catch up opens as a centred dialog, with the same Mark read and Undo.
Screenshots
Member, on a phone
1. Shift-end reminder
2. Inbox with topics
3. Requests topic
4. Catch up
5. Mark read, with Undo
6. All caught up
Owner, on a phone
7. Inbox with topics
8. Approve / Decline
9. Answered
10. Team chips
11. Another team
12. Personal view
On desktop
13. Inbox with topics
14. Requests topic
15. Catch up
16. Mark read, with Undo
What changed
Server (meteor-backend/): clock-out/clock-in alerts always open Huddle; notifications.unreadCount and notifications.markManyRead (returns each row's stored read time); getInbox({ withUnread }); the real unread total in the APNs/FCM badge, a silent badge push after reads and deletes (deleteNotifications helper), and a badge sync when an iOS token registers; "Agree to Clock Out" also records shiftReminderResponse.
Inbox state (NotificationInboxContext): one provider for the live inbox and the exact count; it reloads when the rows and the count disagree (reads or deletes on another device, answered requests, more than one load of unread). Web/Android badge sync.
Huddle (useNotificationTopics, notificationTopics): virtual topics for tickets, Requests and Clock reminders, unread counts on real conversations, Approve/Decline and Clock out/Keep working inside topics (NoticeActions). Opening a topic marks it read (plan decision D6); not while the tab is hidden or Catch up is open.
Catch up (CatchUp): one card at a time per team across every organization, Mentions first / Recent, Mark read with a 5 s Undo (sent only after the window, card hidden while the request is in flight), Open conversation, cards for unread that no team holds, phone full-screen layout.
Shift reminder: the popup follows the clock event's own answer (response or agreed flag), not read.
Header bell shows the unread count; the Start huddle button is replaced by Catch up (see docs/superchat-inbox-gaps.md for what SuperChat could not do).
Validation
Frontend: npx vitest run src 1136 passing; tsc --noEmit, ESLint and Prettier clean.
Backend: unit tests 732 passing; notifications integration tests 13 passing against a local backend. shift-end.test.ts needs METEOR_AGENDA_ENABLED=true, and timesheet-approvals.test.ts counts all request notifications in its database, so neither was meaningful on the local seeded database.
Checked in a browser at web and phone sizes and on an iPhone (Device Hub, timecore-dev). Not yet confirmed: the app-icon number after a read on another device, and the Android badge.
Known limits
The @ mention marker is not shown on conversation rows (SuperChat has no slot).
The Android badge updates with each new push but not after a read while the app is closed; that needs a store build.
Break reminders and other types not in the plan's table appear as "Other notifications", linking to the Notifications page.
Virtual topics built in the browser from the notifications already loaded,
a real app badge count, Catch up, and answering requests inside a topic.
Server code may change but no collection, field or stored data does; the
only database change is one index on notifications.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved gaps in unread-state synchronization, visibility-based read tracking, and clock-out behavior could leave notifications and badges stale or sessions running.
Adds a documentation-only plan for #914 that groups existing notifications into browser-built Huddle topics without storing new data. Server-stored topics from #928 remain an optional later phase.
Changes:
Defines topic mappings and no-new-data constraints.
Plans unread counts, badge updates, inline actions and Catch up with delayed Undo.
Provides milestone checklists, validation steps and rollout guidance.
File
Description
docs/notification-inbox-frontend-plan.md
Adds the phased implementation plan for notification topics and Catch up.
- [ ] `push.js` `sendApns`: replace `note.badge = 1` (~line 154) with `unreadTotal(userId)`, counted **after** the new notification is inserted.
- [ ] `push.js` `sendFcm`: set `android.notification.notificationCount` to the same total.
- [ ] Helper **`syncBadge(userId)`**: sends a **silent** APNs push (no alert, no sound, `badge: <total>`) to that user's iOS devices. Call it after `markOneRead`, `markAllRead` and `markManyRead`. Don't let a push failure fail the method.
- [ ] Android: when the frontend's unread total reaches 0, call `PushNotifications.removeAllDeliveredNotifications()` (the plugin is already installed). This ships as an **OTA**; no store build.
The reason will be displayed to describe this comment to others. Learn more.
Not changed. You are right that Android only gets a new count with the next push, and that clearing the shade at zero needs the app to be running. A background update path on Android needs a store build, which this PR avoids; it is listed under Known limits in the description. Leaving this open for the plan's authors to decide.
- [ ] Labels: ticket topics show the ticket key and **current** title, using the tickets the app already loads for the team, and falling back to the newest notification's title (D5). Requests: "Requests". Reminders: "Clock reminders". Put the strings in a `*_TEXT` object.
- [ ] Opening a virtual topic shows its notifications as messages (title, body, time, a link to `data.url`). It has **no composer**: nobody can post into it.
- [ ] Opening a virtual topic calls `markManyRead` with its unread ids (one call). The badge, unread count and Catch up update without a reload.
- [ ] Real conversations: set SuperChat's unread badge (already supported, gaps doc row 1.16) from that conversation's unread post notifications (D3). Show an **@** marker when one is a mention. Opening the conversation calls `markManyRead` for them.
The reason will be displayed to describe this comment to others. Learn more.
Not changed here. Marking a topic's notifications read when it opens is the plan's decision D6, and the notification list is a short feed rather than a long scroll. What I did change: nothing is read in a hidden tab or while Catch up is open. If #914 needs per-message visibility, that is a decision for the issue owner, so leaving this open.
One huddleUrl helper replaces the Work-tab fallbacks in clock-in and clock-out notices.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
One NotificationInboxProvider owns the live inbox and the exact unread count;
iOS gets the count in each push and in a badge-only push after reads, Android
clears the shade at zero, and the web sets the Badging API.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
#914)
Ticket, Requests and Clock reminders topics are built in the browser from the live
inbox; post notifications count on the conversation holding the post. Opening
either marks its notifications read in one call.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ic (#914)
Approve/Decline a timesheet change or join request, and Clock out / Keep working,
from the notification topic. The shift-reminder answer is shared with its pop-up.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
One card per conversation with unread items, Mark read held for an undo window,
a team switch and sort. Adds the 1.3.0 release note and an e2e.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… its dialog while the team changes (#914)
- A card for unread that is in no conversation here, and a pointer to the Notifications page for unread with no team
- Undo is a status bar under the card
- The dialog's open state lives in Huddle, so switching team no longer closes it
- Catch up is a full-width row under the filters, not crammed beside the search box
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t the newest 200 (#914)
getInbox can include older unread rows (withUnread, up to 1000); unread with no team gets its own card; the team's unplaced unread comes before it.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s in the browser (#914)
- A failed join request lookup no longer reads as answered
- Answer buttons left-align; team buttons in Catch up wrap
- Opening a conversation marks nothing read while Catch up is open
- The phone's full-screen Catch up keeps clear of the notch
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved notification-state bugs can make unread items inaccessible, leave inboxes and badges inconsistent, and misrepresent shift-reminder responses.
Approving or rejecting deletes this request's notifications on the server (timesheet-approvals.js:305-311), but this only updates component-local request state. The shared inbox ignores DDP removals, so the deleted message and potentially its unread Catch up card remain. Remove the matching rows from the shared inbox after a successful decision.
Remove answered join-request notifications from the shared inbox
Answering a join request deletes its notification on the server, but this handler updates only component-local state. The additions-only subscription leaves the deleted message in the shared inbox, including an unread Catch up card when answered there. Remove the row from the shared inbox after success, as the NotificationsPage handler already does.
Include reminder responses in the DDP clock mapping
src/lib/api.ts:1828
The REST clock serializer supplies this field, but ddpDocToClockEvent in src/lib/ddp.ts:787–797 drops it. TeamContext uses that mapper for live updates, so an answer made on another device never updates the new pending-state checks until a REST refresh. Carry shiftReminderResponse through the DDP mapper as well.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved notification-state bugs can leave counts and cards inconsistent, make unread items inaccessible, and resurface already-answered shift reminders.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unresolved synchronization, pagination, and reminder-response defects can leave notification cards and badges stale, hide valid actions, and make unread items unreachable.
… reminder answers
- Refresh the iPhone badge when unread notifications are deleted (one shared helper)
- markManyRead returns each row's stored read time
- Inbox reloads when its rows and the exact count disagree (other-device reads, answered
requests, more than one load of unread)
- Catch up keeps a card hidden while its request is pending and restores it on failure;
button shows in Personal; ticket topic titles follow live renames
- Hidden tabs no longer mark notifications read
- Agree to Clock Out counts as an answer (server records it; client reads the flag too);
DDP adapter maps the response; reminder status comes from its own team
- A failed request lookup is no longer shown as already answered
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dharp02
changed the title
docs: Plan for Notifications in the Huddle Inbox Without New Data (#914)
feat(notifications): notification topics, real badge count and Catch up in the Huddle inbox (#914)
Dec 4, 2026
The notification work moves out of the 1.3.0 note into its own 1.4.0 note.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
Not changed. Marking a topic's notifications read when it opens is the plan's decision D6 (see the earlier threads on this); whether #914 needs per-message visibility is for the issue owner. What does gate it: a visible tab, a conversation pane that is on screen, and Catch up not being open. Leaving this open.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved issues allow stale shift-reminder actions to overwrite answers from another device, while notification races and reconciliation gaps leave incorrect badges and outdated controls visible.
…pane visibility
- Open notifications on the fallback card no longer marks its rows read
- Counts that answer out of order are ignored; coming back to the foreground reloads the inbox
- The REST clock event carries autoClockoutAgreed, so a shift agreed before the response was
recorded still reads as answered; the pop-up closes when another device answers
- getInbox({ withUnread }) also returns the unanswered reminder of an open shift, however old
- Auto read waits until the conversation pane is on screen (phones keep it open behind the list)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
An unresolved inbox-loading race can restore deleted notifications after a newer response, leaving stale entries that unread-count reconciliation cannot remove.
…eyed Catch up cards
- Inbox loads are numbered, so an older answer cannot put back a deleted row
- The open-shift reminders are fetched apart from the limited inbox rows
- Every stored notification that sends no phone alert still refreshes the iPhone badge
- Catch up keeps held and in-flight cards by team and id, so same-id cards of other teams show
- Catch up says it could not load (with a retry) instead of "all caught up" after a failed load
- Auto read never sends an id again while its request is out
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The shared “Not tied to a team” card uses a team-specific key, allowing duplicate Mark read/Undo actions when switching teams during an in-flight request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #914
Implements
docs/notification-inbox-frontend-plan.md: notifications appear as topics in the Huddle inbox, the app badge shows the real unread total, and a Catch up view walks through unread cards. Nothing new is stored: no collections, fields or migrations. Server changes are code plus one index (notifications{ userId, read }, droppable withdropIndex('unread_by_user')).Demo
On desktop: Catch up opens as a centred dialog, with the same Mark read and Undo.
Screenshots
Member, on a phone
Owner, on a phone
On desktop
What changed
meteor-backend/): clock-out/clock-in alerts always open Huddle;notifications.unreadCountandnotifications.markManyRead(returns each row's stored read time);getInbox({ withUnread }); the real unread total in the APNs/FCM badge, a silent badge push after reads and deletes (deleteNotificationshelper), and a badge sync when an iOS token registers; "Agree to Clock Out" also recordsshiftReminderResponse.NotificationInboxContext): one provider for the live inbox and the exact count; it reloads when the rows and the count disagree (reads or deletes on another device, answered requests, more than one load of unread). Web/Android badge sync.useNotificationTopics,notificationTopics): virtual topics for tickets, Requests and Clock reminders, unread counts on real conversations, Approve/Decline and Clock out/Keep working inside topics (NoticeActions). Opening a topic marks it read (plan decision D6); not while the tab is hidden or Catch up is open.CatchUp): one card at a time per team across every organization, Mentions first / Recent, Mark read with a 5 s Undo (sent only after the window, card hidden while the request is in flight), Open conversation, cards for unread that no team holds, phone full-screen layout.read.docs/superchat-inbox-gaps.mdfor what SuperChat could not do).Validation
npx vitest run src1136 passing;tsc --noEmit, ESLint and Prettier clean.notificationsintegration tests 13 passing against a local backend.shift-end.test.tsneedsMETEOR_AGENDA_ENABLED=true, andtimesheet-approvals.test.tscounts all request notifications in its database, so neither was meaningful on the local seeded database.tests/e2e/notifications/catch-up.spec.ts(Mark read, Undo, count returns).Known limits
🤖 Generated with Claude Code