Problem
The recent re-open fix only reopens a dismissed notification when the GitHub notification reason changes. That catches cases like subscribed -> mention, but it can miss same-reason new activity, such as a new comment on a subscribed thread that remains reason=subscribed.
If GitHub returns an already-handled notification in the active notifications API again, that is itself useful signal: there is unread/new activity for the thread.
Suggested behavior
Reopen a locally handled notification when GitHub serves it again with new activity, even if reason did not change.
Implementation hints
Options:
- Store GitHub
updated_at on the notification row and reopen when incoming updated_at > last_handled_github_updated_at.
- Store
last_read_at/latest_comment_url where available and compare those.
- Simpler first pass: if an existing row is
dismissed=1 or acted_at IS NOT NULL and appears in gh api notifications, clear dismissed, clear acted_at, and set action_taken = 'RE-OPENED: new GitHub activity detected'.
Be careful not to reset rows that are currently processing=1; those should probably stay locked.
Problem
The recent re-open fix only reopens a dismissed notification when the GitHub notification
reasonchanges. That catches cases likesubscribed -> mention, but it can miss same-reason new activity, such as a new comment on a subscribed thread that remainsreason=subscribed.If GitHub returns an already-handled notification in the active notifications API again, that is itself useful signal: there is unread/new activity for the thread.
Suggested behavior
Reopen a locally handled notification when GitHub serves it again with new activity, even if
reasondid not change.Implementation hints
Options:
updated_aton the notification row and reopen when incomingupdated_at > last_handled_github_updated_at.last_read_at/latest_comment_urlwhere available and compare those.dismissed=1oracted_at IS NOT NULLand appears ingh api notifications, cleardismissed, clearacted_at, and setaction_taken = 'RE-OPENED: new GitHub activity detected'.Be careful not to reset rows that are currently
processing=1; those should probably stay locked.