Skip to content

Attribute channel task rows to the human who started them#3548

Draft
adboio wants to merge 5 commits into
mainfrom
posthog-code/channel-feed-human-sender
Draft

Attribute channel task rows to the human who started them#3548
adboio wants to merge 5 commits into
mainfrom
posthog-code/channel-feed-human-sender

Conversation

@adboio

@adboio adboio commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

channel feeds are hard to scan because every message looks basically the same

Screenshot 2026-07-17 at 4.08.28 PM.png

Changes

make the actual task author show up as the sender, when the task is human-initiated from within the app

Screenshot 2026-07-17 at 4.11.51 PM.png

How did you test this?

manually

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

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
@trunk-io

trunk-io Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 6a879c8.

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
@posthog

posthog Bot commented Jul 17, 2026

Copy link
Copy Markdown
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.

adboio added 2 commits July 17, 2026 14:10
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
@adboio
adboio requested review from a team, adamleithp and k11kirky July 17, 2026 20:12
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
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