Expand description
Notifications: telling the user about work that has no buffer (NOTIF.1a).
Design:
[../../../docs/dev/architecture/notifications.md], which defers the
specification itself to design.md §5.9.9 and records why the gate
opened. In short: C-c g f (fetch) fires from any buffer, returns
immediately with an optimistic echo, and on completion says
nothing — success is invisible and failure reaches *messages*
only. The echo area cannot fix that; it is one transient line
written at fire time, with no completion event and no persistence.
Three surfaces, three questions, which is what keeps them from
competing: the headerline answers “what is the buffer I am looking
at doing?”, *messages* answers “what happened earlier?”, and a
notification answers “the thing I started has finished — wherever I
am now”. A fetch has no buffer, so it is the third.
This crate is the data layer: the notification, the store, and expiry. Rendering is NOTIF.1b/c (both peers, one patch); magit is the first consumer, NOTIF.1d.
Modules§
- mode
- NOTIF.1f:
notifications-mode— the*notifications*buffer. - options
- NOTIF.1e: the notification subsystem’s typed options.
Structs§
- Notification
- One notification.
- Notification
Action - Something a notification offers to do about itself.
- Notification
Id - Identity for a posted notification — the handle a consumer keeps to replace or dismiss it.
- Notification
Store - The live notifications, newest last.
Enums§
- Notification
Level - How loudly a notification reads, and how long it lingers.
- Notify
Inbound - What arrives on the notification subsystem’s inbound bus.
Constants§
- MAX_
VISIBLE - How many notifications a corner shows at once (§5.9.9’s default).
The rest queue;
NotificationStore::queuedreports how many. - SCOPE_
SEPARATOR - Between a notification’s scope and its text, on every surface.
Functions§
- install
- worse than one that never vanishes — it reads as a rendering bug.
InboundBus::sendbakes the wake in, so the drain runs off-keystroke and the layer repaints on its own. - notification_
at - Which notification the cursor is on, from
render_buffer’s map. - render_
buffer - NOTIF.1f: the
*notifications*buffer’s text, and the row→id map that goes with it. - task_
notification - NC.2: how a finished background task reads.