Skip to content

Show automation prompts as compact timeline rows - #4763

Merged
brsbl merged 8 commits into
mainfrom
bb/automation-run-chips-in-timeline-thr_tu2gp5848g
Oct 3, 2026
Merged

brsbl merged 8 commits into
mainfrom
bb/automation-run-chips-in-timeline-thr_tu2gp5848g

Conversation

@brsbl

@brsbl brsbl commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Automation prompts now show as a compact "Automation · 2:08 PM" row with a one-line preview.
  • Clicking the row expands the full prompt; the marker is never shown.
  • "Automation" links to that automation's page.
  • A pending or failed delivery shows "Steer pending" or "Steer failed" on the collapsed row.
  • Automation-spawned threads now send the same marker, so their first message gets the row too.
  • No API, contract, stored-data, or protocol changes; older spawned threads keep their plain first message.

How you verified

  • Remote CI: all checks passed on aab199607c, including new parsing, row, and spawned-prompt tests.
  • Branch web app, Chrome for Testing, desktop and mobile: the row renders, expands, and links to the automation page.
  • Not captured: the failed-steer state can't be staged in the dev app; a regression test covers it.

Screenshots

Before: 94d704e71d (merge base) · After: 9bd1bb6e12 (last timeline change) · Captured at 2×

Screen / state Viewport Before After
Automation message Desktop · 1440×900 Before: raw marker and full prompt in a user bubble on desktop After: compact Automation row with link and send time on desktop
Automation message / expanded Desktop · 1440×900 No expanded state; the bubble above always shows the whole prompt After: expanded automation row on desktop
Automation message Mobile · 390×844 Before: raw marker and full prompt in a user bubble on mobile After: compact Automation row on mobile
Automation message / expanded Mobile · 390×844 No expanded state; the bubble above shows the prompt behind "Show more" After: expanded automation row on mobile

BB-Thread-ID: thr_fqru8755b7

🤖 Generated with Claude Code

AGENT GENERATED

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T21:20:38.219076Z f71f868 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +365 to +366
const automationBodyOffset =
initiator === "user" ? automationDueBodyOffset(text) : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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/SDK threads.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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

brsbl and others added 2 commits October 2, 2026 14:22
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>
@brsbl brsbl changed the title Show automation prompts as compact timeline rows Show automation re-prompts as compact timeline rows Oct 2, 2026
brsbl and others added 5 commits October 2, 2026 14:44
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>
@brsbl brsbl changed the title Show automation re-prompts as compact timeline rows Show automation prompts as compact timeline rows Oct 2, 2026
@brsbl
brsbl merged commit 4ee8964 into main Oct 3, 2026
27 checks passed
@brsbl
brsbl deleted the bb/automation-run-chips-in-timeline-thr_tu2gp5848g branch October 3, 2026 00:04
brsbl added a commit that referenced this pull request Oct 4, 2026
## 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 | ![Before
success](https://github.com/user-attachments/assets/716fa92f-2409-4bad-9f31-6c71171ad18f)
| ![After
success](https://github.com/user-attachments/assets/9c9dbc2e-6b07-4b24-b1d0-e2465db8d620)
|
| View prompt | 1440×900 | ![Before prompt always
visible](https://github.com/user-attachments/assets/716fa92f-2409-4bad-9f31-6c71171ad18f)
| ![After View
prompt](https://github.com/user-attachments/assets/5252793f-d4fc-4ba8-ae8f-5492bed1aecd)
|
| Failure with Retry | 1440×900 | ![Before
failure](https://github.com/user-attachments/assets/02f3f223-8b22-4377-a779-2b45c164ab85)
| ![After failure with
Retry](https://github.com/user-attachments/assets/4c06aced-6e80-46b3-90a5-4ea76d40343e)
|
| Success and failure | 390×844 | ![Before
mobile](https://github.com/user-attachments/assets/de16923c-5180-4ebb-8f7e-47ef5ab9f1dc)
| ![After
mobile](https://github.com/user-attachments/assets/5eca2dec-41d8-499f-bc17-3586cca023b9)
|
| View prompt | 390×844 | ![Before mobile prompt always
visible](https://github.com/user-attachments/assets/de16923c-5180-4ebb-8f7e-47ef5ab9f1dc)
| ![After mobile View
prompt](https://github.com/user-attachments/assets/82358fc9-e8cb-4069-a969-9012173f6f6b)
|

<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
hxy91819 added a commit to hxy91819/bb that referenced this pull request Oct 12, 2026
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>
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.

1 participant