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_state
What it is
Part of the notifications feature. Defines the shared NotificationState
lifecycle enum (Unseen / Seen / Done) and its transition policy, kept
dependency-light so it compiles to wasm.
Start here
src/lib.rs: theNotificationStateenum and its invariants — read the module doc comment first (viewing timestamps are historical metadata, not another state representation).src/postgres.rs: thesqlx::Typemapping to the Postgresnotification_stateenum, gated behind thepostgresfeature.src/graphql.rs: theasync-graphqlenum mapping, gated behindgraphql.
Scope
- Owns: the lifecycle enum, its
ACTIVEset, and (de)serialization across JSON, Postgres, and GraphQL. - Not here: how/when a notification transitions in response to app events →
notification.
Boundaries
- Used by:
notification,item_filters,graphql_notification,graphql_soup_filter_input— including wasm builds, so this crate must stay free of non-wasm-safe dependencies outside the optional features.
Checks
cargo test -p notification_state(SQLX_OFFLINEunset).cargo test -p notification_state --features postgres,graphqlfor the adapter mappings.
Related
- Rules:
.agents/rules/rust/architecture.md