Repository navigation
Conversation
Chat messages and queued messages already record which automation and input delivered them. Expose both on codersdk.ChatMessage and codersdk.ChatQueuedMessage through the db2sdk converters so REST and stream consumers can label automation input. Signed-off-by: Thomas Kosiewski <tk@coder.com>
Messages and queued inputs delivered by a chat automation now show an "Automation run" label with the automation name and a short input ID. Names come from the organization's chat automations list, fetched only when the chat-automations experiment is on and the chat holds automation input. A deleted or unreadable automation is shown by its ID. Signed-off-by: Thomas Kosiewski <tk@coder.com>
Live automation input now invalidates the chat automations list, so a label from an automation created or renamed after the page loaded shows the current name without a reload. The store invalidates on a durable automation message and on a queue_update that adds automation input. Long automation names now truncate on their own, so the input ID stays visible. The tooltip shows the full name, or explains that the name is unavailable because the automation was deleted or is not readable. Signed-off-by: Thomas Kosiewski <tk@coder.com>
… query The only caller of chatAutomations() sets its own enabled condition, so the factory's enabled option never took effect. Also tighten the useChatAutomationNames doc comment.
…nd queue refresh Add a ChatPageTimeline test that proves resolved automation names reach history labels, with a deleted automation shown by ID and no label on ordinary messages. Add a chat store case that already queued automation input does not refetch the automation list.
Neutral tooltip copy for an unresolved automation name, shorter comments, mock-prefixed fixtures, and an inlined single-use story constant.
…now' into tk/codagt-1215-automations-chat-labels
…now' into tk/codagt-1215-automations-chat-labels
|
Dogfood UAT evidence (remote develop.sh instance, Webhook input in an existing chat, with the label and tooltip: Queued webhook input, with the label and tooltip: First message of a new_chat automation: After the automation is deleted, the label shows its ID: Ordinary messages and queued items have no label: Run now was not on the base branch during UAT. It uses the same Generated with |
|
@codex review |
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: 112058251d
ℹ️ 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".
…ames and assert requests in tests Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1ca6544a7
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Readiness record for head 198c318.
Generated with |
…now' into tk/codagt-1215-automations-chat-labels
|
Merged the new 7b head (25b8907, which changes one line of
The only difference between 198c318 and 91550ed is the lower-layer ARCHITECTURE.md line. The clean Codex verdict on 198c318 therefore still covers this PR's changes, so I did not request a new round. CI for the new head is ci run 36684329074 (dispatched by hand, because no Generated with |
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main d9c13dc: no content conflicts; make gen produced no diff
Generated with |
Only chatAutomationNameMap uses it in this layer, so knip reported it as an unused export. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main 35abc22: stopped exporting the chatAutomations query (knip flagged it as unused after the review fix)
Generated with |
The loading and error label states are covered by the QueuedMessagesList and ConversationTimeline stories, so the timeline tests keep only the automations request assertions. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main 35abc22: dropped the rendered label checks Codex flagged (FE1); the stories cover those states. Upper layers pick this up in the next sync pass
Generated with |
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main d11809f: merged #30166
Generated with |
ibetitsmike
left a comment
There was a problem hiding this comment.
Xum re-reviewed this PR on behalf of @ibetitsmike using GPT-6.1 Sol (high) Exec subagents.
The prior hook, required timeline-name prop, tooltip-status and tooltip-story fixes remain intact at the current pin. New findings: Standards 0, Spec 0, Frontend 0; the optional label status and remaining rendered-label wait stay on their existing threads, and the fixture nit remains optional. At this head, the Go provenance test, 9 focused Vitest cases, TypeScript check and 5 Chromium story setups passed. These setup checks are not Pixel or visual approval; fresh required CI/Pixel verdicts and remote UAT were not verified.
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main a328bee: merged #30166
Generated with |
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
merged #30166
Generated with |
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
merged #30166
Generated with |
…gt-1215-automations-chat-labels No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Generated with |
AutomationLabel no longer defaults nameStatus to "settled", so every caller states the automations list status explicitly instead of silently falling back to the automation ID. - ConversationTimeline: ChatMessageItem requires automationNameStatus. Rows without an automation (and the live row) pass a module-level "settled" constant so memoized rows still skip re-rendering when the list status changes. - QueuedMessagesList requires automationNames. AgentChatInput keeps the prop optional because the create form and loading skeleton have no queue, and defaults it to an explicit empty, settled constant. - ChatPageContent.test: replace the queuedAutomationInput factory, which was called twice with identical arguments, with a mockQueuedAutomationInput fixture spread from MockChatQueuedMessage. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…ame defaults Pass the "settled" literal to rows without an automation instead of a named constant, since a string prop is already stable for memo. Move NO_AUTOMATION_NAMES off the pill sizing comment and document the optional automationNames prop where it is declared. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Review fixes: AutomationLabel's nameStatus is now required and passed explicitly (rows without an automation get the "settled" literal, which is stable for memo); QueuedMessagesList requires automationNames; ChatPageContent.test.tsx uses a mockQueuedAutomationInput constant spread from MockChatQueuedMessage.
Generated with |
|
Review follow-ups in head c551108:
Generated with |
…automation request tests The experiment-off tests waited on a rendered automation label or the Send now button before asserting that no automations request was sent. They now wait until the component has built its automation name query, which happens only after the dashboard has loaded the experiments, and then check the request spy. The label rendering stays covered by the AutomationUserMessages and AutomationMessages stories. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
… mocked module oxlint's consistent-type-imports rule forbids import() type annotations. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
ibetitsmike
left a comment
There was a problem hiding this comment.
Xum validated this PR and approved it on behalf of @ibetitsmike.
The original test-contract finding is fixed: the maintained tests wait for the real query factory and assert the API outcome, not rendered copy. Fresh production-gate removal controls independently reproduce the forbidden request for history, queue experiment, and queue missing-input guards; the unchanged tests pass again with production restored. The required-status and shared-fixture corrections remain intact.
Independent GPT-6.1 Sol (high) Standards and Spec verification found no remaining own-layer blocker. Approval is tied to this exact head and base, current local behavioral/lint/type validation, unchanged PR scope, all-green CI, and an immediate live gate.
…ions-chat-labels Brings main ff158c0 into this layer. No conflicts. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…ions-chat-labels Brings the new_chat automation title source fix from #30134. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_








Closes CODAGT-1215. Part of CODAGT-1135 (Automations for Coder Agents, RFC step 9).
Chat messages and queued inputs delivered by a chat automation (webhook, schedule, Run now) now show a label:
Automation run · <automation name> · input <first 8 chars of input ID>. A tooltip holds the full automation and input IDs. While names load, the label omits the name part. When the name cannot be resolved (deleted automation, a shared-chat viewer who cannot read it, or experiment off), the label shows the automation ID instead. Ordinary messages have no label.Changes
codersdk.ChatMessageandcodersdk.ChatQueuedMessagegainautomation_idandinput_id(omitted when unset).db2sdkfills them from the existing columns, so REST messages and the streammessageandqueue_updateevents carry them. No behavior change in the lower layers.API.experimental.getChatAutomations, achatAutomationsquery, anduseChatAutomationNames. The hook fetchesGET /api/experimental/organizations/{org}/chat-automationsonly when the user-scopedchat-automationsexperiment is on and the chat holds automation input. TheAutomationLabelcomponent uses the sharedBadgeandTooltip, and is wired intoConversationTimeline(history) andQueuedMessagesList(queue). The chat store refetches names when new automation input arrives, so automations created or renamed after page load show their current name.Validation
useChatAutomationNamesreports loading until the list resolves and then maps IDs to names; the chat store refetches names on new live automation input. Go:TestChatMessageAutomationProvenancefor both converters.ConversationTimeline/AutomationUserMessagesandQueuedMessagesList/AutomationMessages(named, deleted by ID, long name at phone width, no label on ordinary items) andQueuedMessagesList/AutomationMessagesLoading(name still loading: no UUID flash).Known limitations (follow-ups under CODAGT-1135)
Stack
Stacked on #30085, #30096, #30112, #30117, #30127, #30134, #30160 (1211 7a) and #30166 (1211 7b). Base:
tk/codagt-1211b-automations-run-now.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high