:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(desktop): hide own presence avatar on task and canvas rows (#105240)
Shy Alter79380ec8046e
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemPresence.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemPresence.tsxindex 34c115c4a215..270e948a02aa 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemPresence.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemPresence.tsx@@ -51,24 +51,18 @@ export function RowPresence({}) {const author = rowAuthor(item);if (!author) return null;+ // Presence tells you who else is here, so your own face is noise.+ if (currentUserUuid && author.user.uuid === currentUserUuid) return null;if (presenceTier(item.ts, Date.now()) === "idle") return null;- return (- <ActiveRowPresence- item={item}- author={author}- isCurrentUser={author.user.uuid === currentUserUuid}- />- );+ return <ActiveRowPresence item={item} author={author} />;}function ActiveRowPresence({item,author,- isCurrentUser,}: {item: ChannelItemModel;author: NonNullable<ReturnType<typeof rowAuthor>>;- isCurrentUser: boolean;}) {const tier = presenceTier(item.ts, useNow());if (tier === "idle") return null;@@ -77,13 +71,9 @@ function ActiveRowPresence({user={author.user}tier={tier}label={- isCurrentUser && tier === "live"- ? "You are working on this"- : isCurrentUser- ? "You were here recently"- : tier === "live"- ? `${author.label} is working on this`- : `${author.label} was here recently`+ tier === "live"+ ? `${author.label} is working on this`+ : `${author.label} was here recently`}/>);diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsxindex b0b932abf606..b83f5e464aac 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx@@ -433,11 +433,11 @@ describe("ChannelItemRow", () => {});it.each([- ["task", "u-1", "You were here recently"],+ ["task", "u-1", null],["task", "u-2", "Ada Lovelace was here recently"],- ["canvas", "u-1", "You were here recently"],+ ["canvas", "u-1", null],["canvas", "u-2", "Ada Lovelace was here recently"],- ] as const)("labels recent %s presence for %s", (kind, uuid, label) => {+ ] as const)("shows recent %s presence for %s", (kind, uuid, label) => {renderRow(item({kind,@@ -453,9 +453,13 @@ describe("ChannelItemRow", () => {}),);- expect(screen.getByRole("img", { name: label }).textContent).toContain(- "AL",- );+ if (label === null) {+ expect(screen.queryByText("AL")).toBeNull();+ } else {+ expect(screen.getByRole("img", { name: label }).textContent).toContain(+ "AL",+ );+ }});// A pinned row offering only `move` resolves against the Command Center's