Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(signals): show claims in inbox list and add claimed-by-you scope (#123700)

Dylan Martin28a4896b51e0
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 613f73be8802..fb4421c2e00a 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -11793,9 +11793,9 @@ snapshots:
scenes-app-inbox-agent-steering--empty--light:
hash: v1.k794b7964.8adf1aa893baffeccf09c959ceb43997a3d0dd7b802f915f683721bb3178811c.yiCitLDCxycb1PBAgQTZ4xqjtSr02cPmmNj0VOb8bu8
scenes-app-inbox-badges--all-badges--dark:
- hash: v1.k794b7964.af6738a012eb72f4b04fd8cf8b4d261890dbd7e648ccb07faeb60bdcccafda08.EsSExwgbanifoakADPew_MY6G2Rc-EXXw-8tw5XSai4
+ hash: v1.k794b7964.c6bac996748791bbd88c8abc72d44e9172769986297ab0ac48fd23ec9edcc5b2.092bC5ezJqGKGs9AZe67qgtt9PQKNSYVgzXfH2iKrJg
scenes-app-inbox-badges--all-badges--light:
- hash: v1.k794b7964.d061576c8c9fc51bf45a3634c11e927d69e7e2735283cf0c80d33b74fc6dbbdc._NV0FtnOe4QLvFAhZxiQsA3pmnSEkZmNTgd5U-gSyl4
+ hash: v1.k794b7964.58da4d3170f8e7795f0e7c976674e55efad66d852d07d5b9fcdb01afcfc17891.H6sNsGilEijnYs7rdTtGX8wC3jL4D29WyUBvImXTFUs
scenes-app-inbox-cards--agent-run-cards--dark:
hash: v1.k794b7964.7cc4dbc1b4a83c8bf268f09c3d00e8b7603c512cdd0c3cc0d75f4b981e5dc5ab.wTpmY_L9kXga6yhoZsATY70EN3UhqZAs-YdxGBCZBWQ
scenes-app-inbox-cards--agent-run-cards--light:
@@ -12960,14 +12960,22 @@ snapshots:
hash: v1.k794b7964.f9a83c327228b9dc366404a24fe1f88a4608f4694c43cdf01de771b1ac547172.CFV0llmyOs0ZWBe7Uw-OokP5jVMOJ6SZjH80RD08vSM
scenes-app-inbox-tabs--reports--light:
hash: v1.k794b7964.09631597a035ed2189054412354d31cd22be3eec9bb0f561418068ea3ef9c214.EXw1pHmTZK_RjVclsYo_Kxb0JqyvHrvFgvkQAzayXcM
+ scenes-app-inbox-tabs--reports-claimed-by-you--dark:
+ hash: v1.k794b7964.1070834764fdad5a3d888541deb8b0c72fac85a3836eb21f4a62446bc7c45a22.DvVXNF9vqwD76ZaD-2_kHjXlyTqb1snRqwB8AOSosGY
+ scenes-app-inbox-tabs--reports-claimed-by-you--light:
+ hash: v1.k794b7964.95bf3928b8fa23267ce0bb0e8018ad38d913ecd0a6f4f5b67e09fdb3bd4435f2.WQz4vOt5sfNaYpjjP83G9dHpxtvfyckM09VXeKJHY64
scenes-app-inbox-tabs--reports-empty--dark:
- hash: v1.k794b7964.a4766b945dbac1ec8fc6d4dd000b02c42912ca216f9f8e6b16cad697bd8e92a8.w39hYf6soNmmsPVoiutqVtA86Xx00ECeouUh022ElgE
+ hash: v1.k794b7964.dc29c2f2e427a085e6638ef993c88dcc03a504fdb24167b483fff97553bd46ed.ty7BrQvUhYyHSMZKZjwRJamVmkH7NNaUMDBbB-wLDIg
scenes-app-inbox-tabs--reports-empty--light:
- hash: v1.k794b7964.08f847fa4664de2be9a4e1942aec7a8c7444588bc02568f23d930abf19fc35a4.JadKDYvIFMx6zo9ddxk_VSix7S9GSXHtDow1E6yXVQg
+ hash: v1.k794b7964.de36cd16144fd835268ab3f6c3aa5894d7b60ff2b9ff2c6b416369070fb1f24d.20awEOZWTST7v9gjqIv9fHfT4w80_baLe7_Mw5Bk8Qs
scenes-app-inbox-tabs--reports-state-filtered--dark:
hash: v1.k794b7964.b3675efc6ab575a71d6dbfd070ef7ee5c0cfaaed90d859341fd1ecd20032e276.yZjyF1WUMajJfhKzXXM-DjLjrsM4XZBk-1ftGYV4Do0
scenes-app-inbox-tabs--reports-state-filtered--light:
hash: v1.k794b7964.cb670e03a25ac8030f2f2d4d9d41cbbd8e26b60fbcae8ea96e10e58d0a5eddad.31zd7o2K_JZ3CehR-Gl0RnbvrXTP7tVtnBtTdscMG5U
+ scenes-app-inbox-tabs--reports-with-claims--dark:
+ hash: v1.k794b7964.8739ea679919c4d6a2c09bd357e89614fe2252af85a9025bb56b523a770ad515.YaLcy41I469btJRSyINtIJbpbcnl7hydSuJxi7voOVY
+ scenes-app-inbox-tabs--reports-with-claims--light:
+ hash: v1.k794b7964.cf4edb8ac059037df5005e5bcca04f215e126823ce37f45e5fd64d940c4c2492.-voqOgPliDlvuLkVAamILi4hlybtZdbKJ_5rmP-u1IY
scenes-app-inbox-tabs--runs--dark:
hash: v1.k794b7964.b0eb8ed605bd36103e79e0a60b214bb3923082a8a3e942619b209e2e63c4c27b.tc-_hXddEA1-okpf16Of3a1wM9gWn-D4ZW1_LLaPKq4
scenes-app-inbox-tabs--runs--light:
diff --git a/frontend/src/scenes/project-homepage/today/todayNextStep.test.ts b/frontend/src/scenes/project-homepage/today/todayNextStep.test.ts
index 2d45341d97a5..308850b8d4d2 100644
--- a/frontend/src/scenes/project-homepage/today/todayNextStep.test.ts
+++ b/frontend/src/scenes/project-homepage/today/todayNextStep.test.ts
@@ -13,6 +13,7 @@ const CLAIMED_BY_TASK = makeReport({
user: null,
agent: null,
claim_id: 'c1',
+ responsible_user: null,
},
})
diff --git a/products/signals/backend/report_claims.py b/products/signals/backend/report_claims.py
index 86863366215f..c00ed954e713 100644
--- a/products/signals/backend/report_claims.py
+++ b/products/signals/backend/report_claims.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+from collections.abc import Iterable
from datetime import datetime
from uuid import UUID
@@ -97,6 +98,41 @@ def responsible_user(claim: ReportClaim) -> User | None:
return User.objects.filter(id=tasks[0].created_by_id).first()
+def responsible_users(claims: Iterable[ReportClaim]) -> dict[UUID, User]:
+ """`responsible_user` for many claims in a fixed number of queries, keyed by claim id."""
+ claims = list(claims)
+ result = {claim.claim_id: claim.actor_user for claim in claims if claim.actor_user is not None}
+ task_claims = [claim for claim in claims if claim.actor_user is None and claim.actor_task_id is not None]
+ if not task_claims:
+ return result
+ creator_by_task = tasks_facade.get_task_creator_ids(
+ [claim.actor_task_id for claim in task_claims if claim.actor_task_id is not None],
+ {claim.team_id for claim in task_claims},
+ )
+ users = User.objects.in_bulk(set(creator_by_task.values()))
+ for claim in task_claims:
+ creator_id = creator_by_task.get(str(claim.actor_task_id))
+ if creator_id in users:
+ result[claim.claim_id] = users[creator_id]
+ return result
+
+
+def reports_claimed_for_user(*, team_id: int, user_id: int) -> Q:
+ """Reports whose active claim the user answers for: their own, their external agents', and their tasks'."""
+ claims = active_claims(team_id=team_id)
+ legacy = legacy_claims(team_id=team_id)
+ claimed_task_ids = [
+ *claims.filter(created_by__isnull=True, task_id__isnull=False).values_list("task_id", flat=True),
+ *legacy.filter(actor_user__isnull=True, actor_task_id__isnull=False).values_list("actor_task_id", flat=True),
+ ]
+ own_task_ids = tasks_facade.filter_task_ids_created_by(
+ [task_id for task_id in claimed_task_ids if task_id is not None], team_id=team_id, user_id=user_id
+ )
+ own_claims = claims.filter(Q(created_by_id=user_id) | Q(created_by__isnull=True, task_id__in=own_task_ids))
+ own_legacy = legacy.filter(Q(actor_user_id=user_id) | Q(actor_user__isnull=True, actor_task_id__in=own_task_ids))
+ return Q(id__in=own_claims.values("report_id")) | Q(id__in=own_legacy.values("report_id"))
+
+
def reports_with_active_claim(*, team_id: int, actor: ArtefactAttribution | None = None) -> Q:
claims = active_claims(team_id=team_id)
legacy = legacy_claims(team_id=team_id)
diff --git a/products/signals/backend/serializers.py b/products/signals/backend/serializers.py
index 95a335916e1d..222e914310e5 100644
--- a/products/signals/backend/serializers.py
+++ b/products/signals/backend/serializers.py
@@ -737,6 +737,13 @@ class SignalReportAssigneeSerializer(serializers.Serializer):
task_id = serializers.UUIDField(allow_null=True)
agent = serializers.CharField(allow_null=True)
claimed_at = serializers.DateTimeField(allow_null=True)
+ responsible_user = _UserSerializer(
+ allow_null=True,
+ help_text=(
+ "The person who answers for the claim: the user for a user claim, the user an MCP agent acts for, or "
+ "the user who started an internal task. Null when no person stands behind the claim."
+ ),
+ )
class SignalUserAutonomyConfigSerializer(serializers.ModelSerializer):
@@ -2100,6 +2107,7 @@ class SignalReportSerializer(serializers.ModelSerializer):
assignment = self._get_assignment(obj)
if assignment is None or not assignment.actor_kind:
return None
+ responsible = self._get_responsible_user(assignment)
return {
"claim_id": str(assignment.claim_id) if assignment.claim_id else None,
"kind": assignment.actor_kind,
@@ -2107,8 +2115,15 @@ class SignalReportSerializer(serializers.ModelSerializer):
"task_id": str(assignment.actor_task_id) if assignment.actor_task_id else None,
"agent": assignment.actor_agent,
"claimed_at": assignment.claimed_at,
+ "responsible_user": _UserSerializer(responsible).data if responsible else None,
}
+ def _get_responsible_user(self, claim: "ReportClaim") -> User | None:
+ from products.signals.backend.report_claims import responsible_user
+
+ users = self.context.get("claim_responsible_users_map")
+ return users.get(claim.claim_id) if users is not None else responsible_user(claim)
+
def _get_assignment(self, obj: SignalReport) -> "ReportClaim | None":
from products.signals.backend.report_claims import get_active_claim
diff --git a/products/signals/backend/test/test_signal_report_assignment_api.py b/products/signals/backend/test/test_signal_report_assignment_api.py
index 787389632855..aa9833c28523 100644
--- a/products/signals/backend/test/test_signal_report_assignment_api.py
+++ b/products/signals/backend/test/test_signal_report_assignment_api.py
@@ -14,6 +14,7 @@ from rest_framework import status
from posthog.egress.limiter.policies import Priority
from posthog.models.activity_logging.activity_log import ActivityLog
from posthog.models.team.team import Team
+from posthog.models.user import User
from products.signals.backend.implementation_pr import ImplementationPr, primary_pull_request
from products.signals.backend.models import (
@@ -26,7 +27,7 @@ from products.signals.backend.models import (
SignalReportPullRequest,
)
from products.signals.backend.report_assignments import update_assignments_for_pull_request
-from products.signals.backend.report_claims import get_active_claim
+from products.signals.backend.report_claims import get_active_claim, get_active_claims, responsible_users
from products.signals.backend.report_monitoring_attempts import complete_implementation
@@ -934,6 +935,52 @@ class TestSignalReportAssignmentAPI(APIBaseTest):
assert response.status_code == status.HTTP_200_OK
assert {row["id"] for row in response.json()["results"]} == {str(mine.id)}
+ def test_assignee_mine_matches_claims_by_the_user_their_agents_and_their_tasks(self):
+ Task = apps.get_model("tasks", "Task")
+ teammate = User.objects.create_and_join(self.organization, "[email protected]", None)
+ own_task = Task.objects.create(
+ team=self.team, created_by=self.user, title="Own task", origin_product=Task.OriginProduct.SIGNAL_REPORT
+ )
+ teammate_task = Task.objects.create(
+ team=self.team, created_by=teammate, title="Teammate task", origin_product=Task.OriginProduct.SIGNAL_REPORT
+ )
+ mine = [self._create_report(title=title) for title in ("By me", "By my agent", "By my task")]
+ theirs = [self._create_report(title=title) for title in ("By teammate", "By teammate task")]
+ for report, headers in [
+ (mine[0], {}),
+ (mine[1], self._agent_headers("codex")),
+ (mine[2], {"X-PostHog-Task-Id": str(own_task.id)}),
+ (theirs[1], {"X-PostHog-Task-Id": str(teammate_task.id)}),
+ ]:
+ assert self.client.post(self._claim_url(report), data={}, format="json", headers=headers).status_code == 200
+ self.client.force_login(teammate)
+ assert self.client.post(self._claim_url(theirs[0]), data={}, format="json").status_code == 200
+ self.client.force_login(self.user)
+
+ response = self.client.get(self._list_url(assignee="mine"))
+
+ assert response.status_code == status.HTTP_200_OK
+ rows = response.json()["results"]
+ assert {row["id"] for row in rows} == {str(report.id) for report in mine}
+ assert {row["assignee"]["responsible_user"]["id"] for row in rows} == {self.user.id}
+
+ def test_responsible_users_resolves_task_claims_in_fixed_queries(self):
+ Task = apps.get_model("tasks", "Task")
+ reports = [self._create_report(title=f"Task report {i}") for i in range(3)]
+ for report in reports:
+ task = Task.objects.create(
+ team=self.team, created_by=self.user, title="Task", origin_product=Task.OriginProduct.SIGNAL_REPORT
+ )
+ headers = {"X-PostHog-Task-Id": str(task.id)}
+ assert self.client.post(self._claim_url(report), data={}, format="json", headers=headers).status_code == 200
+ claims = get_active_claims(team_id=self.team.id, report_ids=[str(report.id) for report in reports])
+
+ with self.assertNumQueries(2):
+ users = responsible_users(claims.values())
+
+ assert len(users) == len(reports)
+ assert {user.id for user in users.values()} == {self.user.id}
+
def test_claimed_report_remains_in_default_actionable_list(self):
report = self._create_report()
self.client.post(self._claim_url(report), data={}, format="json")
diff --git a/products/signals/backend/views.py b/products/signals/backend/views.py
index 6883a87bc308..f7895f1eb94a 100644
--- a/products/signals/backend/views.py
+++ b/products/signals/backend/views.py
@@ -138,6 +138,7 @@ from products.signals.backend.free_trial import (
capture_signal_report_free_trial_paused,
)
from products.signals.backend.implementation_pr import (
+ ImplementationPr,
fetch_implementation_prs_for_reports,
implementation_pr_report_filter,
primary_pull_request,
@@ -182,10 +183,13 @@ from products.signals.backend.report_check_authoring import (
replace_metric_check,
)
from products.signals.backend.report_claims import (
+ ReportClaim,
actor_works_under_claim,
get_active_claim,
get_active_claims,
+ reports_claimed_for_user,
reports_with_active_claim,
+ responsible_users,
)
from products.signals.backend.report_content_gates import organization_report_monitoring_enabled
from products.signals.backend.report_generation.research import ActionabilityChoice
@@ -1718,8 +1722,14 @@ class SignalReportViewSet(
raw = self.request.query_params.get("assignee")
if raw is None or not raw.strip():
return queryset
- if raw.strip().lower() != "me":
- raise serializers.ValidationError({"assignee": "Invalid value. Allowed: me."})
+ value = raw.strip().lower()
+ if value == "mine":
+ user_id = self.request.user.id
+ if user_id is None: # unreachable behind authentication
+ raise exceptions.NotAuthenticated()
+ return queryset.filter(reports_claimed_for_user(team_id=self.team_id, user_id=user_id))
+ if value != "me":
+ raise serializers.ValidationError({"assignee": "Invalid value. Allowed: me, mine."})
actor = self._request_attribution()
return queryset.filter(reports_with_active_claim(team_id=self.team_id, actor=actor))
@@ -2295,6 +2305,22 @@ class SignalReportViewSet(
"billing_period_bounds": current_billing_period_bounds(self.organization),
}
+ @staticmethod
+ def _claim_and_pull_request_context(
+ report_ids: list[str],
+ pull_requests_map: dict[str, list[ImplementationPr]],
+ claims: dict[str, ReportClaim],
+ ) -> dict[str, object]:
+ implementation_pr_by_report = {rid: primary_pull_request(prs) for rid, prs in pull_requests_map.items()}
+ return {
+ "pull_requests_map": pull_requests_map,
+ "claims_map": dict.fromkeys(report_ids) | claims,
+ "claim_responsible_users_map": responsible_users(claims.values()),
+ "implementation_pr_url_map": {rid: pr.url for rid, pr in implementation_pr_by_report.items()},
+ "implementation_pr_state_map": {rid: pr.state for rid, pr in implementation_pr_by_report.items()},
+ "implementation_pr_merged_ids": {rid for rid, pr in implementation_pr_by_report.items() if pr.merged},
+ }
+
def _enriched_report_context(self, report: SignalReport) -> dict:
# Detail-view parity with list(): inject the source metadata map the serializer reads.
# This lookup is best-effort so a ClickHouse failure cannot hide the report.
@@ -2306,10 +2332,8 @@ class SignalReportViewSet(
signal_meta_map = {}
try:
pull_requests_map = fetch_implementation_prs_for_reports(report_ids, team_id=self.team_id)
- implementation_pr_by_report = {rid: primary_pull_request(prs) for rid, prs in pull_requests_map.items()}
except Exception:
logger.exception("signals.enriched_context.implementation_pr_failed", report_id=str(report.id))
- implementation_pr_by_report = {}
pull_requests_map = {}
try:
source_suggestion = current_source_suggestion(self.team, str(report.id))
@@ -2321,15 +2345,12 @@ class SignalReportViewSet(
except Exception:
logger.exception("signals.enriched_context.report_plan_failed", report_id=str(report.id))
plan = None
+ claims = get_active_claims(team_id=self.team_id, report_ids=report_ids)
return {
**self.get_serializer_context(),
"source_products_map": {rid: meta.source_products for rid, meta in signal_meta_map.items()},
"scout_names_map": {rid: meta.scout_name for rid, meta in signal_meta_map.items() if meta.scout_name},
- "pull_requests_map": pull_requests_map,
- "claims_map": dict.fromkeys(report_ids) | get_active_claims(team_id=self.team_id, report_ids=report_ids),
- "implementation_pr_url_map": {rid: pr.url for rid, pr in implementation_pr_by_report.items()},
- "implementation_pr_state_map": {rid: pr.state for rid, pr in implementation_pr_by_report.items()},
- "implementation_pr_merged_ids": {rid for rid, pr in implementation_pr_by_report.items() if pr.merged},
+ **self._claim_and_pull_request_context(report_ids, pull_requests_map, claims),
"source_suggestions_map": {str(report.id): source_suggestion},
"report_plans_map": {str(report.id): plan},
}
@@ -2745,8 +2766,12 @@ class SignalReportViewSet(
type=OpenApiTypes.STR,
location=OpenApiParameter.QUERY,
required=False,
- enum=["me"],
- description="Use 'me' to return reports claimed by the current user, task, or MCP agent.",
+ enum=["me", "mine"],
+ description=(
+ "'me' returns reports claimed by exactly the requesting actor: the user, the internal task, or "
+ "the MCP agent. 'mine' returns every report the requesting user answers for: their own claims, "
+ "claims by MCP agents acting for them, and claims by internal tasks they started."
+ ),
),
],
)
@@ -2889,10 +2914,8 @@ class SignalReportViewSet(
with tracer.start_as_current_span("signals.reports.list.fetch_implementation_prs"):
try:
pull_requests_map = fetch_implementation_prs_for_reports(report_ids, team_id=self.team_id)
- implementation_pr_by_report = {rid: primary_pull_request(prs) for rid, prs in pull_requests_map.items()}
except Exception:
logger.exception("signals.reports.list.implementation_pr_failed", report_count=len(report_ids))
- implementation_pr_by_report = {}
pull_requests_map = {}
# One grouped query for the whole page, in place of the per-row annotation the other
@@ -2913,15 +2936,12 @@ class SignalReportViewSet(
artefact_count=artefact_counts.get(str(report.id), 0),
channel_id=live_channel_ids.get(str(report.id)),
)
+ claims = get_active_claims(team_id=self.team_id, report_ids=report_ids)
context = {
**self.get_serializer_context(),
"source_products_map": {rid: meta.source_products for rid, meta in signal_meta_map.items()},
"scout_names_map": {rid: meta.scout_name for rid, meta in signal_meta_map.items() if meta.scout_name},
- "pull_requests_map": pull_requests_map,
- "claims_map": dict.fromkeys(report_ids) | get_active_claims(team_id=self.team_id, report_ids=report_ids),
- "implementation_pr_url_map": {rid: pr.url for rid, pr in implementation_pr_by_report.items()},
- "implementation_pr_state_map": {rid: pr.state for rid, pr in implementation_pr_by_report.items()},
- "implementation_pr_merged_ids": {rid for rid, pr in implementation_pr_by_report.items() if pr.merged},
+ **self._claim_and_pull_request_context(report_ids, pull_requests_map, claims),
"first_billable_pr_run_at_map": first_billable_pr_run_at_map,
"inbox_ranker": self._inbox_ranker,
}
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index 08c5e79dfe62..0d1ce76b909e 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -1924,6 +1924,8 @@ export interface SignalReportAssigneeApi {
agent: string | null
/** @nullable */
claimed_at: string | null
+ /** The person who answers for the claim: the user for a user claim, the user an MCP agent acts for, or the user who started an internal task. Null when no person stands behind the claim. */
+ responsible_user: _UserApi | null
}
/**
@@ -10349,7 +10351,7 @@ export type SignalsReportsListParams = {
*/
already_addressed?: boolean
/**
- * Use 'me' to return reports claimed by the current user, task, or MCP agent.
+ * 'me' returns reports claimed by exactly the requesting actor: the user, the internal task, or the MCP agent. 'mine' returns every report the requesting user answers for: their own claims, claims by MCP agents acting for them, and claims by internal tasks they started.
*/
assignee?: SignalsReportsListAssignee
/**
@@ -10475,6 +10477,7 @@ export type SignalsReportsListAssignee = (typeof SignalsReportsListAssignee)[key
export const SignalsReportsListAssignee = {
Me: 'me',
+ Mine: 'mine',
} as const
export type SignalsReportPrChecksParams = {
diff --git a/products/signals/frontend/inbox/__mocks__/inboxMocks.ts b/products/signals/frontend/inbox/__mocks__/inboxMocks.ts
index 71de6dbf3274..aa056737e931 100644
--- a/products/signals/frontend/inbox/__mocks__/inboxMocks.ts
+++ b/products/signals/frontend/inbox/__mocks__/inboxMocks.ts
@@ -3,8 +3,12 @@
// three tab types (reports / pull requests / runs), suggested-reviewer ("for
// you") reports, conventional-commit titles, and varying agent-run volume.
+import { MOCK_DEFAULT_USER } from 'lib/api.mock'
+
import { SignalNode } from 'scenes/debug/signals/types'
+import type { SignalReportAssigneeApi, _UserApi } from 'products/signals/frontend/generated/api.schemas'
+
import { SignalReport, SignalReportStatus, SignalSourceProduct } from '../types'
const BASE_DATE = '2026-06-10T12:00:00Z'
@@ -134,6 +138,42 @@ export const reportTabReports: SignalReport[] = [
// ── Pull requests tab ───────────────────────────────────────────────────────
+type ClaimUser = Pick<_UserApi, 'id' | 'uuid' | 'first_name' | 'email'>
+
+export function userClaim(user: ClaimUser): SignalReportAssigneeApi {
+ const person = { ...user, last_name: '' }
+ return {
+ claim_id: null,
+ kind: 'user',
+ user: person,
+ task_id: null,
+ agent: null,
+ claimed_at: BASE_DATE,
+ responsible_user: person,
+ }
+}
+
+export function agentClaim(user: ClaimUser, agent: string): SignalReportAssigneeApi {
+ return { ...userClaim(user), kind: 'agent', agent }
+}
+
+export const myClaim = userClaim(MOCK_DEFAULT_USER)
+export const myAgentClaim = agentClaim(MOCK_DEFAULT_USER, 'claude-code')
+export const teammateClaim = userClaim({
+ id: 2,
+ uuid: 'teammate-uuid',
+ first_name: 'Robin',
+ email: '[email protected]',
+})
+
+// The Reports tab rows with one claimed by the current user, one by their agent, and one by a teammate.
+const CLAIMS_BY_ROW: (SignalReportAssigneeApi | null)[] = [myClaim, teammateClaim, null, myAgentClaim]
+
+export const claimedReports: SignalReport[] = reportTabReports.map((report, index) => ({
+ ...report,
+ assignee: CLAIMS_BY_ROW[index] ?? null,
+}))
+
export const pullRequestReports: SignalReport[] = [
makeReport({
title: 'fix(invites): validate recipient payload before submit',
diff --git a/products/signals/frontend/inbox/components/badges/InboxBadges.stories.tsx b/products/signals/frontend/inbox/components/badges/InboxBadges.stories.tsx
index df5338a183e3..8291c9fe8ea7 100644
--- a/products/signals/frontend/inbox/components/badges/InboxBadges.stories.tsx
+++ b/products/signals/frontend/inbox/components/badges/InboxBadges.stories.tsx
@@ -1,7 +1,9 @@
import type { Meta, StoryObj } from '@storybook/react'
+import { myClaim, teammateClaim } from '../../__mocks__/inboxMocks'
import { SignalReportActionability, SignalReportPriority, SignalReportStatus } from '../../types'
import { AnimatedEllipsis } from './AnimatedEllipsis'
+import { ReportClaimTag } from './ReportClaimTag'
import { SignalReportActionabilityBadge } from './SignalReportActionabilityBadge'
import { SignalReportPriorityBadge } from './SignalReportPriorityBadge'
import { SignalReportStatusBadge } from './SignalReportStatusBadge'
@@ -49,6 +51,10 @@ export const AllBadges: Story = {
<SignalReportActionabilityBadge key={a} actionability={a} />
))}
</Row>
+ <Row label="Claim">
+ <ReportClaimTag report={{ assignee: myClaim }} />
+ <ReportClaimTag report={{ assignee: teammateClaim }} />
+ </Row>
<Row label="Working">
<span className="text-sm text-secondary">
Investigating
diff --git a/products/signals/frontend/inbox/components/badges/ReportClaimTag.tsx b/products/signals/frontend/inbox/components/badges/ReportClaimTag.tsx
new file mode 100644
index 000000000000..96b541154724
--- /dev/null
+++ b/products/signals/frontend/inbox/components/badges/ReportClaimTag.tsx
@@ -0,0 +1,54 @@
+import { useValues } from 'kea'
+
+import { LemonTag, ProfilePicture, Tooltip } from '@posthog/lemon-ui'
+
+import { fullNameOrEmail } from 'lib/utils/strings'
+import { userLogic } from 'scenes/userLogic'
+
+import type { SignalReport } from '../../types'
+
+function claimTooltip(kind: string, name: string | null): string {
+ if (kind === 'agent') {
+ return name ? `${name}'s agent is working on this` : 'Your agent is working on this'
+ }
+ if (kind === 'task') {
+ return name ? `A task ${name} started is working on this` : 'A task you started is working on this'
+ }
+ return name ? `${name} is working on this` : 'You claimed this report'
+}
+
+/**
+ * Marks a claimed report, so the list tells the user's own claims apart from a teammate's. A claim by
+ * an MCP agent or an internal task counts for the person who answers for it, and the tooltip says which.
+ */
+export function ReportClaimTag({ report }: { report: Pick<SignalReport, 'assignee'> }): JSX.Element | null {
+ const { user } = useValues(userLogic)
+ const assignee = report.assignee
+ const person = assignee?.responsible_user
+ if (!assignee || !person) {
+ return null
+ }
+ const isMine = !!user?.uuid && person.uuid === user.uuid
+ const name = fullNameOrEmail(person)
+
+ if (isMine) {
+ return (
+ <Tooltip title={claimTooltip(assignee.kind, null)}>
+ <LemonTag type="success" size="small" data-attr="inbox-report-card-claim-tag">
+ You're on it
+ </LemonTag>
+ </Tooltip>
+ )
+ }
+ return (
+ <Tooltip title={claimTooltip(assignee.kind, name)}>
+ <LemonTag
+ size="small"
+ icon={<ProfilePicture user={person} name={name} size="xs" />}
+ data-attr="inbox-report-card-claim-tag"
+ >
+ <span className="max-w-32 truncate">{person.first_name || name}</span>
+ </LemonTag>
+ </Tooltip>
+ )
+}
diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.tsx
index b953a9cd4533..21e42215d31c 100644
--- a/products/signals/frontend/inbox/components/cards/ReportCard.tsx
+++ b/products/signals/frontend/inbox/components/cards/ReportCard.tsx
@@ -24,6 +24,7 @@ import {
safeHttpUrl,
} from '../../utils/reportPresentation'
import { primaryReportPullRequest } from '../../utils/reportPullRequests'
+import { ReportClaimTag } from '../badges/ReportClaimTag'
import { SignalReportBillingBadge } from '../badges/SignalReportBillingBadge'
import { SignalReportPriorityBadge } from '../badges/SignalReportPriorityBadge'
import {
@@ -272,6 +273,7 @@ function ReportCardRaw({
</LemonTag>
</Tooltip>
)}
+ {!isDismissed && !isResolved && <ReportClaimTag report={report} />}
<SignalReportBillingBadge report={report} />
{rankingSortField && <ReportCardRankingTag report={report} sortField={rankingSortField} />}
{!showImpactColumn && (
diff --git a/products/signals/frontend/inbox/components/detail/InboxDetail.stories.tsx b/products/signals/frontend/inbox/components/detail/InboxDetail.stories.tsx
index 91de1997a6d0..1c0e1fd57aca 100644
--- a/products/signals/frontend/inbox/components/detail/InboxDetail.stories.tsx
+++ b/products/signals/frontend/inbox/components/detail/InboxDetail.stories.tsx
@@ -235,6 +235,7 @@ export const StatusBlock: Story = {
task_id: null,
agent: 'Build agent',
claimed_at: '2026-06-11T10:00:00Z',
+ responsible_user: null,
},
})
return (
@@ -278,6 +279,13 @@ export const ReportClaimedByTeammate: Story = {
task_id: null,
agent: null,
claimed_at: '2026-06-10T10:00:00Z',
+ responsible_user: {
+ id: 1,
+ uuid: 'u-1',
+ email: '[email protected]',
+ first_name: 'Octo',
+ last_name: 'Cat',
+ },
},
}}
/>
diff --git a/products/signals/frontend/inbox/components/detail/ReportStatusSection.test.tsx b/products/signals/frontend/inbox/components/detail/ReportStatusSection.test.tsx
index 1328a8bd1bc4..391b9da773d8 100644
--- a/products/signals/frontend/inbox/components/detail/ReportStatusSection.test.tsx
+++ b/products/signals/frontend/inbox/components/detail/ReportStatusSection.test.tsx
@@ -43,6 +43,7 @@ describe('ReportStatusSection', () => {
task_id: null,
agent: 'Build agent',
claimed_at: '2026-06-11T10:00:00Z',
+ responsible_user: null,
},
})
@@ -75,6 +76,7 @@ describe('ReportStatusSection', () => {
task_id: null,
agent: null,
claimed_at: '2026-06-11T10:00:00Z',
+ responsible_user: null,
},
})}
/>
diff --git a/products/signals/frontend/inbox/components/shell/InboxScopeFilter.tsx b/products/signals/frontend/inbox/components/shell/InboxScopeFilter.tsx
index bc65b1fe2443..1660b0440701 100644
--- a/products/signals/frontend/inbox/components/shell/InboxScopeFilter.tsx
+++ b/products/signals/frontend/inbox/components/shell/InboxScopeFilter.tsx
@@ -9,7 +9,7 @@ import type { UserType } from '~/types'
import { parseTeammateInboxScope, teammateInboxScope } from '../../inboxMembership'
import { type InboxReviewerOption, inboxFiltersLogic } from '../../logics/inboxFiltersLogic'
-import { INBOX_SCOPE_ENTIRE_PROJECT, INBOX_SCOPE_FOR_YOU, InboxScope } from '../../types'
+import { INBOX_SCOPE_CLAIMED_BY_YOU, INBOX_SCOPE_ENTIRE_PROJECT, INBOX_SCOPE_FOR_YOU, InboxScope } from '../../types'
function getReviewerOptions(
reviewers: InboxReviewerOption[],
@@ -37,8 +37,8 @@ function getReviewerOptions(
/**
* Single-dropdown reviewer scope for the flat Reports list: one trigger that names the current
- * scope and opens the shared people picker with "Entire project" and each teammate. Selecting
- * yourself uses the "For you" scope. A user with no reports suggested to them is
+ * scope and opens the shared people picker with "Entire project", "Claimed by you" and each teammate.
+ * Selecting yourself uses the "For you" scope. A user with no reports suggested to them is
* auto-switched to "Entire project" (see `shouldDefaultToEntireProject`). Scope is persisted via
* `inboxFiltersLogic`; teammates come from its shared `availableReviewers` loader.
*/
@@ -63,9 +63,11 @@ export function InboxScopeFilter(): JSX.Element {
const triggerLabel = isForYou
? 'For you'
- : selectedTeammateUuid
- ? (selectedTeammateLabel ?? cachedTeammateLabel ?? 'Teammate')
- : 'Entire project'
+ : scope === INBOX_SCOPE_CLAIMED_BY_YOU
+ ? 'Claimed by you'
+ : selectedTeammateUuid
+ ? (selectedTeammateLabel ?? cachedTeammateLabel ?? 'Teammate')
+ : 'Entire project'
const options = getReviewerOptions(reviewers, user)
@@ -85,6 +87,7 @@ export function InboxScopeFilter(): JSX.Element {
options={options}
optionsLoading={availableReviewersLoading}
onSearch={searchAvailableReviewers}
+ extraOptions={[{ label: 'Claimed by you', onClick: () => pick(INBOX_SCOPE_CLAIMED_BY_YOU) }]}
onChange={() => pick(INBOX_SCOPE_ENTIRE_PROJECT)}
onSelectOption={(uuid, label) =>
pick(uuid === user?.uuid ? INBOX_SCOPE_FOR_YOU : teammateInboxScope(uuid), label)
@@ -94,7 +97,7 @@ export function InboxScopeFilter(): JSX.Element {
<LemonButton
size="small"
type="secondary"
- tooltip="See the reports suggested to you, every report in the project, or a teammate's"
+ tooltip="See the reports suggested to you, the reports you claimed, every report in the project, or a teammate's"
// Name the active scope for assistive tech. Without this, LemonButton copies the
// string tooltip into aria-label, so a screen reader hears the help text and never
// the current scope.
diff --git a/products/signals/frontend/inbox/components/tabs/InboxTabs.stories.tsx b/products/signals/frontend/inbox/components/tabs/InboxTabs.stories.tsx
index ca0edbabc784..7eb98e35a482 100644
--- a/products/signals/frontend/inbox/components/tabs/InboxTabs.stories.tsx
+++ b/products/signals/frontend/inbox/components/tabs/InboxTabs.stories.tsx
@@ -1,3 +1,5 @@
+import { MOCK_USER_UUID } from 'lib/api.mock'
+
import type { Decorator, Meta, StoryObj } from '@storybook/react'
import { useMountedLogic } from 'kea'
import { router } from 'kea-router'
@@ -8,7 +10,7 @@ import { urls } from 'scenes/urls'
import { mswDecorator } from '~/mocks/browser'
-import { mockSourceMetadata, pullRequestReports, reportTabReports } from '../../__mocks__/inboxMocks'
+import { claimedReports, mockSourceMetadata, pullRequestReports, reportTabReports } from '../../__mocks__/inboxMocks'
import { inboxSceneLogic } from '../../inboxSceneLogic'
import { SignalReport, SignalRun } from '../../types'
import { ReportsTab } from './ReportsTab'
@@ -49,10 +51,14 @@ const SAMPLE_RUNS: SignalRun[] = [
function reportsListDecorator(reports: SignalReport[]): Decorator {
return mswDecorator({
get: {
- '/api/projects/:id/signals/reports': () => [
- 200,
- { results: reports, count: reports.length, next: null, previous: null },
- ],
+ // Mirrors the server's `assignee=mine` filter so the Claimed by you scope narrows the rows.
+ '/api/projects/:id/signals/reports': ({ request }) => {
+ const claimedByMe = new URL(request.url).searchParams.get('assignee') === 'mine'
+ const results = claimedByMe
+ ? reports.filter((report) => report.assignee?.responsible_user?.uuid === MOCK_USER_UUID)
+ : reports
+ return [200, { results, count: results.length, next: null, previous: null }]
+ },
'/api/projects/:id/signals/reports/available_reviewers': () => [200, []],
'/api/projects/:id/signals/scout/configs': () => [200, []],
},
@@ -103,6 +109,18 @@ export const ReportsStateFiltered: Story = {
render: () => <ReportsTabStory searchParams={{ state: 'monitoring' }} />,
}
+// Claim tags on the rows: the user's own claim, their agent's claim, a teammate's claim, and unclaimed reports.
+export const ReportsWithClaims: Story = {
+ decorators: [reportsListDecorator(claimedReports)],
+ render: () => <ReportsTabStory searchParams={{ scope: 'entire-project' }} />,
+}
+
+// The Claimed by you scope narrows the same rows to the claims of the user and their agents.
+export const ReportsClaimedByYou: Story = {
+ decorators: [reportsListDecorator(claimedReports)],
+ render: () => <ReportsTabStory searchParams={{ scope: 'claimed-by-you' }} />,
+}
+
// Nothing anywhere: the whole-list empty state.
export const ReportsEmpty: Story = {
decorators: [reportsListDecorator([])],
diff --git a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
index d07951c8d8b1..6e906d69591b 100644
--- a/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
+++ b/products/signals/frontend/inbox/components/tabs/ReportsTab.tsx
@@ -17,6 +17,7 @@ import { inboxSetupLogic } from '../../logics/inboxSetupLogic'
import { reportListLogic, sectionListLogicProps } from '../../logics/reportListLogic'
import {
INBOX_SCOPE_ENTIRE_PROJECT,
+ INBOX_SCOPE_CLAIMED_BY_YOU,
INBOX_SCOPE_FOR_YOU,
InboxReportSectionKey,
InboxScope,
@@ -196,6 +197,9 @@ function emptyListCopy(scope: InboxScope, narrowed: boolean): string {
if (scope === INBOX_SCOPE_FOR_YOU) {
return 'No reports suggested for you yet. Switch the scope to see the entire project.'
}
+ if (scope === INBOX_SCOPE_CLAIMED_BY_YOU) {
+ return "You haven't claimed any reports. Open a report and select I'm on it to claim it."
+ }
return 'No reports here yet.'
}
diff --git a/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts b/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts
index d6e58b6933f8..251be5facf62 100644
--- a/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxBulkActionsLogic.ts
@@ -8,7 +8,9 @@ import { teamLogic } from 'scenes/teamLogic'
import { signalsReportsReviewersMeDestroy } from 'products/signals/frontend/generated/api'
+import type { SignalReportAssigneeApi } from '../../generated/api.schemas'
import { captureInboxReportAction } from '../inboxAnalytics'
+import type { SignalReport } from '../types'
import { type DismissalFeedback, type ResolveReasonValue, suppressDismissalPayload } from '../utils/dismissalReasons'
/** Tally of a bulk operation that ran one request per selected report. */
@@ -83,6 +85,13 @@ export interface inboxBulkActionsLogicActions {
clearSelection: () => {
value: true
}
+ reportClaimChanged: (
+ reportId: string,
+ assignee: SignalReport['assignee']
+ ) => {
+ assignee: SignalReportAssigneeApi | null | undefined
+ reportId: string
+ }
reportReviewersChanged: (
reportId: string,
reviewerUuids: string[]
@@ -172,6 +181,9 @@ export const inboxBulkActionsLogic = kea<inboxBulkActionsLogicType>([
/** Broadcast that a report's suggested reviewers were saved, with the PostHog user uuids now on
* it, so a list scoped to a reviewer who is no longer on the report drops the row in place. */
reportReviewersChanged: (reportId: string, reviewerUuids: string[]) => ({ reportId, reviewerUuids }),
+ /** Broadcast that a report was claimed or released elsewhere (the detail pane), with the new
+ * assignee (null once released), so every mounted list updates the row's claim in place. */
+ reportClaimChanged: (reportId: string, assignee: SignalReport['assignee']) => ({ reportId, assignee }),
}),
reducers({
diff --git a/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts b/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
index 3b6df8648a5d..d61acab334fc 100644
--- a/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
@@ -107,6 +107,7 @@ describe('inboxFiltersLogic', () => {
{ ...DEFAULT_STATE, scope: 'teammate:0199ed4a-5c03-0000-3220-df21df612e95' },
{ scope: 'teammate:0199ed4a-5c03-0000-3220-df21df612e95' },
],
+ ['claimed-by-you scope only', { ...DEFAULT_STATE, scope: 'claimed-by-you' }, { scope: 'claimed-by-you' }],
// An unchecked-everything selection means every state. It must survive the URL rewrite
// that follows each toggle, or hydration would put the default selection straight back.
['an explicitly empty state selection', { ...DEFAULT_STATE, stateFilter: [] }, { state: 'all' }],
diff --git a/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts b/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
index 467e9862e54f..92caebbf50f2 100644
--- a/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
@@ -116,7 +116,7 @@ export interface InboxFilterState {
function parseScopeParam(raw: unknown): InboxScope {
if (typeof raw === 'string') {
- if (raw === 'entire-project') {
+ if (raw === 'entire-project' || raw === 'claimed-by-you') {
return raw
}
// Validate the teammate id so a malformed shared link falls back to the default scope
diff --git a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
index f01d60c331cc..3a6123937146 100644
--- a/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxOnboardingLogic.ts
@@ -307,8 +307,8 @@ export interface inboxOnboardingLogicValues {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface inboxOnboardingLogicActions {
- loadPullsCount: () => any // reportListLogic
- loadReportsCount: () => any // reportListLogic
+ loadPullsCount: (_?: void | undefined) => void // reportListLogic
+ loadReportsCount: (_?: void | undefined) => void // reportListLogic
loadScoutConfigs: (_?: void | undefined) => void // scoutFleetLogic
loadSourceConfigs: () => any // signalSourcesLogic
checkWizardSession: () => {
diff --git a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
index 2fe2ce6c8eaa..b4862b535d52 100644
--- a/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxReportDetailLogic.ts
@@ -1645,6 +1645,7 @@ export const inboxReportDetailLogic = kea<inboxReportDetailLogicType>([
if (scene?.values.selectedReportId === props.reportId) {
scene.actions.seedSelectedReport(report)
}
+ inboxBulkActionsLogic.findMounted()?.actions.reportClaimChanged(props.reportId, updated.assignee)
actions.loadReportArtefacts()
actions.setClaimSaving(false)
},
diff --git a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts b/products/signals/frontend/inbox/logics/inboxTriageLogic.ts
index cdfd77f5b8d8..06efb2a166c5 100644
--- a/products/signals/frontend/inbox/logics/inboxTriageLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxTriageLogic.ts
@@ -108,9 +108,9 @@ export interface inboxTriageLogicActions {
} // reportListLogic
loadReportsSuccess: (
reportsResponse: import('./reportListLogic').ReportListResponse,
- payload?: any
+ payload?: void | undefined
) => {
- payload?: any
+ payload?: void | undefined
reportsResponse: import('./reportListLogic').ReportListResponse
} // reportListLogic
removeReport: (reportId: string) => {
diff --git a/products/signals/frontend/inbox/logics/reportListLogic.test.ts b/products/signals/frontend/inbox/logics/reportListLogic.test.ts
index 66f04360d53f..4fad75a5928a 100644
--- a/products/signals/frontend/inbox/logics/reportListLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/reportListLogic.test.ts
@@ -9,7 +9,9 @@ import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { useMocks } from '~/mocks/jest'
import { initKeaTests } from '~/test/init'
+import { myClaim } from '../__mocks__/inboxMocks'
import {
+ INBOX_SCOPE_CLAIMED_BY_YOU,
INBOX_SCOPE_ENTIRE_PROJECT,
INBOX_SCOPE_FOR_YOU,
InboxReportSectionKey,
@@ -136,6 +138,49 @@ describe('reportListLogic', () => {
expect(requestedOffsets).toEqual(['0', String(FIRST_PAGE.length)])
})
+ it.each([
+ { scope: INBOX_SCOPE_FOR_YOU, suggested_reviewers: MOCK_USER_UUID, assignee: undefined },
+ { scope: INBOX_SCOPE_CLAIMED_BY_YOU, suggested_reviewers: undefined, assignee: 'mine' },
+ { scope: 'teammate:t-1', suggested_reviewers: 't-1', assignee: undefined },
+ { scope: INBOX_SCOPE_ENTIRE_PROJECT, suggested_reviewers: undefined, assignee: undefined },
+ ] as { scope: InboxScope; suggested_reviewers?: string; assignee?: string }[])(
+ 'narrows the $scope request to suggested_reviewers=$suggested_reviewers and assignee=$assignee',
+ ({ scope, suggested_reviewers, assignee }) => {
+ logic.actions.setScope(scope)
+ const { suggested_reviewers: sentReviewers, assignee: sentAssignee } = logic.values.listApiParams
+ expect({ suggested_reviewers: sentReviewers, assignee: sentAssignee }).toEqual({
+ suggested_reviewers,
+ assignee,
+ })
+ }
+ )
+
+ it.each([
+ { name: 'tags the row with a new claim', scope: INBOX_SCOPE_ENTIRE_PROJECT, assignee: myClaim },
+ { name: 'drops a released row from Claimed by you', scope: INBOX_SCOPE_CLAIMED_BY_YOU, assignee: null },
+ ] as { name: string; scope: InboxScope; assignee: SignalReport['assignee'] }[])(
+ 'a claim change in the detail pane $name',
+ async ({ scope, assignee }) => {
+ const bulkLogic = inboxBulkActionsLogic()
+ bulkLogic.mount()
+ logic.actions.setScope(scope)
+ await expectLogic(logic).toFinishAllListeners()
+ const countBefore = logic.values.totalCount ?? 0
+
+ bulkLogic.actions.reportClaimChanged(FIRST_PAGE[0].id, assignee)
+ await expectLogic(logic).toFinishAllListeners()
+
+ const row = logic.values.reports.find((r) => r.id === FIRST_PAGE[0].id)
+ if (assignee) {
+ expect(row?.assignee).toEqual(assignee)
+ } else {
+ expect(row).toBeUndefined()
+ expect(logic.values.totalCount).toBe(countBefore - 1)
+ }
+ bulkLogic.unmount()
+ }
+ )
+
// A failed next page keeps the loaded rows and `hasMore`, and the scroll sentinel may sit
// inside the viewport without re-firing. The flag is what surfaces the retry control, and a
// plain `loadMore` must be able to fetch the page again.
@@ -297,6 +342,74 @@ describe('reportListLogic', () => {
)
})
+ // A scope change while a request for the old query is in flight. The old response lands last,
+ // and the list must still show only the new query's rows.
+ describe('query change while a request is in flight', () => {
+ const ALL = Array.from({ length: 10 }, (_, i) => makeReport(`all-${i}`))
+ const MINE = [makeReport('mine-0')]
+ let heldOffset: string
+ let releaseOldQuery: () => void
+ let logic: ReturnType<typeof reportListLogic.build>
+
+ beforeEach(() => {
+ const oldQueryHeld = new Promise<void>((resolve) => {
+ releaseOldQuery = resolve
+ })
+ useMocks({
+ get: {
+ '/api/projects/:team_id/signals/reports/available_reviewers': {},
+ [REPORTS_URL]: async ({ request }) => {
+ const params = new URL(request.url).searchParams
+ if (params.get('assignee') === 'mine') {
+ return [200, { count: MINE.length, next: null, previous: null, results: MINE }]
+ }
+ if (params.get('offset') === heldOffset) {
+ await oldQueryHeld
+ }
+ const firstPage = params.get('offset') === '0'
+ return [
+ 200,
+ {
+ count: ALL.length + 1,
+ next: firstPage ? 'http://localhost/api/projects/997/signals/reports/?offset=50' : null,
+ previous: null,
+ results: firstPage ? ALL : [makeReport('all-page-2')],
+ },
+ ]
+ },
+ },
+ })
+ initKeaTests()
+ logic = reportListLogic({
+ sectionKey: 'needs-decision',
+ listParams: INBOX_REPORT_SECTION_LIST_PARAMS['needs-decision'],
+ })
+ logic.mount()
+ })
+
+ afterEach(() => logic.unmount())
+
+ it.each([
+ { request: 'first page', offset: '0' },
+ { request: 'next page', offset: String(ALL.length) },
+ ])('drops the late $request of the old query', async ({ offset }) => {
+ heldOffset = offset
+ logic.actions.ensureLoaded()
+ if (offset !== '0') {
+ await expectLogic(logic).toDispatchActions(['loadReportsSuccess'])
+ logic.actions.loadMore()
+ }
+
+ logic.actions.setScope(INBOX_SCOPE_CLAIMED_BY_YOU)
+ await expectLogic(logic).toDispatchActions(['loadReportsSuccess'])
+ releaseOldQuery()
+ await expectLogic(logic).toFinishAllListeners()
+
+ expect(logic.values.reports.map((r) => r.id)).toEqual(['mine-0'])
+ expect(logic.values.totalCount).toBe(MINE.length)
+ })
+ })
+
// The list skips the ClickHouse source lookup so it renders from Postgres alone. The source line
// must then fill in from one follow-up request, and a refresh must ask again so new sources show.
describe('lazy source line', () => {
diff --git a/products/signals/frontend/inbox/logics/reportListLogic.ts b/products/signals/frontend/inbox/logics/reportListLogic.ts
index 82cf6af302fa..1e3ac3c95852 100644
--- a/products/signals/frontend/inbox/logics/reportListLogic.ts
+++ b/products/signals/frontend/inbox/logics/reportListLogic.ts
@@ -20,11 +20,13 @@ import {
} from 'products/signals/frontend/generated/api'
import type { SignalReportMetricSnapshotsApi } from 'products/signals/frontend/generated/api.schemas'
+import type { SignalReportAssigneeApi } from '../../generated/api.schemas'
import { createdAfterForWindow } from '../filterOptions'
import { captureInboxReportAction, type InboxReportActionSurface, setInboxServedRanker } from '../inboxAnalytics'
import {
INBOX_PRIMARY_REPORT_SECTION_KEY,
INBOX_SCOPE_ENTIRE_PROJECT,
+ INBOX_SCOPE_CLAIMED_BY_YOU,
INBOX_SCOPE_FOR_YOU,
InboxReportSectionKey,
InboxScope,
@@ -185,6 +187,7 @@ export interface reportListLogicValues {
reportsLoadFailed: boolean
reportsResponse: ReportListResponse | null
reportsResponseLoading: boolean
+ scopeAssignee: 'mine' | undefined
scopeReviewerUuid: string | undefined
staleMetricReportIds: string[]
totalCount: number | null
@@ -259,7 +262,7 @@ export interface reportListLogicActions {
ensureLoaded: () => {
value: true
}
- loadCount: () => any
+ loadCount: (_: void) => void
loadCountFailure: (
error: string,
errorObject?: any
@@ -269,10 +272,10 @@ export interface reportListLogicActions {
}
loadCountSuccess: (
count: number,
- payload?: any
+ payload?: void
) => {
count: number
- payload?: any
+ payload?: void
}
loadMore: () => {
value: true
@@ -295,7 +298,7 @@ export interface reportListLogicActions {
loadReportSourceMeta: (reportIds: string[]) => {
reportIds: string[]
}
- loadReports: () => any
+ loadReports: (_: void) => void
loadReportsFailure: (
error: string,
errorObject?: any
@@ -305,10 +308,10 @@ export interface reportListLogicActions {
}
loadReportsSuccess: (
reportsResponse: ReportListResponse,
- payload?: any
+ payload?: void
) => {
reportsResponse: ReportListResponse
- payload?: any
+ payload?: void
}
refresh: () => {
value: true
@@ -335,6 +338,13 @@ export interface reportListLogicActions {
reportId: string
surface: InboxReportActionSurface
}
+ setReportAssignee: (
+ reportId: string,
+ assignee: SignalReport['assignee']
+ ) => {
+ assignee: SignalReportAssigneeApi | null | undefined
+ reportId: string
+ }
setSuggestedToMe: (
reportIds: string[],
isSuggested: boolean
@@ -359,6 +369,7 @@ export interface reportListLogicMeta {
key: 'dismissed' | 'held-back' | 'monitoring' | 'needs-decision' | 'not-actionable' | 'resolved'
__keaTypeGenInternalSelectorTypes: {
scopeReviewerUuid: (scope: InboxScope, user: UserType | null) => string | undefined
+ scopeAssignee: (scope: InboxScope) => 'mine' | undefined
listApiParams: (
searchQuery: string,
activeSortField: InboxSortField,
@@ -367,6 +378,7 @@ export interface reportListLogicMeta {
scoutFilter: string[],
priorityFilter: SignalReportPriority[],
scopeReviewerUuid: string | undefined,
+ scopeAssignee: 'mine' | undefined,
activeCreatedWindow: InboxCreatedWindow | null,
arg: any
) => any
@@ -461,6 +473,7 @@ export const reportListLogic = kea<reportListLogicType>([
unassignMe: (reportId: string, surface: InboxReportActionSurface) => ({ reportId, surface }),
unassignMeFinished: (reportId: string) => ({ reportId }),
setSuggestedToMe: (reportIds: string[], isSuggested: boolean) => ({ reportIds, isSuggested }),
+ setReportAssignee: (reportId: string, assignee: SignalReport['assignee']) => ({ reportId, assignee }),
removeReport: (reportId: string) => ({ reportId }),
refresh: true,
// Ask the server for the newest snapshot of the metrics these rows show. Best effort: a
@@ -480,13 +493,15 @@ export const reportListLogic = kea<reportListLogicType>([
count: [
null as number | null,
{
- loadCount: async () => {
+ loadCount: async (_: void, breakpoint) => {
// nosemgrep: prefer-codegen-api-namespaced-signals -- the Inbox renders the handwritten SignalReport. The generated report type is wider (string status and priority, read-only arrays), so the list calls move to generated types together with the Inbox.
const response = await api.signalReports.list({
...listRequestParams(values.listApiParams),
limit: 1,
count_only: 'true',
})
+ // A newer count request for a changed query supersedes this one.
+ breakpoint()
return response.count
},
},
@@ -497,20 +512,24 @@ export const reportListLogic = kea<reportListLogicType>([
// `requestParams` records the query that produced the response, so consumers
// (impression telemetry) can key off what was actually fetched rather than the
// live `listApiParams`, which changes before the refetch lands.
- loadReports: async (): Promise<ReportListResponse> => {
+ loadReports: async (_: void, breakpoint): Promise<ReportListResponse> => {
const params = values.listApiParams
const requestContext = requestContextFromValues(values)
+ cache.firstPageRequestId = (cache.firstPageRequestId ?? 0) + 1
// nosemgrep: prefer-codegen-api-namespaced-signals -- the Inbox renders the handwritten SignalReport. The generated report type is wider (string status and priority, read-only arrays), so the list calls move to generated types together with the Inbox.
const response = await api.signalReports.list({
...listRequestParams(params),
offset: 0,
limit: PAGE_SIZE,
})
+ // A newer first-page request for a changed query supersedes this one.
+ breakpoint()
return { ...response, requestParams: params, requestContext }
},
loadMoreReports: async (): Promise<ReportListResponse> => {
const params = values.listApiParams
const requestContext = requestContextFromValues(values)
+ const firstPageRequestId = cache.firstPageRequestId
const current = values.reportsResponse?.results ?? []
// `removeReport` records ids here while the request is in flight. `current` predates
// those removals, so filter them out or a removed report comes back when the page lands.
@@ -522,6 +541,11 @@ export const reportListLogic = kea<reportListLogicType>([
offset: current.length,
limit: PAGE_SIZE,
})
+ // A first-page load for a changed query started meanwhile. Its rows win, so this
+ // page of the old query must not land on top of them.
+ if (cache.firstPageRequestId !== firstPageRequestId && values.reportsResponse) {
+ return values.reportsResponse
+ }
return {
...response,
results: [...current.filter((r) => !removedWhilePending.has(r.id)), ...response.results],
@@ -564,6 +588,10 @@ export const reportListLogic = kea<reportListLogicType>([
count: Math.max(0, state.count - 1),
}
: state,
+ setReportAssignee: (state, { reportId, assignee }) =>
+ state?.results.some((r) => r.id === reportId)
+ ? { ...state, results: state.results.map((r) => (r.id === reportId ? { ...r, assignee } : r)) }
+ : state,
setSuggestedToMe: (state, { reportIds, isSuggested }) => {
const ids = new Set(reportIds)
// Keep the same state when no row changes, so an unrelated edit does not re-render the list.
@@ -617,6 +645,11 @@ export const reportListLogic = kea<reportListLogicType>([
(scope: InboxScope, user: UserType | null): string | undefined =>
scope === INBOX_SCOPE_FOR_YOU ? (user?.uuid ?? undefined) : teammateUuidFromScope(scope),
],
+ // `mine` also covers the claims of the user's agents and tasks, where `me` matches only the exact actor.
+ scopeAssignee: [
+ (s) => [s.scope],
+ (scope: InboxScope): 'mine' | undefined => (scope === INBOX_SCOPE_CLAIMED_BY_YOU ? 'mine' : undefined),
+ ],
// The section's fixed filter merged with the user-driven chrome + reviewer scope (server-side).
listApiParams: [
(s) => [
@@ -627,6 +660,7 @@ export const reportListLogic = kea<reportListLogicType>([
s.scoutFilter,
s.priorityFilter,
s.scopeReviewerUuid,
+ s.scopeAssignee,
s.activeCreatedWindow,
(_, p) => p.listParams,
],
@@ -638,6 +672,7 @@ export const reportListLogic = kea<reportListLogicType>([
scoutFilter: string[],
priorityFilter: import('../types').SignalReportPriority[],
suggestedReviewer: string | undefined,
+ assignee: 'mine' | undefined,
activeCreatedWindow: InboxCreatedWindow | null,
listParams
) => {
@@ -649,6 +684,7 @@ export const reportListLogic = kea<reportListLogicType>([
scout: scoutFilter.length > 0 ? scoutFilter.join(',') : undefined,
priority: priorityFilter.length > 0 ? priorityFilter.join(',') : undefined,
suggested_reviewers: suggestedReviewer,
+ assignee,
created_window: activeCreatedWindow ?? undefined,
// Rows render from Postgres alone; `loadReportSourceMeta` fills the source line after.
include_source_metadata: 'false',
@@ -822,13 +858,20 @@ export const reportListLogic = kea<reportListLogicType>([
}
},
loadMore: () => {
- if (values.hasMore && !values.reportsResponseLoading) {
+ // Page only from rows of the current query. Rows from before a filter change get
+ // replaced, so a next page appended to them would mix two queries.
+ if (
+ values.hasMore &&
+ !values.reportsResponseLoading &&
+ values.loadedQueryKey === JSON.stringify(values.listApiParams)
+ ) {
actions.loadMoreReports()
}
},
refresh: () => {
actions.loadCount()
- if (values.isLoaded) {
+ // An in-flight first page was requested with the old filters, so it reloads too.
+ if (values.isLoaded || values.reportsResponseLoading) {
actions.loadReports()
}
},
@@ -931,6 +974,23 @@ export const reportListLogic = kea<reportListLogicType>([
actions.setSuggestedToMe([reportId], reviewerUuids.includes(userUuid))
}
},
+ // The Claimed by you list holds only the user's claims: a release drops the row in place, and a
+ // new claim reloads the list so the row joins it. Every other list updates the claim tag.
+ [inboxBulkActionsLogic.actionTypes.reportClaimChanged]: ({ reportId, assignee }) => {
+ const isLoaded = values.reports.some((r) => r.id === reportId)
+ if (values.scopeAssignee) {
+ const isMine = !!values.user?.uuid && assignee?.responsible_user?.uuid === values.user.uuid
+ if (!isMine && isLoaded) {
+ actions.removeReport(reportId)
+ return
+ }
+ if (isMine && !isLoaded) {
+ actions.refresh()
+ return
+ }
+ }
+ actions.setReportAssignee(reportId, assignee)
+ },
[inboxBulkActionsLogic.actionTypes.unassignedMe]: ({ reportIds }: { reportIds: string[] }) => {
if (values.isScopedToMe) {
const loadedIds = new Set(values.reportsResponse?.results.map((r) => r.id))
diff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.ts
index d26f87e70598..f8e9070c2b9d 100644
--- a/products/signals/frontend/inbox/types.ts
+++ b/products/signals/frontend/inbox/types.ts
@@ -344,10 +344,14 @@ export const INBOX_REPORT_SECTION_TAG: Partial<Record<InboxReportSectionKey, 'St
*/
export const INBOX_CONFIG_TAB_KEY: InboxTabKey = 'config'
-/** `for-you` (suggested-reviewer reports), `entire-project` (all), or `teammate:<uuid>`. */
-export type InboxScope = 'for-you' | 'entire-project' | `teammate:${string}`
+/**
+ * `for-you` (suggested-reviewer reports), `claimed-by-you` (reports the user claimed), `entire-project`
+ * (all), or `teammate:<uuid>`.
+ */
+export type InboxScope = 'for-you' | 'claimed-by-you' | 'entire-project' | `teammate:${string}`
export const INBOX_SCOPE_FOR_YOU: InboxScope = 'for-you'
+export const INBOX_SCOPE_CLAIMED_BY_YOU: InboxScope = 'claimed-by-you'
export const INBOX_SCOPE_ENTIRE_PROJECT: InboxScope = 'entire-project'
// ── SignalReport ↔ Task linkage ─────────────────────────────────────────────
diff --git a/products/signals/frontend/inbox/utils/reportClaim.test.ts b/products/signals/frontend/inbox/utils/reportClaim.test.ts
index 78935e1f6ace..7d3bcba43faf 100644
--- a/products/signals/frontend/inbox/utils/reportClaim.test.ts
+++ b/products/signals/frontend/inbox/utils/reportClaim.test.ts
@@ -11,6 +11,7 @@ describe('report claim', () => {
task_id: kind === 'task' ? 'task-1' : null,
agent: kind === 'agent' ? 'codex' : null,
claimed_at: '2026-10-22T10:00:00Z',
+ responsible_user: { id: 1, uuid: 'user-1', first_name: 'Bob', last_name: 'Smith', email: '[email protected]' },
})
it.each([
diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yaml
index 62fa97c134ce..4ba5554fa860 100644
--- a/products/signals/mcp/tools.yaml
+++ b/products/signals/mcp/tools.yaml
@@ -458,42 +458,44 @@ tools:
that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering
by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text
search across title and summary, source_product (e.g. error_tracking, session_replay), suggested_reviewers,
- `unclaimed`, and `assignee=me`. Claimed reports remain actionable and visible; use `unclaimed=true` to pick
- work that has no owner and no draft, open, or unknown PR. Some statuses are hidden by default (currently
- suppressed); pass `include_all_statuses=true` to list reports in every status. Do this when deduplicating
- against the full inbox state, and read each row's `status` (plus `suppression_source`, `dismissal_reason`,
- and `dismissal_note` on suppressed rows) before acting. A suppressed row's `suppression_source` says whether
- someone dismissed it (`dismissed`) or a judge held it back before anyone saw it (`safety_judge`,
- `not_actionable`, `system`). For picking up work, filter to `ready` — earlier statuses are still moving
- through the pipeline, and `pending_input` reports are waiting on a human. Each report's full work log,
- including signal findings, judgments, and log entries, is readable via inbox-report-artefacts-list; read it
- before acting on a report. Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at'
- by default. To answer "what should I look at next", pass `view=actionable` with
- `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready, actionable reports that
- have no implementation PR yet, at or above the requesting user's personal PR-generation threshold, falling
- back to the project threshold. `use_priority_preference` selects which priorities to include, and does not
- order them, so pass `sort=priority` to put P0 first; the default ordering can put a recently updated P4
- above an older P0. Without `limit` a page holds up to 100 reports, each with its summary. To answer "what
- needs me", pass `view=for_you` with `sort=priority`: that returns the open, actionable reports that wait for
- the requesting user's input, that they claimed, or that name them as a suggested reviewer, and `count` gives
- how many there are in total. The other views are `needs_input` (waiting on a human), `needs_decision`
- (failed reports, plus actionable ready or pending-input reports without an implementation PR), `monitoring`
- (an implementation PR is open), `resolved`, `dismissed` (suppressed by a person, an agent, a merge, or a
- closed PR), `held_back` (suppressed by a judge, with nobody's review yet), `not_actionable`, and `all`.
- Narrow by reviewer with `scope=for_me`, or `scope=teammate` plus `teammate_uuid`; the default
- `scope=entire_project` searches every report. `priority`, `source_product`, and `scout` each take a
- comma-separated list. To find the self-driving reports for one source record — e.g. what the inbox already
- investigated for a specific support ticket — pass that record's id as `source_id` together with exactly one
- `source_product` (for a support ticket: `source_product=conversations` and the ticket's UUID as
- `source_id`); add `include_all_statuses=true` to include dismissed ones. Each row includes typed impact
- metric metadata and any accessible cached snapshot, but omits live query definitions and comparisons.
- Queryless legacy or malformed metrics are always redacted. Listing reports does not execute metric queries.
- Each row's `ranking.predictions` carries the inbox ranking model's predicted probability and lift per
- outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an average report. `readable: false` means
- training could not measure that outcome, so rank and filter on it with caution. A prediction is a forecast,
- not the report's state, and `status: unscored` is not a low score. Order with `ordering=-ranking_<outcome>`,
- filter with `ranking_min_lift` and `ranking_min_probability` (for example `fix:2`), and read
- inbox-ranking-outcomes-list for what each outcome means.
+ `unclaimed`, and `assignee`. `assignee=me` returns only the reports this exact agent claimed, so use it to
+ find your own work. `assignee=mine` returns every report the user answers for: claims by the user, by any of
+ their MCP agents, and by internal tasks they started. Claimed reports remain actionable and visible; use
+ `unclaimed=true` to pick work that has no owner and no draft, open, or unknown PR. Some statuses are hidden
+ by default (currently suppressed); pass `include_all_statuses=true` to list reports in every status. Do this
+ when deduplicating against the full inbox state, and read each row's `status` (plus `suppression_source`,
+ `dismissal_reason`, and `dismissal_note` on suppressed rows) before acting. A suppressed row's
+ `suppression_source` says whether someone dismissed it (`dismissed`) or a judge held it back before anyone
+ saw it (`safety_judge`, `not_actionable`, `system`). For picking up work, filter to `ready` — earlier
+ statuses are still moving through the pipeline, and `pending_input` reports are waiting on a human. Each
+ report's full work log, including signal findings, judgments, and log entries, is readable via
+ inbox-report-artefacts-list; read it before acting on a report. Results are paginated and ordered by
+ '-is_suggested_reviewer,status,-updated_at' by default. To answer "what should I look at next", pass
+ `view=actionable` with `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready,
+ actionable reports that have no implementation PR yet, at or above the requesting user's personal
+ PR-generation threshold, falling back to the project threshold. `use_priority_preference` selects which
+ priorities to include, and does not order them, so pass `sort=priority` to put P0 first; the default
+ ordering can put a recently updated P4 above an older P0. Without `limit` a page holds up to 100 reports,
+ each with its summary. To answer "what needs me", pass `view=for_you` with `sort=priority`: that returns the
+ open, actionable reports that wait for the requesting user's input, that they claimed, or that name them as
+ a suggested reviewer, and `count` gives how many there are in total. The other views are `needs_input`
+ (waiting on a human), `needs_decision` (failed reports, plus actionable ready or pending-input reports
+ without an implementation PR), `monitoring` (an implementation PR is open), `resolved`, `dismissed`
+ (suppressed by a person, an agent, a merge, or a closed PR), `held_back` (suppressed by a judge, with
+ nobody's review yet), `not_actionable`, and `all`. Narrow by reviewer with `scope=for_me`, or
+ `scope=teammate` plus `teammate_uuid`; the default `scope=entire_project` searches every report. `priority`,
+ `source_product`, and `scout` each take a comma-separated list. To find the self-driving reports for one
+ source record — e.g. what the inbox already investigated for a specific support ticket — pass that record's
+ id as `source_id` together with exactly one `source_product` (for a support ticket:
+ `source_product=conversations` and the ticket's UUID as `source_id`); add `include_all_statuses=true` to
+ include dismissed ones. Each row includes typed impact metric metadata and any accessible cached snapshot,
+ but omits live query definitions and comparisons. Queryless legacy or malformed metrics are always redacted.
+ Listing reports does not execute metric queries. Each row's `ranking.predictions` carries the inbox ranking
+ model's predicted probability and lift per outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an
+ average report. `readable: false` means training could not measure that outcome, so rank and filter on it
+ with caution. A prediction is a forecast, not the report's state, and `status: unscored` is not a low score.
+ Order with `ordering=-ranking_<outcome>`, filter with `ranking_min_lift` and `ranking_min_probability` (for
+ example `fix:2`), and read inbox-ranking-outcomes-list for what each outcome means.
agent_note: >
You may inspect reports without claiming them. A claim indicates active work that should not be duplicated.
Before claiming a report, read the report and its work log. If you decide to begin working to fix the issues
diff --git a/products/tasks/backend/facade/api.py b/products/tasks/backend/facade/api.py
index 79b6a9c8475e..ed0d7d6a1812 100644
--- a/products/tasks/backend/facade/api.py
+++ b/products/tasks/backend/facade/api.py
@@ -1332,6 +1332,28 @@ def task_owned_by_user(task_id: str | UUID, team_id: int, user_id: int) -> bool:
return Task.objects.filter(id=task_id, team_id=team_id, created_by_id=user_id).exists()
+def filter_task_ids_created_by(task_ids: Iterable[str | UUID], team_id: int, user_id: int) -> frozenset[UUID]:
+ """The ids among `task_ids` of the team's tasks that the user started."""
+ ids = [str(t) for t in task_ids]
+ if not ids:
+ return frozenset()
+ return frozenset(
+ Task.objects.filter(id__in=ids, team_id=team_id, created_by_id=user_id).values_list("id", flat=True)
+ )
+
+
+def get_task_creator_ids(task_ids: Iterable[str | UUID], team_ids: Iterable[int]) -> dict[str, int]:
+ """The id of the user who started each task, without loading the full task."""
+ ids = [str(t) for t in task_ids]
+ teams = list(team_ids)
+ if not ids or not teams:
+ return {}
+ rows = Task.objects.filter(id__in=ids, team_id__in=teams, created_by_id__isnull=False).values_list(
+ "id", "created_by_id"
+ )
+ return {str(task_id): created_by_id for task_id, created_by_id in rows}
+
+
def task_exempt_from_code_access(task_id: str | UUID, team_id: int) -> bool:
"""Whether this task's cloud runs are entitled outside PostHog Desktop.
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 86ab436f0ca6..945f3d35dc19 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -7918,7 +7918,7 @@
}
},
"inbox-reports-list": {
- "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), suggested_reviewers, `unclaimed`, and `assignee=me`. Claimed reports remain actionable and visible; use `unclaimed=true` to pick work that has no owner and no draft, open, or unknown PR. Some statuses are hidden by default (currently suppressed); pass `include_all_statuses=true` to list reports in every status. Do this when deduplicating against the full inbox state, and read each row's `status` (plus `suppression_source`, `dismissal_reason`, and `dismissal_note` on suppressed rows) before acting. A suppressed row's `suppression_source` says whether someone dismissed it (`dismissed`) or a judge held it back before anyone saw it (`safety_judge`, `not_actionable`, `system`). For picking up work, filter to `ready` — earlier statuses are still moving through the pipeline, and `pending_input` reports are waiting on a human. Each report's full work log, including signal findings, judgments, and log entries, is readable via inbox-report-artefacts-list; read it before acting on a report. Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default. To answer \"what should I look at next\", pass `view=actionable` with `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready, actionable reports that have no implementation PR yet, at or above the requesting user's personal PR-generation threshold, falling back to the project threshold. `use_priority_preference` selects which priorities to include, and does not order them, so pass `sort=priority` to put P0 first; the default ordering can put a recently updated P4 above an older P0. Without `limit` a page holds up to 100 reports, each with its summary. To answer \"what needs me\", pass `view=for_you` with `sort=priority`: that returns the open, actionable reports that wait for the requesting user's input, that they claimed, or that name them as a suggested reviewer, and `count` gives how many there are in total. The other views are `needs_input` (waiting on a human), `needs_decision` (failed reports, plus actionable ready or pending-input reports without an implementation PR), `monitoring` (an implementation PR is open), `resolved`, `dismissed` (suppressed by a person, an agent, a merge, or a closed PR), `held_back` (suppressed by a judge, with nobody's review yet), `not_actionable`, and `all`. Narrow by reviewer with `scope=for_me`, or `scope=teammate` plus `teammate_uuid`; the default `scope=entire_project` searches every report. `priority`, `source_product`, and `scout` each take a comma-separated list. To find the self-driving reports for one source record — e.g. what the inbox already investigated for a specific support ticket — pass that record's id as `source_id` together with exactly one `source_product` (for a support ticket: `source_product=conversations` and the ticket's UUID as `source_id`); add `include_all_statuses=true` to include dismissed ones. Each row includes typed impact metric metadata and any accessible cached snapshot, but omits live query definitions and comparisons. Queryless legacy or malformed metrics are always redacted. Listing reports does not execute metric queries. Each row's `ranking.predictions` carries the inbox ranking model's predicted probability and lift per outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an average report. `readable: false` means training could not measure that outcome, so rank and filter on it with caution. A prediction is a forecast, not the report's state, and `status: unscored` is not a low score. Order with `ordering=-ranking_<outcome>`, filter with `ranking_min_lift` and `ranking_min_probability` (for example `fix:2`), and read inbox-ranking-outcomes-list for what each outcome means.",
+ "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), suggested_reviewers, `unclaimed`, and `assignee`. `assignee=me` returns only the reports this exact agent claimed, so use it to find your own work. `assignee=mine` returns every report the user answers for: claims by the user, by any of their MCP agents, and by internal tasks they started. Claimed reports remain actionable and visible; use `unclaimed=true` to pick work that has no owner and no draft, open, or unknown PR. Some statuses are hidden by default (currently suppressed); pass `include_all_statuses=true` to list reports in every status. Do this when deduplicating against the full inbox state, and read each row's `status` (plus `suppression_source`, `dismissal_reason`, and `dismissal_note` on suppressed rows) before acting. A suppressed row's `suppression_source` says whether someone dismissed it (`dismissed`) or a judge held it back before anyone saw it (`safety_judge`, `not_actionable`, `system`). For picking up work, filter to `ready` — earlier statuses are still moving through the pipeline, and `pending_input` reports are waiting on a human. Each report's full work log, including signal findings, judgments, and log entries, is readable via inbox-report-artefacts-list; read it before acting on a report. Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default. To answer \"what should I look at next\", pass `view=actionable` with `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready, actionable reports that have no implementation PR yet, at or above the requesting user's personal PR-generation threshold, falling back to the project threshold. `use_priority_preference` selects which priorities to include, and does not order them, so pass `sort=priority` to put P0 first; the default ordering can put a recently updated P4 above an older P0. Without `limit` a page holds up to 100 reports, each with its summary. To answer \"what needs me\", pass `view=for_you` with `sort=priority`: that returns the open, actionable reports that wait for the requesting user's input, that they claimed, or that name them as a suggested reviewer, and `count` gives how many there are in total. The other views are `needs_input` (waiting on a human), `needs_decision` (failed reports, plus actionable ready or pending-input reports without an implementation PR), `monitoring` (an implementation PR is open), `resolved`, `dismissed` (suppressed by a person, an agent, a merge, or a closed PR), `held_back` (suppressed by a judge, with nobody's review yet), `not_actionable`, and `all`. Narrow by reviewer with `scope=for_me`, or `scope=teammate` plus `teammate_uuid`; the default `scope=entire_project` searches every report. `priority`, `source_product`, and `scout` each take a comma-separated list. To find the self-driving reports for one source record — e.g. what the inbox already investigated for a specific support ticket — pass that record's id as `source_id` together with exactly one `source_product` (for a support ticket: `source_product=conversations` and the ticket's UUID as `source_id`); add `include_all_statuses=true` to include dismissed ones. Each row includes typed impact metric metadata and any accessible cached snapshot, but omits live query definitions and comparisons. Queryless legacy or malformed metrics are always redacted. Listing reports does not execute metric queries. Each row's `ranking.predictions` carries the inbox ranking model's predicted probability and lift per outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an average report. `readable: false` means training could not measure that outcome, so rank and filter on it with caution. A prediction is a forecast, not the report's state, and `status: unscored` is not a low score. Order with `ordering=-ranking_<outcome>`, filter with `ranking_min_lift` and `ranking_min_probability` (for example `fix:2`), and read inbox-ranking-outcomes-list for what each outcome means.",
"category": "Signals",
"feature": "signals",
"summary": "List signal reports",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 1868569e90b5..63f86560ea4e 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -8136,7 +8136,7 @@
}
},
"inbox-reports-list": {
- "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), suggested_reviewers, `unclaimed`, and `assignee=me`. Claimed reports remain actionable and visible; use `unclaimed=true` to pick work that has no owner and no draft, open, or unknown PR. Some statuses are hidden by default (currently suppressed); pass `include_all_statuses=true` to list reports in every status. Do this when deduplicating against the full inbox state, and read each row's `status` (plus `suppression_source`, `dismissal_reason`, and `dismissal_note` on suppressed rows) before acting. A suppressed row's `suppression_source` says whether someone dismissed it (`dismissed`) or a judge held it back before anyone saw it (`safety_judge`, `not_actionable`, `system`). For picking up work, filter to `ready` — earlier statuses are still moving through the pipeline, and `pending_input` reports are waiting on a human. Each report's full work log, including signal findings, judgments, and log entries, is readable via inbox-report-artefacts-list; read it before acting on a report. Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default. To answer \"what should I look at next\", pass `view=actionable` with `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready, actionable reports that have no implementation PR yet, at or above the requesting user's personal PR-generation threshold, falling back to the project threshold. `use_priority_preference` selects which priorities to include, and does not order them, so pass `sort=priority` to put P0 first; the default ordering can put a recently updated P4 above an older P0. Without `limit` a page holds up to 100 reports, each with its summary. To answer \"what needs me\", pass `view=for_you` with `sort=priority`: that returns the open, actionable reports that wait for the requesting user's input, that they claimed, or that name them as a suggested reviewer, and `count` gives how many there are in total. The other views are `needs_input` (waiting on a human), `needs_decision` (failed reports, plus actionable ready or pending-input reports without an implementation PR), `monitoring` (an implementation PR is open), `resolved`, `dismissed` (suppressed by a person, an agent, a merge, or a closed PR), `held_back` (suppressed by a judge, with nobody's review yet), `not_actionable`, and `all`. Narrow by reviewer with `scope=for_me`, or `scope=teammate` plus `teammate_uuid`; the default `scope=entire_project` searches every report. `priority`, `source_product`, and `scout` each take a comma-separated list. To find the self-driving reports for one source record — e.g. what the inbox already investigated for a specific support ticket — pass that record's id as `source_id` together with exactly one `source_product` (for a support ticket: `source_product=conversations` and the ticket's UUID as `source_id`); add `include_all_statuses=true` to include dismissed ones. Each row includes typed impact metric metadata and any accessible cached snapshot, but omits live query definitions and comparisons. Queryless legacy or malformed metrics are always redacted. Listing reports does not execute metric queries. Each row's `ranking.predictions` carries the inbox ranking model's predicted probability and lift per outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an average report. `readable: false` means training could not measure that outcome, so rank and filter on it with caution. A prediction is a forecast, not the report's state, and `status: unscored` is not a low score. Order with `ordering=-ranking_<outcome>`, filter with `ranking_min_lift` and `ranking_min_probability` (for example `fix:2`), and read inbox-ranking-outcomes-list for what each outcome means.",
+ "description": "List signal reports for the current project. A signal report is a cluster of related observations (signals) that PostHog has aggregated into a single issue or trend. Reports surface in the Inbox. Supports filtering by status (potential, candidate, in_progress, pending_input, ready, resolved, failed, suppressed), free-text search across title and summary, source_product (e.g. error_tracking, session_replay), suggested_reviewers, `unclaimed`, and `assignee`. `assignee=me` returns only the reports this exact agent claimed, so use it to find your own work. `assignee=mine` returns every report the user answers for: claims by the user, by any of their MCP agents, and by internal tasks they started. Claimed reports remain actionable and visible; use `unclaimed=true` to pick work that has no owner and no draft, open, or unknown PR. Some statuses are hidden by default (currently suppressed); pass `include_all_statuses=true` to list reports in every status. Do this when deduplicating against the full inbox state, and read each row's `status` (plus `suppression_source`, `dismissal_reason`, and `dismissal_note` on suppressed rows) before acting. A suppressed row's `suppression_source` says whether someone dismissed it (`dismissed`) or a judge held it back before anyone saw it (`safety_judge`, `not_actionable`, `system`). For picking up work, filter to `ready` — earlier statuses are still moving through the pipeline, and `pending_input` reports are waiting on a human. Each report's full work log, including signal findings, judgments, and log entries, is readable via inbox-report-artefacts-list; read it before acting on a report. Results are paginated and ordered by '-is_suggested_reviewer,status,-updated_at' by default. To answer \"what should I look at next\", pass `view=actionable` with `use_priority_preference=true`, `sort=priority`, and `limit=10`: that returns ready, actionable reports that have no implementation PR yet, at or above the requesting user's personal PR-generation threshold, falling back to the project threshold. `use_priority_preference` selects which priorities to include, and does not order them, so pass `sort=priority` to put P0 first; the default ordering can put a recently updated P4 above an older P0. Without `limit` a page holds up to 100 reports, each with its summary. To answer \"what needs me\", pass `view=for_you` with `sort=priority`: that returns the open, actionable reports that wait for the requesting user's input, that they claimed, or that name them as a suggested reviewer, and `count` gives how many there are in total. The other views are `needs_input` (waiting on a human), `needs_decision` (failed reports, plus actionable ready or pending-input reports without an implementation PR), `monitoring` (an implementation PR is open), `resolved`, `dismissed` (suppressed by a person, an agent, a merge, or a closed PR), `held_back` (suppressed by a judge, with nobody's review yet), `not_actionable`, and `all`. Narrow by reviewer with `scope=for_me`, or `scope=teammate` plus `teammate_uuid`; the default `scope=entire_project` searches every report. `priority`, `source_product`, and `scout` each take a comma-separated list. To find the self-driving reports for one source record — e.g. what the inbox already investigated for a specific support ticket — pass that record's id as `source_id` together with exactly one `source_product` (for a support ticket: `source_product=conversations` and the ticket's UUID as `source_id`); add `include_all_statuses=true` to include dismissed ones. Each row includes typed impact metric metadata and any accessible cached snapshot, but omits live query definitions and comparisons. Queryless legacy or malformed metrics are always redacted. Listing reports does not execute metric queries. Each row's `ranking.predictions` carries the inbox ranking model's predicted probability and lift per outcome (`open`, `action`, `fix`), and `readable`. Lift 1.0 is an average report. `readable: false` means training could not measure that outcome, so rank and filter on it with caution. A prediction is a forecast, not the report's state, and `status: unscored` is not a low score. Order with `ordering=-ranking_<outcome>`, filter with `ranking_min_lift` and `ranking_min_probability` (for example `fix:2`), and read inbox-ranking-outcomes-list for what each outcome means.",
"category": "Signals",
"feature": "signals",
"summary": "List signal reports",
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 6f1e02ee62c1..42f05b132445 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -79661,6 +79661,8 @@ export namespace Schemas {
agent: string | null;
/** @nullable */
claimed_at: string | null;
+ /** The person who answers for the claim: the user for a user claim, the user an MCP agent acts for, or the user who started an internal task. Null when no person stands behind the claim. */
+ responsible_user: _User | null;
}
/**
@@ -139013,7 +139015,7 @@ export namespace Schemas {
*/
already_addressed?: boolean;
/**
- * Use 'me' to return reports claimed by the current user, task, or MCP agent.
+ * 'me' returns reports claimed by exactly the requesting actor: the user, the internal task, or the MCP agent. 'mine' returns every report the requesting user answers for: their own claims, claims by MCP agents acting for them, and claims by internal tasks they started.
*/
assignee?: SignalsReportsListAssignee;
/**
@@ -139140,6 +139142,7 @@ export namespace Schemas {
export const SignalsReportsListAssignee = {
Me: 'me',
+ Mine: 'mine',
} as const;
export type SignalsReportPrChecksParams = {
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index d13589657ca8..d7559e8fff5d 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -313,9 +313,11 @@ export const SignalsReportsListQueryParams = () => zod.object({
'Filter by whether the latest actionability judgment says the issue is already being handled. False also includes older reports where that judgment did not record a value.'
),
assignee: zod
- .enum(['me'])
+ .enum(['me', 'mine'])
.optional()
- .describe("Use 'me' to return reports claimed by the current user, task, or MCP agent."),
+ .describe(
+ "'me' returns reports claimed by exactly the requesting actor: the user, the internal task, or the MCP agent. 'mine' returns every report the requesting user answers for: their own claims, claims by MCP agents acting for them, and claims by internal tasks they started."
+ ),
channel_id: zod
.string()
.optional()
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
index 0401fb5acc57..258bff8a6b45 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/inbox-reports-list.json
@@ -10,8 +10,8 @@
"type": "boolean"
},
"assignee": {
- "description": "Use 'me' to return reports claimed by the current user, task, or MCP agent.",
- "enum": ["me"],
+ "description": "'me' returns reports claimed by exactly the requesting actor: the user, the internal task, or the MCP agent. 'mine' returns every report the requesting user answers for: their own claims, claims by MCP agents acting for them, and claims by internal tasks they started.",
+ "enum": ["me", "mine"],
"type": "string"
},
"channel_id": {