Skip to content

: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.

fix(inbox): confirm triage state changes (#100346)

Dylan Martinfd66e97cc7eb
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts
index a84d61c4ce21..0a13e29d6d6d 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts
@@ -424,6 +424,8 @@ export function useInboxBulkActions(
if (result.failureCount > 0) {
toast.error(formatBulkActionSummary("suppress", result));
+ } else {
+ toast.success(formatBulkActionSummary("suppress", result));
}
},
onError: (error, _variables, context) => {
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDismissAction.test.tsx b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDismissAction.test.tsx
index 95651cac56cf..c38050accc95 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDismissAction.test.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDismissAction.test.tsx
@@ -127,7 +127,7 @@ describe("useInboxReportDismissAction", () => {
});
});
- it("keeps the dialog closed once the dismissal lands", async () => {
+ it("keeps the dialog closed and confirms when the dismissal lands", async () => {
mocks.updateState.mockResolvedValue({ ...report, status: "suppressed" });
const user = userEvent.setup();
render(<DismissActionHarness />, { wrapper: createWrapper() });
@@ -135,6 +135,7 @@ describe("useInboxReportDismissAction", () => {
await enterDismissal(user);
await waitFor(() => expect(mocks.updateState).toHaveBeenCalled());
+ expect(mocks.toastSuccess).toHaveBeenCalledWith("1 report dismissed");
expect(
screen.queryByPlaceholderText("Optional: add detail"),
).not.toBeInTheDocument();
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.tsx
index e755055bdcd6..131b2853b332 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
@@ -134,7 +134,7 @@ describe("useInboxReportResolveAction", () => {
);
});
- it("updates the list before the request finishes without a success toast", async () => {
+ it("updates the list before the request finishes and confirms success", async () => {
let finishRequest: ((value: SignalReport) => void) | undefined;
mocks.updateState.mockReturnValue(
new Promise<SignalReport>((resolve) => {
@@ -164,7 +164,7 @@ describe("useInboxReportResolveAction", () => {
});
await act(async () => finishRequest?.({ ...report, status: "resolved" }));
- expect(mocks.toastSuccess).not.toHaveBeenCalled();
+ expect(mocks.toastSuccess).toHaveBeenCalledWith("Report resolved");
expect(invalidate).toHaveBeenCalled();
});
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.tsx b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.tsx
index 4f367fa28c94..95069eb1ba6a 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportResolveAction.tsx
@@ -93,6 +93,7 @@ export function useInboxReportResolveAction(
setRetryDraft(result.draftGeneration, report.id, undefined);
setInitialReason(undefined);
setInitialNote("");
+ toast.success("Report resolved");
if (startedAtRef.current !== null) {
trackResult("resolve", "succeeded", startedAtRef.current);
}