Repository navigation
Show automation prompts as compact timeline rows - #4763
Conversation
Automation re-prompts arrive as user messages prefixed with [bb automation due:<id>]. Render them through the existing generated-message row: Repeat icon, "Automation" title, one-line preview, full prompt on expand, without the raw marker. No contract or API changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f71f8689de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const automationBodyOffset = | ||
| initiator === "user" ? automationDueBodyOffset(text) : null; |
There was a problem hiding this comment.
Require trusted provenance before labeling an Automation
Any ordinary user message can begin with [bb automation due:anything], and this condition then relabels it as an Automation, hides the marker, and removes the normal user-message actions. Because initiator === "user" also describes messages typed through the composer and no server-supplied automation provenance is checked, user-authored content can be accidentally or deliberately presented as an automation; carry a trusted origin discriminator on the timeline row instead of inferring authorship solely from message text.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed that the row is chosen from the message text, not from server provenance. Labeling it doesn't expose anything new, though:
- Every sender that can produce an
initiator: "user"message (the composer, CLI/SDKthreads.send, plugins) can already put any text in a user bubble under the user's own name, which is the more trusted label. - Relabeling it "Automation" gives the sender no extra permissions or agent input, and the full prompt is one click away.
- Agent and system messages are routed before this check, so they can't reach the automation branch.
A trusted origin field on the turn would need a new send/timeline contract, which is out of scope for this display-only PR. Leaving this as a follow-up.
AGENT GENERATED
| @@ -0,0 +1,6 @@ | |||
| const AUTOMATION_DUE_PREFIX_PATTERN = /^\[bb automation due:[^\]\s]+\]\s*/u; | |||
There was a problem hiding this comment.
Preserve whitespace belonging to the automation prompt
When a configured prompt starts with blank lines or indentation, the trailing \s* consumes that prompt whitespace along with the marker separator. For example, a prompt beginning with four spaces to form a Markdown code block loses those spaces before rendering, so the expanded row no longer shows the full prompt and can change its Markdown meaning; match only the delimiter inserted by renderAutomationDueMessage rather than arbitrary whitespace from the body.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid edge case, but it isn't limited to the pattern. The compact row (GeneratedConversationMessage) also calls text.trim() on every body it renders, agent and system messages included. Tightening the pattern to match only the \n\n delimiter wouldn't keep a prompt's leading indentation on its own.
Prompts that start with indented Markdown are rare, so I'm recording this as a follow-up rather than changing the shared row in this PR.
AGENT GENERATED
Automation re-prompts are sent with steer-if-active. When that steer is pending or rejected, the old user bubble showed Steer pending/failed; the compact row only showed it after expanding. Put the label in the row title instead so a failed delivery stays visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The marker already carries the automation id and the thread knows its project, so the Automation title links to the existing automation detail route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A one-line automation prompt with the label in the title has nothing to expand, so its header is not a button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show "Automation · 2:08 PM": the link underlines only on hover and the send time uses the subtle tone, without a clock icon. Render it in the row instead of extending the shared timeline title link type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spawned runs now send the same [bb automation due:<id>] marker as re-prompts, so their first message renders as the automation row too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
## Human comments ## What was wrong Automation runs were stored and displayed as user messages. The compact row from #4763 still exposed the prompt and coupled automation presentation to core. ## What changed - Automations render their own named timeline markers with time, status, View prompt, and Retry after failure. - Generic experimental SDK APIs attach markers to hidden turns and let the owning plugin read or update them. - Markers follow their exact turn through queuing, cold starts, completion, failure, and cancellation. - Existing #4763 chips retain their rendering. Additive database fields preserve existing records; daemon protocols are unchanged. - SDK 0.6.17, Plugin Guide, automation CLI retry, and discoverable automation guidance document the new behavior. ## How you verified - [Remote CI](https://github.com/get-bb/bb/actions/runs/37170978766) passed on `bab5dc5db6`: 26 jobs succeeded, including Linux/Windows tests, type checks, and package smoke checks. - Chrome for Testing 151.0.7922.71: success, prompt disclosure, failed turn, Retry, reload, and desktop/mobile layouts passed at 2×. - Retry created a distinct hidden turn in the same thread; the timeline contained zero user-message rows. - One architectural/implementation review identified five P1 issues; targeted fixes and regression checks resolved them. The checkout lacks `scripts/bb-dev-app`; evidence uses its exact app/server/daemon development services with isolated data and browser profile. Before: `c201f6490a` · After: `bab5dc5db6` · 2× pixel density. | State | Viewport | Before | After | | --- | --- | --- | --- | | Success | 1440×900 |  |  | | View prompt | 1440×900 |  |  | | Failure with Retry | 1440×900 |  |  | | Success and failure | 390×844 |  |  | | View prompt | 390×844 |  |  | <details> <summary>Review follow-ups</summary> Deferred P2 findings: thread forks do not yet copy plugin markers; a successful run can inherit an inaccurate error string from the legacy settlement fallback. These remain follow-up work under the review scope policy. </details> User QA is pending. This PR does not migrate Action Cards or Digests. BB-Thread-ID: thr_h9xm8rfpbh > AGENT GENERATED
Absorbed by desktop-v0.46.0: - fix/acp-permission-mode: upstream get-bb#4922 - fix/sidebar-touch-hover-actions: upstream get-bb#5097 - feature/sidebar-pinned-new-thread: upstream get-bb#5229 nav rail layout - feature/automation-auto-marker: upstream Automation timeline row (get-bb#4763) - fix/mobile-composer-top-clearance: upstream get-bb#5026 - fix/mobile-model-drawer: upstream 8a01b97 Dropped: fix/acp-fast-mode, fix/acp-codex-goal (ACP Codex no longer used); fix/mobile-model-picker folded into fix/provider-icon-hitbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Human comments
What was wrong
Automation prompts looked like the user had typed them. Prompts into an existing thread showed as a big user bubble with the raw
[bb automation due:<id>]marker, and automation-spawned threads opened with the prompt as a plain user bubble.What changed
How you verified
aab199607c, including new parsing, row, and spawned-prompt tests.Screenshots
Before:
94d704e71d(merge base) · After:9bd1bb6e12(last timeline change) · Captured at 2×BB-Thread-ID: thr_fqru8755b7
🤖 Generated with Claude Code