@@ -2,9 +2,6 @@ import type { Task, UserBasic } from "@posthog/shared/domain-types";
22import type { Meta , StoryObj } from "@storybook/react-vite" ;
33import { 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.
85function 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> = {
5652export default meta ;
5753type 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- */
6455export 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- */
7562export 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- */
8971export 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- */
10381export const NoStarter : Story = {
10482 args : {
10583 task : task ( { created_by : null , title : "Untitled task" } ) ,
0 commit comments