Skip to content

Commit eaeb807

Browse files
authored
Drop explanatory comments added in this PR
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
1 parent abd493c commit eaeb807

2 files changed

Lines changed: 0 additions & 31 deletions

File tree

packages/ui/src/features/canvas/components/ChannelFeedView.stories.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import type { Task, UserBasic } from "@posthog/shared/domain-types";
22
import type { Meta, StoryObj } from "@storybook/react-vite";
33
import { TaskFeedRow } from "./ChannelFeedView";
44

5-
// A stand-in for the real TaskCard, which fetches its own status/PR data and so
6-
// renders empty in Storybook. The story only needs something card-shaped under
7-
// the attribution for the row to read realistically.
85
function MockTaskCard({ title }: { title: string }) {
96
return (
107
<div className="mt-1.5 rounded-sm border border-border-primary px-3 py-2.5">
@@ -33,7 +30,6 @@ const task = (overrides: Partial<Task> = {}): Task => ({
3330
slug: "task-1",
3431
title: "Add feedback modal to channels view",
3532
description: "",
36-
// A fixed timestamp keeps the relative-time label stable for visual review.
3733
created_at: "2026-07-17T12:00:00.000Z",
3834
updated_at: "2026-07-17T12:00:00.000Z",
3935
origin_product: "user_created",
@@ -56,22 +52,13 @@ const meta: Meta<typeof TaskFeedRow> = {
5652
export default meta;
5753
type Story = StoryObj<typeof TaskFeedRow>;
5854

59-
/**
60-
* A channel-started task, attributed to the human who started it: initials
61-
* avatar, their display name, no "Agent" badge, and a plain "started a new
62-
* task" body.
63-
*/
6455
export const HumanStarted: Story = {
6556
args: {
6657
task: task(),
6758
children: <MockTaskCard title="Add feedback modal to channels view" />,
6859
},
6960
};
7061

71-
/**
72-
* A human with no name set falls back to the email-derived initials in the
73-
* avatar and the email as the display name.
74-
*/
7562
export const HumanEmailOnly: Story = {
7663
args: {
7764
task: task({
@@ -81,11 +68,6 @@ export const HumanEmailOnly: Story = {
8168
},
8269
};
8370

84-
/**
85-
* A non-user origin (e.g. Slack) stays agent-attributed — robot avatar,
86-
* "PostHog" name, "Agent" badge — even though created_by is set, because that
87-
* person didn't start the task in the channel.
88-
*/
8971
export const AgentOrigin: Story = {
9072
args: {
9173
task: task({
@@ -96,10 +78,6 @@ export const AgentOrigin: Story = {
9678
},
9779
};
9880

99-
/**
100-
* A user_created task with no created_by has no human to attribute, so it also
101-
* falls back to the agent identity.
102-
*/
10381
export const NoStarter: Story = {
10482
args: {
10583
task: task({ created_by: null, title: "Untitled task" }),

packages/ui/src/features/canvas/components/ChannelFeedView.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,21 +414,12 @@ function ReplyFooter({
414414
);
415415
}
416416

417-
// The human who kicked a task off in the channel, or null when the row should
418-
// stay agent-attributed. Only channel-started tasks (user_created) are a
419-
// person's doing; other origins (Slack, automations) carry a created_by who
420-
// didn't start it here, so they keep the agent identity — which also leaves
421-
// that identity free for genuine agent-authored messages in the future.
422417
function channelTaskStarter(task: Task): UserBasic | null {
423418
return task.origin_product === "user_created"
424419
? (task.created_by ?? null)
425420
: null;
426421
}
427422

428-
// The presentational feed row: avatar + attribution header + body. The task
429-
// card and reply footer are supplied as `children` (they fetch their own data,
430-
// so keeping them out of here leaves the row pure and storyable); `actions` is
431-
// the hover toolbar.
432423
export function TaskFeedRow({
433424
task,
434425
actions,

0 commit comments

Comments
 (0)