Skip to main content

Crate lattice_notify

Crate lattice_notify 

Source
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.
NotificationAction
Something a notification offers to do about itself.
NotificationId
Identity for a posted notification — the handle a consumer keeps to replace or dismiss it.
NotificationStore
The live notifications, newest last.

Enums§

NotificationLevel
How loudly a notification reads, and how long it lingers.
NotifyInbound
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::queued reports 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::send bakes 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.

Type Aliases§

NotificationStoreHandle