Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
notification_inbox
What it is
The unified notifications inbox: the viewer's pending notifications grouped
by the entity they are filed under and cut into rows (one per channel thread,
channel top level, entity's comments, email thread, task, pull request, request
or agent session). Built on the shared feed layer, crates/attention_feed.
Start here
src/domain/rows.rs: the row rules — every notification's home row, one message one row, one stack per top-level message and per entity's comments, noise hidden in its natural row.src/domain/service.rs: page, recompute, done (of rows or of one notification of a stack), seen and undo.src/domain/policy.rs: which groups the inbox lists.
Scope
- Owns: row kinds, row ids (
<group id>#<slot>), shown and hidden notifications, row state and revision, inbox membership. - Not here: paging, refill, done/seen/undo plumbing, live batching and
adapters →
crates/attention_feed; GraphQL →crates/graphql_notification_inbox; candidate SQL and access gates →crates/soup(attention.rs).
Boundaries
- Depends on:
attention_feed,item_filters,filter_ast,model_notifications. - Used by:
graphql_notification_inbox,document_storage_service(composition).
Recipes
- Give a new notification kind a row:
place_event(or the channel and discussion rules) insrc/domain/rows.rs→ a row type insrc/domain/models.rs→graphql_notification_inboxinputs → a test inrows/test.rs. Theplace_eventmatch is exhaustive on purpose. - Offer a button on a row:
actionsinsrc/domain/rows.rs→InboxRowActionKind→ its GraphQL enum. The client performs the action through the API of what it acts on.
Checks
cargo test -p notification_inbox
Gotchas
- Groups use
CandidateKeying::FiledEntity: a channel's group holds its threads, so channel rows partition the whole channel's notifications. - Row types, actor kinds and action kinds only grow: add values, never repurpose or remove them; clients skip values they do not know.
- Only rows have an
idin GraphQL; the client cache reads anyidfield as entity identity and requiresID!, so other inbox types use other names (groupId,principalId,targetId). - Row contents must not depend on the scope; scopes only filter rows, so the web cache can normalize rows by id across inboxes.
- An unread scope filters on each row's
unseen, which follows the row's own rule (mail by its unread messages), so a row leaves or returns through the same recompute as any other change.
Related
- Rules:
.agents/rules/rust/architecture.md· Docs:docs/guides/add-notification-kind.md