: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
feat(signals): add resolve and a dismissed section to the inbox (#89728)
Chris Volzer2e7c2fa0f986
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex c78392351885..f4d20ac65aba 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -6913,9 +6913,9 @@ snapshots:scenes-app-identitymatching--identity-matching-paid-attribution--light:hash: v1.k794b7964.f03553d78131d130ceaeb2df5f49c72e4e0ffde0d2db48d9fa8d97677490eeb7.WopQgucFAMz-6URparfwrJLeb30wxWhND35g-bo_Cxcscenes-app-inbox-badges--all-badges--dark:- hash: v1.k794b7964.c436e88b3e0ac628e8a7a2cdeb278b54e5376992c0c0bcc24caac7ee65bc09bc.Uen6SlyE-ZluxIB8D1eV-8QzF87e_6XLQC8e-nbminI+ hash: v1.k794b7964.53905d82a430d879b42b90781915bc47ada17d1634f6145b5b141d0e6e6204bc.oEkMuoSWfz-n8QLBO2OpyTDUxhKzVOi9Tvb0erHRKi8scenes-app-inbox-badges--all-badges--light:- hash: v1.k794b7964.eb6c618365a2f71c3bae1048839e9bb22601b73251ca408f8148a2f100d017e9.nFG7aYMzOmD0fdEDVImBV9jAXIPzEDyS50osIR9Sfq4+ hash: v1.k794b7964.8f8b7a732548437aa428fd82a69d073a2f4024848b5a770881530a68b98125ed.9JUpBWsRhQtAmOwnqlJhPbBL6oR4K2-b9pDd646bmWcscenes-app-inbox-cards--agent-run-cards--dark:hash: v1.k794b7964.7cc4dbc1b4a83c8bf268f09c3d00e8b7603c512cdd0c3cc0d75f4b981e5dc5ab.wTpmY_L9kXga6yhoZsATY70EN3UhqZAs-YdxGBCZBWQscenes-app-inbox-cards--agent-run-cards--light:@@ -6965,9 +6965,9 @@ snapshots:scenes-app-inbox-detail--report--light:hash: v1.k794b7964.f42eb359e62e037d7b75d0348f507dea76b69e442f80adc8b54736e0edcd8da5.42xwdpzwUuNAIMlWPnm3StGJdZdEOr-0lSd9-xtvvmcscenes-app-inbox-detail--report-legacy--dark:- hash: v1.k794b7964.928a85486b43f720f99d1e4bc5cc9ac39bc819485db42b3f2a147118e944a78d.tMeLC7oEBMIOeqnvWxlRyot0nDBp_5OJf0SEcpd6zuI+ hash: v1.k794b7964.d7a01f7a2a244386c3ec004e61de0fd02236bccdafcec4ba7e93ff32718ffe13.jUGu-FHFfhAd2qeCWI5wOXQQysSf6WfTdZzeLU_O_eMscenes-app-inbox-detail--report-legacy--light:- hash: v1.k794b7964.c4e51fd2318b33fa286b7ffbcdf8205f8414408b6c0ca9cd5f24888727354c8d.o-Bc8gNn_6DdOZNlyym6uUjT5aeoDrO4xyZkJQy40SQ+ hash: v1.k794b7964.392775470a41cccd95b251ee30d09f015663edab59f852b12afc37aef730b19c.lnlu12qEUqkUiiNGmEYw9IPajbwBudChG3gReWHDOCgscenes-app-inbox-detail--report-minimal--dark:hash: v1.k794b7964.7b457e88868510c008646ab0ed37de232ec66ccbd001e82256e156e44a4cfa23.38qy-CrE1s8-psQTdpOZqMVW5alFzYnH7On3bETCnGUscenes-app-inbox-detail--report-minimal--light:@@ -6992,6 +6992,10 @@ snapshots:hash: v1.k794b7964.99146d997bb569f68e6cfb667b5883c2ca975f2f04fe062d9ab922a0fe680900.KybBPR_SeSkhcH5889w_sa11YO8EL2uiiGf_Am6JNMEscenes-app-inbox-discussreportbutton--without-suggestions--light:hash: v1.k794b7964.6654dee1d413ac50eb29fcbab3b3dde06541b4a0fc4a4607ae1b2796328d07c5.eqPPN2GQdz-wrK9qf6vtxES7ViLETcCGwBRUmvhZVy8+ scenes-app-inbox-hotkeyradio--with-selection--dark:+ hash: v1.k794b7964.ee23fd931ed2324fdc42cbb44bb06176f40e1e47d5c03f9118ccc0f5f013201b.BmJiKZm5EO6qY8tSt5oSll_wmMMWh7IJ0dqN_bSQwa8+ scenes-app-inbox-hotkeyradio--with-selection--light:+ hash: v1.k794b7964.3e50641442cc87cebfb5e0380042c05c0e5f15e238011e5aab24f8e69da5ea8e.IarzlyKga2lc-4CZ8UpBjuU1D_75I4SRnyKDESA9drkscenes-app-inbox-pullrequestdiffview--default--dark:hash: v1.k794b7964.564cd678d9da50089c918c63d37c816257091c6c9d7d2f957dc9c96f596d34dc.8ICzP4d5gRBF0h4CT87lZgk82tCHyXIOsszi6P3JQ-Mscenes-app-inbox-pullrequestdiffview--default--light:@@ -7033,9 +7037,9 @@ snapshots:scenes-app-inbox-scene--legacy--light:hash: v1.k794b7964.76ea52563f9f53e051fd54634ebfc726b5f5570d3e6c7dd8b0663951c41c7f5c._pNa0ljBd_71oP2dETrcKP92bjh9QWeYpVKcR0LfL-kscenes-app-inbox-scene--legacy-report--dark:- hash: v1.k794b7964.9deadf33fcb565f01266462aeaddcbb6dfa839d7518f474d4ee2e690e2742161.oUW5kHKVYyMoWP-1h0m6F7Gl7gvhjU7pfDcxI7WP79o+ hash: v1.k794b7964.394f0282b127fd767d9c1810af66bdd2d5203ca478321b40e727ed16c18987c7.JkcauZfmV5rs015oieOBoNd5zf3Re8tnNFVYCklLk0kscenes-app-inbox-scene--legacy-report--light:- hash: v1.k794b7964.ebb392821dadb22240182d8f0de7e0bc4822fe101654209f11767e8d6a7a89ab.ePPA5rETWZn-47ZTzj_boQlK0xYH2RR5aFfyQ2-0lUQ+ hash: v1.k794b7964.51dc2d5bfd3811ee214103b68083e2ac2232b64a092eca8cebaffcc7e69b3cbb.dujympeX0YqXxpaI_BbT7jlZ5S8WwYYl3KA3VSoHV5kscenes-app-inbox-scene--legacy-scouts--dark:hash: v1.k794b7964.ccafcee2140f93914459f62a4039c1c7538ecc2d059e1dd6c8577e6fe088e9ea.WZMifs5X7aCwLPl7tYpymRwZrtQ6ovHXvo-T-QWfbKQscenes-app-inbox-scene--legacy-scouts--light:@@ -7049,9 +7053,9 @@ snapshots:scenes-app-inbox-scene--self-driving-onboarding--light:hash: v1.k794b7964.5268ad52b39cdc5bb1d699e6a1a839a552ce397134d6773714e1f5a2d95994b6.hgkYOJDE9ZNZ0mMtcj9cpcDCtmas-opelntO_tyQ9Igscenes-app-inbox-scene--self-driving-paused--dark:- hash: v1.k794b7964.7ff34e488265ae8c882ea751c7c1131d6be923113809af0bb5c73073a08e4052.v_4oh-JC3KwUHpq-frRrju4-HbqxSoEhRcEsfpclMyw+ hash: v1.k794b7964.60911ae280a03886530975a4cd39b2ddaf6d1a7103a313a1f800d7a42cddee35.Y8Sb9v0E_DYvJ89JRyPxQejbUpmHipZ7JuvM1WFRyMAscenes-app-inbox-scene--self-driving-paused--light:- hash: v1.k794b7964.17392068d051031cca6ae99a174c7336b8d6bae0061671780305281186e8524c.mgSpDwEw5VUYOqrCHB5j5ZojsMODYJyk270xDqQQz_o+ hash: v1.k794b7964.033fd2c05dcdb683b4147896428653092c1952d69439ac35481de90b8d926ae6.TNnPVe7tq65qZEe-umw43NvxSH0pxhgiiFJKwo5eXKoscenes-app-inbox-scene--self-driving-verdict-pending--dark:hash: v1.k794b7964.570e5dddd645996b94ff94b2c563b32ced3793db3ab5ccf360d16126af3b9a0b.WC_VEZ1N_iX-o4r11w15QWfD8Nzo1gFerTznKiaIX84scenes-app-inbox-scene--self-driving-verdict-pending--light:@@ -7061,9 +7065,9 @@ snapshots:scenes-app-inbox-scene--settings--light:hash: v1.k794b7964.dd753e8a7abdbfa5891a5b2c62da90282c08aa5e3a608a20cafdd3b35628cfa5._lag-pvviMbZ2S8iO_qLEgggn2Tv4UKDraQEzVgLlYAscenes-app-inbox-scene--triage--dark:- hash: v1.k794b7964.2e91d744a4551aaee3420a915bb46220934b937bd1cacc963dc43d2ea4c4a862.fR04GF9ZhD3oJc6BenUt_e7DrqrNJXsMFnXNg2UlVKc+ hash: v1.k794b7964.77e43b36fdcd81befecf4de80e489050f525840924ec6ddef37c23a9179dbe8a.B3qkZFYBncFaPn2EBg4cBoYu_LIwW29imNwBdLXF5eoscenes-app-inbox-scene--triage--light:- hash: v1.k794b7964.1fcdda8455a45b636d29f42c681696c649b26a1339ba5b5890d166ec5bd98aaf.CejUDitmTV84DoeFjFwwFhrEP62iSRHVYAgYCu77zAM+ hash: v1.k794b7964.ea1f0a1a3cd9c029a33e39277a276be15a04555ba2addee17df2aacb108316dc.CFYN_7EjRWTlSCsBQMuZ6Bq_ViTyRy7_RqqtqKfg05wscenes-app-inbox-scoutconfigform--disabled--dark:hash: v1.k794b7964.9e9e262f07b97a0b655fa6ca799ff35c3b37b42f211b11c6a8c3fbcc5adcd577.UoegfVUyhTCj8GE9rRIrVcmmNL8UxCXUrBi3A2A9Fggscenes-app-inbox-scoutconfigform--disabled--light:@@ -7191,23 +7195,23 @@ snapshots:scenes-app-inbox-tabs--pull-requests-legacy--dark:hash: v1.k794b7964.7a8a1ac4681274dd7f60472421a6f6362d11d3aad177531004cf98c756e505ef.acR7Y_EmrnKN4GzYlFAScr8a4_ZKjmxeCYKzgiwBHroscenes-app-inbox-tabs--pull-requests-legacy--light:- hash: v1.k794b7964.2fb1e20ff50d808253cae40e732b64a77eef587baa1841d6588881aa1b14dc12.1MI5WWLUgeiqrwAT4cZW09aAIqNQ9i7X2_ZNyeJC9eQ+ hash: v1.k794b7964.d66d0f73814191c857a64891ddd73dbbca609b40f71b80b5a97b95b1d0ed5d0d.coTm8czKJGGrvOoP28HGqgyV0I1HTpvp14uWHt7b4dQscenes-app-inbox-tabs--reports--dark:- hash: v1.k794b7964.cd360fcaed74c53422991231f6a791a12057405540f0150adb4ecc09b73ac6c5.p_hQlErs-3lrBf7b8DuAhzkk4fbTxQTgylgfkcL1c84+ hash: v1.k794b7964.c85f18207a5cd24dfb6f087a18ecd2156c1a9f5e76ad47cc041b266caab06587.xELuHAi4lH3Xs2a2bObdfnLztO2C6YKN2lWnOsKuaYoscenes-app-inbox-tabs--reports--light:- hash: v1.k794b7964.3d2493fe0ab657fd31abf0f48fa3f9693eceeeccba9ff3ea3e5dea66ffcd5092.GbMr4_h6BGh7w9G77P06CRaWlmWIeXQytdbAtTCb2ds+ hash: v1.k794b7964.fa80701fb9b9e6653ef8c7a646e9f710d66863cfd7fab678de5cbe7d31127a74.HmDKcwJDlzTlvc1u8vdBQLgB-WVsOq3ogCMrgFlgZEoscenes-app-inbox-tabs--reports-all-sections-expanded--dark:- hash: v1.k794b7964.06a0b8c5ca7fb098ac7e5ce44c49135701698e84b3ae3edd72d227a1119a4303.HRyt3vtt4lD0xZx90h4668_W9LqG63GV9hEO8cV-q6Y+ hash: v1.k794b7964.31989b8f37efb2b2a553f95cee62f7e5333651b9f6d2ac97f2098cfa2d6f620e.k_0TpkPYmZKMUu3GYQynFHVpZW5S165b0gGIlblCdZIscenes-app-inbox-tabs--reports-all-sections-expanded--light:- hash: v1.k794b7964.c2ff7a23464315c7f5e19c17ded8f57caea0cf61c4e50544145f49edb23d793e.7eM7-fdqtg2u4CKHFAxC8h03mQ-tr2THF4Guz6Yb1u8+ hash: v1.k794b7964.02a6ab0a9e2e9a876c4ed6f461ed58bb6f68c2eef94f9b099c582452752be7e8.ESbmLMcQQZUfAE9lxzUw4B5LVKsY6d668Y9XRlBlcIwscenes-app-inbox-tabs--reports-empty--dark:hash: v1.k794b7964.fadcb6a49ae519ed7432563af517599477371bc1e9823b09c7a1cc351925b249.FHSWD8X0Bg6UfdgpmdkK_3y1cIiWzBwfN5WCvTWLV2wscenes-app-inbox-tabs--reports-empty--light:hash: v1.k794b7964.3a6b3393d02f9fbc789213e7ff4ca0ab90a0cb31962995cc42ce547dff9719fe.Tg74pzAgyn6wyvXNoPcUZuobn29C3aOLd5LoX0aFbCQscenes-app-inbox-tabs--reports-legacy--dark:- hash: v1.k794b7964.326c71356c4257bb46ed43d558ae3e3e8c3fc4e191ff0eaa509a31b2ef9a773a.lE_OH56Yt15Qg1nQy248vuW5943PTrT4nN97jI8miNU+ hash: v1.k794b7964.6bffd9df9241aef3533411aba5c41ba3b0d0ad7bd5701e5f8a0da414e0710700.-BcMQAuZIxfrd2EioB1VGkALBdOQqgN9Y1g3CmfC7Q0scenes-app-inbox-tabs--reports-legacy--light:- hash: v1.k794b7964.94ebb7bba9a6913dd3f6fe65e288ab7cd0ba0010f7e9f46987c4a22c35ee22ce.n15PAvBhHiYNF5ax1o5CGeX50_YD3k2bls6SqRPGTFU+ hash: v1.k794b7964.7864bdacc54e80bd704a403fb813da48779160b95ad014df7bbae8a84a5d24a3.7J1YPQyUSF6iat2oGdHpGn1E3Ml0eTRtyb64GwDL334scenes-app-inbox-tabs--runs--dark:hash: v1.k794b7964.4ece3bdc6be5207a77eafc6d9005ce3a065539767d7a4da5f3f2f5f913bb3567.Wu4dnjXImAjEXPa2f8AdBAeJIwpnA-ak02ZeHI87kBoscenes-app-inbox-tabs--runs--light:diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.tsindex 9adfa9ad0dd3..8431b4c557b9 100644--- a/frontend/src/lib/api.ts+++ b/frontend/src/lib/api.ts@@ -5208,7 +5208,7 @@ const api = {async reingest(id: SignalReport['id']): Promise<{ status: string; report_id: string }> {return await new ApiRequest().signalReport(id).withAction('reingest').create()},- // State transitions: suppress (dismiss) or snooze back to potential. Backend: `state` action.+ // State transitions: suppress (dismiss), resolve, or snooze back to potential. Backend: `state` action.async setState(id: SignalReport['id'], data: SignalReportStateRequest): Promise<SignalReport> {return await new ApiRequest().signalReport(id).withAction('state').create({ data })},diff --git a/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx b/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsxindex 8506f6c67e0f..44075d7eced7 100644--- a/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx+++ b/frontend/src/lib/lemon-ui/LemonDialog/LemonDialog.tsx@@ -33,7 +33,7 @@ export type LemonFormDialogProps = LemonDialogFormPropsType &export type LemonDialogProps = Pick<LemonModalProps,- 'title' | 'description' | 'width' | 'maxWidth' | 'inline' | 'footer' | 'zIndex' | 'className'+ 'title' | 'description' | 'width' | 'maxWidth' | 'inline' | 'footer' | 'zIndex' | 'className' | 'overlayClassName'> & {primaryButton?: LemonButtonProps | nullsecondaryButton?: LemonButtonProps | nulldiff --git a/frontend/src/lib/signals/prState.ts b/frontend/src/lib/signals/prState.tsindex e19a645f60b4..36e1ef1f0769 100644--- a/frontend/src/lib/signals/prState.ts+++ b/frontend/src/lib/signals/prState.ts@@ -28,7 +28,14 @@ export function derivePrState(status: SignalReportStatus | string, prMerged: booif (prMerged) {return 'merged'}- if (status === SignalReportStatus.FAILED) {+ // A terminal report no longer points at an open PR: dismiss and resolve close the report's open+ // implementation PR, a report suppressed by its PR closing without merging is closed by+ // definition, and a failed report's PR never landed. Only a live report still has an open PR.+ if (+ status === SignalReportStatus.FAILED ||+ status === SignalReportStatus.SUPPRESSED ||+ status === SignalReportStatus.RESOLVED+ ) {return 'closed'}return 'open'diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex 6612b774530d..5771311a2252 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -4795,6 +4795,15 @@ export type HotKey =| 'x'| 'y'| 'z'+ | '1'+ | '2'+ | '3'+ | '4'+ | '5'+ | '6'+ | '7'+ | '8'+ | '9'| 'escape'| 'enter'| 'space'diff --git a/products/customer_analytics/frontend/components/Feed/FeedTabContent.tsx b/products/customer_analytics/frontend/components/Feed/FeedTabContent.tsxindex 69e55010be49..6e350cc61214 100644--- a/products/customer_analytics/frontend/components/Feed/FeedTabContent.tsx+++ b/products/customer_analytics/frontend/components/Feed/FeedTabContent.tsx@@ -41,7 +41,7 @@ export function FeedTabContent(): JSX.Element {key={report.id}report={report}backUrl={urls.customerAnalyticsFeed()}- onArchive={(reason, note) => archiveReport(report.id, reason, note)}+ onDismiss={(reason, note) => archiveReport(report.id, reason, note)}/>))}</div>diff --git a/products/signals/backend/implementation_pr.py b/products/signals/backend/implementation_pr.pyindex 352bed8de3ea..a77289babfab 100644--- a/products/signals/backend/implementation_pr.py+++ b/products/signals/backend/implementation_pr.py@@ -102,7 +102,7 @@ def fetch_implementation_pr_urls_for_reports(report_ids: list[str]) -> dict[str,return {report_id: pr.url for report_id, pr in fetch_implementation_pr_state_for_reports(report_ids).items()}-PrCloseReason = Literal["suppressed", "snoozed"]+PrCloseReason = Literal["suppressed", "snoozed", "resolved"]# Left on the PR before it's closed, so anyone looking at the PR sees why it was closed and how to undo it._PR_CLOSE_COMMENT_TEMPLATE = (@@ -113,6 +113,11 @@ _PR_CLOSE_COMMENTS: dict[PrCloseReason, str] = {reason: _PR_CLOSE_COMMENT_TEMPLATE.format(action=reason)for reason in cast(tuple[PrCloseReason, ...], ("suppressed", "snoozed"))}+# A resolved report never reopens, so the undo advice above does not apply to it.+_PR_CLOSE_COMMENTS["resolved"] = (+ "🔕 Closing this PR because the linked PostHog report was resolved without it.\n\n"+ "If that wasn't intended, reopen this PR."+)def close_implementation_pr_for_report(@@ -123,7 +128,7 @@ def close_implementation_pr_for_report() -> bool:"""Best-effort: comment on and close the GitHub PR opened for this report's implementation task.- Called when a report is suppressed or snoozed — the open PR shouldn't linger. Only acts on a PR+ Called when a report is suppressed, snoozed, or resolved without its PR — the open PR shouldn't linger. Only acts on a PRthat is still open: an already-closed or merged PR is left untouched (no comment, no close), sowe never leave a confusing "closing this PR" note on a PR that shipped months ago. Leaves anexplanatory comment, then closes the PR. Returns True when the PR was closed, False when therediff --git a/products/signals/backend/receivers.py b/products/signals/backend/receivers.pyindex 25cafbed0672..a63b78c288b3 100644--- a/products/signals/backend/receivers.py+++ b/products/signals/backend/receivers.py@@ -165,6 +165,11 @@ def _pr_close_reason(if instance.status == SignalReport.Status.POTENTIAL and prior_status in _SNOOZE_SOURCE_STATUSES:return "snoozed"+ # Only a resolve that a caller asked for through the state API supersedes the PR. The PR-merge+ # webhook also lands in RESOLVED, and its PR is merged, so there is nothing to close there.+ if instance.status == SignalReport.Status.RESOLVED and getattr(instance, "_close_pr_on_resolve", False):+ return "resolved"+return None@@ -176,12 +181,13 @@ def close_pr_when_report_dismissed(update_fields: set[str] | None = None,**kwargs: Any,) -> None:- """Close the implementation PR when a report is suppressed or snoozed.+ """Close the implementation PR when a report is suppressed, snoozed, or resolved by a caller.- This is the single choke point for the archive→close side effect: every suppression surface+ This is the single choke point for the dismiss→close side effect: every suppression surface(Slack, the REST state/bulk-state API, any future one) ends in a ``save`` that flips statusto SUPPRESSED, and snoozing a ready/resolved report ends in READY/RESOLVED → POTENTIAL, so- hooking the model here covers them all without each caller opting in.+ hooking the model here covers them all without each caller opting in. A resolve closes the PR+ only when the state API flagged it (see ``_pr_close_reason``)."""prior_status = getattr(instance, "_prior_status", None)reason = _pr_close_reason(diff --git a/products/signals/backend/test/test_dismissal_pr_close.py b/products/signals/backend/test/test_dismissal_pr_close.pyindex 626d596a9572..ab989d6a93f9 100644--- a/products/signals/backend/test/test_dismissal_pr_close.py+++ b/products/signals/backend/test/test_dismissal_pr_close.py@@ -91,6 +91,14 @@ class TestClosePrWhenReportDismissed(BaseTest):self._save_transition(report, SignalReport.Status.POTENTIAL, error="not actionable")mock_task.delay.assert_not_called()+ def test_resolve_outside_the_state_api_does_not_enqueue(self):+ # The PR-merge webhook resolves through transition_to directly. Its PR is merged, so the+ # receiver must not try to close it.+ report = self._create_report()+ with patch("products.signals.backend.receivers.close_dismissed_report_pr") as mock_task:+ self._save_transition(report, SignalReport.Status.RESOLVED)+ mock_task.delay.assert_not_called()+def test_unrelated_save_of_suppressed_report_does_not_enqueue(self):report = self._create_report(report_status=SignalReport.Status.SUPPRESSED)with patch("products.signals.backend.receivers.close_dismissed_report_pr") as mock_task:@@ -112,6 +120,7 @@ class TestCloseImplementationPrForReport(BaseTest):[("suppressed", "suppressed"),("snoozed", "snoozed"),+ ("resolved", "resolved"),])def test_comments_on_and_closes_linked_pr(self, _name: str, reason: PrCloseReason):diff --git a/products/signals/backend/test/test_signal_report_api.py b/products/signals/backend/test/test_signal_report_api.pyindex fed29d37cba5..830a9b81beff 100644--- a/products/signals/backend/test/test_signal_report_api.py+++ b/products/signals/backend/test/test_signal_report_api.py@@ -1583,6 +1583,12 @@ class TestSignalReportSuppressionAPI(APIBaseTest):@parameterized.expand([("resolve_with_reason", {"state": "resolved", "dismissal_reason": "already_fixed"}, "already_fixed"),+ (+ "resolve_fixed_outside_posthog",+ {"state": "resolved", "dismissal_reason": "fixed_outside_posthog"},+ "fixed_outside_posthog",+ ),+ ("resolve_pr_merged", {"state": "resolved", "dismissal_reason": "pr_merged"}, "pr_merged"),# A resolve carrying no feedback must not pick a reason up from anywhere.("resolve_without_reason", {"state": "resolved"}, None),]@@ -1606,6 +1612,20 @@ class TestSignalReportSuppressionAPI(APIBaseTest):assert label["properties"]["status"] == SignalReport.Status.RESOLVEDassert label["properties"]["dismissal_reason"] == expected_reason+ def test_resolve_via_state_api_closes_the_open_implementation_pr(self):+ # The inbox PR is superseded by a fix that landed elsewhere, so the receiver must close it+ # with the resolve-specific comment rather than leave it open.+ report = self._create_report()+ with patch("products.signals.backend.receivers.close_dismissed_report_pr") as mock_task:+ with self.captureOnCommitCallbacks(execute=True):+ response = self.client.post(+ self._state_url(str(report.id)),+ data=json.dumps({"state": "resolved", "dismissal_reason": "fixed_outside_posthog"}),+ content_type="application/json",+ )+ assert response.status_code == status.HTTP_200_OK, response.json()+ mock_task.delay.assert_called_once_with(report_id=str(report.id), team_id=self.team.id, reason="resolved")+def test_state_transition_response_includes_source_products(self):report = self._create_report()diff --git a/products/signals/backend/views.py b/products/signals/backend/views.pyindex a6ddd39316cb..47adb65a0db3 100644--- a/products/signals/backend/views.py+++ b/products/signals/backend/views.py@@ -462,17 +462,21 @@ SIGNAL_REPORT_DISMISSAL_REASON_CHOICES = [("analysis_wrong", "Agent's analysis is wrong"),("wontfix_intentional", "Won't fix - intentional behavior"),("wontfix_irrelevant", "Won't fix - issue is real but insignificant"),+ ("fixed_outside_posthog", "Fixed outside PostHog"),+ ("pr_merged", "PR was merged"),("other", "Something else…"),]_DISMISSAL_REASON_HELP_TEXT = (- "Optional canonical reason code for the dismissal. Must be one of: already_fixed, "- "report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match "- "the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work "- "this report asked for is done, the honest transition is state='resolved' (the reason/note records "- "why). Reserve 'already_fixed' with state='potential' (snooze/restore) for \"fixed by something "- "else / might recur\" cases, so the report reappears if the issue comes back. Use 'other' together "- "with a dismissal_note for anything that doesn't fit a code."+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, "+ "report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, "+ "pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather "+ "than a raw code. When the work this report asked for is done, the honest transition is "+ "state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), "+ "'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), "+ "or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, "+ "wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything "+ "that doesn't fit a code.")@@ -507,7 +511,8 @@ class SignalReportStateRequestSerializer(serializers.Serializer):"Target state for the report. Use 'suppressed' to dismiss the report from the inbox, ""'potential' to snooze/reopen it for later review, or 'resolved' when the work this report ""asked for has been done. Resolving is only allowed from a researched status (ready or "- "pending_input) or a suppressed report; other statuses return 409 (skipped in bulk)."+ "pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). "+ "Dismissing or resolving closes the report's open implementation PR, if it has one."),)dismissal_reason = serializers.ChoiceField(@@ -2113,6 +2118,10 @@ class SignalReportViewSet(# post_save receiver snapshots it there. Matters most for resolve: a resolve driven by# the PR-merge webhook has no feedback, and only this flag distinguishes the two.report._wrote_dismissal_feedback = writes_dismissal_feedback # type: ignore[attr-defined]+ # A resolve through this API says the work is done without the inbox PR, so that PR is+ # superseded and the receiver closes it. The PR-merge webhook resolves through+ # transition_to directly and never sets this, so a merged PR is left alone.+ report._close_pr_on_resolve = target_status == SignalReport.Status.RESOLVED # type: ignore[attr-defined]report.save(update_fields=updated_fields)@@ -2141,9 +2150,9 @@ class SignalReportViewSet(if hasattr(report, "prefetched_dismissal_artefacts"):del report.prefetched_dismissal_artefacts- # A dismissal (transition into SUPPRESSED) closes the linked implementation PR — handled- # centrally by the post_save receiver (receivers.close_pr_when_report_dismissed), so this- # method doesn't special-case it. Restore/snooze to "potential" leaves the PR alone.+ # A dismissal (transition into SUPPRESSED) or a resolve closes the linked implementation PR —+ # handled centrally by the post_save receiver (receivers.close_pr_when_report_dismissed), so+ # this method doesn't special-case it. Restore/snooze to "potential" leaves the PR alone.return SignalReportBulkStateOutcome.TRANSITIONED, None@extend_schema(diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex e5f0251ebd72..e24b22fe7767 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1563,6 +1563,8 @@ export const SignalReportStateEnumApi = {* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else…*/export type DismissalReasonEnumApi = (typeof DismissalReasonEnumApi)[keyof typeof DismissalReasonEnumApi]@@ -1573,23 +1575,27 @@ export const DismissalReasonEnumApi = {AnalysisWrong: 'analysis_wrong',WontfixIntentional: 'wontfix_intentional',WontfixIrrelevant: 'wontfix_irrelevant',+ FixedOutsidePosthog: 'fixed_outside_posthog',+ PrMerged: 'pr_merged',Other: 'other',} as constexport interface SignalReportStateRequestApi {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.** * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved */state: SignalReportStateEnumApi- /** Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for "fixed by something else / might recur" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else… */dismissal_reason?: DismissalReasonEnumApi/**@@ -1744,19 +1750,21 @@ export interface CommitDiffResponseApi {}export interface SignalReportBulkStateRequestApi {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.** * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved */state: SignalReportStateEnumApi- /** Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for "fixed by something else / might recur" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else… */dismissal_reason?: DismissalReasonEnumApi/**diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 4e0910aaa61b..b756569adf81 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -190,7 +190,7 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({.enum(['suppressed', 'potential', 'resolved']).describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved').describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"),dismissal_reason: zod.enum([@@ -199,14 +199,16 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({'analysis_wrong','wontfix_intentional','wontfix_irrelevant',+ 'fixed_outside_posthog',+ 'pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason\/note records why). Reserve 'already_fixed' with state='potential' (snooze\/restore) for \"fixed by something else \/ might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_\*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()@@ -279,7 +281,7 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({.enum(['suppressed', 'potential', 'resolved']).describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved').describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"),dismissal_reason: zod.enum([@@ -288,14 +290,16 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({'analysis_wrong','wontfix_intentional','wontfix_irrelevant',+ 'fixed_outside_posthog',+ 'pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason\/note records why). Reserve 'already_fixed' with state='potential' (snooze\/restore) for \"fixed by something else \/ might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_\*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()diff --git a/products/signals/frontend/inbox/components/InboxReportList.tsx b/products/signals/frontend/inbox/components/InboxReportList.tsxindex 996b34a06934..3608f525ae7c 100644--- a/products/signals/frontend/inbox/components/InboxReportList.tsx+++ b/products/signals/frontend/inbox/components/InboxReportList.tsx@@ -4,7 +4,7 @@ import { ComponentType, JSX, useCallback, useEffect, useRef } from 'react'import { captureInboxReportsImpressed, captureInboxViewed } from '../inboxAnalytics'import { inboxSceneLogic } from '../inboxSceneLogic'import { inboxFiltersLogic } from '../logics/inboxFiltersLogic'-import { INBOX_REPORT_SECTION_LIST_PARAMS, reportListLogic, ReportListLogicProps } from '../logics/reportListLogic'+import { legacyTabListLogicProps, reportListLogic } from '../logics/reportListLogic'import { INBOX_LEGACY_TAB_SECTION, InboxFlatListTabKey, InboxReportSectionKey, SignalReport } from '../types'import { DismissalReasonValue } from '../utils/dismissalReasons'import { CardSkeleton } from './cards/CardSkeleton'@@ -14,7 +14,7 @@ import { InboxSearchFilterBar } from './shell/InboxSearchFilterBar'export interface InboxReportCardProps {report: SignalReportsectionKey: InboxReportSectionKey- onArchive: (reason: DismissalReasonValue, note: string) => void+ onDismiss: (reason: DismissalReasonValue, note: string) => void/** Restore a suppressed report back to the inbox. Only wired on the Archived tab. */onRestore?: () => void/** Rendered as an attached row inside a shared bordered container (vs. a freestanding card). */@@ -29,12 +29,6 @@ interface InboxReportListProps {| { icon: JSX.Element; title: string; description: string; extra?: JSX.Element }}-/** The keyed list instance behind a legacy tab: the redesign's section with the same server filter. */-function sectionLogicProps(tabKey: InboxFlatListTabKey): ReportListLogicProps {- const sectionKey = INBOX_LEGACY_TAB_SECTION[tabKey]- return { sectionKey, listParams: INBOX_REPORT_SECTION_LIST_PARAMS[sectionKey] }-}-/*** Shared body for the flat report-list tabs shown with the redesign flag off (Pull requests /* Reports / Not actionable / Archive). Each is the same primitive – only the server filter and@@ -44,7 +38,7 @@ function sectionLogicProps(tabKey: InboxFlatListTabKey): ReportListLogicProps {*/export function InboxReportList(props: InboxReportListProps): JSX.Element {return (- <BindLogic logic={reportListLogic} props={sectionLogicProps(props.tabKey)}>+ <BindLogic logic={reportListLogic} props={legacyTabListLogicProps(props.tabKey)}><InboxReportListInner {...props} /></BindLogic>)@@ -53,7 +47,7 @@ export function InboxReportList(props: InboxReportListProps): JSX.Element {function InboxReportListInner({ tabKey, Card, emptyState }: InboxReportListProps): JSX.Element {const { reports, count, totalCount, hasMore, reportsResponseLoading, isLoaded, loadedQueryKey, loadedContext } =useValues(reportListLogic)- const { ensureLoaded, loadMore, archiveReport, restoreReport, refresh } = useActions(reportListLogic)+ const { ensureLoaded, loadMore, dismissReport, restoreReport, refresh } = useActions(reportListLogic)const { hasActiveFilters, sourceProductFilter, priorityFilter, scope } = useValues(inboxFiltersLogic)// The list stays mounted (hidden) while a report/scout detail is open, so gate the view event on// the list actually being the visible surface — otherwise a deep-link to a report fires a phantom@@ -65,10 +59,10 @@ function InboxReportListInner({ tabKey, Card, emptyState }: InboxReportListProps// active tab's `total_count` alone says nothing about a user who lands on Pull requests and has// 200 reports waiting. These share the tab bar's keyed instances, so no extra requests.const { count: pullsTabCount, countLoading: pullsTabCountLoading } = useValues(- reportListLogic(sectionLogicProps('pulls'))+ reportListLogic(legacyTabListLogicProps('pulls')))const { count: reportsTabCount, countLoading: reportsTabCountLoading } = useValues(- reportListLogic(sectionLogicProps('reports'))+ reportListLogic(legacyTabListLogicProps('reports')))// A badge count is settled once its request is no longer in flight: loaded, refreshed, or failed// (count stays null). Waiting on the loading flags rather than non-null values means a scope or@@ -217,7 +211,7 @@ function InboxReportListInner({ tabKey, Card, emptyState }: InboxReportListPropskey={report.id}report={report}sectionKey={INBOX_LEGACY_TAB_SECTION[tabKey]}- onArchive={(reason, note) => archiveReport(report.id, reason, note)}+ onDismiss={(reason, note) => dismissReport(report.id, reason, note)}onRestore={() => restoreReport(report.id)}/>))}diff --git a/products/signals/frontend/inbox/components/InboxReportSection.tsx b/products/signals/frontend/inbox/components/InboxReportSection.tsxindex f9c27ee0095d..6e9922373643 100644--- a/products/signals/frontend/inbox/components/InboxReportSection.tsx+++ b/products/signals/frontend/inbox/components/InboxReportSection.tsx@@ -22,7 +22,8 @@ import { useReportImpressions } from './useReportImpressions'const EMPTY_SECTION_COPY: Record<InboxReportSectionKey, string> = {'needs-decision': 'No reports are waiting for a pull request.',monitoring: 'No pull requests open yet. Start one from a report above.',- resolved: 'Nothing resolved or archived yet.',+ resolved: 'Nothing resolved yet.',+ dismissed: 'Nothing dismissed yet.','not-actionable': 'Nothing has been judged not actionable.',}diff --git a/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx b/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsxindex fc0c7c6ad657..60f65e2a978a 100644--- a/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx+++ b/products/signals/frontend/inbox/components/badges/SignalReportStatusBadge.tsx@@ -29,7 +29,7 @@ export const STATUS_TOOLTIPS: Partial<Record<SignalReportStatus, string>> = {[SignalReportStatus.POTENTIAL]: 'Gathering signals. The report will be queued once enough evidence accumulates.',[SignalReportStatus.RESOLVED]: 'This report has been resolved.',[SignalReportStatus.FAILED]: 'Research failed. The report may be retried automatically.',- [SignalReportStatus.SUPPRESSED]: 'This report has been suppressed and is out of your inbox.',+ [SignalReportStatus.SUPPRESSED]: 'This report was dismissed and is out of your inbox.',[SignalReportStatus.DELETED]: 'This report has been deleted.',}@@ -41,7 +41,7 @@ export const STATUS_LABELS: Partial<Record<SignalReportStatus, string>> = {[SignalReportStatus.POTENTIAL]: 'Gathering',[SignalReportStatus.RESOLVED]: 'Resolved',[SignalReportStatus.FAILED]: 'Failed',- [SignalReportStatus.SUPPRESSED]: 'Suppressed',+ [SignalReportStatus.SUPPRESSED]: 'Dismissed',[SignalReportStatus.DELETED]: 'Deleted',}diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsxindex 4c89981465ab..8053b9708c50 100644--- a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx+++ b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx@@ -41,9 +41,9 @@ describe('ReportCard', () => {afterEach(cleanup)// The redesign makes the linked row the only way in and leaves the status / actionability chips- // to the section headers; the legacy list keeps Archive, the Review button, and the chips.+ // to the section headers; the legacy list keeps Dismiss, the Review button, and the chips.it.each([[true], [false]])(- 'with the redesign flag %p shows Review and Archive and chips only on the legacy list',+ 'with the redesign flag %p shows Review and Dismiss and chips only on the legacy list',(redesign) => {const legacyChrome = !redesignfeatureFlagLogic.actions.setFeatureFlags([FEATURE_FLAGS.INBOX_REDESIGN], {@@ -56,7 +56,7 @@ describe('ReportCard', () => {const { queryByText } = render(<ReportCard report={report} />)expect(queryByText('Review') !== null).toBe(legacyChrome)expect(queryByText('View report')).toBeNull()- expect(queryByText('Archive') !== null).toBe(legacyChrome)+ expect(queryByText('Dismiss') !== null).toBe(legacyChrome)expect(queryByText('Queued') !== null).toBe(legacyChrome)expect(queryByText('Actionable') !== null).toBe(legacyChrome)}diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.tsxindex e19decdff33d..dcd8fcafbb3e 100644--- a/products/signals/frontend/inbox/components/cards/ReportCard.tsx+++ b/products/signals/frontend/inbox/components/cards/ReportCard.tsx@@ -1,7 +1,7 @@import clsx from 'clsx'import { router } from 'kea-router'-import { IconArchive, IconUndo } from '@posthog/icons'+import { IconCheck, IconHide, IconUndo } from '@posthog/icons'import { LemonButton, LemonTag, Link, Tooltip } from '@posthog/lemon-ui'import { TZLabel } from 'lib/components/TZLabel'@@ -18,7 +18,7 @@ import {SignalReportStatus,SignalSourceProduct,} from '../../types'-import { dismissalReasonLabel, DismissalReasonValue } from '../../utils/dismissalReasons'+import { dismissalReasonLabel, DismissalReasonValue, isResolveReason } from '../../utils/dismissalReasons'import { inboxReportDetailUrl } from '../../utils/inboxReportUrls'import {deriveHeadline,@@ -37,7 +37,7 @@ import {sourceProductsTooltipTitle,} from '../badges/sourceProductIcons'import { inboxCardRowClassName } from './inboxCardRowClassName'-import { useReportArchive } from './useReportArchive'+import { useReportDismiss } from './useReportDismiss'// ── Shared card sub-components ────────────────────────────────────────────────@@ -102,17 +102,17 @@ export function InboxCardSourceMeta({* status/actionability chips.** Under the redesign the row itself is the way in: the whole card links to the report detail, so- * there is no separate open button. Archiving lives in the report detail pane and the bulk selection- * bar, where what is being dismissed is in full view. Other surfaces that embed this card can still- * opt into a row-level Archive via `onArchive`. The redesign also drops the status and actionability- * chips: the section a row sits in (Needs a PR, Not actionable, ...) already says what they said.- * With the flag off every row keeps its chips, its Archive button, and "Review".+ * there is no separate open button. Dismissing and resolving live in the report detail pane and the+ * bulk selection bar, where what is being judged is in full view. Other surfaces that embed this+ * card can still opt into a row-level Dismiss via `onDismiss`. The redesign also drops the status+ * and actionability chips: the section a row sits in (Needs a PR, Not actionable, ...) already says+ * what they said. With the flag off every row keeps its chips, its Dismiss button, and "Review".*/export function ReportCard({report,sectionKey = 'needs-decision',attached = false,- onArchive,+ onDismiss,onRestore,backUrl,preview = false,@@ -120,8 +120,8 @@ export function ReportCard({report: SignalReportsectionKey?: InboxReportSectionKeyattached?: boolean- /** Archive from the row. The inbox list omits it; surfaces that embed this card can opt in. */- onArchive?: (reason: DismissalReasonValue, note: string) => void+ /** Dismiss from the row. The inbox list omits it; surfaces that embed this card can opt in. */+ onDismiss?: (reason: DismissalReasonValue, note: string) => voidonRestore?: () => void/** Internal path the detail view's back button should return to, for cards rendered outside the inbox. */backUrl?: string@@ -129,9 +129,11 @@ export function ReportCard({* placeholder report id can never be opened (it 404s). */preview?: boolean}): JSX.Element {- const isArchived = sectionKey === 'resolved'- // Resolved reports are terminal (their implementation PR merged) – shown for reference in the- // Resolved section. They can't be restored or re-archived; refunding their PR lives in the detail pane.+ // Keyed on status, not the section: the legacy Archive tab lists dismissed and resolved rows+ // through one section key, and the two need different affordances.+ const isDismissed = report.status === SignalReportStatus.SUPPRESSED+ // Resolved reports are terminal (a merged PR or a resolve) – shown for reference in the Resolved+ // section. They can't be restored or dismissed; refunding their PR lives in the detail pane.const isResolved = report.status === SignalReportStatus.RESOLVEDconst prUrl = safeHttpUrl(report.implementation_pr_url)const prUrlParts = prUrl ? parsePrUrlParts(prUrl) : null@@ -151,23 +153,24 @@ export function ReportCard({redesign ? 'reports' : INBOX_SECTION_LEGACY_TAB[sectionKey])- const { isArchiving, onArchiveClick } = useReportArchive({+ const { isDismissing, onDismissClick } = useReportDismiss({reportId: report.id,cardTitle,report,surface: 'list_row',- onArchive,+ onDismiss,})const isRefunded = !!report.refund- const showsArchive = !!onArchive || !redesign+ const showsDismiss = !!onDismiss || !redesign- // On the Resolved view, surface why it was dismissed (reason tag + note tooltip) when we have it.- // Key off the report still being suppressed, not the tab: a report that was dismissed, restored,- // then resolved keeps its old dismissal artefact, and showing that tag would mislabel finished work.- // The dedicated billing badge already marks refunded reports, so skip the duplicate chip there.- const dismissalLabel =- isArchived && report.status === SignalReportStatus.SUPPRESSED && !isRefunded+ // Why the report left the inbox (reason tag + note tooltip) when we have it: the dismiss reason+ // on dismissed rows, and a resolve reason on rows resolved by hand. A report that was dismissed,+ // restored, then resolved by a merged PR keeps its old dismissal artefact, so a resolved row only+ // shows a reason that describes a resolve (see `isResolveReason`). The dedicated billing badge+ // already marks refunded reports, so skip the duplicate chip there.+ const outcomeLabel =+ !isRefunded && (isDismissed || (isResolved && isResolveReason(report.dismissal_reason)))? dismissalReasonLabel(report.dismissal_reason): null@@ -227,10 +230,10 @@ export function ReportCard({{!hasPr && !redesign && report.actionability && (<SignalReportActionabilityBadge actionability={report.actionability} />)}- {dismissalLabel && (+ {outcomeLabel && (<Tooltip title={report.dismissal_note || undefined}>- <LemonTag size="small" icon={<IconArchive />}>- {dismissalLabel}+ <LemonTag size="small" icon={isResolved ? <IconCheck /> : <IconHide />}>+ {outcomeLabel}</LemonTag></Tooltip>)}@@ -271,11 +274,11 @@ export function ReportCard({{/* Refund deliberately isn't offered at the card level – it lives in the report detailpane, where the consequences are in view. Resolved reports are terminal and a refunded- archived report can't be restored, so neither carries actions – skip the column (and+ dismissed report can't be restored, so neither carries actions – skip the column (anddivider) for both. */}- {!isResolved && !(isArchived && isRefunded) && (isArchived || showsArchive || !redesign) && (+ {!isResolved && !(isDismissed && isRefunded) && (isDismissed || showsDismiss || !redesign) && (<div className="flex items-center justify-end gap-2.5 shrink-0 @lg:self-stretch @lg:border-l @lg:border-primary @lg:pl-3">- {isArchived ? (+ {isDismissed ? (// A refunded report can't be restored (its PR can never be billed again).!isRefunded && (<LemonButton@@ -295,18 +298,18 @@ export function ReportCard({)) : (<>- {showsArchive && (+ {showsDismiss && (<LemonButtontype="secondary"size="small"- icon={<IconArchive />}- tooltip="Archive this report"- aria-label="Archive this report"- loading={isArchiving}- onClick={preview ? undefined : onArchiveClick}+ icon={<IconHide />}+ tooltip="Dismiss this report"+ aria-label="Dismiss this report"+ loading={isDismissing}+ onClick={preview ? undefined : onDismissClick}tabIndex={preview ? -1 : undefined}>- Archive+ Dismiss</LemonButton>)}{!redesign && (diff --git a/products/signals/frontend/inbox/components/cards/useReportArchive.ts b/products/signals/frontend/inbox/components/cards/useReportDismiss.tssimilarity index 57%rename from products/signals/frontend/inbox/components/cards/useReportArchive.tsrename to products/signals/frontend/inbox/components/cards/useReportDismiss.tsindex 047951be7d75..bff39b45c423 100644--- a/products/signals/frontend/inbox/components/cards/useReportArchive.ts+++ b/products/signals/frontend/inbox/components/cards/useReportDismiss.ts@@ -8,33 +8,33 @@ import { DismissalReasonValue } from '../../utils/dismissalReasons'import { openDismissReportDialog } from '../shell/DismissReportDialog'/**- * Shared archive handler for the inbox cards (Report / Pull request). Opens the dismissal- * dialog and either delegates to the bound list logic via `onArchive` (optimistic) or, when- * used standalone (e.g. stories), falls back to a direct `signalReports.setState` call. The- * single-report `dismiss` analytics fire here so both the list card and the detail pane are- * covered from one place.+ * Shared dismiss handler for the inbox cards and the detail pane. Opens the dismiss dialog and+ * either delegates to the bound list logic via `onDismiss` (optimistic) or, when used standalone+ * (e.g. stories), falls back to a direct `signalReports.setState` call. The single-report+ * `dismiss` analytics fire here so both the list card and the detail pane are covered from one+ * place.*/-export function useReportArchive({+export function useReportDismiss({reportId,cardTitle,report,surface,- onArchive,- onArchived,+ onDismiss,+ onDismissed,}: {reportId: stringcardTitle: string- /** The report being archived, used to enrich the `dismiss` analytics. */+ /** The report being dismissed, used to enrich the `dismiss` analytics. */report?: SignalReport | null- /** Which surface the archive was triggered from, for the `dismiss` analytics. */+ /** Which surface the dismiss was triggered from, for the `dismiss` analytics. */surface?: InboxReportActionSurface- onArchive?: (reason: DismissalReasonValue, note: string) => void- /** Fired once the report is archived (after `onArchive`, or after the fallback API call succeeds). */- onArchived?: () => void-}): { isArchiving: boolean; onArchiveClick: (event: React.MouseEvent) => void } {- const [isArchiving, setIsArchiving] = useState(false)+ onDismiss?: (reason: DismissalReasonValue, note: string) => void+ /** Fired once the report is dismissed (after `onDismiss`, or after the fallback API call succeeds). */+ onDismissed?: () => void+}): { isDismissing: boolean; onDismissClick: (event: React.MouseEvent) => void } {+ const [isDismissing, setIsDismissing] = useState(false)- const onArchiveClick = (event: React.MouseEvent): void => {+ const onDismissClick = (event: React.MouseEvent): void => {event.preventDefault()event.stopPropagation()openDismissReportDialog({@@ -48,26 +48,26 @@ export function useReportArchive({surface: surface ?? 'list_row',extra: { dismissal_reason: reason, ...(note ? { dismissal_note: note } : {}) },})- if (onArchive) {- onArchive(reason, note)- onArchived?.()+ if (onDismiss) {+ onDismiss(reason, note)+ onDismissed?.()return}// Fallback for standalone usage (e.g. stories) without a bound list logic.- setIsArchiving(true)+ setIsDismissing(true)try {await api.signalReports.setState(reportId, {state: 'suppressed',dismissal_reason: reason,...(note ? { dismissal_note: note } : {}),})- onArchived?.()+ onDismissed?.()} finally {- setIsArchiving(false)+ setIsDismissing(false)}},})}- return { isArchiving, onArchiveClick }+ return { isDismissing, onDismissClick }}diff --git a/products/signals/frontend/inbox/components/cards/useReportRefund.ts b/products/signals/frontend/inbox/components/cards/useReportRefund.tsindex 121b7e3bf8ee..7aaaa7ad8531 100644--- a/products/signals/frontend/inbox/components/cards/useReportRefund.ts+++ b/products/signals/frontend/inbox/components/cards/useReportRefund.ts@@ -10,7 +10,7 @@ import { teamLogic } from 'scenes/teamLogic'import { signalsReportsRefundCreate } from 'products/signals/frontend/generated/api'import { captureInboxReportAction, InboxReportActionSurface } from '../../inboxAnalytics'-import { SignalReport } from '../../types'+import { SignalReport, SignalReportStatus } from '../../types'import { openRefundReportDialog } from '../shell/RefundReportDialog'// Copy per backend `refund_ineligibility_reason`. `already_refunded` / `billing_exempt` never@@ -21,9 +21,9 @@ const REFUND_DISABLED_REASONS: Record<string, string> = {}/**- * Shared refund handler for the inbox cards and the detail pane, mirroring `useReportArchive`.+ * Shared refund handler for the inbox cards and the detail pane, mirroring `useReportDismiss`.* Opens the refund dialog and posts to the refund endpoint; the backend freezes the billing path,- * archives the report, and (when needed) kicks off the billing credit. Offered only when the flag+ * dismisses the report, and (when needed) kicks off the billing credit. Offered only when the flag* is on and the report has a billable PR that hasn't been refunded — the server enforces the same* rules, so `canRefund` is purely a display gate.*/@@ -35,7 +35,7 @@ export function useReportRefund({report: SignalReport/** Which surface the refund was triggered from, for the `refund` analytics. */surface?: InboxReportActionSurface- /** Fired once the refund API call succeeds (the report is archived server-side by then). */+ /** Fired once the refund API call succeeds (the report is dismissed server-side by then). */onRefunded?: () => void}): {canRefund: boolean@@ -67,6 +67,10 @@ export function useReportRefund({event.stopPropagation()openRefundReportDialog({reportTitle: report.title,+ // A merged PR resolved the report? The refund leaves it in Resolved instead of dismissing+ // it (the `resolved_via_merged_pr` branch in the refund endpoint), so the copy must not+ // promise a dismissal.+ staysResolved: report.status === SignalReportStatus.RESOLVED && report.implementation_pr_merged === true,onConfirm: async ({ reason, note }) => {if (isRefunding || currentTeamId == null) {returndiff --git a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsxindex 7dd8fd2b0357..9a2613677247 100644--- a/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx+++ b/products/signals/frontend/inbox/components/detail/ArtefactLogList.tsx@@ -2,7 +2,7 @@ import { type ComponentType, useState } from 'react'import {IconActivity,- IconArchive,+ IconHide,IconCode,IconComment,IconCommit,@@ -122,7 +122,7 @@ const ARTEFACT_MARKER: Record<string, ComponentType<{ className?: string }>> = {signal_finding: IconSearch,suggested_reviewers: IconPeople,repo_selection: IconGitRepository,- dismissal: IconArchive,+ dismissal: IconHide,video_segment: IconVideoCamera,title_change: IconPencil,summary_change: IconPencil,diff --git a/products/signals/frontend/inbox/components/detail/ReportDetail.tsx b/products/signals/frontend/inbox/components/detail/ReportDetail.tsxindex 979ee8154805..a2a0a85eed05 100644--- a/products/signals/frontend/inbox/components/detail/ReportDetail.tsx+++ b/products/signals/frontend/inbox/components/detail/ReportDetail.tsx@@ -495,7 +495,7 @@ export function InboxDetailFrame({{reportActions.map((action) => (<LemonButtonkey={action.key}- type="secondary"+ type={action.primary ? 'primary' : 'secondary'}size="small"icon={action.icon}loading={action.loading}diff --git a/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx b/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsxindex 608a7f9fad95..d8541fb5de3a 100644--- a/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx+++ b/products/signals/frontend/inbox/components/detail/ReportDetailActions.tsx@@ -2,7 +2,7 @@ import { useActions, useValues } from 'kea'import { router } from 'kea-router'import { type MouseEvent, useState } from 'react'-import { IconArchive, IconReceipt, IconUndo } from '@posthog/icons'+import { IconCheckCircle, IconHide, IconReceipt, IconUndo } from '@posthog/icons'import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'@@ -13,8 +13,9 @@ import { inboxSceneLogic } from '../../inboxSceneLogic'import { inboxBulkActionsLogic } from '../../logics/inboxBulkActionsLogic'import { INBOX_REPORT_SECTION_LIST_PARAMS, reportListLogic } from '../../logics/reportListLogic'import { ACTIONABLE_ACTIONABILITY_VALUES, SignalReport, SignalReportStatus } from '../../types'-import { useReportArchive } from '../cards/useReportArchive'+import { useReportDismiss } from '../cards/useReportDismiss'import { useReportRefund } from '../cards/useReportRefund'+import { useReportResolve } from './useReportResolve'/*** One detail-pane action, rendered either inline as a `LemonButton` (wide layouts) or as a@@ -30,6 +31,8 @@ export interface ReportDetailAction {tooltip?: string/** Renders the action disabled with this explanation (e.g. a PR past its refund window). */disabledReason?: string+ /** Renders inline as the primary button: the one step the report is waiting on. */+ primary?: boolean}/**@@ -53,46 +56,55 @@ export function canCreateImplementationPr(report: SignalReport): boolean {}/**- * Detail-pane actions as data: Archive/Restore and Refund. Create PR and Discuss are each rendered- * separately as a standalone dropdown button (`CreatePrButton`, `DiscussReportButton`) since they- * open a note popover rather than firing on click; rating a report lives at the end of the body- * (`ReportFeedbackFooter`). Archiving reuses the shared `useReportArchive` dialog flow. Callers- * render these inline or inside a menu.+ * Detail-pane actions as data: Resolve, Dismiss/Restore, and Refund. Create PR and Discuss are each+ * rendered separately as a standalone dropdown button (`CreatePrButton`, `DiscussReportButton`)+ * since they open a note popover rather than firing on click; rating a report lives at the end of+ * the body (`ReportFeedbackFooter`). Dismissing and resolving reuse the shared `useReportDismiss` /+ * `useReportResolve` dialog flows. Callers render these inline or inside a menu.*/export function useReportDetailActions(report: SignalReport): ReportDetailAction[] {- const { reportArchived } = useActions(inboxBulkActionsLogic)+ const { reportStateChanged } = useActions(inboxBulkActionsLogic)const { activeTab } = useValues(inboxSceneLogic)const { loadSelectedReport } = useActions(inboxSceneLogic)const [isRestoring, setIsRestoring] = useState(false)- const isArchived = report.status === SignalReportStatus.SUPPRESSED- // Resolved reports are terminal – nothing to archive, restore, or kick off.+ const isDismissed = report.status === SignalReportStatus.SUPPRESSED+ // Resolved reports are terminal – nothing to dismiss, restore, or resolve.const isResolved = report.status === SignalReportStatus.RESOLVED- // Refund leaves a report in place only when a merged PR resolved it; anything else it archives+ // Refund leaves a report in place only when a merged PR resolved it; anything else it dismisses// (so the open PR gets closed), which means the view has to navigate away. Mirrors the// `resolved_via_merged_pr` branch in the refund endpoint.const staysPutOnRefund = isResolved && report.implementation_pr_merged === true- const { isArchiving, onArchiveClick } = useReportArchive({+ // Once a verdict persists, broadcast so every mounted list reconciles against the server (the+ // report leaves Needs a PR / Review and merge and joins Resolved or Dismissed), then return to+ // the list.+ const leaveForList = (): void => {+ reportStateChanged()+ router.actions.push(urls.inbox(activeTab))+ }++ const { isDismissing, onDismissClick } = useReportDismiss({reportId: report.id,cardTitle: report.title ?? 'Untitled report',report,surface: 'detail_pane',- // Once the suppress persists, broadcast so every mounted list reconciles against the server- // (the report leaves Reports/Pull requests and joins Archived), then return to the list.- onArchived: () => {- reportArchived()- router.actions.push(urls.inbox(activeTab))- },+ onDismissed: leaveForList,+ })++ const { isResolving, onResolveClick } = useReportResolve({+ report,+ surface: 'detail_pane',+ onResolved: leaveForList,})const { canRefund, refundDisabledReason, isRefunding, onRefundClick } = useReportRefund({report,surface: 'detail_pane',- // Refunding archives the report server-side, so reconcile the lists the same way and+ // Refunding dismisses the report server-side, so reconcile the lists the same way and// return to the list — except for resolved reports, which stay where they are.onRefunded: () => {- reportArchived()+ reportStateChanged()if (!staysPutOnRefund) {router.actions.push(urls.inbox(activeTab))} else {@@ -114,24 +126,28 @@ export function useReportDetailActions(report: SignalReport): ReportDetailAction}const onRestoreClick = async (): Promise<void> => {- // Prefer the mounted Resolved list logic so it optimistically drops the row and fixes its+ // Prefer the mounted Dismissed list logic so it optimistically drops the row and fixes its// count + view badge synchronously (it also fires the API call + toast). Navigate straight back.- const archivedList = reportListLogic.findMounted({- sectionKey: 'resolved',- listParams: INBOX_REPORT_SECTION_LIST_PARAMS.resolved,+ const dismissedList = reportListLogic.findMounted({+ sectionKey: 'dismissed',+ listParams: INBOX_REPORT_SECTION_LIST_PARAMS.dismissed,})- if (archivedList) {+ if (dismissedList) {// The list logic fires the `restore` analytics; just drive navigation here.- archivedList.actions.restoreReport(report.id)+ dismissedList.actions.restoreReport(report.id)router.actions.push(urls.inbox(activeTab))return}- // Fallback for a deep-linked detail with no mounted Resolved list (e.g. cold load).+ // Fallback for a deep-linked detail with no mounted Dismissed list (e.g. cold load), and for+ // the flag-off Archive list, which mounts under the `resolved` key and so isn't found above.setIsRestoring(true)try {await api.signalReports.setState(report.id, { state: 'potential' })captureInboxReportAction({ report, actionType: 'restore', surface: 'detail_pane' })lemonToast.success('Report restored to inbox')+ // Broadcast so any mounted list (including that Archive instance) reconciles against the+ // server before we navigate back; nothing else in this path repairs its stale row + count.+ reportStateChanged()router.actions.push(urls.inbox(activeTab))} catch (error: any) {lemonToast.error(error?.detail || error?.message || 'Failed to restore report')@@ -140,17 +156,16 @@ export function useReportDetailActions(report: SignalReport): ReportDetailAction}}- // A resolved report is terminal – its PR already merged, so only Discuss (rendered separately)- // applies. The PR can still be refunded (auto-approved by design; the weekly review watches- // refunded-then-merged).+ // A resolved report is terminal, so only Discuss (rendered separately) applies. Its PR can+ // still be refunded (auto-approved by design; the weekly review watches refunded-then-merged).if (isResolved) {return canRefund ? [refund] : []}- // An already-archived report offers Restore instead of Archive (and no Create PR). A refunded- // report can't be restored (its PR can never be billed again), so Restore is hidden for it; an- // archived-but-still-charged report can still be refunded.- if (isArchived) {+ // An already-dismissed report offers Restore instead of Dismiss (and no Create PR). A refunded+ // report can't be restored (its PR can never be billed again), so Restore is hidden for it; a+ // dismissed-but-still-charged report can still be refunded.+ if (isDismissed) {return [...(canRefund ? [refund] : []),...(report.refund@@ -168,14 +183,33 @@ export function useReportDetailActions(report: SignalReport): ReportDetailAction]}+ // Offer Resolve only where the backend accepts a direct transition to RESOLVED — a researched+ // report (ready or pending_input). Other live statuses (potential, candidate, in_progress,+ // failed) return 409, so don't show a dead-end affordance. Mirrors `canCreateImplementationPr`+ // and the server transition guard.+ const canResolve = report.status === SignalReportStatus.READY || report.status === SignalReportStatus.PENDING_INPUT++ const resolve: ReportDetailAction = {+ key: 'resolve',+ label: 'Resolve',+ icon: <IconCheckCircle />,+ loading: isResolving,+ tooltip: 'Mark this report as done',+ // The judge found the fix already in flight, so Create PR is withheld and closing the+ // report is the step it waits on.+ primary: report.already_addressed === true,+ onClick: onResolveClick,+ }+const actions: ReportDetailAction[] = [+ ...(canResolve ? [resolve] : []),{- key: 'archive',- label: 'Archive',- icon: <IconArchive />,- loading: isArchiving,- tooltip: 'Archive this report out of your inbox',- onClick: onArchiveClick,+ key: 'dismiss',+ label: 'Dismiss',+ icon: <IconHide />,+ loading: isDismissing,+ tooltip: 'Dismiss this report from your inbox',+ onClick: onDismissClick,},...(canRefund ? [refund] : []),]diff --git a/products/signals/frontend/inbox/components/detail/useReportResolve.ts b/products/signals/frontend/inbox/components/detail/useReportResolve.tsnew file mode 100644index 000000000000..014073db0fd8--- /dev/null+++ b/products/signals/frontend/inbox/components/detail/useReportResolve.ts@@ -0,0 +1,70 @@+import { useState } from 'react'++import { lemonToast } from '@posthog/lemon-ui'++import api from 'lib/api'++import { captureInboxReportAction, InboxReportActionSurface } from '../../inboxAnalytics'+import { SignalReport } from '../../types'+import { openResolveReportDialog } from '../shell/ResolveReportDialog'++/**+ * Resolve handler for the report detail pane: opens the resolve dialog, then marks the report done+ * through the `state` API. The single-report `resolve` analytics fire here so every detail surface+ * reads the same.+ */+export function useReportResolve({+ report,+ surface,+ onResolved,+}: {+ report: SignalReport+ /** Which surface the resolve was triggered from, for the `resolve` analytics. */+ surface: InboxReportActionSurface+ /** Fired once the resolve persists. */+ onResolved?: () => void+}): { isResolving: boolean; onResolveClick: (event: React.MouseEvent) => void } {+ const [isResolving, setIsResolving] = useState(false)+ // The backend closes an open implementation PR on resolve; the dialog and the toast say so.+ const hasOpenPr = !!report.implementation_pr_url && report.implementation_pr_merged !== true++ const onResolveClick = (event: React.MouseEvent): void => {+ event.preventDefault()+ event.stopPropagation()+ openResolveReportDialog({+ reportTitle: report.title ?? 'Untitled report',+ hasOpenPr,+ onConfirm: async ({ reason, note }) => {+ // pinned: `dismissal_reason` is the persisted field the reason lands in, for both+ // verdicts, so one breakdown reads dismissals and resolves alike.+ // Only the structured reason — the free-form note can carry proprietary text, and the+ // state API below already stores it. Matches the bulk resolve path.+ captureInboxReportAction({+ report,+ actionType: 'resolve',+ surface,+ extra: { dismissal_reason: reason },+ })+ setIsResolving(true)+ try {+ await api.signalReports.setState(report.id, {+ state: 'resolved',+ dismissal_reason: reason,+ ...(note ? { dismissal_note: note } : {}),+ })+ lemonToast.success(hasOpenPr ? 'Report resolved. Closing its pull request.' : 'Report resolved')+ onResolved?.()+ } catch (error: any) {+ lemonToast.error(error?.detail || error?.message || 'Failed to resolve report')+ // Reject so LemonDialog keeps the dialog open (the chosen reason and note survive+ // for a retry) and captures genuine failures. Matches useReportRefund.+ throw error+ } finally {+ setIsResolving(false)+ }+ },+ })+ }++ return { isResolving, onResolveClick }+}diff --git a/products/signals/frontend/inbox/components/shell/DismissReportDialog.tsx b/products/signals/frontend/inbox/components/shell/DismissReportDialog.tsxindex 2fdfaf7a2aae..83be372ab914 100644--- a/products/signals/frontend/inbox/components/shell/DismissReportDialog.tsx+++ b/products/signals/frontend/inbox/components/shell/DismissReportDialog.tsx@@ -1,12 +1,10 @@-import { IconHide, IconPause } from '@posthog/icons'-import { LemonDialog } from 'lib/lemon-ui/LemonDialog'import { LemonField } from 'lib/lemon-ui/LemonField'import { LemonRadio, LemonRadioOption } from 'lib/lemon-ui/LemonRadio'import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea'-import { Tooltip } from 'lib/lemon-ui/Tooltip'-import { DISMISSAL_REASON_OPTIONS, DismissalReasonValue, isDismissalReasonSnooze } from '../../utils/dismissalReasons'+import { DISMISSAL_REASON_OPTIONS, DismissalReasonValue } from '../../utils/dismissalReasons'+import { HotkeyRadio } from './HotkeyRadio'export interface DismissReportDialogResult {reason: DismissalReasonValue@@ -18,66 +16,54 @@ interface OpenDismissReportDialogParams {reportTitle?: string | null/** When greater than 1, copy reflects a bulk dismiss of the current selection. */selectedCount?: number+ /** Show a digit keycap on each reason and let 1..9 pick it. On for triage mode, where the whole flow is keyboard-driven. */+ hotkeys?: boolean/** Called with the chosen reason + note once the user confirms. */onConfirm: (result: DismissReportDialogResult) => void | Promise<void>}-const PAUSE_OPTION_TOOLTIP =- 'Snoozes this report: it briefly leaves your inbox while more context is gathered, and it can come back if new signals match.'-const SUPPRESS_OPTION_TOOLTIP =- 'Dismisses permanently: the report leaves your inbox and matching signals will not surface it again. Your reason is saved with the report.'--// Vertical radio list mirroring desktop `DismissReportDialog`: each reason carries an icon +-// tooltip explaining whether it snoozes (pause) or dismisses permanently (eye-slash).-const REASON_RADIO_OPTIONS: LemonRadioOption<DismissalReasonValue>[] = DISMISSAL_REASON_OPTIONS.map((option) => {- const snoozes = isDismissalReasonSnooze(option.value)- return {- value: option.value,- label: (- <Tooltip title={snoozes ? PAUSE_OPTION_TOOLTIP : SUPPRESS_OPTION_TOOLTIP} placement="right">- <span className="inline-flex flex-wrap items-center gap-1.5">- {option.label}- {snoozes ? (- <IconPause className="shrink-0 text-secondary" />- ) : (- <IconHide className="shrink-0 text-secondary" />- )}- </span>- </Tooltip>- ),- }-})+const REASON_RADIO_OPTIONS: LemonRadioOption<DismissalReasonValue>[] = DISMISSAL_REASON_OPTIONS.map((option) => ({+ value: option.value,+ label: option.label,+}))/*** Opens the dismiss dialog. Mirrors desktop `DismissReportDialog`: pick a reason* (canonical {@link DISMISSAL_REASON_OPTIONS}) plus an optional note, then suppress.* The caller wires `onConfirm` to the bulk-dismiss action or a direct* `api.signalReports.setState(id, { state: 'suppressed', dismissal_reason, dismissal_note })`.+ * Its sibling {@link openResolveReportDialog} has the same shape for the other verdict.*/export function openDismissReportDialog({reportTitle,selectedCount = 1,+ hotkeys = false,onConfirm,}: OpenDismissReportDialogParams): void {const isBulk = selectedCount > 1const title = isBulk- ? `Archive ${selectedCount} reports?`- : `Archive report "${reportTitle?.trim() ? reportTitle : 'Untitled report'}"?`+ ? `Dismiss ${selectedCount} reports?`+ : `Dismiss report "${reportTitle?.trim() ? reportTitle : 'Untitled report'}"?`const description = isBulk- ? 'These reports will be archived out of your inbox. Your feedback is saved on each report, and your note goes to the agents that filed them.'- : 'This report will be archived out of your inbox. Your feedback is saved on the report, and your note goes to the agent that filed it.'+ ? 'These reports leave your inbox. Your feedback is saved on each report, and your note goes to the agents that filed them.'+ : 'This report leaves your inbox. Your feedback is saved on the report, and your note goes to the agent that filed it.'LemonDialog.openForm({title,description,maxWidth: '36rem',+ overlayClassName: '!items-center',initialValues: { reason: null as DismissalReasonValue | null, note: '' },content: (<div className="flex flex-col gap-3"><LemonField name="reason" label="Reason">- {({ value, onChange }) => (- <LemonRadio value={value} onChange={onChange} options={REASON_RADIO_OPTIONS} />- )}+ {({ value, onChange }) =>+ hotkeys ? (+ <HotkeyRadio value={value} onChange={onChange} options={DISMISSAL_REASON_OPTIONS} />+ ) : (+ <LemonRadio value={value} onChange={onChange} options={REASON_RADIO_OPTIONS} />+ )+ }</LemonField><LemonField name="note" label="Note" info="Optional. The agent reads it on its next run."><LemonTextArea@@ -92,7 +78,7 @@ export function openDismissReportDialog({errors: {reason: (reason) => (!reason ? "You haven't picked a reason" : undefined),},- primaryButtonProps: { children: 'Archive & teach the agent' },+ primaryButtonProps: { children: 'Dismiss & teach the agent' },shouldAwaitSubmit: true,onSubmit: async ({ reason, note }) => {if (!reason) {diff --git a/products/signals/frontend/inbox/components/shell/HotkeyRadio.stories.tsx b/products/signals/frontend/inbox/components/shell/HotkeyRadio.stories.tsxnew file mode 100644index 000000000000..2c87da2034bd--- /dev/null+++ b/products/signals/frontend/inbox/components/shell/HotkeyRadio.stories.tsx@@ -0,0 +1,23 @@+import type { Meta, StoryObj } from '@storybook/react'+import { useState } from 'react'++import { RESOLVE_REASON_OPTIONS, ResolveReasonValue } from '../../utils/dismissalReasons'+import { HotkeyRadio } from './HotkeyRadio'++const meta: Meta<typeof HotkeyRadio> = {+ title: 'Scenes-App/Inbox/HotkeyRadio',+ component: HotkeyRadio,+ parameters: { layout: 'centered' },+}+export default meta++type Story = StoryObj<typeof HotkeyRadio>++function ResolveReasons(): JSX.Element {+ const [value, setValue] = useState<ResolveReasonValue | null>('pr_merged')+ return <HotkeyRadio value={value} onChange={setValue} options={RESOLVE_REASON_OPTIONS} />+}++export const WithSelection: Story = {+ render: () => <ResolveReasons />,+}diff --git a/products/signals/frontend/inbox/components/shell/HotkeyRadio.test.tsx b/products/signals/frontend/inbox/components/shell/HotkeyRadio.test.tsxnew file mode 100644index 000000000000..a7beefb2e4fa--- /dev/null+++ b/products/signals/frontend/inbox/components/shell/HotkeyRadio.test.tsx@@ -0,0 +1,84 @@+import '@testing-library/jest-dom'++import { cleanup, render, screen } from '@testing-library/react'+import userEvent from '@testing-library/user-event'++import { HotkeyRadio } from './HotkeyRadio'++describe('HotkeyRadio', () => {+ const options = [+ { value: 'one', label: 'First' },+ { value: 'two', label: 'Second' },+ { value: 'three', label: 'Third' },+ ] as const++ afterEach(cleanup)++ function renderRadio(): jest.Mock {+ const onChange = jest.fn()+ render(+ <div>+ <HotkeyRadio value={null} onChange={onChange} options={options} />+ <textarea aria-label="note" />+ </div>+ )+ return onChange+ }++ it.each<[string, () => Promise<void>, string | null]>([+ [+ 'a digit picks the matching option',+ async () => {+ await userEvent.keyboard('2')+ },+ 'two',+ ],+ // The regression this guards: a digit typed into the note must not change the reason.+ [+ 'a digit typed into a text field is left alone',+ async () => {+ await userEvent.click(screen.getByLabelText('note'))+ await userEvent.keyboard('2')+ },+ null,+ ],+ // A radio already holds focus after a click, and a digit must still switch the choice.+ [+ 'a digit still picks after a radio was clicked',+ async () => {+ await userEvent.click(screen.getByLabelText(/First/))+ await userEvent.keyboard('3')+ },+ 'three',+ ],+ [+ 'a digit past the last option does nothing',+ async () => {+ await userEvent.keyboard('4')+ },+ null,+ ],+ // Command/Ctrl+digit is a browser tab switch, not a pick.+ [+ 'a modifier chord is left to the browser',+ async () => {+ await userEvent.keyboard('{Meta>}2{/Meta}')+ },+ null,+ ],+ ])('%s', async (_name, press, expected) => {+ const onChange = renderRadio()+ await press()+ if (expected === null) {+ expect(onChange).not.toHaveBeenCalled()+ } else {+ expect(onChange).toHaveBeenLastCalledWith(expected)+ }+ })++ it('shows the digit keycap in front of each option', () => {+ renderRadio()+ expect(screen.getByLabelText(/Second/)).toBeInTheDocument()+ expect(screen.getByText('2')).toBeInTheDocument()+ })+})diff --git a/products/signals/frontend/inbox/components/shell/HotkeyRadio.tsx b/products/signals/frontend/inbox/components/shell/HotkeyRadio.tsxnew file mode 100644index 000000000000..71c442129c7c--- /dev/null+++ b/products/signals/frontend/inbox/components/shell/HotkeyRadio.tsx@@ -0,0 +1,73 @@+import { KeyboardShortcut } from 'lib/components/KeyboardShortcut/KeyboardShortcut'+import { useEventListener } from 'lib/hooks/useEventListener'+import { LemonRadio, LemonRadioOption } from 'lib/lemon-ui/LemonRadio'++import { HotKey } from '~/types'++const DIGIT_HOTKEYS = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const satisfies readonly HotKey[]++export interface HotkeyRadioOption<T extends React.Key> {+ value: T+ label: string+}++interface HotkeyRadioProps<T extends React.Key> {+ value: T | null | undefined+ onChange: (value: T) => void+ /** At most nine options get a digit shortcut; any past that render without one. */+ options: readonly HotkeyRadioOption<T>[]+}++// A digit typed into a text field is content, not a shortcut. Radio and checkbox inputs are not+// text fields, so a digit still picks an option after one of them was clicked.+function isTextEntryTarget(target: EventTarget | null): boolean {+ if (!(target instanceof HTMLElement)) {+ return false+ }+ if (target.isContentEditable || target instanceof HTMLTextAreaElement) {+ return true+ }+ return target instanceof HTMLInputElement && !['radio', 'checkbox', 'button', 'submit'].includes(target.type)+}++/**+ * A radio group where the digit keys 1..9 pick the matching option, with a keycap in front of each+ * label. The listener sits on `window` while the group is mounted, so it works from wherever focus+ * is in the dialog except a text field. Modifier chords are left to the browser.+ */+export function HotkeyRadio<T extends React.Key>({ value, onChange, options }: HotkeyRadioProps<T>): JSX.Element {+ useEventListener(+ 'keydown',+ (event) => {+ if (event.metaKey || event.ctrlKey || event.altKey || isTextEntryTarget(event.target)) {+ return+ }+ const index = (DIGIT_HOTKEYS as readonly string[]).indexOf(event.key)+ const option = index >= 0 ? options[index] : undefined+ if (!option) {+ return+ }+ event.preventDefault()+ onChange(option.value)+ },+ window,+ [options, onChange]+ )++ const radioOptions: LemonRadioOption<T>[] = options.map((option, index) => {+ const hotkey = DIGIT_HOTKEYS[index]+ return {+ value: option.value,+ label: hotkey ? (+ <span className="inline-flex items-center gap-2">+ <KeyboardShortcut {...{ [hotkey]: true }} />+ {option.label}+ </span>+ ) : (+ option.label+ ),+ }+ })++ return <LemonRadio value={value ?? undefined} onChange={onChange} options={radioOptions} />+}diff --git a/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx b/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsxindex ce715918bf73..d36c14653461 100644--- a/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx+++ b/products/signals/frontend/inbox/components/shell/InboxBulkSelectionBar.tsx@@ -1,24 +1,26 @@import { useActions, useValues } from 'kea'-import { IconArchive, IconX } from '@posthog/icons'+import { IconCheckCircle, IconHide, IconX } from '@posthog/icons'import { LemonButton } from '@posthog/lemon-ui'import { inboxBulkActionsLogic } from '../../logics/inboxBulkActionsLogic'import { openDismissReportDialog } from './DismissReportDialog'+import { openResolveReportDialog } from './ResolveReportDialog'/*** Bulk action toolbar shown when one or more reports are multi-selected.- * Mirrors desktop `InboxBulkSelectionBar` (the dismiss + clear slice). Selection- * and the bulk-dismiss call live in `inboxBulkActionsLogic`; delete / reingest+ * Mirrors desktop `InboxBulkSelectionBar` (the dismiss + clear slice) plus Resolve. Selection+ * and the bulk state calls live in `inboxBulkActionsLogic`; delete / reingest* remain on `inboxSceneLogic` per-report.*/export function InboxBulkSelectionBar(): JSX.Element | null {- const { selectedCount, isDismissing } = useValues(inboxBulkActionsLogic)- const { clearSelection, bulkDismiss } = useActions(inboxBulkActionsLogic)+ const { selectedCount, isDismissing, isResolving } = useValues(inboxBulkActionsLogic)+ const { clearSelection, bulkDismiss, bulkResolve } = useActions(inboxBulkActionsLogic)if (selectedCount === 0) {return null}+ const busy = isDismissing || isResolvingreturn (<div className="flex items-center justify-between gap-3 flex-wrap rounded border border-accent bg-accent-highlight-secondary px-3 py-2">@@ -31,17 +33,34 @@ export function InboxBulkSelectionBar(): JSX.Element | null {<LemonButtontype="secondary"size="small"- icon={<IconArchive />}+ icon={<IconCheckCircle />}+ loading={isResolving}+ disabledReason={busy ? 'Working…' : undefined}+ onClick={() =>+ openResolveReportDialog({+ selectedCount,+ onConfirm: ({ reason, note }) => bulkResolve(reason, note),+ })+ }+ data-attr="inbox-bulk-resolve"+ >+ Resolve+ </LemonButton>+ <LemonButton+ type="secondary"+ size="small"+ icon={<IconHide />}loading={isDismissing}- disabledReason={isDismissing ? 'Archiving…' : undefined}+ disabledReason={busy ? 'Working…' : undefined}onClick={() =>openDismissReportDialog({selectedCount,onConfirm: ({ reason, note }) => bulkDismiss(reason, note),})}+ data-attr="inbox-bulk-dismiss">- Archive+ Dismiss</LemonButton><LemonButtontype="tertiary"diff --git a/products/signals/frontend/inbox/components/shell/InboxTabBarLegacy.tsx b/products/signals/frontend/inbox/components/shell/InboxTabBarLegacy.tsxindex dfcb76fe7617..667f52afde76 100644--- a/products/signals/frontend/inbox/components/shell/InboxTabBarLegacy.tsx+++ b/products/signals/frontend/inbox/components/shell/InboxTabBarLegacy.tsx@@ -6,10 +6,9 @@ import { LemonSkeleton, LemonTabs, LemonTag } from '@posthog/lemon-ui'import { urls } from 'scenes/urls'import { inboxSceneLogic } from '../../inboxSceneLogic'-import { INBOX_REPORT_SECTION_LIST_PARAMS, reportListLogic } from '../../logics/reportListLogic'+import { legacyTabListLogicProps, reportListLogic } from '../../logics/reportListLogic'import {INBOX_FLAT_LIST_TAB_KEYS,- INBOX_LEGACY_TAB_SECTION,INBOX_STAFF_ONLY_TAB_KEYS,INBOX_LEGACY_TAB_KEYS,INBOX_TAB_LABEL,@@ -32,8 +31,7 @@ function isStaffOnlyTabKey(tab: InboxTabKey): boolean {* The active tab shares the same keyed instance, so no double-fetch.*/function FlatTabCount({ tabKey }: { tabKey: InboxFlatListTabKey }): JSX.Element {- const sectionKey = INBOX_LEGACY_TAB_SECTION[tabKey]- const logic = reportListLogic({ sectionKey, listParams: INBOX_REPORT_SECTION_LIST_PARAMS[sectionKey] })+ const logic = reportListLogic(legacyTabListLogicProps(tabKey))useMountedLogic(logic)const { count, countLoading } = useValues(logic)// Skeleton only while the request is genuinely in flight; on failure `count` stays null,diff --git a/products/signals/frontend/inbox/components/shell/RefundReportDialog.tsx b/products/signals/frontend/inbox/components/shell/RefundReportDialog.tsxindex 9e4cf6543cea..70694a923b4d 100644--- a/products/signals/frontend/inbox/components/shell/RefundReportDialog.tsx+++ b/products/signals/frontend/inbox/components/shell/RefundReportDialog.tsx@@ -13,6 +13,12 @@ export interface RefundReportDialogResult {interface OpenRefundReportDialogParams {/** Report title for the dialog copy. */reportTitle?: string | null+ /**+ * True when a merged PR resolved the report. The refund then leaves it in Resolved instead of+ * dismissing it, so the copy must not promise a dismissal. Mirrors the `resolved_via_merged_pr`+ * branch in the refund endpoint.+ */+ staysResolved?: boolean/** Called with the chosen reason + note once the user confirms. */onConfirm: (result: RefundReportDialogResult) => void | Promise<void>}@@ -28,15 +34,18 @@ const REFUND_REASON_OPTIONS: LemonRadioOption<SignalReportRefundReasonEnumApi>[]/*** Opens the refund dialog (mirrors {@link openDismissReportDialog}): pick a required reason plus an- * optional note, then refund. The caller wires `onConfirm` to the refund API call; refunding also- * archives the report, so the copy says both. `shouldAwaitSubmit` keeps the primary button in a- * loading state while the request is in flight, so it can't be double-submitted.+ * optional note, then refund. The caller wires `onConfirm` to the refund API call. Refunding+ * dismisses the report, except when a merged PR resolved it (then it stays resolved), which+ * `staysResolved` reflects in the copy. `shouldAwaitSubmit` keeps the primary button in a loading+ * state while the request is in flight, so it can't be double-submitted.*/-export function openRefundReportDialog({ reportTitle, onConfirm }: OpenRefundReportDialogParams): void {+export function openRefundReportDialog({ reportTitle, staysResolved, onConfirm }: OpenRefundReportDialogParams): void {+ const outcomeLine = staysResolved+ ? 'The report stays resolved.'+ : "The report is dismissed as part of the refund and can't be restored."LemonDialog.openForm({title: `Refund the PR for "${reportTitle?.trim() ? reportTitle : 'Untitled report'}"?`,- description:- "You won't pay for this PR and it won't count toward your included PRs. The report is archived as part of the refund and can't be restored.",+ description: `You won't pay for this PR and it won't count toward your included PRs. ${outcomeLine}`,maxWidth: '30rem',initialValues: { reason: null as SignalReportRefundReasonEnumApi | null, note: '' },content: (diff --git a/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsx b/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsxnew file mode 100644index 000000000000..0cc8aef3ca89--- /dev/null+++ b/products/signals/frontend/inbox/components/shell/ResolveReportDialog.tsx@@ -0,0 +1,102 @@+import { LemonDialog } from 'lib/lemon-ui/LemonDialog'+import { LemonField } from 'lib/lemon-ui/LemonField'+import { LemonRadio, LemonRadioOption } from 'lib/lemon-ui/LemonRadio'+import { LemonTextArea } from 'lib/lemon-ui/LemonTextArea'++import { RESOLVE_REASON_OPTIONS, ResolveReasonValue } from '../../utils/dismissalReasons'+import { HotkeyRadio } from './HotkeyRadio'++export interface ResolveReportDialogResult {+ reason: ResolveReasonValue+ note: string+}++interface OpenResolveReportDialogParams {+ /** Report title for single-report copy. Ignored when `selectedCount > 1`. */+ reportTitle?: string | null+ /** When greater than 1, copy reflects a bulk resolve of the current selection. */+ selectedCount?: number+ /** Whether the report has an implementation PR that is still open. Resolving closes it, so the copy says so. */+ hasOpenPr?: boolean+ /** Show a digit keycap on each reason and let 1..9 pick it. On for triage mode, where the whole flow is keyboard-driven. */+ hotkeys?: boolean+ /** Called with the chosen reason + note once the user confirms. */+ onConfirm: (result: ResolveReportDialogResult) => void | Promise<void>+}++const REASON_RADIO_OPTIONS: LemonRadioOption<ResolveReasonValue>[] = RESOLVE_REASON_OPTIONS.map((option) => ({+ value: option.value,+ label: option.label,+}))++/**+ * Opens the resolve dialog: pick why the report is done (canonical {@link RESOLVE_REASON_OPTIONS})+ * plus an optional note, then mark it resolved with Enter or the button. Same shape as+ * {@link openDismissReportDialog}, so the two verdicts read alike. The caller wires `onConfirm` to+ * the bulk-resolve action or a direct+ * `api.signalReports.setState(id, { state: 'resolved', dismissal_reason, dismissal_note })`.+ */+export function openResolveReportDialog({+ reportTitle,+ selectedCount = 1,+ hasOpenPr = false,+ hotkeys = false,+ onConfirm,+}: OpenResolveReportDialogParams): void {+ const isBulk = selectedCount > 1+ const title = isBulk+ ? `Resolve ${selectedCount} reports?`+ : `Resolve report "${reportTitle?.trim() ? reportTitle : 'Untitled report'}"?`+ const description = isBulk+ ? 'These reports are marked as done. If an issue comes back, you get a new report linked to the old one. Any open pull request for these reports is closed.'+ : `This marks the report as done. If the issue comes back, you get a new report linked to this one.${+ hasOpenPr ? ' The pull request opened for this report is closed.' : ''+ }`++ LemonDialog.openForm({+ title,+ description,+ maxWidth: '36rem',+ overlayClassName: '!items-center',+ initialValues: { reason: null as ResolveReasonValue | null, note: '' },+ content: (+ <div className="flex flex-col gap-3">+ <LemonField name="reason" label="Reason">+ {({ value, onChange }) =>+ hotkeys ? (+ <HotkeyRadio value={value} onChange={onChange} options={RESOLVE_REASON_OPTIONS} />+ ) : (+ <LemonRadio value={value} onChange={onChange} options={REASON_RADIO_OPTIONS} />+ )+ }+ </LemonField>+ <LemonField+ name="note"+ label="Note"+ info="Optional. A link to the fix helps anyone who reads this report later."+ >+ <LemonTextArea+ // stopPropagation keeps Enter in this multi-line note from reaching the dialog+ // form and resolving the report (and closing its PR) mid-sentence.+ stopPropagation+ placeholder="Link to the pull request or commit, or what fixed it."+ maxLength={4000}+ minRows={3}+ maxRows={8}+ />+ </LemonField>+ </div>+ ),+ errors: {+ reason: (reason) => (!reason ? "You haven't picked a reason" : undefined),+ },+ primaryButtonProps: { children: isBulk ? 'Resolve reports' : 'Resolve report' },+ shouldAwaitSubmit: true,+ onSubmit: async ({ reason, note }) => {+ if (!reason) {+ return+ }+ await onConfirm({ reason, note: (note ?? '').trim() })+ },+ })+}diff --git a/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx b/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsxindex 749bb9f123d2..1d2b0a8a364a 100644--- a/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx+++ b/products/signals/frontend/inbox/components/tabs/ReportsTab.test.tsx@@ -82,7 +82,7 @@ describe('ReportsTab', () => {await waitFor(() => {const viewed = (posthog.capture as jest.Mock).mock.calls.filter(([event]) => event === INBOX_EVENTS.VIEWED)expect(viewed).toHaveLength(1)- // Needs a PR + Review and merge + Resolved. Not actionable is staff-only triage.+ // Needs a PR + Review and merge + Resolved + Dismissed. Not actionable is staff-only triage.expect(viewed[0][1]).toMatchObject({ tab: 'reports', total_count: 13, is_empty: false })})})diff --git a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsxindex 14171819d730..e7f3036c4942 100644--- a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx+++ b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx@@ -33,7 +33,7 @@ import { InboxScopeSelect } from '../shell/InboxScopeSelect'* surfaced nothing worth acting on. The empty-state verdict is a separate question, answered over* the sections the current user can actually see.*/-const COUNTED_SECTION_KEYS = ['needs-decision', 'monitoring', 'resolved'] as const+const COUNTED_SECTION_KEYS = ['needs-decision', 'monitoring', 'resolved', 'dismissed'] as consttype CountedSectionKey = (typeof COUNTED_SECTION_KEYS)[number]@@ -44,7 +44,7 @@ interface SectionListState {}/**- * Every section's header count and rendered rows, keyed by section. All four logics are mounted+ * Every section's header count and rendered rows, keyed by section. All five logics are mounted* regardless of who is looking, so the hooks never change shape when the staff flag resolves;* callers decide which sections matter to them.*@@ -62,6 +62,7 @@ function useSectionStates(): Record<InboxReportSectionKey, SectionListState> {listParams: INBOX_REPORT_SECTION_LIST_PARAMS.monitoring,}const resolvedProps = { sectionKey: 'resolved' as const, listParams: INBOX_REPORT_SECTION_LIST_PARAMS.resolved }+ const dismissedProps = { sectionKey: 'dismissed' as const, listParams: INBOX_REPORT_SECTION_LIST_PARAMS.dismissed }const notActionableProps = {sectionKey: 'not-actionable' as const,listParams: INBOX_REPORT_SECTION_LIST_PARAMS['not-actionable'],@@ -82,6 +83,11 @@ function useSectionStates(): Record<InboxReportSectionKey, SectionListState> {countLoading: resolvedCountLoading,visibleReports: resolvedReports,} = useValues(reportListLogic(resolvedProps))+ const {+ count: dismissedCount,+ countLoading: dismissedCountLoading,+ visibleReports: dismissedReports,+ } = useValues(reportListLogic(dismissedProps))const {count: notActionableCount,countLoading: notActionableCountLoading,@@ -104,6 +110,11 @@ function useSectionStates(): Record<InboxReportSectionKey, SectionListState> {countLoading: resolvedCountLoading,visibleReports: resolvedReports,},+ dismissed: {+ count: dismissedCount,+ countLoading: dismissedCountLoading,+ visibleReports: dismissedReports,+ },'not-actionable': {count: notActionableCount,countLoading: notActionableCountLoading,@@ -184,7 +195,7 @@ function ReportsEmptyState(): JSX.Element {/*** The Reports tab: one toolbar over a single column of collapsible sections (Needs a PR / Review and- * merge / Resolved, plus Not actionable for staff). Each section owns its own filtered request,+ * merge / Resolved / Dismissed, plus Not actionable for staff). Each section owns its own filtered request,* count, and paging via the keyed `reportListLogic`, while the toolbar, reviewer scope, and bulk* selection are shared across all of them.*/diff --git a/products/signals/frontend/inbox/components/triage/InboxTriageView.tsx b/products/signals/frontend/inbox/components/triage/InboxTriageView.tsxindex ebaecebdcfe7..8226ee79dbb8 100644--- a/products/signals/frontend/inbox/components/triage/InboxTriageView.tsx+++ b/products/signals/frontend/inbox/components/triage/InboxTriageView.tsx@@ -2,7 +2,7 @@ import { useActions, useValues } from 'kea'import { router } from 'kea-router'import { useEffect, useRef } from 'react'-import { IconArchive, IconArrowLeft, IconPullRequest } from '@posthog/icons'+import { IconArrowLeft, IconCheckCircle, IconHide, IconPullRequest } from '@posthog/icons'import { LemonButton, LemonSkeleton, Link, Tooltip } from '@posthog/lemon-ui'import { KeyboardShortcut } from 'lib/components/KeyboardShortcut/KeyboardShortcut'@@ -96,7 +96,8 @@ function HintBarItem({ shortcut, label }: { shortcut: JSX.Element; label: stringfunction TriageCard({ report, expanded }: { report: SignalReport; expanded: boolean }): JSX.Element {const { canCreatePr, isCreatingPr, aiConsentDisabledReason, currentReportUrl } = useValues(inboxTriageLogic)- const { archiveCurrent, createPrForCurrent, openCurrent, toggleExpanded } = useActions(inboxTriageLogic)+ const { dismissCurrent, resolveCurrent, createPrForCurrent, openCurrent, toggleExpanded } =+ useActions(inboxTriageLogic)const conventionalTitle = parseConventionalCommitTitle(report.title)const title = displayConventionalCommitTitle(report.title, 'Untitled report')@@ -190,12 +191,23 @@ function TriageCard({ report, expanded }: { report: SignalReport; expanded: bool<LemonButtontype="secondary"size="small"- icon={<IconArchive />}- onClick={archiveCurrent}+ icon={<IconCheckCircle />}+ onClick={resolveCurrent}+ sideIcon={<KeyboardShortcut r />}+ data-attr="inbox-triage-resolve"+ >+ Resolve+ </LemonButton>+ <LemonButton+ type="secondary"+ size="small"+ icon={<IconHide />}+ onClick={dismissCurrent}sideIcon={<KeyboardShortcut a />}+ // pinned: data-attr predates the Archive → Dismiss rename; dashboards read it.data-attr="inbox-triage-archive">- Archive+ Dismiss</LemonButton>{canCreatePr && (<LemonButton@@ -252,8 +264,16 @@ export function InboxTriageView(): JSX.Element {expanded,counter,} = useValues(inboxTriageLogic)- const { navigate, toggleExpanded, setExpanded, archiveCurrent, createPrForCurrent, openCurrent, ensureLoaded } =- useActions(inboxTriageLogic)+ const {+ navigate,+ toggleExpanded,+ setExpanded,+ dismissCurrent,+ resolveCurrent,+ createPrForCurrent,+ openCurrent,+ ensureLoaded,+ } = useActions(inboxTriageLogic)useKeyboardHotkeys({@@ -278,7 +298,8 @@ export function InboxTriageView(): JSX.Element {},e: { action: outsideDialogs(() => toggleExpanded()) },o: { action: outsideDialogs(() => openCurrent()) },- a: { action: outsideDialogs(() => archiveCurrent()) },+ a: { action: outsideDialogs(() => dismissCurrent()) },+ r: { action: outsideDialogs(() => resolveCurrent()) },c: { action: outsideDialogs(() => createPrForCurrent()) },escape: {// Escape peels back one layer: the expanded summary, then triage mode itself.@@ -291,7 +312,16 @@ export function InboxTriageView(): JSX.Element {}),},},- [expanded, navigate, toggleExpanded, setExpanded, archiveCurrent, createPrForCurrent, openCurrent]+ [+ expanded,+ navigate,+ toggleExpanded,+ setExpanded,+ dismissCurrent,+ resolveCurrent,+ createPrForCurrent,+ openCurrent,+ ])// Once per open, when the queue has settled, so the panel shows up next to the otherdiff --git a/products/signals/frontend/inbox/inboxAnalytics.ts b/products/signals/frontend/inbox/inboxAnalytics.tsindex 5787ab042d29..e657d631dc75 100644--- a/products/signals/frontend/inbox/inboxAnalytics.ts+++ b/products/signals/frontend/inbox/inboxAnalytics.ts@@ -72,13 +72,15 @@ export type InboxReportFeedbackSentiment = 'positive' | 'negative'/*** Report actions cloud actually emits. Names match the desktop enum one-for-one (so the- * `action_type` breakdown reads the same across clients), plus cloud-only `restore` (Archive tab),- * `view_diff`, `show_more` (a list section widening its window), and the section expand/collapse- * pair (desktop splits those per section instead).+ * `action_type` breakdown reads the same across clients), plus cloud-only `restore` (Dismissed+ * section), `resolve` (marking a report done without an inbox PR), `view_diff`, `show_more` (a list+ * section widening its window), and the section expand/collapse pair (desktop splits those per+ * section instead).* Desktop-only variants we don't fire yet are intentionally omitted.*/export type InboxReportActionType =| 'dismiss'+ | 'resolve'| 'discuss'| 'restore'| 'create_pr'diff --git a/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts b/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.tsindex 219a473565d1..da0c9aa99a11 100644--- a/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts@@ -5,7 +5,7 @@ import { lemonToast } from '@posthog/lemon-ui'import api from 'lib/api'import { captureInboxReportAction } from '../inboxAnalytics'-import type { DismissalReasonValue } from '../utils/dismissalReasons'+import type { DismissalReasonValue, ResolveReasonValue } from '../utils/dismissalReasons'/** Tally of a bulk operation that ran one request per selected report. */interface BulkActionResult {@@ -13,19 +13,20 @@ interface BulkActionResult {failureCount: number}-function formatDismissSummary(result: BulkActionResult): string {+function formatBulkSummary(result: BulkActionResult, verb: 'dismissed' | 'resolved'): string {const { successCount, failureCount } = resultconst pluralized = successCount === 1 ? 'report' : 'reports'if (failureCount === 0) {- return `${successCount} ${pluralized} dismissed`+ return `${successCount} ${pluralized} ${verb}`}- return `${successCount} ${pluralized} dismissed, ${failureCount} failed`+ return `${successCount} ${pluralized} ${verb}, ${failureCount} failed`}// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface inboxBulkActionsLogicValues {hasSelection: booleanisDismissing: boolean+ isResolving: booleanselectedCount: numberselectedReportIds: string[]}@@ -51,10 +52,23 @@ export interface inboxBulkActionsLogicActions {bulkDismissSuccess: () => {value: true}+ bulkResolve: (+ reason: ResolveReasonValue,+ note: string+ ) => {+ note: string+ reason: 'already_fixed' | 'fixed_outside_posthog' | 'other' | 'pr_merged'+ }+ bulkResolveFailure: () => {+ value: true+ }+ bulkResolveSuccess: () => {+ value: true+ }clearSelection: () => {value: true}- reportArchived: () => {+ reportStateChanged: () => {value: true}selectAll: (reportIds: string[]) => {@@ -84,11 +98,11 @@ export type inboxBulkActionsLogicType = MakeLogicType<>/**- * Multi-select + bulk dismiss for the inbox report list. Mirrors desktop+ * Multi-select + bulk dismiss / resolve for the inbox report list. Mirrors desktop* `inboxReportSelectionStore` (selection state) and `useInboxBulkActions`* (bulk suppress via `updateSignalReportState`). Kept deliberately thin: shift /* range selection lives in the list component; this logic owns the id set and- * the dismiss call.+ * the state calls.*/export const inboxBulkActionsLogic = kea<inboxBulkActionsLogicType>([path(['scenes', 'inbox', 'logics', 'inboxBulkActionsLogic']),@@ -102,9 +116,14 @@ export const inboxBulkActionsLogic = kea<inboxBulkActionsLogicType>([bulkDismiss: (reason: DismissalReasonValue, note: string) => ({ reason, note }),bulkDismissSuccess: true,bulkDismissFailure: true,- /** Broadcast that a single report was archived elsewhere (e.g. the detail pane), so every- * mounted list reconciles itself. Persisting the change is the caller's responsibility. */- reportArchived: true,+ /** Resolve every selected report with the chosen reason/note, then clear. */+ bulkResolve: (reason: ResolveReasonValue, note: string) => ({ reason, note }),+ bulkResolveSuccess: true,+ bulkResolveFailure: true,+ /** Broadcast that a single report changed state elsewhere (dismissed, resolved, or refunded in+ * the detail pane), so every mounted list reconciles itself. Persisting the change is the+ * caller's responsibility. */+ reportStateChanged: true,}),reducers({@@ -126,6 +145,14 @@ export const inboxBulkActionsLogic = kea<inboxBulkActionsLogicType>([bulkDismissFailure: () => false,},],+ isResolving: [+ false,+ {+ bulkResolve: () => true,+ bulkResolveSuccess: () => false,+ bulkResolveFailure: () => false,+ },+ ],}),selectors({@@ -174,18 +201,64 @@ export const inboxBulkActionsLogic = kea<inboxBulkActionsLogicType>([// Total failure: nothing was suppressed, so there's nothing for the list to drop.if (result.successCount === 0) {- lemonToast.error(formatDismissSummary(result))+ lemonToast.error(formatBulkSummary(result, 'dismissed'))actions.bulkDismissFailure()return}// Any success (partial or full) must reload so the suppressed reports leave the list.// A partial failure still surfaces as an error toast ("N dismissed, M failed").if (result.failureCount > 0) {- lemonToast.error(formatDismissSummary(result))+ lemonToast.error(formatBulkSummary(result, 'dismissed'))} else {- lemonToast.success(formatDismissSummary(result))+ lemonToast.success(formatBulkSummary(result, 'dismissed'))}actions.bulkDismissSuccess()},+ // Same shape as bulkDismiss. A report the backend refuses to resolve from its current status+ // (a 409) counts as failed, so the toast says how many were left in place.+ bulkResolve: async ({ reason, note }) => {+ const reportIds = values.selectedReportIds+ if (reportIds.length === 0) {+ actions.bulkResolveFailure()+ return+ }+ const trimmedNote = note.trim().slice(0, 4000)+ // Only the structured reason — the free-form note can carry proprietary text.+ captureInboxReportAction({+ actionType: 'resolve',+ surface: 'bulk_bar',+ isBulk: true,+ bulkSize: reportIds.length,+ extra: { dismissal_reason: reason },+ })+ const results = await Promise.allSettled(+ reportIds.map((id) =>+ api.signalReports.setState(id, {+ state: 'resolved',+ dismissal_reason: reason,+ ...(trimmedNote ? { dismissal_note: trimmedNote } : {}),+ })+ )+ )+ const successCount = results.filter((r) => r.status === 'fulfilled').length+ const result: BulkActionResult = {+ successCount,+ failureCount: results.length - successCount,+ }++ actions.clearSelection()++ if (result.successCount === 0) {+ lemonToast.error(formatBulkSummary(result, 'resolved'))+ actions.bulkResolveFailure()+ return+ }+ if (result.failureCount > 0) {+ lemonToast.error(formatBulkSummary(result, 'resolved'))+ } else {+ lemonToast.success(formatBulkSummary(result, 'resolved'))+ }+ actions.bulkResolveSuccess()+ },})),])diff --git a/products/signals/frontend/inbox/logics/inboxReportSectionsLogic.ts b/products/signals/frontend/inbox/logics/inboxReportSectionsLogic.tsindex 1fba0303b0d5..cb048338bbf8 100644--- a/products/signals/frontend/inbox/logics/inboxReportSectionsLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxReportSectionsLogic.ts@@ -8,12 +8,13 @@ export const INBOX_OPEN_SECTIONS_STORAGE_KEY = 'inbox-open-report-sections'/*** How a section starts before the user has collapsed or expanded it. The two sections that carry- * work to do open; the two that are a record of work already judged stay out of the way.+ * work to do open; the three that are a record of work already judged stay out of the way.*/export const DEFAULT_OPEN_SECTIONS: Record<InboxReportSectionKey, boolean> = {monitoring: true,'needs-decision': true,resolved: false,+ dismissed: false,'not-actionable': false,}@@ -26,7 +27,7 @@ export interface inboxReportSectionsLogicValues {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface inboxReportSectionsLogicActions {toggleSection: (section: InboxReportSectionKey) => {- section: 'monitoring' | 'needs-decision' | 'not-actionable' | 'resolved'+ section: 'dismissed' | 'monitoring' | 'needs-decision' | 'not-actionable' | 'resolved'}}diff --git a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts b/products/signals/frontend/inbox/logics/inboxTriageLogic.tsindex d569437c7905..2f9fd93ce033 100644--- a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxTriageLogic.ts@@ -5,6 +5,7 @@ import { urls } from 'scenes/urls'import { canCreateImplementationPr } from '../components/detail/ReportDetailActions'import { openDismissReportDialog } from '../components/shell/DismissReportDialog'+import { openResolveReportDialog } from '../components/shell/ResolveReportDialog'import { captureInboxReportAction } from '../inboxAnalytics'import { inboxSceneLogic } from '../inboxSceneLogic'import { inboxTaskKickoffLogic } from '../inboxTaskKickoffLogic'@@ -72,7 +73,7 @@ export interface inboxTriageLogicActions {feedback: string | undefinedreport: SignalReport} // inboxTaskKickoffLogic- archiveReport: (+ dismissReport: (reportId: string,reason:| 'already_fixed'@@ -123,10 +124,19 @@ export interface inboxTriageLogicActions {removeReport: (reportId: string) => {reportId: string} // reportListLogic- archiveCurrent: () => {+ resolveReport: (+ reportId: string,+ reason: 'already_fixed' | 'fixed_outside_posthog' | 'other' | 'pr_merged',+ note: string+ ) => {+ note: string+ reason: 'already_fixed' | 'fixed_outside_posthog' | 'other' | 'pr_merged'+ reportId: string+ } // reportListLogic+ createPrForCurrent: () => {value: true}- createPrForCurrent: () => {+ dismissCurrent: () => {value: true}focusReport: (@@ -142,6 +152,9 @@ export interface inboxTriageLogicActions {openCurrent: () => {value: true}+ resolveCurrent: () => {+ value: true+ }setExpanded: (expanded: boolean) => {expanded: boolean}@@ -202,7 +215,8 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([['ensureLoaded','loadMore',- 'archiveReport',+ 'dismissReport',+ 'resolveReport','removeReport','loadReportsSuccess','loadMoreReportsSuccess',@@ -222,13 +236,14 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([focusReport: (reportId: string | null, index: number) => ({ reportId, index }),toggleExpanded: true,setExpanded: (expanded: boolean) => ({ expanded }),- archiveCurrent: true,+ dismissCurrent: true,+ resolveCurrent: true,createPrForCurrent: true,openCurrent: true,}),reducers({- // The index the user asked for. It can point past the end once archiving shrinks the list,+ // The index the user asked for. It can point past the end once a verdict shrinks the list,// so `currentIndex` clamps it against what is loaded rather than trusting it directly.requestedIndex: [0,@@ -238,7 +253,7 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([},],// The report the URL says the user is on. It wins over the index while it is still in the- // queue, so rows archived above it don't shift the user onto a different report.+ // queue, so rows dismissed above it don't shift the user onto a different report.requestedReportId: [null as string | null,{@@ -352,15 +367,16 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([actions.loadMore()}},- archiveCurrent: () => {+ dismissCurrent: () => {const report = values.currentReportif (!report) {return}openDismissReportDialog({reportTitle: displayConventionalCommitTitle(report.title, 'Untitled report'),+ hotkeys: true,onConfirm: ({ reason, note }) => {- // The structured reason plus the user's note, matching the list-card archive+ // The structured reason plus the user's note, matching the list-card dismiss// path so the dismiss analytics read the same from every surface.captureInboxReportAction({report,@@ -369,7 +385,29 @@ export const inboxTriageLogic = kea<inboxTriageLogicType>([extra: { dismissal_reason: reason, ...(note ? { dismissal_note: note } : {}) },})// The list logic drops the row optimistically, so the next report takes this index.- actions.archiveReport(report.id, reason, note)+ actions.dismissReport(report.id, reason, note)+ },+ })+ },+ resolveCurrent: () => {+ const report = values.currentReport+ if (!report) {+ return+ }+ // Triage walks Needs a PR, so no report here has an open PR to close.+ openResolveReportDialog({+ reportTitle: displayConventionalCommitTitle(report.title, 'Untitled report'),+ hotkeys: true,+ onConfirm: ({ reason, note }) => {+ // Only the structured reason — the free-form note can carry proprietary text.+ // `resolveReport` still persists it through the state API. Matches the bulk resolve path.+ captureInboxReportAction({+ report,+ actionType: 'resolve',+ surface: 'triage_mode',+ extra: { dismissal_reason: reason },+ })+ actions.resolveReport(report.id, reason, note)},})},diff --git a/products/signals/frontend/inbox/logics/inboxUsageLogic.ts b/products/signals/frontend/inbox/logics/inboxUsageLogic.tsindex 5eccc8a19e38..234652aa5a70 100644--- a/products/signals/frontend/inbox/logics/inboxUsageLogic.ts+++ b/products/signals/frontend/inbox/logics/inboxUsageLogic.ts@@ -503,10 +503,10 @@ export const inboxUsageLogic = kea<inboxUsageLogicType>([// Seed the field with the current limit (or the free allowance when uncapped).actions.setLimitFormValue('prs', values.limitPrs ?? values.freePrs)},- // Refunds broadcast `reportArchived` after archiving server-side; reload the summary so+ // Refunds broadcast `reportStateChanged` after dismissing server-side; reload the summary so// the widget's netted PR count updates in-session (mirrors the reportListLogic reconcile- // listener — a plain archive just makes this a cheap no-op reload).- [inboxBulkActionsLogic.actionTypes.reportArchived]: () => actions.loadRefundSummary(),+ // listener — a plain dismiss or resolve just makes this a cheap no-op reload).+ [inboxBulkActionsLogic.actionTypes.reportStateChanged]: () => actions.loadRefundSummary(),})),// Fires on mount and again when the org-group-keyed flag arrives after mount — a mount-time// load alone silently skips the summary on pageloads where flags resolve late, leaving thediff --git a/products/signals/frontend/inbox/logics/reportListLogic.ts b/products/signals/frontend/inbox/logics/reportListLogic.tsindex 13dccffab062..88c69bbffb55 100644--- a/products/signals/frontend/inbox/logics/reportListLogic.ts+++ b/products/signals/frontend/inbox/logics/reportListLogic.ts@@ -17,12 +17,14 @@ import {INBOX_PRIMARY_REPORT_SECTION_KEY,INBOX_SCOPE_ENTIRE_PROJECT,INBOX_SCOPE_FOR_YOU,+ INBOX_LEGACY_TAB_SECTION,+ InboxFlatListTabKey,InboxReportSectionKey,InboxScope,SignalReport,} from '../types'import type { SignalReportPriority } from '../types'-import { DismissalReasonValue } from '../utils/dismissalReasons'+import { DismissalReasonValue, ResolveReasonValue } from '../utils/dismissalReasons'import { isInboxRedesignEnabled } from '../utils/inboxRedesign'import { inboxBulkActionsLogic } from './inboxBulkActionsLogic'import { buildSignalReportListOrdering, inboxFiltersLogic } from './inboxFiltersLogic'@@ -67,12 +69,28 @@ export const INBOX_REPORT_SECTION_LIST_PARAMS: Record<InboxReportSectionKey, Repstatus: 'ready,pending_input',actionability: ACTIONABLE_ACTIONABILITY_VALUES.join(','),},- // Terminal reports: ones resolved by a merged implementation PR (not restorable) and ones- // the user archived (suppressed, restorable).- resolved: { status: 'suppressed,resolved' },+ // Fixed by a merged implementation PR, or resolved by a person. Terminal, not restorable.+ resolved: { status: 'resolved' },+ // Dismissed by a person, or suppressed because its PR closed without merging. Restorable.+ dismissed: { status: 'suppressed' },'not-actionable': { actionability: 'not_actionable' },}+/**+ * The keyed list instance behind a legacy tab (redesign flag off). Every tab shows one section with+ * that section's filter, except Archive, which lists resolved and dismissed reports together. It+ * reuses the `resolved` instance with a wider filter instead of adding a section key, because the+ * section keys drive analytics, `data-attr` values, and persisted collapsed state that the legacy+ * tab must not extend, and the two layouts are never mounted together.+ */+export function legacyTabListLogicProps(tabKey: InboxFlatListTabKey): ReportListLogicProps {+ const sectionKey = INBOX_LEGACY_TAB_SECTION[tabKey]+ if (tabKey === 'archived') {+ return { sectionKey, listParams: { status: 'suppressed,resolved' } }+ }+ return { sectionKey, listParams: INBOX_REPORT_SECTION_LIST_PARAMS[sectionKey] }+}+function teammateUuidFromScope(scope: string): string | undefined {return scope.startsWith('teammate:') ? scope.slice('teammate:'.length).trim() || undefined : undefined}@@ -188,7 +206,7 @@ export interface reportListLogicActions {toggleSourceProduct: (source: string) => {source: string} // inboxFiltersLogic- archiveReport: (+ dismissReport: (reportId: string,reason: DismissalReasonValue,note: string@@ -260,6 +278,15 @@ export interface reportListLogicActions {removeReport: (reportId: string) => {reportId: string}+ resolveReport: (+ reportId: string,+ reason: ResolveReasonValue,+ note: string+ ) => {+ note: string+ reason: 'already_fixed' | 'fixed_outside_posthog' | 'other' | 'pr_merged'+ reportId: string+ }restoreReport: (reportId: string) => {reportId: string}@@ -270,7 +297,7 @@ export interface reportListLogicActions {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface reportListLogicMeta {- key: 'monitoring' | 'needs-decision' | 'not-actionable' | 'resolved'+ key: 'dismissed' | 'monitoring' | 'needs-decision' | 'not-actionable' | 'resolved'__keaTypeGenInternalSelectorTypes: {primarySectionKey: (featureFlags: FeatureFlagsSet) => InboxReportSectionKeylistApiParams: (@@ -358,7 +385,8 @@ export const reportListLogic = kea<reportListLogicType>([actions({ensureLoaded: true,loadMore: true,- archiveReport: (reportId: string, reason: DismissalReasonValue, note: string) => ({ reportId, reason, note }),+ dismissReport: (reportId: string, reason: DismissalReasonValue, note: string) => ({ reportId, reason, note }),+ resolveReport: (reportId: string, reason: ResolveReasonValue, note: string) => ({ reportId, reason, note }),restoreReport: (reportId: string) => ({ reportId }),removeReport: (reportId: string) => ({ reportId }),refresh: true,@@ -618,7 +646,7 @@ export const reportListLogic = kea<reportListLogicType>([actions.refresh()}},- archiveReport: async ({ reportId, reason, note }) => {+ dismissReport: async ({ reportId, reason, note }) => {actions.removeReport(reportId)try {await api.signalReports.setState(reportId, {@@ -626,13 +654,34 @@ export const reportListLogic = kea<reportListLogicType>([dismissal_reason: reason,...(note ? { dismissal_note: note } : {}),})+ // Reconcile every mounted section against the server so the Dismissed target gains the+ // row and count, not just this source section (which already dropped it optimistically).+ inboxBulkActionsLogic.actions.reportStateChanged()} catch (error: any) {- lemonToast.error(error?.detail || error?.message || 'Failed to archive report')+ lemonToast.error(error?.detail || error?.message || 'Failed to dismiss report')+ actions.refresh()+ }+ },+ // Mark a report done without an inbox PR (transition to `resolved`). Optimistically drops it+ // from this section; the broadcast below reconciles every section, so it joins Resolved now.+ resolveReport: async ({ reportId, reason, note }) => {+ actions.removeReport(reportId)+ try {+ await api.signalReports.setState(reportId, {+ state: 'resolved',+ dismissal_reason: reason,+ ...(note ? { dismissal_note: note } : {}),+ })+ lemonToast.success('Report resolved')+ // Reconcile every mounted section so the Resolved target gains the row and count.+ inboxBulkActionsLogic.actions.reportStateChanged()+ } catch (error: any) {+ lemonToast.error(error?.detail || error?.message || 'Failed to resolve report')actions.refresh()}},// Restore a suppressed report back to the inbox (transition to `potential`). Optimistically- // drops it from Resolved; the report re-enters the pipeline and resurfaces elsewhere.+ // drops it from Dismissed; the report re-enters the pipeline and resurfaces elsewhere.restoreReport: async ({ reportId }) => {const report = values.reports.find((r) => r.id === reportId)actions.removeReport(reportId)@@ -641,20 +690,25 @@ export const reportListLogic = kea<reportListLogicType>([// Fire only after the restore persists, matching ReportDetailActions' fallback path.captureInboxReportAction({ report, actionType: 'restore', surface: 'list_row' })lemonToast.success('Report restored to inbox')- // Restore maps through restore_target_status server-side, so a report suppressed while- // resolved returns to `resolved` and still belongs in this section. Reconcile against- // the server rather than trusting the optimistic removal, which over-drops those rows.- actions.refresh()+ // Restore maps through restore_target_status server-side, so the report lands back in+ // whichever section its pre-suppression status names (a report suppressed while ready+ // returns to Needs a PR / Review and merge). Broadcast so every mounted section+ // reconciles — this one loses the row, the destination gains it and its count — not+ // just the section that owns the action.+ inboxBulkActionsLogic.actions.reportStateChanged()} catch (error: any) {lemonToast.error(error?.detail || error?.message || 'Failed to restore report')actions.refresh()}},- // Bulk archive happens in the singleton; refresh this section once it lands.+ // A bulk dismiss or resolve happens in the singleton; refresh this section once it lands so+ // the affected reports leave it and the counts settle.[inboxBulkActionsLogic.actionTypes.bulkDismissSuccess]: () => actions.refresh(),- // A single report archived elsewhere (e.g. the detail pane) – reconcile this section against- // the server so the report leaves its section and joins Resolved, counts included.- [inboxBulkActionsLogic.actionTypes.reportArchived]: () => actions.refresh(),+ [inboxBulkActionsLogic.actionTypes.bulkResolveSuccess]: () => actions.refresh(),+ // A single report dismissed, resolved, or refunded elsewhere (e.g. the detail pane) – reconcile+ // this section against the server so the report leaves its section and joins Resolved or+ // Dismissed, counts included.+ [inboxBulkActionsLogic.actionTypes.reportStateChanged]: () => actions.refresh(),})),events(({ actions }) => ({diff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.tsindex f68fb55edf50..493b4506e9c1 100644--- a/products/signals/frontend/inbox/types.ts+++ b/products/signals/frontend/inbox/types.ts@@ -3,6 +3,7 @@ import type { UserBasicType } from '~/types'import {type ReportChartApi,type SignalReportRefundApi,+ type SignalReportStateRequestApi,type SignalScoutRunSummaryApi,SignalSourceProductApi as SignalSourceProduct,SignalSourceTypeApi as SignalSourceType,@@ -243,7 +244,13 @@ export const INBOX_LEGACY_TAB_DESCRIPTION: Record<InboxTabKey, string> = {* section header, and the keys of the persisted expanded/collapsed state, so they outlive renames of* the labels above them (`needs-decision` is now "Needs a PR", `monitoring` is "Review and merge").*/-export const INBOX_REPORT_SECTION_KEYS = ['monitoring', 'needs-decision', 'resolved', 'not-actionable'] as const+export const INBOX_REPORT_SECTION_KEYS = [+ 'monitoring',+ 'needs-decision',+ 'resolved',+ 'dismissed',+ 'not-actionable',+] as constexport type InboxReportSectionKey = (typeof INBOX_REPORT_SECTION_KEYS)[number]/**@@ -256,14 +263,17 @@ export const INBOX_REPORT_SECTION_LABEL: Record<InboxReportSectionKey, string> =monitoring: 'Review and merge','needs-decision': 'Needs a PR',resolved: 'Resolved',+ dismissed: 'Dismissed','not-actionable': 'Not actionable',}-/** One line per section, shown under its header while the section is open. */+/** One line per section, shown as a tooltip when hovering its header. */export const INBOX_REPORT_SECTION_DESCRIPTION: Record<InboxReportSectionKey, string> = {monitoring: 'Reports with a pull request open, ready for you to review and merge on GitHub.','needs-decision': 'Reports an agent can act on that have no pull request yet.',- resolved: 'Reports resolved by a merged pull request, and reports you archived.',+ resolved: 'Reports fixed by a merged pull request, or marked resolved.',+ dismissed:+ 'Reports you dismissed, and reports whose pull request was closed without merging. Most can be restored to your inbox.','not-actionable':'Reports judged not actionable because they are too vague, lack supporting evidence, or describe expected behavior.',}@@ -301,9 +311,11 @@ export const INBOX_FLAT_LIST_TAB_KEYS = ['pulls', 'reports', 'not-actionable', 'export type InboxFlatListTabKey = (typeof INBOX_FLAT_LIST_TAB_KEYS)[number]/**- * Each legacy report tab shows exactly one of the redesign's sections, with the same server filter.- * Both layouts share the keyed `reportListLogic` instances through this map, so a report loaded- * under one layout is found by the other and the mount-time count loaders are not duplicated.+ * Each legacy report tab shows one of the redesign's sections. Both layouts share the keyed+ * `reportListLogic` instances through this map, so a report loaded under one layout is found by the+ * other and the mount-time count loaders are not duplicated. The Archive tab is the exception: it+ * lists the Resolved and Dismissed sections together, through the `resolved` instance with its own+ * filter (see `legacyTabListLogicProps`).*/export const INBOX_LEGACY_TAB_SECTION: Record<InboxFlatListTabKey, InboxReportSectionKey> = {pulls: 'monitoring',@@ -318,6 +330,7 @@ export const INBOX_SECTION_LEGACY_TAB: Record<InboxReportSectionKey, InboxFlatLi'needs-decision': 'reports','not-actionable': 'not-actionable',resolved: 'archived',+ dismissed: 'archived',}/**@@ -444,12 +457,8 @@ export interface SignalScoutEmissionReportLink {report: LinkedSignalReport | null}-// ── Report state transitions (backend `state` action: dismiss / snooze) ──────+// ── Report state transitions (backend `state` action: dismiss / snooze / resolve) ──────-export interface SignalReportStateRequest {- state: 'suppressed' | 'potential'- dismissal_reason?: string- dismissal_note?: string- /** Only honored for state === 'potential' (snooze): re-promote after N more signals. */- snooze_for?: number-}+// Generated from the serializer, so the state and reason enums stay in sync with the backend.+// Re-exported under the domain name so consumers don't carry the `Api` suffix.+export type SignalReportStateRequest = SignalReportStateRequestApidiff --git a/products/signals/frontend/inbox/utils/dismissalReasons.ts b/products/signals/frontend/inbox/utils/dismissalReasons.tsindex 1f3422e9464b..a03c01dfa14a 100644--- a/products/signals/frontend/inbox/utils/dismissalReasons.ts+++ b/products/signals/frontend/inbox/utils/dismissalReasons.ts@@ -1,55 +1,60 @@-// Port of desktop `packages/shared/src/dismissal-reasons.ts`. Canonical dismiss /-// suppress reasons shown in the inbox. Values are persisted on dismissal artefacts-// by the backend `state` action – add or reorder options here only, and keep the-// values in sync with desktop.+// Port of desktop `packages/shared/src/dismissal-reasons.ts`. Canonical reason codes recorded when a+// report is dismissed or resolved. Values are persisted on dismissal artefacts by the backend `state`+// action – add or reorder options here only, and keep the values in sync with desktop and with+// `SIGNAL_REPORT_DISMISSAL_REASON_CHOICES` in `products/signals/backend/views.py`.export const DISMISSAL_REASON_OPTIONS = [- {- value: 'already_fixed',- label: 'Already fixed',- snoozesInsteadOfDismiss: true,- },- {- value: 'report_unclear',- label: 'Report is unclear to me',- },- {- value: 'analysis_wrong',- label: "Agent's analysis is wrong",- },- {- value: 'wontfix_intentional',- label: "Won't fix - intentional behavior",- },- {- value: 'wontfix_irrelevant',- label: "Won't fix - issue is real but insignificant",- },+ { value: 'already_fixed', label: 'Already fixed' },+ { value: 'report_unclear', label: 'Report is unclear to me' },+ { value: 'analysis_wrong', label: "Agent's analysis is wrong" },+ { value: 'wontfix_intentional', label: "Won't fix - intentional behavior" },+ { value: 'wontfix_irrelevant', label: "Won't fix - issue is real but insignificant" },{ value: 'other', label: 'Something else…' },] as const-/** Persisted dismissal / suppress reason (values match {@link DISMISSAL_REASON_OPTIONS}). */+/**+ * Reasons offered when a person resolves a report. `already_fixed` is also a dismiss reason on+ * purpose: as a dismissal it tells the agent the report was stale when filed, and as a resolve it+ * records the report as done. The person picks by which of those they want.+ */+export const RESOLVE_REASON_OPTIONS = [+ { value: 'fixed_outside_posthog', label: 'Fixed outside PostHog' },+ { value: 'pr_merged', label: 'PR was merged' },+ { value: 'already_fixed', label: 'Was already fixed before this report' },+ { value: 'other', label: 'Something else…' },+] as const++/** Persisted dismiss reason (values match {@link DISMISSAL_REASON_OPTIONS}). */export type DismissalReasonValue = (typeof DISMISSAL_REASON_OPTIONS)[number]['value']-// Reason codes persisted by flows outside the dismiss dialog (never user-selectable there), so the-// dismissal chip still renders a label instead of the raw code. `refunded` is written by the PR-// refund action, which archives the report as part of the refund.-const EXTRA_DISMISSAL_REASON_LABELS: Record<string, string> = {- refunded: 'Refunded',+/** Persisted resolve reason (values match {@link RESOLVE_REASON_OPTIONS}). */+export type ResolveReasonValue = (typeof RESOLVE_REASON_OPTIONS)[number]['value']++/**+ * Whether a persisted reason describes a resolve rather than a dismissal. A resolved row only shows+ * a reason chip for these: a report that was dismissed, restored, then resolved by a merged PR keeps+ * its old dismiss reason, and showing that on finished work would mislabel it.+ */+export function isResolveReason(value: string | null | undefined): boolean {+ return value === 'fixed_outside_posthog' || value === 'pr_merged' || value === 'already_fixed'}-/** Whether the given reason snoozes the report (temporarily) instead of permanently dismissing it. */-export function isDismissalReasonSnooze(value: DismissalReasonValue): boolean {- const option = DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)- return option != null && 'snoozesInsteadOfDismiss' in option && option.snoozesInsteadOfDismiss === true+// Reason codes persisted by flows outside the two dialogs (never user-selectable there), so the+// reason chip still renders a label instead of the raw code. `refunded` is written by the PR+// refund action, which dismisses the report as part of the refund.+const EXTRA_DISMISSAL_REASON_LABELS: Record<string, string> = {+ refunded: 'Refunded',}-/** Human label for a persisted dismissal reason code, or the raw code if it's not a known option. */+/** Human label for a persisted reason code, or the raw code if it's not a known option. */export function dismissalReasonLabel(value: string | null | undefined): string | null {if (!value) {return null}return (- DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)?.label ?? EXTRA_DISMISSAL_REASON_LABELS[value] ?? value+ DISMISSAL_REASON_OPTIONS.find((o) => o.value === value)?.label ??+ RESOLVE_REASON_OPTIONS.find((o) => o.value === value)?.label ??+ EXTRA_DISMISSAL_REASON_LABELS[value] ??+ value)}diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 8cb72ad859f0..d54cf3658b35 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -121,11 +121,11 @@ tools:for clearing, snoozing, or resolving a batch of inbox reports without one request per report. Pass `ids`(1–100 report ids) and a `state` ('resolved' when the requested work is done, 'suppressed' to dismiss,'potential' to snooze/restore); the optional `dismissal_reason` (same canonical codes as the single-report- tool), `dismissal_note`, and `snooze_for` apply to every id. Each id is processed independently, so the- whole call returns 200 even on partial failure: inspect `results` (one entry per id, in request order) and- the `transitioned_count` / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose- transition isn't allowed from its current status comes back as `skipped` (the single-report 409) while the- rest still go through.+ tool), `dismissal_note`, and `snooze_for` apply to every id. Dismissing or resolving closes each report's+ open implementation PR, if it has one. Each id is processed independently, so the whole call returns 200+ even on partial failure: inspect `results` (one entry per id, in request order) and the `transitioned_count`+ / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose transition isn't allowed from+ its current status comes back as `skipped` (the single-report 409) while the rest still go through.inbox-reports-list:operation: signals_reports_listenabled: true@@ -235,16 +235,18 @@ tools:been done (e.g. you fixed the issue it describes), 'suppressed' to dismiss the report from the inbox (theuser has reviewed it and decided no action is needed), or 'potential' to snooze/restore it back into thepipeline for later review. Resolving is only allowed from a researched status (ready or pending_input) or a- suppressed report — other statuses return 409. Optionally include a `dismissal_reason` — a canonical code- from the inbox UI (`already_fixed`, `report_unclear`, `analysis_wrong`, `wontfix_intentional`,- `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw string; on a 'resolved'- transition it records why it was resolved. When the requested work is done, prefer state='resolved' over- `already_fixed`+snooze — reserve `already_fixed` with state='potential' for "fixed by something else / might- recur" cases, so the report reappears if the issue comes back. Use `other` plus a `dismissal_note`- (free-form text, up to 4000 chars) for anything that doesn't fit a code. Both are persisted as a DISMISSAL- artefact on the report so the rationale survives later transitions. Returns 409 if the transition is not- allowed from the report's current status. To transition several reports at once, use- `inbox-reports-bulk-set-state` instead of calling this per report.+ suppressed report — other statuses return 409. Dismissing or resolving closes the report's open+ implementation PR, if it has one; a resolved report never reopens, and a recurrence starts a fresh report+ linked to it. Optionally include a `dismissal_reason` — a canonical code from the inbox UI+ (`fixed_outside_posthog`, `pr_merged`, `already_fixed`, `report_unclear`, `analysis_wrong`,+ `wontfix_intentional`, `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw+ string. With state='resolved' use `fixed_outside_posthog` when the fix landed without a pull request,+ `pr_merged` when a pull request with the fix was merged but did not resolve the report on its own, or+ `already_fixed` when it was fixed before the report was filed; the other codes describe a dismissal. Use+ `other` plus a `dismissal_note` (free-form text, up to 4000 chars) for anything that doesn't fit a code.+ Both are persisted as a DISMISSAL artefact on the report so the rationale survives later transitions.+ Returns 409 if the transition is not allowed from the report's current status. To transition several reports+ at once, use `inbox-reports-bulk-set-state` instead of calling this per report.inbox-reports-update:operation: signals_reports_partial_updateenabled: truediff --git a/products/signals/skills/inbox-exploration/SKILL.md b/products/signals/skills/inbox-exploration/SKILL.mdindex c41029de5889..0bece7ec6abf 100644--- a/products/signals/skills/inbox-exploration/SKILL.md+++ b/products/signals/skills/inbox-exploration/SKILL.md@@ -367,14 +367,18 @@ inbox-reports-set-state`suppressed` report that held one of those when archived; anything else returns `409`. **Onlyresolve work that has actually landed.** A fix shipping as a PR resolves itself on merge (see_Step 4_); resolve by hand only where the webhook can never reach — a skill-body edit, a config- change, a `NO_REPO` report. Don't use `already_fixed` + `state: "potential"` when _you_ did the- fixing: that pairing means "fixed by something else, might recur", so the report comes back.+ change, a `NO_REPO` report. Record `dismissal_reason: "fixed_outside_posthog"` for that (the fix+ landed without a pull request); use `pr_merged` when a pull request with the fix was merged but+ did not resolve the report on its own; reserve `already_fixed` for an issue fixed before the+ report was filed. Don't use `already_fixed` + `state: "potential"` when _you_ did the fixing:+ that pairing means "fixed by something else, might recur", so the report comes back.- `state: "suppressed"` dismisses the report from the inbox; `state: "potential"` snoozes it backinto the pipeline. When snoozing, `snooze_for: <N>` holds it until it accumulates N more signals.-- `dismissal_reason` must be one of six server-validated canonical codes — `already_fixed`,- `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`, `other` — an- unlisted value returns `400`. Reach for `other` plus a `dismissal_note` for anything that doesn't- fit a specific code. `dismissal_note` is free-form (≤ 4000 chars). Both persist as a DISMISSAL+- `dismissal_reason` must be one of eight server-validated canonical codes — `already_fixed`,+ `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`,+ `fixed_outside_posthog`, `pr_merged`, `other` — an unlisted value returns `400`. Reach for `other` plus a+ `dismissal_note` for anything that doesn't fit a specific code. `dismissal_note` is free-form+ (≤ 4000 chars). Both persist as a DISMISSALartefact, so the rationale survives later transitions — **always include them**, on a resolve too,so a future reader knows _why_.- On a dismiss, snooze, or restore, the `dismissal_note` is also forwarded as a steering note to thediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex bf4bec7285cb..44a1f3d8c67c 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -5445,7 +5445,7 @@}},"inbox-reports-bulk-set-state": {- "description": "Transition many signal reports to the same state in one call — the bulk form of `inbox-reports-set-state`, for clearing, snoozing, or resolving a batch of inbox reports without one request per report. Pass `ids` (1–100 report ids) and a `state` ('resolved' when the requested work is done, 'suppressed' to dismiss, 'potential' to snooze/restore); the optional `dismissal_reason` (same canonical codes as the single-report tool), `dismissal_note`, and `snooze_for` apply to every id. Each id is processed independently, so the whole call returns 200 even on partial failure: inspect `results` (one entry per id, in request order) and the `transitioned_count` / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose transition isn't allowed from its current status comes back as `skipped` (the single-report 409) while the rest still go through.",+ "description": "Transition many signal reports to the same state in one call — the bulk form of `inbox-reports-set-state`, for clearing, snoozing, or resolving a batch of inbox reports without one request per report. Pass `ids` (1–100 report ids) and a `state` ('resolved' when the requested work is done, 'suppressed' to dismiss, 'potential' to snooze/restore); the optional `dismissal_reason` (same canonical codes as the single-report tool), `dismissal_note`, and `snooze_for` apply to every id. Dismissing or resolving closes each report's open implementation PR, if it has one. Each id is processed independently, so the whole call returns 200 even on partial failure: inspect `results` (one entry per id, in request order) and the `transitioned_count` / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose transition isn't allowed from its current status comes back as `skipped` (the single-report 409) while the rest still go through.","category": "Signals","feature": "signals","summary": "Dismiss or snooze signal reports in bulk",@@ -5487,7 +5487,7 @@}},"inbox-reports-set-state": {- "description": "Transition a single signal report to a new state. Use 'resolved' when the work this report asked for has been done (e.g. you fixed the issue it describes), 'suppressed' to dismiss the report from the inbox (the user has reviewed it and decided no action is needed), or 'potential' to snooze/restore it back into the pipeline for later review. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report — other statuses return 409. Optionally include a `dismissal_reason` — a canonical code from the inbox UI (`already_fixed`, `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw string; on a 'resolved' transition it records why it was resolved. When the requested work is done, prefer state='resolved' over `already_fixed`+snooze — reserve `already_fixed` with state='potential' for \"fixed by something else / might recur\" cases, so the report reappears if the issue comes back. Use `other` plus a `dismissal_note` (free-form text, up to 4000 chars) for anything that doesn't fit a code. Both are persisted as a DISMISSAL artefact on the report so the rationale survives later transitions. Returns 409 if the transition is not allowed from the report's current status. To transition several reports at once, use `inbox-reports-bulk-set-state` instead of calling this per report.",+ "description": "Transition a single signal report to a new state. Use 'resolved' when the work this report asked for has been done (e.g. you fixed the issue it describes), 'suppressed' to dismiss the report from the inbox (the user has reviewed it and decided no action is needed), or 'potential' to snooze/restore it back into the pipeline for later review. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report — other statuses return 409. Dismissing or resolving closes the report's open implementation PR, if it has one; a resolved report never reopens, and a recurrence starts a fresh report linked to it. Optionally include a `dismissal_reason` — a canonical code from the inbox UI (`fixed_outside_posthog`, `pr_merged`, `already_fixed`, `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw string. With state='resolved' use `fixed_outside_posthog` when the fix landed without a pull request, `pr_merged` when a pull request with the fix was merged but did not resolve the report on its own, or `already_fixed` when it was fixed before the report was filed; the other codes describe a dismissal. Use `other` plus a `dismissal_note` (free-form text, up to 4000 chars) for anything that doesn't fit a code. Both are persisted as a DISMISSAL artefact on the report so the rationale survives later transitions. Returns 409 if the transition is not allowed from the report's current status. To transition several reports at once, use `inbox-reports-bulk-set-state` instead of calling this per report.","category": "Signals","feature": "signals","summary": "Dismiss or snooze a signal report",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex e6b0283a4833..73bdbae16251 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -5642,7 +5642,7 @@}},"inbox-reports-bulk-set-state": {- "description": "Transition many signal reports to the same state in one call — the bulk form of `inbox-reports-set-state`, for clearing, snoozing, or resolving a batch of inbox reports without one request per report. Pass `ids` (1–100 report ids) and a `state` ('resolved' when the requested work is done, 'suppressed' to dismiss, 'potential' to snooze/restore); the optional `dismissal_reason` (same canonical codes as the single-report tool), `dismissal_note`, and `snooze_for` apply to every id. Each id is processed independently, so the whole call returns 200 even on partial failure: inspect `results` (one entry per id, in request order) and the `transitioned_count` / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose transition isn't allowed from its current status comes back as `skipped` (the single-report 409) while the rest still go through.",+ "description": "Transition many signal reports to the same state in one call — the bulk form of `inbox-reports-set-state`, for clearing, snoozing, or resolving a batch of inbox reports without one request per report. Pass `ids` (1–100 report ids) and a `state` ('resolved' when the requested work is done, 'suppressed' to dismiss, 'potential' to snooze/restore); the optional `dismissal_reason` (same canonical codes as the single-report tool), `dismissal_note`, and `snooze_for` apply to every id. Dismissing or resolving closes each report's open implementation PR, if it has one. Each id is processed independently, so the whole call returns 200 even on partial failure: inspect `results` (one entry per id, in request order) and the `transitioned_count` / `skipped_count` / `failed_count` / `not_found_count` summary. An id whose transition isn't allowed from its current status comes back as `skipped` (the single-report 409) while the rest still go through.","category": "Signals","feature": "signals","summary": "Dismiss or snooze signal reports in bulk",@@ -5684,7 +5684,7 @@}},"inbox-reports-set-state": {- "description": "Transition a single signal report to a new state. Use 'resolved' when the work this report asked for has been done (e.g. you fixed the issue it describes), 'suppressed' to dismiss the report from the inbox (the user has reviewed it and decided no action is needed), or 'potential' to snooze/restore it back into the pipeline for later review. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report — other statuses return 409. Optionally include a `dismissal_reason` — a canonical code from the inbox UI (`already_fixed`, `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw string; on a 'resolved' transition it records why it was resolved. When the requested work is done, prefer state='resolved' over `already_fixed`+snooze — reserve `already_fixed` with state='potential' for \"fixed by something else / might recur\" cases, so the report reappears if the issue comes back. Use `other` plus a `dismissal_note` (free-form text, up to 4000 chars) for anything that doesn't fit a code. Both are persisted as a DISMISSAL artefact on the report so the rationale survives later transitions. Returns 409 if the transition is not allowed from the report's current status. To transition several reports at once, use `inbox-reports-bulk-set-state` instead of calling this per report.",+ "description": "Transition a single signal report to a new state. Use 'resolved' when the work this report asked for has been done (e.g. you fixed the issue it describes), 'suppressed' to dismiss the report from the inbox (the user has reviewed it and decided no action is needed), or 'potential' to snooze/restore it back into the pipeline for later review. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report — other statuses return 409. Dismissing or resolving closes the report's open implementation PR, if it has one; a resolved report never reopens, and a recurrence starts a fresh report linked to it. Optionally include a `dismissal_reason` — a canonical code from the inbox UI (`fixed_outside_posthog`, `pr_merged`, `already_fixed`, `report_unclear`, `analysis_wrong`, `wontfix_intentional`, `wontfix_irrelevant`, `other`), so it renders as a labelled chip rather than a raw string. With state='resolved' use `fixed_outside_posthog` when the fix landed without a pull request, `pr_merged` when a pull request with the fix was merged but did not resolve the report on its own, or `already_fixed` when it was fixed before the report was filed; the other codes describe a dismissal. Use `other` plus a `dismissal_note` (free-form text, up to 4000 chars) for anything that doesn't fit a code. Both are persisted as a DISMISSAL artefact on the report so the rationale survives later transitions. Returns 409 if the transition is not allowed from the report's current status. To transition several reports at once, use `inbox-reports-bulk-set-state` instead of calling this per report.","category": "Signals","feature": "signals","summary": "Dismiss or snooze a signal report",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex d7e922981ede..99d272594a3c 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -28815,6 +28815,8 @@ export namespace Schemas {* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else…*/export type DismissalReasonEnum = typeof DismissalReasonEnum[keyof typeof DismissalReasonEnum];@@ -28826,6 +28828,8 @@ export namespace Schemas {AnalysisWrong: 'analysis_wrong',WontfixIntentional: 'wontfix_intentional',WontfixIrrelevant: 'wontfix_irrelevant',+ FixedOutsidePosthog: 'fixed_outside_posthog',+ PrMerged: 'pr_merged',Other: 'other',} as const;@@ -76663,19 +76667,21 @@ export namespace Schemas {} as const;export interface SignalReportBulkStateRequest {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.** * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved */state: SignalReportStateEnum;- /** Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for "fixed by something else / might recur" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else… */dismissal_reason?: DismissalReasonEnum;/**@@ -76807,19 +76813,21 @@ export namespace Schemas {}export interface SignalReportStateRequest {- /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).+ /** Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.** * `suppressed` - suppressed* * `potential` - potential* * `resolved` - resolved */state: SignalReportStateEnum;- /** Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for "fixed by something else / might recur" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.+ /** Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.** * `already_fixed` - Already fixed* * `report_unclear` - Report is unclear to me* * `analysis_wrong` - Agent's analysis is wrong* * `wontfix_intentional` - Won't fix - intentional behavior* * `wontfix_irrelevant` - Won't fix - issue is real but insignificant+ * * `fixed_outside_posthog` - Fixed outside PostHog+ * * `pr_merged` - PR was merged* * `other` - Something else… */dismissal_reason?: DismissalReasonEnum;/**diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex c0b1e755c4c5..e124c48ae4d5 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -180,7 +180,7 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({.enum(['suppressed', 'potential', 'resolved']).describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved').describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"),dismissal_reason: zod.enum([@@ -189,14 +189,16 @@ export const SignalsReportsStateCreateBody = /* @__PURE__ */ zod.object({'analysis_wrong','wontfix_intentional','wontfix_irrelevant',+ 'fixed_outside_posthog',+ 'pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason\/note records why). Reserve 'already_fixed' with state='potential' (snooze\/restore) for \"fixed by something else \/ might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_\*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()@@ -371,7 +373,7 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({.enum(['suppressed', 'potential', 'resolved']).describe('\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved').describe(- "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"+ "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze\/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n\* `suppressed` - suppressed\n\* `potential` - potential\n\* `resolved` - resolved"),dismissal_reason: zod.enum([@@ -380,14 +382,16 @@ export const SignalsReportsBulkStateCreateBody = /* @__PURE__ */ zod.object({'analysis_wrong','wontfix_intentional','wontfix_irrelevant',+ 'fixed_outside_posthog',+ 'pr_merged','other',]).describe(- "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…").optional().describe(- "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason\/note records why). Reserve 'already_fixed' with state='potential' (snooze\/restore) for \"fixed by something else \/ might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `other` - Something else…"+ "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_\*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n\* `already_fixed` - Already fixed\n\* `report_unclear` - Report is unclear to me\n\* `analysis_wrong` - Agent's analysis is wrong\n\* `wontfix_intentional` - Won't fix - intentional behavior\n\* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n\* `fixed_outside_posthog` - Fixed outside PostHog\n\* `pr_merged` - PR was merged\n\* `other` - Something else…"),dismissal_note: zod.string()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.jsonindex 3b1ab0c9cbc2..65e59d41b117 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-bulk-set-state.json@@ -7,13 +7,15 @@"type": "string"},"dismissal_reason": {- "description": "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for \"fixed by something else / might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n* `other` - Something else…",+ "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `pr_merged` - PR was merged\n* `other` - Something else…","enum": ["already_fixed","report_unclear","analysis_wrong","wontfix_intentional","wontfix_irrelevant",+ "fixed_outside_posthog",+ "pr_merged","other"],"type": "string"@@ -33,7 +35,7 @@"type": "number"},"state": {- "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved",+ "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved","enum": ["suppressed", "potential", "resolved"],"type": "string"}diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.jsonindex 16fe5f793c8b..75a33f67db43 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-set-state.json@@ -7,13 +7,15 @@"type": "string"},"dismissal_reason": {- "description": "Optional canonical reason code for the dismissal. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' (the reason/note records why). Reserve 'already_fixed' with state='potential' (snooze/restore) for \"fixed by something else / might recur\" cases, so the report reappears if the issue comes back. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n* `other` - Something else…",+ "description": "Optional canonical reason code recorded with the transition. Must be one of: already_fixed, report_unclear, analysis_wrong, wontfix_intentional, wontfix_irrelevant, fixed_outside_posthog, pr_merged, other — these match the inbox UI so the rationale renders as a labelled chip rather than a raw code. When the work this report asked for is done, the honest transition is state='resolved' with 'fixed_outside_posthog' (the fix landed without a pull request), 'pr_merged' (a pull request with the fix was merged but did not resolve the report on its own), or 'already_fixed' (it was fixed before the report was filed). The dismissal codes (report_unclear, analysis_wrong, wontfix_*) go with state='suppressed'. Use 'other' together with a dismissal_note for anything that doesn't fit a code.\n\n* `already_fixed` - Already fixed\n* `report_unclear` - Report is unclear to me\n* `analysis_wrong` - Agent's analysis is wrong\n* `wontfix_intentional` - Won't fix - intentional behavior\n* `wontfix_irrelevant` - Won't fix - issue is real but insignificant\n* `fixed_outside_posthog` - Fixed outside PostHog\n* `pr_merged` - PR was merged\n* `other` - Something else…","enum": ["already_fixed","report_unclear","analysis_wrong","wontfix_intentional","wontfix_irrelevant",+ "fixed_outside_posthog",+ "pr_merged","other"],"type": "string"@@ -29,7 +31,7 @@"type": "number"},"state": {- "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk).\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved",+ "description": "Target state for the report. Use 'suppressed' to dismiss the report from the inbox, 'potential' to snooze/reopen it for later review, or 'resolved' when the work this report asked for has been done. Resolving is only allowed from a researched status (ready or pending_input) or a suppressed report; other statuses return 409 (skipped in bulk). Dismissing or resolving closes the report's open implementation PR, if it has one.\n\n* `suppressed` - suppressed\n* `potential` - potential\n* `resolved` - resolved","enum": ["suppressed", "potential", "resolved"],"type": "string"}