Skip to content

feat(dashboard): Show an automation card at the top of automation runs - #2170

Merged
dcramer merged 3 commits into
mainfrom
feat/dashboard-automation-run-trigger
Oct 16, 2026
Merged

dcramer merged 3 commits into
mainfrom
feat/dashboard-automation-run-trigger

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Automation run conversations now show one card at the top of the transcript. It says which Automation ran, what triggered it, how to open it, and whose credentials it used. Before, the only link was "Triggered by …" in the details drawer, and the run input showed as a user message from a confusing "junior" author.

Changes

  • Trigger card (TranscriptAutomationTriggerView). It replaces the run input message. It is one bordered card:
    • Line 1: Automation icon, Automation name, and an "Open automation →" button.
    • Line 2 (muted): the trigger (an event such as "Linear issue ACME-42 closed", or a schedule such as "Every Monday at 9:00 AM"), the relative run time, and "Runs as system" or "Runs as ". The credential part is left out when it is not known.
    • "Show prompt" expands the raw run input. It is collapsed by default.
  • No header link. The header meta line is unchanged from main. The details drawer keeps one "Automation: " row that links to the Automation.
  • Report fields on sourceTask (readConversationSourceTask, chat/automations/read.ts):
    • triggerMessageId: the run input message, so the dashboard does not infer it.
    • triggerLabel: the schedule description, or the trigger resource label plus the event action when the trigger has one event.
    • credentialMode and credentialUser: read from the run's DispatchRecord.credentialSubject, not from the Automation's current setting. They are omitted when the dispatch record is gone (it has a TTL) and for viewers who cannot see the Automation.
  • The detail integration test covers the new fields. A mock fixture agent-dispatch:event-1 covers an event automation run.

Why "junior" showed as the author

  • createOrGetDispatch sets actor: { platform: "system", name: plugin } (chat/agent-dispatch/store.ts). For Event automations the plugin is "junior". For Scheduled automations it is "scheduler".
  • slack/dispatch-turn.ts builds a synthetic Slack message with that name as the author (isBot: true). The report then shows it as the user message author.
  • So "junior" is the dispatch owner's plugin name. It is not the bot identity and it does not reflect credential mode. This PR replaces that message with the trigger card.

Before / after (mock data)

Before: the run input shows as a user message from "junior". The link is only in the drawer.

before transcript
before details

After: one trigger card at the top of the transcript, collapsed and with the prompt expanded.

after card
after prompt expanded

Follow-ups

  • Credentials are known only while the dispatch record exists. Store the credential mode and creator on each execution row so older runs show them too.
  • Event triggers show the Automation's trigger label, not the exact event payload of the run.
  • Stop stamping the dispatch plugin name as the Message author in slack/dispatch-turn.ts.
  • Treat the trigger message as a trigger in markdown export and transcript search.

Validation

  • pnpm typecheck
  • tests/integration/api/conversations/detail.test.ts (3/3)
  • Dashboard vitest (334/334), dashboard oxlint, dashboard-style:check, file-length:check
  • Mock QA: JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true pnpm dev, /conversations/agent-dispatch%3Aevent-1

via David Cramer.

--

View Junior Session [Sentry]

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 16, 2026 11:08pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

135 screenshot changes — 0 changed · 135 added · 0 removed

Review screenshots in Frameshift

sentry-junior Bot and others added 2 commits October 16, 2026 22:21
Show an "Automation: <name>" link in the conversation header and details
drawer for automation runs. Render the run's dispatch input as an
automation trigger row instead of a user message from "junior".

The conversation report now names that input in
sourceTask.triggerMessageId so the dashboard does not infer it from ids.

Co-Authored-By: David Cramer <[email protected]>
Replace the header link and trigger row with one card at the top of the
transcript. It names the Automation, links to it, and shows the trigger,
run time, and whose credentials the run used. Credentials come from the
run's dispatch record. The run input stays behind Show prompt.

Co-Authored-By: David Cramer <[email protected]>
@sentry-junior
sentry-junior Bot force-pushed the feat/dashboard-automation-run-trigger branch from f1719e5 to f307f9d Compare October 16, 2026 22:32
@sentry-junior sentry-junior Bot changed the title feat(dashboard): Link automation runs and render their trigger input feat(dashboard): Show an automation card at the top of automation runs Oct 16, 2026
@dcramer
dcramer marked this pull request as ready for review October 16, 2026 22:38
@github-actions github-actions Bot added the risk: high PR risk score: high label Oct 16, 2026
Hidden Automations show as Automation, not Scheduled or Event automation.
@dcramer
dcramer merged commit 6f08f29 into main Oct 16, 2026
44 checks passed
@dcramer
dcramer deleted the feat/dashboard-automation-run-trigger branch October 16, 2026 23:15

This branch was successfully deployed

1 active deployment
Preview – junior-docs — edc70f7b Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant