Skip to content

Agent inbox: show failed turns and a latest-activity line on each card - #491

Open
Birfy wants to merge 1 commit into
ThinkFlowLab:mainfrom
Birfy:feat/471-inbox-failed-turns
Open

Birfy wants to merge 1 commit into
ThinkFlowLab:mainfrom
Birfy:feat/471-inbox-failed-turns

Conversation

@Birfy

@Birfy Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Part of #471 (first slice, owner decision 2026-10-20 option a). #471 also lists items the owner deferred (board view, tool-call counts, first-run guide, team views waiting for #51/#149/#55/#57, inbox-side task actions), so this PR does not close it.

What

  • Failed turns in the Agent inbox. Needs you gets a Failed card for a turn of my own Bot that failed, read from work.ended, the same ended-turn entries the finish/fail notifications use (Proactive reminders 1/3: event reminders (approval waiting, failed, finished) in app and desktop #353, PR Notify when my own Bots finish or fail a turn, with one Notifications switch #470); no second event source. A card shows while that failure is the latest ended turn in its place (a Bot's own chat or one group), younger than 7 days, and the Bot is not running or waiting for an approval there. A later finished turn clears it, and that chat is then not also in Done. Title: the chat's last line (The last turn did not finish without the Session list); reason: the failure text. Open only.
  • Latest activity row. Each card may carry one more line, Latest: … (full text on hover): a task's newest note, else what its Bot runs there now (running turns and tasks only), else the chat's last line. Left out when it only repeats the title or reason.
  • Host (turns.js): past the last 20 ended turns, a place's latest turn is kept while it is a failure younger than 7 days (at most 50), so busy Bots elsewhere do not push an unresolved failure out of the inbox. Notifications are unaffected (they already skip entries they told or that predate the window).
  • Out of scope (deferred by the owner): board view, tool-call counts, team views.

Test

  • core/test/inbox.test.js: failed-turn cards (own Bots only, latest-in-place, cleared by running/waiting/a later finished turn, 7 days, badge count, Open only) and the latest-activity row (sources, no repeats, rendering). core/test/approval-notices.test.js: the host keeps a still-latest failure past the last 20 and drops it once a finished turn follows.
  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: pass (core 1080, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures; plugin lint ok; patches check ok; arch-docs OK).
  • Not run: live DSH bench / the owner's Mac instances (no visual check in a running shell).

Docs: docs/subsystems/core-client.md (Agent inbox), docs/subsystems/core-host.md (endedView). Changelog: changelog.d/471-inbox-failed-turns.added.md.

Risk tier: T2 (estimate; the controller sets the label)

@Birfy Birfy added agent-pr Pull request opened by an agent enhancement New feature or request area:ui Web/desktop UI and copy labels Oct 20, 2026
@Birfy Birfy self-assigned this Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: f580949
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: pass (core lint + arch-docs OK, plugin lint ok, build-client check ok, ds-bot patches check ok; core 1080, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures)
  • node --test core/test/inbox.test.js core/test/approval-notices.test.js: 24/24 pass
  • node scripts/ds-bot-patches.mjs generate + check: ok; npm run build in core (client.js regenerated)
  • CI at the tip: tests-ok, test (Node 24 · DSH 0.2.0-rc.2), plugins (social/tree/timeline), package, risk tier (T2), reviewed tip: all green
  • Diff reviewed against the owner design rules: scope is the confirmed first slice only (failed turns + latest-activity row; board, tool-call counts, team views not touched); reuses work.ended from Proactive reminders 1/3: event reminders (approval waiting, failed, finished) in app and desktop #353 (no second event source); my own Bots only; failed-turn cards have Open only (no approval path, buttons only, no typed-reply approval); English UI with zh strings; no new + menu entry or sidebar section
    Not run:
  • Live DSH bench / the owner's Mac instances (no visual check of the cards in a running shell)
  • Real OS notifications (unchanged by this PR beyond the host keeping older failures, which the notifier already skips)

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 20, 2026
@github-actions github-actions Bot added the risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff label Oct 20, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent area:ui Web/desktop UI and copy awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip enhancement New feature or request risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant