Mark notifications as read on GitHub when leaving unread#26
Open
greggroth wants to merge 1 commit into
Open
Conversation
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>
5c72ee3 to
9e28507
Compare
anticomputer
approved these changes
Jun 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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-effortPATCH /notifications/threads/{thread_id}using the thread id stored on the underlying forge-notification object, authenticated viaforge--rest. Wire it intogh-notify-set-notification-statusso 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 defcustomsetting (default t). Setting a notification back to unread remains local-only, as GitHub has no stable endpoint to mark a thread unread.