: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(inbox): distinguish desktop resolutions from dismissals (#117792)
Georgiy Tarasov82166fe32374
diff --git a/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts b/packages/agent/packages/agent-contracts/src/dismissal-reasons.tsindex 51be3a923727..849e9d6ca56e 100644--- a/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts+++ b/packages/agent/packages/agent-contracts/src/dismissal-reasons.ts@@ -28,8 +28,8 @@ export const DISMISSAL_REASON_OPTIONS = [] as const;export const RESOLVE_REASON_OPTIONS = [- { value: "fixed_outside_posthog", label: "Fixed outside PostHog" },- { value: "pr_merged", label: "PR was merged" },+ { value: "fixed_outside_posthog", label: "Implemented manually" },+ { value: "no_action_needed", label: "No action needed" },{ value: "already_fixed", label: "Was already fixed before this report" },{ value: "other", label: "Something else…" },] as const;@@ -43,7 +43,8 @@ export type ResolveReasonOptionValue =export type ReportStateReason =| DismissalReasonOptionValue- | ResolveReasonOptionValue;+ | ResolveReasonOptionValue+ | "pr_merged";/** Whether the given reason snoozes the report (temporarily) instead of permanently dismissing it. */export function isDismissalReasonSnooze(@@ -66,6 +67,6 @@ export function dismissalReasonLabel(value: string): string {return (DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)?.label ??RESOLVE_REASON_OPTIONS.find((o) => o.value === value)?.label ??- value+ (value === "pr_merged" ? "PR already merged" : value));}diff --git a/packages/agent/packages/agent-contracts/src/domain-types.ts b/packages/agent/packages/agent-contracts/src/domain-types.tsindex b461ac514fe3..fe80779f6a22 100644--- a/packages/agent/packages/agent-contracts/src/domain-types.ts+++ b/packages/agent/packages/agent-contracts/src/domain-types.ts@@ -956,6 +956,7 @@ export interface DismissalArtefact extends SignalReportArtefactBase {}export interface DismissalContent {+ state?: "resolved" | "suppressed" | "potential" | null;reason: ReportStateReason;/** Optional free-form detail provided alongside the reason. */note: string;diff --git a/products/desktop/docs/SELF-DRIVING-REPORTS.md b/products/desktop/docs/SELF-DRIVING-REPORTS.mdindex d83a441ceb34..1e0d26618f40 100644--- a/products/desktop/docs/SELF-DRIVING-REPORTS.md+++ b/products/desktop/docs/SELF-DRIVING-REPORTS.md@@ -12,6 +12,9 @@ When both destinations are available and the chat token has the required scopes,The agent asks for agreement on the text and selected destination before writing. If a scout note is unavailable or refused, it offers a work-log entry and asks again.Pure Q&A needs no save offer. Saving feedback does not resolve or dismiss the report.Select text in either report view to ask about that passage.+Resolve marks an accepted report as done. Choose Implemented manually when you made the change outside the report's task, or No action needed when the report was useful but needs no implementation. You can also record that the issue was already fixed or explain another outcome. The reason and optional details are saved with the resolution. A No action needed resolution does not count as a fix and stops pending or active follow-up checks.+Dismiss rejects a report with a reason. Both actions remove it from the active inbox, and its history keeps Resolved and Dismissed separate. Resolving a report with an open implementation PR closes that PR after confirmation.+Activity entries use the verdict recorded with each feedback entry. Resolving shows Report resolved, dismissing shows Report dismissed, and older feedback without a recorded verdict shows Report feedback added. Later status changes do not rewrite these activity labels.Reports with a PR show Open in GitHub as the first header button, followed by Chat.Copy-link options are in the More report actions menu. Report actions do not offer canvas creation.diff --git a/products/desktop/packages/api-client/src/posthog-client.test.ts b/products/desktop/packages/api-client/src/posthog-client.test.tsindex 34fd544dff33..2ac0041517b3 100644--- a/products/desktop/packages/api-client/src/posthog-client.test.ts+++ b/products/desktop/packages/api-client/src/posthog-client.test.ts@@ -2927,14 +2927,20 @@ describe("PostHogAPIClient", () => {// A resolve stores its rationale as a `dismissal` artefact, so resolve-only// reasons must normalize as dismissals rather than degrade to a raw preview.- it.each([["fixed_outside_posthog"], ["pr_merged"]])(+ it.each([["fixed_outside_posthog"], ["pr_merged"], ["no_action_needed"]])("keeps a resolve reason %s as a dismissal row",async (reason) => {const rows = [{id: "d1",type: "dismissal",- content: { reason, note: "", user_id: 1, user_uuid: null },+ content: {+ state: "resolved",+ reason,+ note: "",+ user_id: 1,+ user_uuid: null,+ },created_at: "2026-06-01T00:00:00Z",},];@@ -2950,6 +2956,9 @@ describe("PostHogAPIClient", () => {expect(results[0].type).toBe("dismissal");expect(results[0].degraded).toBeFalsy();expect((results[0].content as { reason: string }).reason).toBe(reason);+ expect((results[0].content as { state: string }).state).toBe(+ "resolved",+ );},);diff --git a/products/desktop/packages/api-client/src/posthog-client.ts b/products/desktop/packages/api-client/src/posthog-client.tsindex 9fd3f7ae3846..03e39ac6e861 100644--- a/products/desktop/packages/api-client/src/posthog-client.ts+++ b/products/desktop/packages/api-client/src/posthog-client.ts@@ -1400,6 +1400,7 @@ type AnyArtefact =const DISMISSAL_REASONS = new Set<ReportStateReason>([...DISMISSAL_REASON_OPTIONS.map((o) => o.value),...RESOLVE_REASON_OPTIONS.map((o) => o.value),+ "pr_merged",]);const PRIORITY_VALUES = new Set(["P0", "P1", "P2", "P3", "P4"]);@@ -1569,6 +1570,12 @@ function normalizeDismissalArtefact(type: "dismissal",...artefactBase(value),content: {+ state:+ contentValue.state === "resolved" ||+ contentValue.state === "suppressed" ||+ contentValue.state === "potential"+ ? contentValue.state+ : null,reason,note: optionalString(contentValue.note) ?? "",user_id:diff --git a/products/desktop/packages/core/src/inbox/bulkActions.test.ts b/products/desktop/packages/core/src/inbox/bulkActions.test.tsindex 9f70f927af2d..e0fb696f1e2c 100644--- a/products/desktop/packages/core/src/inbox/bulkActions.test.ts+++ b/products/desktop/packages/core/src/inbox/bulkActions.test.ts@@ -31,9 +31,9 @@ describe("buildResolveRequest", () => {dismissal_reason: "fixed_outside_posthog",dismissal_note: "Fixed in v2",});- expect(buildResolveRequest("pr_merged", " ")).toEqual({+ expect(buildResolveRequest("no_action_needed", " ")).toEqual({state: "resolved",- dismissal_reason: "pr_merged",+ dismissal_reason: "no_action_needed",});});});diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxReportContextMenu.test.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxReportContextMenu.test.tsxindex 65edf0cbf587..f17ffe7fc372 100644--- a/products/desktop/packages/ui/src/features/inbox/components/InboxReportContextMenu.test.tsx+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxReportContextMenu.test.tsx@@ -269,8 +269,8 @@ describe("InboxReportContextMenu", () => {openMenu(makeReport());await user.hover(screen.getByText("Resolve"));- fireEvent.click(await screen.findByText("PR was merged"));- expect(mocks.resolveWithReason).toHaveBeenCalledWith("pr_merged");+ fireEvent.click(await screen.findByText("No action needed"));+ expect(mocks.resolveWithReason).toHaveBeenCalledWith("no_action_needed");fireEvent.contextMenu(screen.getByText("Report one"));await user.hover(screen.getByText("Dismiss"));@@ -324,8 +324,8 @@ describe("InboxReportContextMenu", () => {);fireEvent.click(screen.getByText("Resolve"));- fireEvent.click(await screen.findByText("PR was merged"));- expect(mocks.openResolveDialog).toHaveBeenCalledWith("pr_merged");+ fireEvent.click(await screen.findByText("No action needed"));+ expect(mocks.openResolveDialog).toHaveBeenCalledWith("no_action_needed");expect(mocks.resolveWithReason).not.toHaveBeenCalled();fireEvent.contextMenu(screen.getByText("Report one"));diff --git a/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.test.tsx b/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.test.tsxindex 0e8192880232..725f49721ca8 100644--- a/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.test.tsx+++ b/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.test.tsx@@ -37,7 +37,7 @@ describe("ResolveReportDialog", () => {await user.type(screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",),"The fix is in another service.",);@@ -72,7 +72,7 @@ describe("ResolveReportDialog", () => {).toBeChecked();expect(screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",),).toHaveFocus();});diff --git a/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.tsx b/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.tsxindex 49ac615e4ee0..45237d4ec22d 100644--- a/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.tsx+++ b/products/desktop/packages/ui/src/features/inbox/components/ResolveReportDialog.tsx@@ -64,15 +64,17 @@ export function ResolveReportDialog({<DialogHeader><DialogTitle>Resolve report "{title}"?</DialogTitle><DialogDescription>- This marks the report as done. If the issue returns, you get a new- report linked to this one.+ This marks a useful report as done. If the issue returns, you get a+ new report linked to this one.{hasOpenPr ? " The open pull request will be closed." : ""}</DialogDescription></DialogHeader><DialogBody><div className="flex flex-col gap-4">+ <Label>How was this report handled?</Label><RadioGroup+ aria-label="How was this report handled?"value={reason ?? ""}onValueChange={(value) =>setReason(value as ResolveReasonOptionValue)@@ -100,7 +102,7 @@ export function ResolveReportDialog({setReason("other");}}}- placeholder="Optional: link to the fix or explain what changed"+ placeholder="Add context or a link to the implementation"rows={3}maxLength={4000}disabled={isSubmitting}@@ -123,7 +125,7 @@ export function ResolveReportDialog({loading={isSubmitting}onClick={() => reason && onConfirm({ reason, note })}>- Resolve report+ {hasOpenPr ? "Resolve and close PR" : "Resolve report"}</Button></DialogFooter></DialogContent>diff --git a/products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx b/products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsxindex 85bb52f54c6a..ce0c7779922f 100644--- a/products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx+++ b/products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx@@ -10,6 +10,8 @@ import {formatRankingProbability,rankingLiftBarPercent,} from "@posthog/core/inbox/rankingFormat";+import { Badge } from "@posthog/quill";+import { dismissalReasonLabel } from "@posthog/shared/dismissalReasons";import type {ActionabilityJudgmentContent,AnySignalReportArtefact,@@ -39,7 +41,6 @@ import { CodeBlock } from "@posthog/ui/primitives/CodeBlock";import { HighlightedCode } from "@posthog/ui/primitives/HighlightedCode";import { RelativeTimestamp } from "@posthog/ui/primitives/RelativeTimestamp";import { cachedImageUrl } from "@posthog/ui/shell/cachedImageUrl";-import { Badge, Box, Flex, Text } from "@radix-ui/themes";import { Fragment, useState } from "react";// A chronological log of every artefact on a report. Each known type renders a@@ -61,7 +62,7 @@ const TYPE_LABELS: Record<string, string> = {signal_finding: "Signal investigated",suggested_reviewers: "Reviewers suggested",repo_selection: "Repo selected",- dismissal: "Report dismissed",+ dismissal: "Report feedback added",video_segment: "Video segment",ranking_score: "Ranking scored",work_claim: "Work claimed",@@ -74,8 +75,18 @@ const WORK_RELEASE_REASON_LABELS: Record<WorkReleaseContent["reason"], string> =taken_over: "Taken over",};-function typeLabel(type: string): string {- return TYPE_LABELS[type] ?? type;+function typeLabel(artefact: AnySignalReportArtefact): string {+ if (artefact.type === "dismissal") {+ const state = (artefact.content as DismissalContent).state;+ return state === "resolved"+ ? "Report resolved"+ : state === "suppressed"+ ? "Report dismissed"+ : state === "potential"+ ? "Report snoozed"+ : "Report feedback added";+ }+ return TYPE_LABELS[artefact.type] ?? artefact.type;}function prettify(value: string): string {@@ -115,17 +126,17 @@ function locationLabel(artefact: AnySignalReportArtefact): string | null {function CodeRefBlock({ code, language }: { code: string; language: string }) {return (- <Box className="mt-1.5">+ <div className="mt-1.5"><CodeBlock size="1"><HighlightedCode code={code} language={language} /></CodeBlock>- </Box>+ </div>);}function RelevanceNote({ note }: { note: string }) {if (!note.trim()) return null;- return <Text className="block text-(--gray-11) text-[13px]">{note}</Text>;+ return <span className="block text-(--gray-11) text-[13px]">{note}</span>;}/** Judgment explanations are often paragraphs — collapsed by default behind a toggle. */@@ -133,7 +144,7 @@ function CollapsibleReasoning({ text }: { text: string }) {const [expanded, setExpanded] = useState(false);if (!text.trim()) return null;return (- <Box>+ <div><buttontype="button"onClick={() => setExpanded((v) => !v)}@@ -148,9 +159,9 @@ function CollapsibleReasoning({ text }: { text: string }) {{expanded ? "Hide reasoning" : "Show reasoning"}</button>{expanded ? (- <Text className="block text-(--gray-11) text-[13px]">{text}</Text>+ <span className="block text-(--gray-11) text-[13px]">{text}</span>) : null}- </Box>+ </div>);}@@ -171,7 +182,7 @@ function CollapsibleNote({.map((line) => line.trim()).find((line) => line.length > 0);return (- <Box>+ <div><buttontype="button"onClick={() => setExpanded((v) => !v)}@@ -186,41 +197,39 @@ function CollapsibleNote({{expanded ? ("Hide note") : (- <Text className="min-w-0 flex-1 truncate">{preview ?? "Note"}</Text>+ <span className="min-w-0 flex-1 truncate">{preview ?? "Note"}</span>)}</button>{expanded ? (- <Box className="text-[13px]">+ <div className="text-[13px]"><MarkdownRenderer content={note} />{author ? (- <Text className="block text-(--gray-10) text-[12px]">+ <span className="block text-(--gray-10) text-[12px]">— {author}- </Text>+ </span>) : null}- </Box>+ </div>) : null}- </Box>+ </div>);}function ReviewersBody({ reviewers }: { reviewers: SuggestedReviewer[] }) {if (reviewers.length === 0) {return (- <Text className="block text-(--gray-10) text-[13px]">+ <span className="block text-(--gray-10) text-[13px]">No reviewers assigned.- </Text>+ </span>);}return (- <Flex direction="column" gap="1">+ <div className="flex flex-col gap-1">{reviewers.map((reviewer) => (- <Flex+ <divkey={reviewer.user?.uuid ?? reviewer.user_uuid ?? reviewer.github_login}- align="center"- gap="2"- wrap="wrap"+ className="flex flex-wrap items-center gap-2">{reviewer.github_login ? (<img@@ -232,13 +241,13 @@ function ReviewersBody({ reviewers }: { reviewers: SuggestedReviewer[] }) {onLoad={(e) => e.currentTarget.classList.add("loaded")}/>) : null}- <Text className="text-[13px]">+ <span className="text-[13px]">{reviewer.user?.first_name ||reviewer.github_name ||reviewer.github_login ||reviewer.user?.email ||"Unknown reviewer"}- </Text>+ </span>{reviewer.github_login ? (<ahref={`https://github.com/${reviewer.github_login}`}@@ -250,9 +259,9 @@ function ReviewersBody({ reviewers }: { reviewers: SuggestedReviewer[] }) {<ArrowSquareOutIcon size={10} /></a>) : null}- </Flex>+ </div>))}- </Flex>+ </div>);}@@ -310,9 +319,9 @@ function RankingHeadRows({ heads }: { heads: RankingHead[] }) {function RankingModelBody({ model }: { model: RankingModelResult }) {if (model.status === "skipped" || model.heads.length === 0) {return (- <Text className="block text-(--gray-10) text-[12px]">+ <span className="block text-(--gray-10) text-[12px]">Skipped{model.skip_reason ? `: ${model.skip_reason}` : ""}- </Text>+ </span>);}return <RankingHeadRows heads={model.heads} />;@@ -322,27 +331,22 @@ function RankingScoreBody({ content }: { content: RankingScoreContent }) {const [showOthers, setShowOthers] = useState(false);const { served, challengers } = content;return (- <Flex direction="column" gap="2" className="min-w-0">+ <div className="flex min-w-0 flex-col gap-2"><RankingModelBody model={served} />- <Flex- align="center"- gap="1"- wrap="wrap"- className="text-(--gray-10) text-[12px]"- >- <Text className="break-all font-mono">{served.key}</Text>+ <div className="flex flex-wrap items-center gap-1 text-(--gray-10) text-[12px]">+ <span className="break-all font-mono">{served.key}</span>{content.manifest_version ? (- <Text>· manifest {content.manifest_version}</Text>+ <span>· manifest {content.manifest_version}</span>) : null}{content.scored_at ? (<>- <Text>·</Text>+ <span>·</span><RelativeTimestamp timestamp={content.scored_at} /></>) : null}- </Flex>+ </div>{challengers.length > 0 ? (- <Box>+ <div><buttontype="button"onClick={() => setShowOthers((v) => !v)}@@ -357,35 +361,28 @@ function RankingScoreBody({ content }: { content: RankingScoreContent }) {Other models ({challengers.length})</button>{showOthers ? (- <Flex direction="column" gap="3" className="mt-2 pl-3">+ <div className="mt-2 flex flex-col gap-3 pl-3">{challengers.map((model) => {const role = model.roles.find((r) => r !== "served");return (- <Flex- key={model.key}- direction="column"- gap="1"- className="min-w-0"- >- <Flex align="center" gap="2" wrap="wrap">- <Text className="break-all font-mono text-(--gray-11) text-[12px]">+ <div key={model.key} className="flex min-w-0 flex-col gap-1">+ <div className="flex flex-wrap items-center gap-2">+ <span className="break-all font-mono text-(--gray-11) text-[12px]">{model.key}- </Text>+ </span>{role ? (- <Badge color="gray" variant="soft">- {prettify(role)}- </Badge>+ <Badge variant="default">{prettify(role)}</Badge>) : null}- </Flex>+ </div><RankingModelBody model={model} />- </Flex>+ </div>);})}- </Flex>+ </div>) : null}- </Box>+ </div>) : null}- </Flex>+ </div>);}@@ -406,28 +403,28 @@ function ArtefactBody({const text = (artefact.content as SignalReportArtefactContent | null)?.content;return (- <Text className="block text-(--gray-10) text-[13px]">+ <span className="block text-(--gray-10) text-[13px]">{text || "No preview available."}- </Text>+ </span>);}switch (artefact.type) {case "code_reference": {const c = artefact.content as CodeReferenceContent;return (- <Box>+ <div><RelevanceNote note={c.relevance_note} /><CodeRefBlockcode={c.contents}language={languageFromPath(c.file_path)}/>- </Box>+ </div>);}case "line_reference": {const c = artefact.content as LineReferenceContent;return (- <Box>+ <div><RelevanceNote note={c.note} />{c.contents ? (<CodeRefBlock@@ -435,7 +432,7 @@ function ArtefactBody({language={languageFromPath(c.file_path)}/>) : null}- </Box>+ </div>);}case "commit":@@ -458,64 +455,62 @@ function ArtefactBody({case "priority_judgment": {const c = artefact.content as PriorityJudgmentContent;return (- <Flex direction="column" gap="1">+ <div className="flex flex-col gap-1"><SignalReportPriorityBadge priority={c.priority} />{c.explanation ? <CollapsibleReasoning text={c.explanation} /> : null}- </Flex>+ </div>);}case "actionability_judgment": {const c = artefact.content as ActionabilityJudgmentContent;return (- <Flex direction="column" gap="1">- <Flex align="center" gap="2" wrap="wrap">+ <div className="flex flex-col gap-1">+ <div className="flex flex-wrap items-center gap-2"><SignalReportActionabilityBadge actionability={c.actionability} />{c.already_addressed ? (- <Badge color="amber" variant="soft">- Already addressed- </Badge>+ <Badge variant="warning">Already addressed</Badge>) : null}- </Flex>+ </div>{c.explanation ? <CollapsibleReasoning text={c.explanation} /> : null}- </Flex>+ </div>);}case "safety_judgment": {const c = artefact.content as SafetyJudgmentContent;return (- <Flex direction="column" gap="1">- <Badge color={c.choice ? "green" : "red"} variant="soft">+ <div className="flex flex-col gap-1">+ <Badge variant={c.choice ? "success" : "destructive"}>{c.choice ? "Safe to act on" : "Unsafe"}</Badge>{c.explanation ? <CollapsibleReasoning text={c.explanation} /> : null}- </Flex>+ </div>);}case "signal_finding": {const c = artefact.content as SignalFindingContent;return (- <Flex direction="column" gap="1">- <Flex align="center" gap="2" wrap="wrap">- <Text className="font-mono text-(--gray-10) text-[12px]">+ <div className="flex flex-col gap-1">+ <div className="flex flex-wrap items-center gap-2">+ <span className="font-mono text-(--gray-10) text-[12px]">{c.signal_id}- </Text>- <Badge color={c.verified ? "green" : "gray"} variant="soft">+ </span>+ <Badge variant={c.verified ? "success" : "default"}>{c.verified ? "Verified" : "Unverified"}</Badge>- </Flex>+ </div>{c.relevant_code_paths.length > 0 ? (- <Flex direction="column">+ <div className="flex flex-col">{c.relevant_code_paths.map((path) => (- <Text+ <spankey={path}className="truncate font-mono text-(--gray-11) text-[12px]">{path}- </Text>+ </span>))}- </Flex>+ </div>) : null}- </Flex>+ </div>);}case "suggested_reviewers":@@ -525,12 +520,10 @@ function ArtefactBody({case "dismissal": {const c = artefact.content as DismissalContent;return (- <Flex direction="column" gap="1">- <Badge color="gray" variant="soft">- {prettify(c.reason)}- </Badge>+ <div className="flex flex-col gap-1">+ <Badge variant="default">{dismissalReasonLabel(c.reason)}</Badge>{c.note ? <RelevanceNote note={c.note} /> : null}- </Flex>+ </div>);}case "ranking_score":@@ -540,24 +533,22 @@ function ArtefactBody({case "work_claim": {const name = (artefact.content as WorkClaimContent).display_name;return name ? (- <Text className="block text-(--gray-11) text-[13px]">{name}</Text>+ <span className="block text-(--gray-11) text-[13px]">{name}</span>) : null;}case "work_release": {const c = artefact.content as WorkReleaseContent;return (- <Badge color="gray" variant="soft">- {WORK_RELEASE_REASON_LABELS[c.reason]}- </Badge>+ <Badge variant="default">{WORK_RELEASE_REASON_LABELS[c.reason]}</Badge>);}default: {const c = artefact.content as SignalReportArtefactContent | null;const text = typeof c?.content === "string" ? c.content : "";return (- <Text className="block text-(--gray-10) text-[13px]">+ <span className="block text-(--gray-10) text-[13px]">{text || "No preview available."}- </Text>+ </span>);}}@@ -577,23 +568,23 @@ function ArtefactRow({const attribution = attributionLabel(artefact);return (- <Box className="rounded-lg border border-gray-6 bg-gray-1 p-3">- <Flex align="center" justify="between" gap="2" className="mb-1.5">- <Flex align="center" gap="2" className="min-w-0">- <Text className="shrink-0 font-medium text-[13px]">- {typeLabel(artefact.type)}- </Text>+ <div className="rounded-lg border border-gray-6 bg-gray-1 p-3">+ <div className="mb-1.5 flex items-center justify-between gap-2">+ <div className="flex min-w-0 items-center gap-2">+ <span className="shrink-0 font-medium text-[13px]">+ {typeLabel(artefact)}+ </span>{location ? (- <Text className="truncate font-mono text-(--gray-10) text-[12px]">+ <span className="truncate font-mono text-(--gray-10) text-[12px]">{location}- </Text>+ </span>) : null}- </Flex>- <Flex align="center" gap="2" className="shrink-0">+ </div>+ <div className="flex shrink-0 items-center gap-2">{attribution ? (- <Text className="text-(--gray-10) text-[12px]">+ <span className="text-(--gray-10) text-[12px]">by {attribution}- </Text>+ </span>) : null}{/* Dev-only escape hatch for inspecting the raw artefact payload. */}{import.meta.env.DEV ? (@@ -610,8 +601,8 @@ function ArtefactRow({</button>) : null}<RelativeTimestamp timestamp={artefact.created_at} />- </Flex>- </Flex>+ </div>+ </div><ArtefactBodyreportId={reportId}artefact={artefact}@@ -622,7 +613,7 @@ function ArtefactRow({{JSON.stringify(artefact, null, 2)}</pre>) : null}- </Box>+ </div>);}@@ -646,7 +637,7 @@ export function ArtefactLogList({);return (- <Flex direction="column" gap="2">+ <div className="flex flex-col gap-2">{sorted.map((artefact) => (<ArtefactRowkey={artefact.id}@@ -655,6 +646,6 @@ export function ArtefactLogList({hideCommitDiffs={hideCommitDiffs}/>))}- </Flex>+ </div>);}diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.test.tsx b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.test.tsxindex 131b2853b332..5b2ccde9df85 100644--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.test.tsx+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.test.tsx@@ -100,39 +100,42 @@ describe("useInboxReportResolveAction", () => {});});- it("tracks triage outcomes and blocks overlapping resolve requests", async () => {- let finishRequest: ((value: SignalReport) => void) | undefined;- mocks.updateState.mockReturnValue(- new Promise<SignalReport>((resolve) => {- finishRequest = resolve;- }),- );- const { result } = renderHook(- () => useInboxReportResolveAction(report, "triage", "triage-1"),- { wrapper },- );+ it.each(["fixed_outside_posthog", "no_action_needed"] as const)(+ "tracks triage outcome %s and blocks overlapping resolve requests",+ async (reason) => {+ let finishRequest: ((value: SignalReport) => void) | undefined;+ mocks.updateState.mockReturnValue(+ new Promise<SignalReport>((resolve) => {+ finishRequest = resolve;+ }),+ );+ const { result } = renderHook(+ () => useInboxReportResolveAction(report, "triage", "triage-1"),+ { wrapper },+ );- act(() => {- result.current.resolveWithReason("fixed_outside_posthog");- result.current.resolveWithReason("fixed_outside_posthog");- });+ act(() => {+ result.current.resolveWithReason(reason);+ result.current.resolveWithReason(reason);+ });- await waitFor(() => expect(mocks.updateState).toHaveBeenCalledOnce());- expect(mocks.actionTrackerArgs.slice(1)).toEqual(["triage", "triage-1"]);- expect(mocks.resultTrackerArgs.slice(1)).toEqual(["triage", "triage-1"]);- expect(mocks.trackAction).toHaveBeenCalledWith("resolve", {- dismissal_reason: "fixed_outside_posthog",- });+ await waitFor(() => expect(mocks.updateState).toHaveBeenCalledOnce());+ expect(mocks.actionTrackerArgs.slice(1)).toEqual(["triage", "triage-1"]);+ expect(mocks.resultTrackerArgs.slice(1)).toEqual(["triage", "triage-1"]);+ expect(mocks.trackAction).toHaveBeenCalledWith("resolve", {+ dismissal_reason: reason,+ });- await act(async () => finishRequest?.({ ...report, status: "resolved" }));- await waitFor(() =>- expect(mocks.trackResult).toHaveBeenCalledWith(- "resolve",- "succeeded",- expect.any(Number),- ),- );- });+ await act(async () => finishRequest?.({ ...report, status: "resolved" }));+ await waitFor(() =>+ expect(mocks.trackResult).toHaveBeenCalledWith(+ "resolve",+ "succeeded",+ expect.any(Number),+ ),+ );+ },+ );it("updates the list before the request finishes and confirms success", async () => {let finishRequest: ((value: SignalReport) => void) | undefined;@@ -207,22 +210,22 @@ describe("useInboxReportResolveAction", () => {await user.click(screen.getByText("Open resolve"));await user.click(- screen.getByRole("radio", { name: "Fixed outside PostHog" }),+ screen.getByRole("radio", { name: "Implemented manually" }),);const note = screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",);await user.type(note, "Fixed in a separate change");await user.click(screen.getByText("Resolve report"));await waitFor(() =>expect(- screen.getByRole("radio", { name: "Fixed outside PostHog" }),+ screen.getByRole("radio", { name: "Implemented manually" }),).toBeChecked(),);expect(screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",),).toHaveValue("Fixed in a separate change");});@@ -244,11 +247,11 @@ describe("useInboxReportResolveAction", () => {await user.click(screen.getByText("Open resolve"));await user.click(- screen.getByRole("radio", { name: "Fixed outside PostHog" }),+ screen.getByRole("radio", { name: "Implemented manually" }),);await user.type(screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",),"Retain this note",);@@ -259,11 +262,11 @@ describe("useInboxReportResolveAction", () => {render(<ResolveActionHarness />, { wrapper: createWrapper(queryClient) });expect(- await screen.findByRole("radio", { name: "Fixed outside PostHog" }),+ await screen.findByRole("radio", { name: "Implemented manually" }),).toBeChecked();expect(screen.getByPlaceholderText(- "Optional: link to the fix or explain what changed",+ "Add context or a link to the implementation",),).toHaveValue("Retain this note");});