Skip to content

Mark notifications as read on GitHub when leaving unread#26

Open
greggroth wants to merge 1 commit into
anticomputer:mainfrom
greggroth:greggroth/mark-notifications-read
Open

Mark notifications as read on GitHub when leaving unread#26
greggroth wants to merge 1 commit into
anticomputer:mainfrom
greggroth:greggroth/mark-notifications-read

Conversation

@greggroth

Copy link
Copy Markdown

Fixes #15

gh-notify only updated local Magit/Forge state when a notification was visited or set to done/pending; the change was never pushed back to GitHub, so notifications stayed unread on github.com. Forge no longer marks threads read on a topic visit, so gh-notify must do it itself.

Add gh-notify--remote-mark-thread-read, which issues an asynchronous, best-effort PATCH /notifications/threads/{thread_id} using the thread id stored on the underlying forge-notification object, authenticated via forge--rest. Wire it into gh-notify-set-notification-status so every path that makes a notification read (visit, set-pending, set-done, and the marked-bulk variants) syncs to GitHub when transitioning out of unread.

Gate the behavior behind the new gh-notify-remote-mark-read defcustom setting (default t). Setting a notification back to unread remains local-only, as GitHub has no stable endpoint to mark a thread unread.

gh-notify only updated local Magit/Forge state when a notification was
visited or set to done/pending; the change was never pushed back to
GitHub, so notifications stayed unread on github.com. Forge no longer
marks threads read on a topic visit, so gh-notify must do it itself.

Add gh-notify--remote-mark-thread-read, which issues an asynchronous,
best-effort PATCH /notifications/threads/{thread_id} using the thread id
stored on the underlying forge-notification object, authenticated via
forge--rest. Wire it into gh-notify-set-notification-status so every path
that makes a notification read (visit, set-pending, set-done, and the
marked-bulk variants) syncs to GitHub when transitioning out of unread.

Gate the behavior behind the new gh-notify-remote-mark-read defcustom
(default t). Setting a notification back to unread remains local-only, as
GitHub has no stable endpoint to mark a thread unread.

Refs: anticomputer#15

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@greggroth greggroth force-pushed the greggroth/mark-notifications-read branch from 5c72ee3 to 9e28507 Compare June 18, 2026 20:12
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.

notifications are no longer being marked as read on GitHub

2 participants