documentation/NOTIFICATIONS.md · main · 2026-11-14

Notifications

Notifications from all extensions are in one feed, with the newest first.

Commands · Levels · Desktop notifications · Message text · Types

Commands

gitsocial notifications [--all] [--type mention,follow] [--limit <n>]
gitsocial notifications count
gitsocial notifications read <id> | read-all
gitsocial notifications unread <id> | unread-all
gitsocial notifications level [<repository>] [all|default|off]

gitsocial fetch reports the unread count when it finishes. In the TUI, @ opens the feed.

gitsocial notifications prints the id of each notification that has a read state: <repository>#commit:<hash>, or <repository>#follow for a follow. read and unread take that id.

Levels

A level of a repository changes the notifications that you get from it. The level is in your personal settings (SETTINGS.md), not in the repository.

gitsocial notifications level                                   # print the levels
gitsocial notifications level all                               # the workspace
gitsocial notifications level https://github.com/org/repo off
gitsocial notifications level https://github.com/org/repo default  # remove the level
LevelNotifications
defaultthe types; a repository with no level is at default
allthe types, and one activity notification for each new timeline item of the repository that is not yours, from the time that you set the level
offthe notifications stay in the feed and in the count, and go to the webhook; none gives a desktop message

The level applies to the repository of the commit of a notification, not to the repository of the item that the commit is about. For example, a comment from a followed repository on your post gives a desktop message when your workspace is at off; it gives none when the followed repository is at off.

The settings view of the TUI shows the level of the workspace as notifications.level; e or Enter changes it to the next level. A registered fork with no level takes the level of the workspace. The level all applies only to the workspace, its registered forks and the repositories of its lists. The activity notifications count toward the limit of three desktop messages, so a fetch with many of them gives one summary. A notification of a repository at off is recorded as sent, so it gets no desktop message after a later change of the level.

RuleTest
A repository with no level gives the same notifications as beforeTestLevel_defaultAddsNothing
The level all gives one activity notification for each timeline item of the repositoryTestLevel_allGivesTimelineRows
An item that is not newer than the set time gives no notificationTestLevel_allStartsAtSetTime
An item by you gives no notificationTestLevel_allSkipsOwnItems
A repository that the workspace does not use gives no activity notificationTestLevel_allOnlyInScope
A fork commit that is also in the workspace gives no activity notificationTestLevel_forkCopyGivesNoEvent
A commit with one of the types keeps that typeTestOnePerKey_activityRanksLast
An assign after a read activity notification of the issue gives a new unread oneTestLevel_assignAfterReadGivesEvent
An activity notification is sent one time and is read by its hashTestDeliver_activityClaimedOnce
A notification of a repository at off is recorded as sent, is in the feed, goes to the webhook, gives no desktop message and is not in the count of a summaryTestDeliver_offRepoNoDesktop
A registered fork with no level takes the level of the workspaceTestLevel_forkTakesWorkspaceLevel
The level of a fork has priority over the level of the workspaceTestLevel_forkOwnEntryWins
A running TUI, serve or RPC server reads a level that a different process wroteTestLevel_seenByRunningProcess
A set stores the identity of the repository and the set time; default removes the levelTestWriteNotificationLevel_roundTrip
The command sets, prints and removes a levelTestNotificationsLevel_setAndList
An activity row in the TUI opens what the timeline row of the item opensTestActivityRow_timelineTarget

Desktop notifications

After a fetch, GitSocial sends a desktop message for each unread notification that no process sent before. Up to three notifications give one message each, and more give one summary message. The cache records each notification that is sent, so the TUI, gitsocial fetch and RPC on one cache send a notification one time.

FetchDesktop messageWebhook
the auto-fetch of the TUIyesyes
the key f in the TUIno, the footer shows the result; no later fetch sends these notificationsyes
the command gitsocial fetch, RPC core.fetchyesyes
the command gitsocial fetch --json, gitsocial social fetch, gitsocial serve, the sync when the TUI starts, the fetch of one repository or of an added repository in the TUI, an importno; the next fetch of the first three rows sends the notificationsno; the same

Turn on fetch.auto.enabled to get desktop messages from the TUI. A notification that you read before a fetch sends it gets no message, also when you mark it unread again. The branch notifications send no message. A new cache, or a repository that you add, can bring old unread notifications; they give a maximum of three messages or one summary.

The cache records one sent state per notification, not one per channel. A notification that the webhook got while the desktop was off gets no desktop message later.

