Skip to content

feat(agents): preview where interrupted agents were working before resume - #3494

Merged
kalvinnchau merged 3 commits into
mainfrom
peon/resume-preview
Nov 13, 2026
Merged

kalvinnchau merged 3 commits into
mainfrom
peon/resume-preview

Conversation

@kalvinnchau

@kalvinnchau kalvinnchau commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The "Resume interrupted agent?" notice now shows where each interrupted agent was working before you choose to resume.

Change

  • Notice disclosure: InterruptedNotice gains a collapsed "N mentions" disclosure (shared Accordion, activity variant). N counts the saved mention turns.
  • Reading the mentions: the first open reads each agent's saved mentions with the same fresh, proof-filtered relay read that Resume uses.
    • Rows are grouped by channel and thread root, and show the channel name, "Thread" or "In channel", and a plain-text excerpt (messagePreview, spoiler-safe).
    • Reads are keyed by agent, so snapshot updates do not cancel or repeat them. They are aborted only when the notice unmounts.
  • Uncertain results: while loading, a mention shows "Checking…". If the read did not return it, it shows "Details unavailable". If the read failed, it shows "Couldn't load details", and it is read again when the disclosure is reopened. This is a preview: Resume reads the mentions again.
  • Keyboard access: the list is a named, focusable scroll region with the shared keyboard focus ring, so long lists can be scrolled from the keyboard in WebKit.
  • Plumbing:
    • AgentRunners.interruptedTurns(key) exposes the saved turns.
    • Agents.interruptedTurns(agent) and Agents.readInterrupted(agent, signal) back the notice.
    • ToastNotice takes an optional details slot between the message and its actions.
  • Unchanged: Resume and Don't resume behave as before.
  • Docs: docs/agents.md and docs/buzz-help.md describe the preview.

Screenshots

Collapsed Expanded (light) Expanded (dark)
Collapsed notice One mention, light One mention, dark

Many mentions in WebKit, with the details list focused and scrolled by keyboard:

Many mentions, keyboard focus

Evidence

  • Component tests (InterruptedNotice.test.tsx):

    • details for a single mention
    • grouping by conversation, with the count of saved turns
    • pending, unavailable and failed states
    • one read across unrelated snapshot updates
    • a failed read retried on reopen while a successful one is kept
    • the tabbable details region
    • abort on dismissal

    The lifecycle and keyboard cases fail against the first implementation and pass now.

  • Browser runs (Chromium and WebKit): real reload → notice → expand → Resume/Don't resume against the production browser broker and a modeled relay. Also covered:

    • a refused read recovering on reopen
    • cancellation while a read is held
    • keyboard scrolling of an overflowing list
    • light/dark themes
    • 1440/800/390px widths, and enlarged text at 390px
  • bin/pnpm check passes.

No browser journeys were added or removed; the browser checks above were run with a separate harness.

🤖 Generated with Claude Code

kalvinnchau and others added 2 commits November 13, 2026 10:59
…sume

the resume notice gains a collapsed mention-count disclosure. opening it reads
the saved mentions once with the same fresh relay read resume uses, then lists
them by channel and thread root with a plain-text excerpt. mentions the read
does not return show details unavailable. toast notices take an optional
details slot between the message and actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
…able

key preview reads by agent so snapshot rebuilds neither cancel nor repeat
them, keep failed reads distinct and read them again on the next open, and
make the overflowing details list a named, focusable scroll region.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
@kalvinnchau
kalvinnchau requested a review from a team as a code owner November 13, 2026 19:19

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 looks good. the preview does the same fresh, proof-filtered readRemote as Resume and never touches the saved turns or follow-ups. reads are kept per agent, so snapshot updates don't restart them, and a failed read (including before the community connects) is read again when the disclosure reopens.

Comment thread src/features/agents/service.ts Resolved
call the real readinterrupted after a stopped app restarts: it reads the
saved ids fresh, drops events without relay proof, and leaves the saved
turns, run count and interrupted list unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
@kalvinnchau
kalvinnchau merged commit 71e8689 into main Nov 13, 2026
66 checks passed
@kalvinnchau
kalvinnchau deleted the peon/resume-preview branch November 13, 2026 21:01
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