Skip to content

fix(notifications): do not notify task viewers - #3959

Merged
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/gate-task-notifications-by-author
Jul 30, 2026
Merged

fix(notifications): do not notify task viewers#3959
trunk-io[bot] merged 2 commits into
mainfrom
posthog-code/gate-task-notifications-by-author

Conversation

@puemos

@puemos puemos commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Problem

Opening a cloud task starts a technical watcher so the app can show live updates. That watcher stays active across navigation and could also trigger completion or needs-input notifications, even when the viewer did not create the task.

There is no user-facing follow or notification subscription involved.

Changes

Behavior Before After
Open another persons task Starts live updates and could later trigger task notifications Starts live updates only
Task finishes or needs input Any client with the technical watcher could notify Only the task creator is notified
Navigate away from the task The watcher remains active Unchanged; live updates continue without granting notification eligibility

The session now records whether the current user created the task. Completion, permission, and spoken notifications check that value before notifying. The live-update watcher itself is unchanged.

How did you test this?

  • Added regression coverage proving that a non-author watcher receives updates without completion, permission, or spoken notifications.
  • Core notification tests passed.
  • Session connection tests passed.
  • Core and UI typechecks passed.
  • Biome and host-boundary checks passed.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 04ff1360-0219-49e7-8831-80aa42d846c6
@puemos puemos self-assigned this Jul 29, 2026
@trunk-io

trunk-io Bot commented Jul 29, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit cf9a51d.

@posthog

posthog Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🦔 ReviewHog reviewed this pull request

Found 1 must fix, 0 should fix, 1 consider.

Published 2 findings (view the review).

@posthog

posthog Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

ReviewHog Alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

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.

ReviewHog Report

Changes

Issues: 2 issues

Files (4)
  • packages/core/src/sessions/sessionFactory.ts
  • packages/core/src/sessions/sessionService.ts
  • packages/shared/src/sessions.ts
  • packages/ui/src/features/sessions/hooks/useSessionConnection.ts

Comment thread packages/ui/src/features/sessions/hooks/useSessionConnection.ts Outdated
Comment thread packages/ui/src/features/sessions/hooks/useSessionConnection.ts
Generated-By: PostHog Code
Task-Id: 04ff1360-0219-49e7-8831-80aa42d846c6
@puemos
puemos marked this pull request as ready for review July 30, 2026 07:31
@trunk-io
trunk-io Bot merged commit 3d73555 into main Jul 30, 2026
43 of 44 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/gate-task-notifications-by-author branch July 30, 2026 08:02
@puemos puemos changed the title fix(notifications): notify task authors only fix(notifications): do not notify task viewers Jul 31, 2026
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