Skip to content

feat(desktop): Attention — a personal triage view over the home feed (preview feature) - #4766

Open
VenusOne-Lee wants to merge 2 commits into
block:mainfrom
VenusOne-Lee:attention-upstream
Open

feat(desktop): Attention — a personal triage view over the home feed (preview feature)#4766
VenusOne-Lee wants to merge 2 commits into
block:mainfrom
VenusOne-Lee:attention-upstream

Conversation

@VenusOne-Lee

@VenusOne-Lee VenusOne-Lee commented Aug 4, 2026

Copy link
Copy Markdown

Implements the Attention surface proposed in #4335, as a desktop preview feature (default off).

What this adds

Attention is a personal triage view that answers one question: what needs me right now? It projects the existing home feed — no new event kinds, no relay changes — into typed, actionable cards:

  • Six-type taxonomy. Every feed item that addresses the viewer is classified as Needs decision, Needs approval, Needs answer, Needs review, Blocked, or To note. Classification is derived from event kind, tags, and message content.
  • Type-specific actions. Each card carries the actions that resolve it (approve, answer, pick an option, note), posted as ordinary threaded replies with correct p-tags. A 5-second undo window holds every outgoing action before it publishes; state persists only on commit, so a crash inside the window is an implicit undo.
  • Declared asks. Agents can declare structured asks in plain prose (**Needs <Name>, <type>:** … with optional verbatim reply options). The parser turns these into per-person cards with one-click replies; multi-ask messages compose a single reply. This is a prose convention, not a protocol change — messages render normally in every other client.
  • Catch up mode (second commit): a read-only digest over the Inbox for skimming what happened without acting.

This is best read as an enhancement of the existing Inbox rather than a new silo: Catch up mode lives directly on the Inbox, and the Attention view is an actionable layer over the same feed items the Inbox already tracks.

Everything is gated behind an attention entry in preview-features.json (default off, per the flow documented in #4337). With the flag off there is no route, no sidebar entry, no Inbox toggle, and no behavior change.

Why a projection

The hosted relay rejects unknown kinds, and an attention layer is inherently a per-viewer view of existing conversation — so this is implemented purely client-side over the feed the desktop app already has. Full design rationale and the decision log are in the fork: ATTENTION_ARCHITECTURE_PROPOSAL.md.

Commits

  1. feat(desktop): Attention view behind preview flag — the feature: projection lib (features/attention/lib), card UI, route, sidebar entry, flag entry, e2e spec. Includes two small enabling refactors: the selectedView union that was re-declared inline in three files is now the shared AppView type (adding a view previously meant editing three unions), and a redundant handleCloseSettings wrapper is removed — both keep AppShell.tsx/AppSidebar.tsx under the 1000-line ratchet.
  2. feat(desktop): Catch up mode on the Inbox — digest mode, also gated behind the attention flag.

Testing

  • pnpm test: 4241 pass, 0 fail (includes ~1,300 lines of new unit tests over the projection, declared-ask parsing, quick options, and catch-up grouping).
  • pnpm test:e2e:smoke: 891 passed, including the two new specs (attention.spec.ts, catchup.spec.ts), which seed the feature flag explicitly since it ships default-off. Five upstream specs failed on my machine; I rebuilt clean upstream main (e1287c9) in a separate worktree and verified all five are pre-existing there: three (relay-reconnect dial retry, scroll-history mounted coverage, video review mode) fail identically on the clean build, and the link-preview / avatar specs are flaky on both branches (link-preview: 1/3 fail on this branch, 2/3 fail on clean main under --repeat-each=3).
  • pnpm check (biome, file-size ratchet, px-text, pubkey-truncation) and pnpm typecheck: clean.
  • The feature has been exercised live against a hosted relay from a test build of the fork (six-fixture pass over real events; event-log verified, including proof that undo prevents publication).

Screenshots follow in a comment via scripts/post-screenshots.sh.

Happy to split this differently (e.g. projection lib first, UI second) if that's easier to review — packaging question also open in #4335.

LethaboN and others added 2 commits August 4, 2026 20:28
A personal triage surface answering "what needs me right now": the home
feed projected into typed cards (Needs decision / approval / answer /
review / Blocked / To note) with type-specific resolving actions posted
as ordinary threaded replies, a 5s undo hold on every outgoing action
(persist on commit only, so a crash inside the window is an implicit
undo), and prose-declared asks with verbatim one-click reply options.
Pure client-side projection: no new event kinds, no relay changes.

Gated behind a default-off "attention" entry in preview-features.json;
with the flag off there is no route, sidebar entry, or behavior change.

Two small enabling refactors keep AppShell.tsx and AppSidebar.tsx under
the 1000-line ratchet: the selectedView union re-declared inline in
three files is now the shared AppView type, and the redundant
handleCloseSettings wrapper around the already-stable closeSettings
callback is gone.

Proposed in block#4335.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Lethabo Ntshudisane <[email protected]>
A read-only digest over the Inbox for skimming what happened without
acting on it: items grouped per channel with summary lines, behind the
same default-off "attention" preview flag as the Attention view. The
toggle renders only when the flag is enabled.

Part of block#4335.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Lethabo Ntshudisane <[email protected]>
@VenusOne-Lee
VenusOne-Lee requested a review from a team as a code owner August 4, 2026 18:31
@VenusOne-Lee

Copy link
Copy Markdown
Author

Screenshots from the two e2e specs (mock bridge, feature flag enabled).

Attention view

Typed cards grouped by what they need from you, oldest first, with an overdue section.

01-attention-view

Expanded card

Type-specific primary action, quick-select reply options, and the undo hold on an outgoing reply.

02-expanded-card

To note

Ask-less mentions collect under To note; Noted clears silently (no reply posted).

03-to-note

Catch up mode

Read-only digest over the Inbox, grouped per channel with summary lines.

04-catch-up

Catch up, empty state

05-catch-up-empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants