Attribute channel task rows to the human who started them#3548
Conversation
Channel feed task rows rendered every message as "PostHog" with a robot
avatar and an "Agent" badge, then repeated the starter's name inline in the
body ("@name started a new task"). This made the feed hard to scan and
misattributed human-initiated tasks to the agent.
Channel-started tasks (origin_product === "user_created") now show the
starter as the sender: their initials in the avatar, their display name as
the author, no "Agent" badge, and a plain "started a new task" body. Tasks
from other origins (Slack, automations) keep the agent attribution so
genuine agent-authored messages remain distinguishable at a glance.
Mirrors the existing SystemFeedRow author-vs-agent pattern in the same file.
Generated-By: PostHog Code
Task-Id: 4b3b11b7-5066-448f-a721-fe8532ce15d1
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Extract the pure presentational TaskFeedRow (avatar + attribution header + body) out of FeedItem so it can be storied; the data-fetching TaskCard and ReplyFooter stay in the FeedItem container and are passed in as children. Adds ChannelFeedView.stories.tsx covering the attribution states so the human-vs-agent sender rendering is easy to validate: human-started, human-with-email-only (initials/name fallback), non-user origin (stays agent-attributed), and user_created with no starter. Generated-By: PostHog Code Task-Id: 4b3b11b7-5066-448f-a721-fe8532ce15d1
|
✅ Visual changes approved by @adboio — baseline updated in 12 new. |
The AgentOrigin story's task() call exceeded the line width; wrap it so `biome check` (the CI quality gate, which runs the formatter) passes. Generated-By: PostHog Code Task-Id: 4b3b11b7-5066-448f-a721-fe8532ce15d1
Remove the doc comments I introduced on channelTaskStarter and TaskFeedRow, and all comments in the new story file, keeping only the pre-existing "Replying now lives" comment that predates this change. Generated-By: PostHog Code Task-Id: 4b3b11b7-5066-448f-a721-fe8532ce15d1
Instead of the generic "started a new task" body, feed rows now show a two-line preview of the user's original prompt (task.description, run through xmlToPlainText to resolve chip tags), matching how the optimistic pending row already previews the prompt. Falls back to the prior text when a task has no description. Adds LongPrompt and NoPrompt stories to cover truncation and the fallback. Generated-By: PostHog Code Task-Id: 4b3b11b7-5066-448f-a721-fe8532ce15d1
12 updated Run: 3d040bb6-1c65-415b-8860-4c73932ce6b8 Co-authored-by: adboio <23323033+adboio@users.noreply.github.com>
|
Reviews (1): Last reviewed commit: "chore(visual): update storybook baseline..." | Re-trigger Greptile |
| {starter ? userDisplayName(starter) : "PostHog"} | ||
| </ThreadItemAuthor> | ||
| {!starter && <Badge variant="info">Agent</Badge>} |
There was a problem hiding this comment.
Missing Creator Changes Task Origin
When a user_created task has no created_by value, starter becomes null and the row labels it as a PostHog agent task. Deleted users, imported tasks, or incomplete API records can therefore turn a human-origin task into an agent-origin message instead of showing an unknown human fallback.
There was a problem hiding this comment.
Pure UI refactor in the canvas channel feed — adds human attribution for user-created tasks, extracts a testable TaskFeedRow component, and backs it with a full Storybook story suite including a NoStarter story that explicitly covers the null created_by edge case the bot raised. No crashes, data loss, API contract changes, or security issues.
Problem
channel feeds are hard to scan because every message looks basically the same
Changes
make the actual task author show up as the sender, when the task is human-initiated from within the app
How did you test this?
manually
Automatic notifications
Created with PostHog Code