Repository navigation
Inbox in the web app: pages, nav, quick view (slice C) - #2779
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…lice C) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l audit; layout fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cs screenshots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Socket-only useNotificationSocket: narrow (asks only refresh the inbox), coalesced, reconnect catch-up; dead notification hook surface and API helpers removed - Quick view lazy-loaded; shared inbox-actions (useInboxSend, stale check, permission detail) - Shared useSecretRequest for the chat card and the inbox - External link chips show their host and reject credentials; dot ids refused; in-app actionUrl only - formatMsSpan for ages and deadlines; project agent-context route builder; hidden-aware minute clock - Stale bell wording in the chat question card Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore; hidden-tab archive flush; more inbox tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion labels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4a00548 to
2c63222
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
Action not completed
|
…ssion order, 44px chips, button-group filters, receipts live region, list retry, per-filter empty states Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playwright visual audit: Inbox (375×667 and 1280×800, dark)Spec: Inbox list (40 items across 4 projects, a stack, a three-line title)Question in a stack (pinned options + Type a different answer)
10-option question (radio list + pinned Send)Expiring permission (command in the body, buttons pinned; once-options first)SecretIrreversible approval12-step task (read-only) and review (Looks good / Reply)Three-line title with a long URL and a 600-character unbroken body
After answering: receipt, then the next item in the stack (2 of 3 → 1 of 2)
Archive receipt with Undo
Updates chip (active chip scrolled into view at 375px)
Empty inboxList error with Retry
Project inbox
Quick view behind the inbox icon (one tap only where safe)
⋯ menu with Archived, painted over the panes
Nav: project Inbox item with its count; inbox icon in the bell's slot
|
…ne list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are skipped, not fatal; audits open the inbox icon Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|