RuleTest
Two deliveries on one cache send an event one timeTestDeliver_twoProcessesSendOnce
A fetch without delivery leaves its events for the next deliveryTestDeliver_afterServeFetch
A manual fetch posts to the webhook and shows no desktop message, now or laterTestDeliver_manualClaimsNoDesktop
An event that was read is never sentTestDeliver_readThenUnread
An event that was sent stays unreadTestClaim_staysUnread
With the desktop off and no webhook, nothing is recorded as sentTestDeliver_channelsOffClaimsNothing

A click on a message goes to the process that sent it.

SendermacOSLinuxWindows
the TUIbrings the terminal of the TUI to the front and opens the item in the TUIopens the item in the TUI; in Ghostty 1.4 or later, in GNOME Terminal and in Konsole on KDE Plasma the tab of the TUI comes to the front; in Ptyxis the Ptyxis window that was used last comes to the front, and the tab is not selected; in another terminal the window stays behindno click
the CLI (gitsocial fetch), RPCopens the item on the siteopens the item on the siteopens the item on the site

In the TUI, the click opens the view that Enter on the row of the feed opens, and marks the notification read. A summary opens the feed. Back goes to the view before the click. In Ghostty, Terminal and iTerm2, the tab of the TUI comes to the front; in another terminal app, only the app comes to the front. Inside tmux, the click selects the tmux window of the TUI and brings the terminal of the tmux client that was active last to the front, with the same result for each terminal as outside tmux.

A click of gitsocial fetch or RPC opens the served site when gitsocial serve runs for the workspace, else the site.url of the workspace. With neither, the message has no click. A summary, and an item of another repository, open the start page of the site.

Known cases of a click on a message of the TUI:

OSSenderInstall
macOSGitSocial.appthe app in ~/Applications or /Applications; the Homebrew cask and the install script place it, and the darwin release zip has it
Linuxthe notification service on the session D-Bus; notify-send for a message with no clicka session D-Bus for the click; the first message writes the icon to ~/.local/share/icons
Windowsa PowerShell toastnothing; the first message writes a GitSocial shortcut into the Start Menu

On macOS without the app, or when the app cannot post, the message comes from osascript, under the name of Script Editor, with no click. The first message asks for permission. If you see no messages, allow notifications for GitSocial in the system settings.

To turn the messages off, run gitsocial settings set notifications.desktop false, or set GITSOCIAL_DESKTOP_NOTIFICATIONS=false on one machine.

Message text

A message has a title and a body of one or two lines. The desktop, the webhook, the browser and the list of gitsocial notifications show the same text; the TUI feed shows cards.

PartContentLimit
titlethe glyph of the row, the actor and what the actor did; it never holds the text of an itemactor 30
line 1the excerpt, the first line of the new text of the event, else the subject, the first line of the item that the event is about100
line 2the repository; when line 1 is the excerpt, the subject, then · , then the repositorysubject 40

A part with no value is left out, so a message with no excerpt and no subject has the repository as its body. A limit counts code points, with ... inside the limit. The glyph is the glyph of the timeline row: the item in its state, ✓ or ✗ for a review, ☷ for a follow and ⎇ for a branch notification. A code commit has no glyph.

Each type has this text, for the actor Alice. S is the subject and E the excerpt.

TypeTitleLine 1
mention• Alice mentioned youE, the first line of the message that mentions you
reference☐ Alice referenced your itemE, the subject of the commit with the trailer; S is your item
edit☐ Alice edited your item; Alice retracted your item; Alice proposed an edit to your item, for an edit from a different repositoryS, the first line of the first version
comment↩ Alice commentedE; S is the original item
repost↻ Alice reposted your postS
quote↻ Alice quoted your postE; S
follow☷ owner/repo added your repository to a listnone, and no line 2
issue-assigned☐ An issue is assigned to youS
issue-closed☑ Alice closed an issue of yours; ☒ Alice canceled an issue of yoursS
issue-reopened☐ Alice reopened an issue of yoursS
fork-issue☐ Alice opened an issue on a forkS
fork-pr△ Alice opened a pull requestS
review-requested△ Your review is requestedS
feedback↩ Alice commented on a pull requestE; S is the pull request
approved✓ Alice approved a pull requestE when the review has text; S
changes-requested✗ Alice requested changesE; S
pr-merged▲ Alice merged your pull requestS
pr-closed△ Alice closed your pull requestS
pr-ready△ Alice marked a pull request readyS
head-advanced⎇ The head branch of a pull request advancedS
base-advanced⎇ The base branch of a pull request advancedS
head-deleted⎇ The head branch of a pull request is not on its remoteS
base-deleted⎇ The base branch of a pull request is not on its remoteS
new-release⏏ Alice released v1.2.0, the tag, else v and the version, with (pre-release); with neither, Alice published a releaseS, left out when it is the tag
memo-comment↩ Alice commented on your memoE; S is the memo
inherited-policy☞ Alice added a critical memoS
branch-diverged⎇ The branch gitmsg/social diverged from its remotenone
activity, a new itemAlice posted, commented, reposted, quoted, opened an issue, opened a pull request, commented on a pull request, added a milestone, added a sprint, published a release, added a memo, committed; else Alice added an itemS
activity, an actionAlice and the verb of the action and the kind of the item: closed an issue, merged a pull request, assigned an issue, approved a pull request; requested a reviewS; E for a review

Each part of a remote text goes through one safe line before it gets to a message or to the terminal. RPC and --json return the parts raw, as Subject, Excerpt, Phrase and Glyph.

StepSafe line
1replace invalid UTF-8 with U+FFFD
2take the first line that is not empty; a line ends at LF, CR, VT, FF, U+0085, U+2028 or U+2029
3change a tab to a space, and remove each other control character
4remove the bidi controls, U+200B and U+FEFF; keep U+200C and U+200D
5change each run of spaces to one space, and trim; a line of only spaces is empty
6cut to the limit, with no joiner or variation selector before the ...
RuleTest
The title and the body of each type are the same in Go and in the browserTestNotificationText_parity, unit_parity.js
The glyph of each type and state is the same in Go and in the browser, and the TUI and the site pages use the one Go tableTestTypeGlyph_parity, unit_parity.js
The new-item phrase of each kind is the same in Go and in the browserTestNewItemPhrase_parity, unit_parity.js
A safe line is the same in Go and in the browserTestSafeLine, unit_parity.js
Each type of a provider has its subject, excerpt, phrase and glyphTestNotificationText_fields
An activity notification has the phrase of its kind or actionTestLevel_activityPhrase
A message with no excerpt and no subject has the repository as its body, and a title never holds a subjectTestNotificationText_missingParts
A title is not longer than the actor limit and the longest phraseTestNotificationText_titleLimit
A summary lists the first three titles and the count of the restTestDesktopMessages_summaryListsTitles
A title that starts with - is text for osascriptTestDarwinSender_titleIsNotAnOption
The list prints each type with no control character of a remote textTestFormatNotification_everyType
The browser fills the parts by its own rule, and the site title is in line 2unit_notify_filter.js

Webhook

notifications.webhook is a URL that receives each message as JSON, for a relay that shows it on a phone or in a chat. The webhook gets the messages also when notifications.desktop is off.

gitsocial settings set notifications.webhook https://relay.example/hook

Each message is one POST with Content-Type: application/json, with the message text as title and body. A summary has no type, repo or hash.

{
  "title": "• Alice mentioned you",
  "body": "Can you check the new sync code?\nowner/repo",
  "url": "https://site.example/index.html#commit:0123456789ab",
  "type": "mention",
  "repo": "https://example.com/owner/repo",
  "hash": "0123456789abcdef0123456789abcdef01234567"
}
RequestValue
timeout5 s
retryone, 1 s after a network error or a 5xx status
after the retrya debug log line; the message is not sent again
batchthe posts of one fetch run at the same time, and the batch ends after two timeouts and the retry delay

In the browser

The static site, on a bucket or under gitsocial serve, shows browser notifications from an open tab. When no tab of the site is open, nothing shows; there is no push server. serve fetches on the fetch.auto.interval and sends no desktop message itself, so a reader with the TUI open gets each item once.

  1. Click the bell in the sidebar header.
  2. Click Turn on notifications and allow them in the prompt of the browser. The site asks only after this click.
  3. To filter, type your email in Notify me about items for.

With an email, the tab shows the new items that mention the email, assign an issue to it, request its review, or comment on a post that it wrote. An item by that email does not show. Without an email, the tab shows each new post, comment, issue, pull request and release.

A notification of the tab has the message text of its type, or of a new item with no email. Line 1 is the subject of the commit: the excerpt of a mention and of a comment, else the subject. A comment has its post in line 2 only when the post is in the items that the tab loaded. The site title, when the site has one, is in line 2 in place of the repository.

