Attribute channel task rows to the human who started them#3548
Draft
adboio wants to merge 5 commits into
Draft
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
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
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
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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