Summary
Inbox slice C (spec idea 01M7G03ZCQ6TM6CMEYDRKQ8ST9 §4.1/§6; SAM task 01M7H9HB8DFJVS28HK0F7TFSBQ). The Inbox in the web app, built on the slice A routes (PR #2776) with no contract change.
/inbox(all projects) and/projects/:id/inbox(lazy, full-bleed). Phone: list, then the item full screen with previous/next and Back. Desktop: list beside the open item (first item shown by default, without taking focus). URL state?filter=&item=&project=.NOTIFICATION_INBOX_ROLE), paged.PermissionOptions(split out ofAcpPermissionCard; pinned layout puts once-options first),ApprovalDecisionButtons(split out ofApprovalItem),AttentionAnswerControls(injectablesubmit, "Type a different answer" beside options, radio list + pinned Send above five options; the chatHumanInputCardgets this too), shareduseSecretRequestandSecretRequestForm.VITE_INBOX_ARCHIVE_UNDO_MS(default 5 s) before sending; a pending archive is sent on the next archive, on unmount (navigation), onvisibilitychangehidden and onpagehide, withfetch keepalive.useNotificationSocket, mounted once inAppShell: asks refresh the inbox, every event refreshes the Updates lists, bursts coalesced, reconnect catches up). No interval polling.NotificationCenter(bell panel),NotificationQuestionDialog+ loader,NotificationItem,attention-request,ProjectNotifications(now redirects toinbox?filter=updates), the olduseNotificationshook surface and its dead API helpers. Push notifications, notification preferences and Settings → Notifications are unchanged.Validation
pnpm lint(web lint clean;pnpm check:fastre-run after fixes)pnpm typecheckpnpm test— apps/web: 410 files, 5234 tests passedinbox-audit.spec.ts31/31 with blocking clipped-overflow assertions;docs-screenshots-inbox.spec.ts3/3Behavioural tests (real components, network mocked at
fetch):tests/unit/pages/inbox-page.test.tsx(answer question/permission/secret/approval/review/free text; failed answer keeps item; stale 409 on open, 409 on answer, closed status; last of stack → next stack; last overall → empty (desktop + phone); refetch keeps item and rows mounted; archive Undo sends nothing; archive sent after the window, on unmount (keepalive), on pagehide; failed archive restores; prev/next/Back; chips; Archived view; focus refetch with app defaults and norefetchInterval; focus moves),inbox-quick-view-and-nav.test.tsx(safe one-tap only, permission once-options only, phone link, nav counts global/project, Notifications gone),nav-toggle.test.tsx(phone drawer count),useNotificationSocket.test.tsx,inbox-updates.test.tsx(collaboration types, asks excluded, malformed rows, load more),attention-answer-controls.test.tsx,inbox-model.test.ts. Rule 82:typed-card-cross-harness.test.ts,HumanInputCard,SecretRequestCard,ApprovalCard,acp-permission-cardtests pass. Error actions and malformed rows:inbox-page.test.tsx("error items and malformed rows"). Guards proven discriminating: removing the unmount flush, the stale check andrefetchOnWindowFocuseach turns its test red.Staging Verification (REQUIRED for all code changes — merge-blocking)
https://app.sammy.party(the storedSAM_PLAYWRIGHT_*tokens returned 401 on primary staging, so I used the documented workload-identity sign-in as the staging smoke user)/projects/:id/notificationsURL (redirects toinbox?filter=updates) and Settings → Notifications load at 1280 and 375 with 0 console errorsStaging Verification Evidence
Real Claude Code agent (conversation task
01M7HV9TEM6BMBGRSARYBJPA2K, Artifacts project01M4VDZZNPV0GV3S4Z6ZQD3YZ2) told to callrequest_human_input(options Red/Blue) andrequest_secret(INBOX_SMOKE_SECRET), then end its turn.GET /api/inboxlisted both items for the smoke user (questionattention:…withoptions, secretsecret:…), countneedsYouincluded both./inboxlist → opened the question → tapped Red →POST …/answer200 → receipt "Sent “Red”" and the walk moved straight to the secret item.POST …/archive200{outcome: "declined", agentNotified: true}; no horizontal overflow, 0 console errors.01M7HVX67XCDNRZTYP2C1CG5M9deleted, no nodes left; lease released (run 43845602610).Observation (not this slice): right after the phone answer, a fresh desktop load still listed the just-answered question for a moment (slice A's
session_summaries.attention_jsonindex catching up); slice G moves questions toasksrows, which removes that lag.UI Compliance Checklist (Required for UI changes)
UI Screenshot Evidence
Surface: Inbox page — list (all projects and project scope)
Surface: Inbox item view with pinned answer controls (every kind)
Surface: Receipts, archive Undo and Updates
Surface: Inbox icon (bell slot), quick view, nav items and ⋯ menu
nav-toggle.test.tsx.End-to-End Verification (Required for multi-component changes)
request()→ mockedfetchat the HTTP edge; live path on staging below)Data Flow Trace
request_human_input/request_secret→ slice A list (packages/operations/src/inbox-list-core.ts) →GET /api/inbox(apps/api/src/routes/inbox.ts) →listInbox(apps/web/src/lib/api/inbox.ts) →useInboxList(components/inbox/useInbox.ts) →useInboxWalk→InboxRow/ItemPane(pages/inbox/InboxPage.tsx).InboxAnswerControls→useInboxSend/AttentionAnswerControls.submit→POST …/inbox/items/:ref/answer→answerInboxItem(packages/operations/src/inbox-write-core.ts) → the item's own store and agent notice →onAnswered→ receipt +advancePast+ inbox invalidation. Secrets:SecretRequestForm→fulfillSecretRequest(same record).archiveItem→usePendingArchive.schedule→ (Undo window) →archiveInboxItem(keepalive) →POST …/archive→ per-store archive (agent told).useNotificationSocket→ invalidate['auth', scope, 'inbox', 'list'|'count']and notification lists; focus →refetchOnWindowFocus.Untested Gaps
Real ACP permission delivery and the agent receiving answer/archive outcomes are exercised on staging (below), not in unit tests. Human-task and error items are read-only until slices H/E.
Post-Mortem (Required for bug fix PRs)
N/A: not a bug fix
Specialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to human (N/A: all completed)acp-interactions.ts).useSecretRequest/useInboxSend;formatMsSpan; route builder; stale bell wording (0e89d4f).actionUrl(0e89d4f). Deferred LOW: archive flush on sign-out (server authorisation prevents any cross-user effect).CodeRabbit Review Evidence (Required for agent-authored PRs)
CodeRabbit Notes
Marked ready and labelled
coderabbit-reviewat 05:21Z; the trusted workflow posted the command at 05:22Z and CodeRabbit replied "Review rate limited" at 05:22Z (its earlier status: "Review skipped: auto reviews are disabled"). The wait ended on that reply; no review arrived.Exceptions (If any)
Agent Preflight (Required)
Classification
External References
N/A: no external API; built against the slice A contract (
packages/shared/src/types/inbox.ts,apps/api/src/routes/inbox.ts,packages/operations/src/inbox-write-core.ts) and the accepted prototype (Library/design/project-overview-inbox-2026-11-15/, branchsam/extend-existing-throwaway-inbox-0qxqpt, reference only).Codebase Impact Analysis
apps/webonly (pages/inbox, components/inbox, NavSidebar, AppShell, MobileNavDrawer, shell bars, command palette, chat cards: AcpPermissionCard, ApprovalItem, AttentionAnswerControls, HumanInputCard, SecretRequestCard; hooks useNotificationSocket/useMinuteClock; lib/api/inbox, query-options/inbox). One comment edit inapps/api/src/services/notification.ts. Docs inapps/www.Documentation & Specs
apps/www/src/content/docs/docs/guides/inbox.md(new),notifications.md,chat-features.md,collaboration.md,session-troubleshooting.md,recent-product-changes.md,reference/api.md,astro.config.tssidebar; docs images regenerated.Constitution & Risk Check
Principle XI: undo window, receipt time and socket debounce are
DEFAULT_*constants withVITE_*overrides; no hardcoded URLs (route builders,API_URL). Risks: notification bell removal (replaced by the inbox icon and Updates); the chat question card also gains the radio list / free-text option (intended, one implementation); F1 (#2775) will need a trivial rebase inPROJECT_NAV_ITEMSandisFullBleedRoute.🤖 Generated with Claude Code