When you open the site, and then each minute while the tab is open, also in the background, and when you go back to the tab, the tab reads the ref list of the site. Each item shows once per browser, and the items that arrived while no tab was open show when you open the site again. The first time a browser turns notifications on, it records the current items and shows nothing. Up to three new items give one notification each, and more give one summary, the same as on the desktop. The tab shows each notification through the service worker of the site, so the notification stays in the notification list of the system after the tab closes. A click opens the item in a tab of the site, or opens the site when no tab is open, and a click on the summary opens the timeline. A browser without service workers shows the notification from the tab, and it can go away when the tab closes.

The browser keeps the email and the seen items in its local storage for the site. Without local storage, on a page that is not https or localhost, or in a browser with no Notification API, the panel tells why and has no button. Safari on iOS gives the Notification API only to a web app on the home screen.

Types

The scope of a type tells which repositories can create it. GitSocial does not notify you about your own actions.

ScopeRepositories
workspaceyour repository
forksthe registered forks
followedthe repositories in your lists
inheritedthe memo repositories that you add with memo inherit add
anyall repositories in the cache
TypeScopeTrigger
mentionanyyour email is mentioned in a commit message
referenceanya Closes: or Refs: trailer names an item you authored
editanysomeone else edits or retracts an item you authored, in any extension
comment, repost, quoteworkspace, followedon your post, or on a thread you took part in
followworkspacea repository adds yours to a list
issue-assignedanyan issue is assigned to you
issue-closed, issue-reopenedanysomeone else closes or reopens an issue assigned to you
fork-issueforkssomeone else opens an issue on a registered fork
fork-prforksa non-draft pull request on a registered fork targets your repository
review-requestedanyyou are added as a reviewer on an open, non-draft pull request
feedback, approved, changes-requestedworkspace, anyon a pull request in your workspace or one you authored
pr-merged, pr-closedanysomeone else merges or closes a pull request you authored
pr-readyforksa draft pull request on a registered fork is marked ready
head-advanced, base-advancedworkspace, forksa branch of an open pull request is ahead of its recorded tip, until pr update records the new tip
head-deleted, base-deletedworkspace, forksa branch of an open pull request is not on its remote
new-releasefolloweda repository in your lists publishes a release
memo-commentanysomeone else comments on a memo you authored
inherited-policyinheriteda priority/critical memo is added to an inherited repository
branch-divergedworkspacea local gitmsg/<ext> branch has unpushed commits and diverges from origin
activityworkspace, forks, followeda repository at the level all has a new timeline item that is not yours

The four branch notifications come from review_branch_observations (ARCHITECTURE.md), which GitSocial updates after each fetch, and go to the author and the reviewers of the pull request. A notification clears when pr update records the new tip, when the branch is on its remote again, or when the pull request closes. branch-diverged clears when the local and remote branches no longer diverge, for example after you merge and push.

The four branch notifications and branch-diverged are conditions: each is in the feed and in the unread count until the cause goes away. A condition has no read state, so m, u, read and read-all do not change it, and it sends no desktop message and no webhook post.

Each other notification is an event: one commit, or one follow of one repository. Its state is one row of core_notification_state, which exists only after the event is sent or read. The state of a commit holds for its hash, with no branch and in each repository, so it stays with a commit that moves to a different branch, and with the copy of a commit in a registered fork.

One commit gives one notification. A commit that is in the workspace and in a fork gives the notification of the workspace. When a commit matches more than one type, this order decides:

  1. a type of pm, review, release or memo; of two such types, issue-assigned before fork-issue and review-requested before fork-pr
  2. a type of social (comment, repost, quote)
  3. mention, then reference, then edit
  4. activity

--type filters before this rule, so --type mention also finds a comment that mentions you.

RuleTest
One commit gives one notification and one count, also with a limit and a type filterTestGather_oneEventPerKey
A commit in the workspace and in a fork gives one notification, one message and one stateTestOnePerKey_workspaceRowWins, TestClaim_copyOfCommit
The count equals the number of rows of the unread feedTestUnreadCount_equalsFeed
A condition has no state, hides no event and no other condition, and "read all" leaves itTestCondition_noState
A follow is marked read and unread aloneTestFollow_markByKey, TestNotificationKey_roundTrip
A state change needs an edit whose action changes the stateTestIssueStateChange_actionOnly, TestPRStateChange_actionOnly