Skip to content

feat: Inbox — structured notification feed for agent activity #3985

@OneStepAt4time

Description

@OneStepAt4time

Inbox — Structured Notification Feed

Why

Users need to know what happened while they were away. Currently we have raw SSE events but no structured inbox. An inbox gives users a scannable feed of agent completions, failures, blockers, and mentions.

Concept

  • Inbox items are structured notifications about agent activity
  • Types: task completed, task failed, blocker reported, mention, session idle
  • Read/unread state, archive, batch operations
  • Real-time updates via SSE

DB Schema

CREATE TABLE inbox_item (
  id TEXT PRIMARY KEY,
  workspace_id TEXT NOT NULL,
  user_id TEXT NOT NULL,
  actor_type TEXT NOT NULL CHECK(actor_type IN ('agent', 'system')),
  actor_id TEXT NOT NULL,
  type TEXT NOT NULL,  -- task_completed, task_failed, blocker, mention, session_idle
  title TEXT NOT NULL,
  body TEXT,
  reference_type TEXT,  -- session, autopilot, squad, chat
  reference_id TEXT,
  read_at TEXT,
  archived_at TEXT,
  created_at TEXT NOT NULL DEFAULT (datetime('now'))
);

CREATE INDEX idx_inbox_user_unread ON inbox_item(user_id, read_at) WHERE read_at IS NULL;

API Endpoints

  • GET /v1/inbox — list inbox items (with unread count)
  • POST /v1/inbox/:id/read — mark as read
  • POST /v1/inbox/read-all — mark all as read
  • POST /v1/inbox/:id/archive — archive
  • POST /v1/inbox/archive-all — archive all read

Frontend

  • Inbox page/drawer: list of items with icon, title, time
  • Unread badge in navigation
  • Click to navigate to referenced entity

Acceptance Criteria

  • Inbox item creation triggered by agent events
  • CRUD API for inbox operations
  • SSE events for new inbox items
  • Dashboard inbox view with unread badge
  • Tests
  • npm run gate passes

Reference

Competitive analysis: references/multica-competitive-analysis.md §2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions