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): open inbox model sorts behind a flag and show score strength (#119480)

posthog[bot]fd94fc08e840
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 9ed375e3bed7..ef454ddc957c 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -11187,9 +11187,9 @@ snapshots:
scenes-app-inbox-cards--pull-request-cards--light:
hash: v1.k794b7964.19291313347041d3b8311d7a7e9b97ee8e60b7ccca476b1b3c43945a006de3fe.Lf3Mkhh7fJ5mnyomCZa2-Jcw4fOG4rgHZ5udu8CQNxg
scenes-app-inbox-cards--report-card-ranking-tags--dark:
- hash: v1.k794b7964.abaf20aa7af1b1f3c1a6ccddab0e1165edd3cf45aaaec52d731367ed96e0d261.YVDei7lwTJkKyFpmmib-c_x-RLTGj8g63o5l33J0aag
+ hash: v1.k794b7964.7e0ad449f0f22eb44dcd7e77ee090c579e08387ae4c34214417a345871fab2a5.f9JnoKRVlRT_kyV09RgUE5_Tz8Q2uAcun90ikzLy_Q4
scenes-app-inbox-cards--report-card-ranking-tags--light:
- hash: v1.k794b7964.ee26ad3306af01e0c2e236809b2b65d794fdec1a39711ba0bc0700e1b2115f91.0vg4Aq4ScTkIch24e-EIvvT5FBlvNo4anozdw0lnJps
+ hash: v1.k794b7964.6a0b9cca157bc22b01c5c0300112dc4587cf632c817750a433628da227c1580c.LTthUp2YqFYePHTgvmC43QS9YX7fdZhD-zPpHgjUjxI
scenes-app-inbox-cards--report-card-states--dark:
hash: v1.k794b7964.b987dc8b9a750647567259b3cfb6f65c1fc03c82294e599942d85f394182ec5f.tJh2uAs0GnyekhEbDh2gi3yZAm6ydVS4Tp8YEAowHcc
scenes-app-inbox-cards--report-card-states--light:
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index c17bb2db5bdd..11ee6597726e 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -375,7 +375,7 @@ export const FEATURE_FLAGS = {
IDENTITY_MATCHING: 'identity-matching', // owner: @fercgomes #team-growth, gates new identity matching scene on marketing analytics
INBOX_GET_IT_MERGED: 'inbox-get-it-merged', // owner: #team-self-driving, gates the Get it merged action in the report Ask AI menu
INBOX_MCP_USED: 'inbox-mcp-used', // owner: #team-self-driving, hides the MCP banner after confirmed Inbox tool use
- INBOX_MODEL_SORT: 'inbox-model-sort', // owner: #team-self-driving, gates the staff-only ranking model sort options and the probability tag on inbox cards
+ INBOX_MODEL_SORT: 'inbox-model-sort', // owner: #team-self-driving, gates the ranking model sort options and the score tag on inbox cards
INBOX_REDESIGN: 'inbox-redesign', // owner: #team-self-driving, gates the inbox redesign: report sections, triage mode, the Settings tab, and scout cards
INBOX_REPORT_FEEDBACK_BANG: 'inbox-report-feedback-bang', // owner: #team-self-driving, gates the party hog that pops on a report thumbs-up in the inbox and on the Today home page
INBOX_SELF_DRIVING_EMPTY_STATE: 'inbox-self-driving-empty-state',
diff --git a/products/signals/backend/ranking/access.py b/products/signals/backend/ranking/access.py
new file mode 100644
index 000000000000..6316472734a1
--- /dev/null
+++ b/products/signals/backend/ranking/access.py
@@ -0,0 +1,57 @@
+"""Who may see the ranking model's output in the inbox: the model sorts and the strength of each report's score.
+
+Staff always may. Other users need the `inbox-model-sort` flag. It is evaluated locally, with the person and group
+properties the web client registers (`frontend/src/lib/utils/posthogIdentity.ts`), so the API agrees with the inbox
+menu without a remote flag call on every inbox request. A flag that fails to evaluate denies access.
+Raw probabilities and model metadata stay staff only.
+"""
+
+import structlog
+
+from posthog.models.team import Team
+from posthog.models.user import User
+from posthog.ph_client import feature_enabled_or_false
+from posthog.utils import get_instance_realm
+
+logger = structlog.get_logger(__name__)
+
+INBOX_MODEL_SORT_FLAG = "inbox-model-sort"
+
+
+def can_view_inbox_ranking(user: User, team: Team) -> bool:
+ if user.is_staff:
+ return True
+ if not user.distinct_id:
+ return False
+ organization = team.organization
+ try:
+ return feature_enabled_or_false(
+ INBOX_MODEL_SORT_FLAG,
+ user.distinct_id,
+ groups={"organization": str(organization.id), "project": str(team.uuid)},
+ person_properties={
+ "email": None if user.anonymize_data else user.email,
+ "realm": get_instance_realm(),
+ },
+ group_properties={
+ "organization": {
+ "id": str(organization.id),
+ "name": organization.name,
+ "slug": organization.slug,
+ "created_at": organization.created_at.isoformat(),
+ },
+ "project": {
+ "id": team.id,
+ "uuid": str(team.uuid),
+ "name": team.name,
+ "ingested_event": team.ingested_event,
+ "is_demo": team.is_demo,
+ "timezone": team.timezone,
+ },
+ },
+ only_evaluate_locally=True,
+ send_feature_flag_events=False,
+ )
+ except Exception:
+ logger.exception("signals.inbox_ranking.flag_failed", team_id=team.id, user_id=user.id)
+ return False
diff --git a/products/signals/backend/serializers.py b/products/signals/backend/serializers.py
index fb31c53cd62b..46f58e5832d5 100644
--- a/products/signals/backend/serializers.py
+++ b/products/signals/backend/serializers.py
@@ -1201,15 +1201,24 @@ class ReportSourceSuggestionSerializer(serializers.Serializer):
class ReportRankingSerializer(serializers.Serializer):
served_key = serializers.CharField(
- help_text="Key of the served model in the scoring pass, as `<model_name>@<model_version>`."
+ help_text=(
+ "Key of the served model in the scoring pass, as `<model_name>@<model_version>`. Empty for non-staff users."
+ )
+ )
+ model_name = serializers.CharField(help_text="Feature family of the served model. Empty for non-staff users.")
+ model_version = serializers.CharField(
+ help_text="Training partition of the served model, as `YYYY-MM-DD`. Empty for non-staff users."
+ )
+ manifest_version = serializers.CharField(
+ help_text="Version of the serving manifest that chose the model. Empty for non-staff users."
)
- model_name = serializers.CharField(help_text="Feature family of the served model.")
- model_version = serializers.CharField(help_text="Training partition of the served model, as `YYYY-MM-DD`.")
- manifest_version = serializers.CharField(help_text="Version of the serving manifest that chose the model.")
scored_at = serializers.DateTimeField(help_text="When the scoring sweep scored the report.")
scores = serializers.DictField(
child=serializers.FloatField(),
- help_text="Outcome head name to its calibrated probability. Empty when the served model skipped the report.",
+ help_text=(
+ "Outcome head name to its calibrated probability. Empty when the served model skipped the report, "
+ "and always empty for non-staff users."
+ ),
)
lifts = serializers.DictField(
child=serializers.FloatField(),
@@ -1399,8 +1408,8 @@ class SignalReportSerializer(serializers.ModelSerializer):
)
ranking = serializers.SerializerMethodField(
help_text=(
- "The served model's score from the latest ranking score artefact. Staff only: null for "
- "other users, and null when the report has no score."
+ "The served model's score from the latest ranking score artefact. Null for users who are neither "
+ "staff nor in the inbox model sort rollout, and null when the report has no score."
),
)
source_suggestion = serializers.SerializerMethodField(
@@ -1651,7 +1660,10 @@ class SignalReportSerializer(serializers.ModelSerializer):
@extend_schema_field(ReportRankingSerializer(allow_null=True))
def get_ranking(self, obj: SignalReport) -> dict | None:
request = self.context.get("request")
- if request is None or not request.user.is_staff:
+ if request is None:
+ return None
+ can_view = self.context.get("can_view_inbox_ranking")
+ if not (can_view() if can_view is not None else request.user.is_staff):
return None
from products.signals.backend.ranking.model_contract import ( # noqa: PLC0415 — keeps numpy and pandas off the API import path
@@ -1692,13 +1704,14 @@ class SignalReportSerializer(serializers.ModelSerializer):
except (ValueError, KeyError, TypeError, AttributeError):
logger.warning("signals.ranking_score.invalid_content", report_id=str(obj.id), artefact_id=str(art.id))
return None
+ is_staff = request.user.is_staff
return {
- "served_key": score.served_key,
- "model_name": served.model_name,
- "model_version": served.model_version,
- "manifest_version": score.manifest_version,
+ "served_key": score.served_key if is_staff else "",
+ "model_name": served.model_name if is_staff else "",
+ "model_version": served.model_version if is_staff else "",
+ "manifest_version": score.manifest_version if is_staff else "",
"scored_at": score.scored_at,
- "scores": served.scores,
+ "scores": served.scores if is_staff else {},
"lifts": lifts,
"readable_heads": readable_heads,
"stale": is_stale_score(score, latest_edit_at),
diff --git a/products/signals/backend/test/test_signal_report_api.py b/products/signals/backend/test/test_signal_report_api.py
index f3a20b99e6a0..81258b5dc41b 100644
--- a/products/signals/backend/test/test_signal_report_api.py
+++ b/products/signals/backend/test/test_signal_report_api.py
@@ -893,6 +893,48 @@ class TestSignalReportListAPI(APIBaseTest):
assert response.status_code == status.HTTP_200_OK
assert response.json()["ranking"] == expected
+ @parameterized.expand(
+ [
+ ("flag_on", True, status.HTTP_200_OK),
+ ("flag_off", False, status.HTTP_400_BAD_REQUEST),
+ ("flag_error_fails_closed", RuntimeError("flags unavailable"), status.HTTP_400_BAD_REQUEST),
+ ]
+ )
+ def test_model_sort_flag_opens_lifts_but_not_raw_scores_to_non_staff(self, _name, flag, expected_status):
+ self.user.is_staff = False
+ self.user.save()
+ high = self._create_report(title="High")
+ low = self._create_report(title="Low")
+ self._ranking_score_artefact(high, scores={"open": 0.8123}, lifts={"open": 3.2})
+ self._ranking_score_artefact(low, scores={"open": 0.1234}, lifts={"open": 0.5})
+
+ evaluate = {"side_effect": flag} if isinstance(flag, Exception) else {"return_value": flag}
+ with patch("products.signals.backend.ranking.access.feature_enabled_or_false", **evaluate):
+ response = self.client.get(self._list_url(status="ready", ordering="-ranking_open,status,-updated_at"))
+ detail = self.client.get(f"/api/projects/{self.team.id}/signals/reports/{high.id}/")
+
+ assert response.status_code == expected_status
+ if expected_status != status.HTTP_200_OK:
+ assert response.json()["attr"] == "ordering"
+ assert detail.json()["ranking"] is None
+ return
+ rows = response.json()["results"]
+ assert [row["id"] for row in rows] == [str(high.id), str(low.id)]
+ assert detail.json()["ranking"] == rows[0]["ranking"]
+ assert rows[0]["ranking"] == {
+ "served_key": "",
+ "model_name": "",
+ "model_version": "",
+ "manifest_version": "",
+ "scored_at": "2026-09-20T12:00:00Z",
+ "scores": {},
+ "lifts": {"open": 3.2},
+ "readable_heads": ["open"],
+ "stale": False,
+ }
+ for raw_score in ("0.1234", "0.8123", "report_embeddings"):
+ assert raw_score not in response.content.decode()
+
@parameterized.expand(
[
("edit_before_the_scored_vector", datetime(2026, 9, 20, 11, 0, tzinfo=UTC), 10, False),
diff --git a/products/signals/backend/views.py b/products/signals/backend/views.py
index ee5ea0341262..a5b1141e202c 100644
--- a/products/signals/backend/views.py
+++ b/products/signals/backend/views.py
@@ -150,6 +150,7 @@ from products.signals.backend.models import (
)
from products.signals.backend.pull_requests import import_report_pull_requests
from products.signals.backend.quota import self_driving_quota_enforcement_enabled, self_driving_quota_gate
+from products.signals.backend.ranking.access import can_view_inbox_ranking
from products.signals.backend.ranking.inbox_sort import (
PRIORITY_ORDERING,
RANKER_ORDERINGS,
@@ -2021,9 +2022,13 @@ class SignalReportViewSet(
),
)
+ @cached_property
+ def _can_view_inbox_ranking(self) -> bool:
+ return can_view_inbox_ranking(cast(User, self.request.user), self.team)
+
def _prefetch_signal_report_ranking_score(self, queryset):
- # Scores are internal model output, so only staff requests pay for the lookup.
- if not self.request.user.is_staff:
+ # Only requests that may see the score pay for the lookup.
+ if not self._can_view_inbox_ranking:
return queryset
return queryset.prefetch_related(
Prefetch(
@@ -2091,9 +2096,9 @@ class SignalReportViewSet(
db_field = self._SIGNAL_REPORT_ORDERING_FIELDS.get(name)
if db_field is None:
continue
- if name in self._RANKING_ORDERING_HEADS and not allow_ranking and not self.request.user.is_staff:
- # The serializer hides ranking scores from non-staff users, and the order would leak them.
- raise serializers.ValidationError({"ordering": f"Ordering by {name} is only available to staff."})
+ if name in self._RANKING_ORDERING_HEADS and not allow_ranking and not self._can_view_inbox_ranking:
+ # The serializer hides ranking scores from these users, and the order would leak them.
+ raise serializers.ValidationError({"ordering": f"Ordering by {name} is not available to you."})
clause = f"-{db_field}" if descending else db_field
clauses.append(clause)
return clauses
@@ -2161,6 +2166,8 @@ class SignalReportViewSet(
return {
**super().get_serializer_context(),
"team": self.team,
+ # Called only when a report renders its `ranking` field, so other requests skip the flag check.
+ "can_view_inbox_ranking": lambda: self._can_view_inbox_ranking,
"report_monitoring_enabled_by_team": {self.team_id: self._report_monitoring_enabled},
# For the serializer's refund_ineligibility_reason field — computed once per request,
# not per report (the bounds are org-level).
@@ -2540,7 +2547,7 @@ class SignalReportViewSet(
"ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, "
"ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields "
"sort by the served ranking model's probability for that outcome head, with unscored reports "
- "last in either direction. They are staff only: other users get a 400."
+ "last in either direction. They need staff or the inbox model sort rollout: other users get a 400."
),
),
OpenApiParameter(
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index 9f59209f3c03..1be3316470b8 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -661,7 +661,7 @@ export const SignalReportBillingExemptReasonEnumApi = {
} as const
/**
- * Outcome head name to its calibrated probability. Empty when the served model skipped the report.
+ * Outcome head name to its calibrated probability. Empty when the served model skipped the report, and always empty for non-staff users.
*/
export type ReportRankingApiScores = { [key: string]: number }
@@ -671,17 +671,17 @@ export type ReportRankingApiScores = { [key: string]: number }
export type ReportRankingApiLifts = { [key: string]: number }
export interface ReportRankingApi {
- /** Key of the served model in the scoring pass, as `<model_name>@<model_version>`. */
+ /** Key of the served model in the scoring pass, as `<model_name>@<model_version>`. Empty for non-staff users. */
served_key: string
- /** Feature family of the served model. */
+ /** Feature family of the served model. Empty for non-staff users. */
model_name: string
- /** Training partition of the served model, as `YYYY-MM-DD`. */
+ /** Training partition of the served model, as `YYYY-MM-DD`. Empty for non-staff users. */
model_version: string
- /** Version of the serving manifest that chose the model. */
+ /** Version of the serving manifest that chose the model. Empty for non-staff users. */
manifest_version: string
/** When the scoring sweep scored the report. */
scored_at: string
- /** Outcome head name to its calibrated probability. Empty when the served model skipped the report. */
+ /** Outcome head name to its calibrated probability. Empty when the served model skipped the report, and always empty for non-staff users. */
scores: ReportRankingApiScores
/** Outcome head name to its probability divided by the head's training base rate, e.g. 2.7 means 2.7x as likely as the average report. A head without a saved base rate has no entry. */
lifts: ReportRankingApiLifts
@@ -812,7 +812,7 @@ export interface SignalReportListApi {
* @nullable
*/
readonly channel_id: string | null
- /** The served model's score from the latest ranking score artefact. Staff only: null for other users, and null when the report has no score. */
+ /** The served model's score from the latest ranking score artefact. Null for users who are neither staff nor in the inbox model sort rollout, and null when the report has no score. */
readonly ranking: ReportRankingApi | null
/**
* Coarse sort key from the ranker named by the list response's ranker field, for sort=recommended only. Lower keys rank first. It is the score decile of the ranker's head (open, action or fixed), then the priority as a tiebreak. The priority ranker uses the priority only. Reports without a usable score sort after scored ones. Null for every other sort.
@@ -1056,7 +1056,7 @@ export interface SignalReportApi {
* @nullable
*/
readonly channel_id: string | null
- /** The served model's score from the latest ranking score artefact. Staff only: null for other users, and null when the report has no score. */
+ /** The served model's score from the latest ranking score artefact. Null for users who are neither staff nor in the inbox model sort rollout, and null when the report has no score. */
readonly ranking: ReportRankingApi | null
}
@@ -7976,7 +7976,7 @@ export type SignalsReportsListParams = {
*/
offset?: number
/**
- * Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They are staff only: other users get a 400.
+ * Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They need staff or the inbox model sort rollout: other users get a 400.
*/
ordering?: string
/**
diff --git a/products/signals/frontend/inbox/components/cards/InboxCards.stories.tsx b/products/signals/frontend/inbox/components/cards/InboxCards.stories.tsx
index 923dc031969d..c97ad4271f22 100644
--- a/products/signals/frontend/inbox/components/cards/InboxCards.stories.tsx
+++ b/products/signals/frontend/inbox/components/cards/InboxCards.stories.tsx
@@ -303,7 +303,7 @@ export const ReportCardRankingTags: Story = {
</CardList>
),
play: async ({ canvas }) => {
- await userEvent.hover(await canvas.findByText('2.1x engage'))
+ await userEvent.hover(await canvas.findByText('Very likely'))
},
}
diff --git a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
index aa866c29b7c6..a55b1da36f17 100644
--- a/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
+++ b/products/signals/frontend/inbox/components/cards/ReportCard.test.tsx
@@ -423,7 +423,7 @@ describe('ReportCard', () => {
})
it.each([
- ['with the impact column', true, 'ranking_fixed', '2.7x fix'],
+ ['with the impact column', true, 'ranking_fixed', 'Very likely'],
[
'without the impact column, falling back to the probability for a head with no lift',
false,
@@ -461,7 +461,7 @@ describe('ReportCard', () => {
cleanup()
enableRedesign()
const { rerender } = render(<ReportCard report={makeReport('r-2')} rankingSortField="ranking_fixed" />)
- expect(screen.getByText('Not scored')).toBeInTheDocument()
+ expect(screen.getByText('Not scored yet')).toBeInTheDocument()
const stale = makeReport('r-2', {
ranking: {
@@ -477,11 +477,11 @@ describe('ReportCard', () => {
},
})
rerender(<ReportCard report={stale} rankingSortField="ranking_fixed" />)
- expect(screen.getByText('Edited since scored')).toBeInTheDocument()
- expect(screen.queryByText('2.7x fix')).not.toBeInTheDocument()
+ expect(screen.getByText('Score out of date')).toBeInTheDocument()
+ expect(screen.queryByText('Very likely')).not.toBeInTheDocument()
rerender(<ReportCard report={makeReport('r-2')} />)
- expect(screen.queryByText('Not scored')).not.toBeInTheDocument()
+ expect(screen.queryByText('Not scored yet')).not.toBeInTheDocument()
})
it('does not show a list metric without a stored snapshot, under the legacy design, or with the metrics flag off', () => {
diff --git a/products/signals/frontend/inbox/components/cards/ReportCardRankingTag.tsx b/products/signals/frontend/inbox/components/cards/ReportCardRankingTag.tsx
index a8842afdf0bc..ec9e4adc30d8 100644
--- a/products/signals/frontend/inbox/components/cards/ReportCardRankingTag.tsx
+++ b/products/signals/frontend/inbox/components/cards/ReportCardRankingTag.tsx
@@ -1,59 +1,104 @@
import clsx from 'clsx'
+import { useCallback } from 'react'
-import { LemonTag, Tooltip } from '@posthog/lemon-ui'
+import { LemonTag, LemonTagType, Tooltip } from '@posthog/lemon-ui'
import { INBOX_RANKING_SCORES, InboxRankingScore, rankingScoreForField } from '../../filterOptions'
+import { captureInboxRankingDetailsViewed } from '../../inboxAnalytics'
import type { InboxRankingSortField } from '../../logics/inboxFiltersLogic'
import { SignalReport } from '../../types'
-import { formatRankingLift, formatRankingProbability } from './rankingFormat'
+import {
+ formatRankingLift,
+ formatRankingProbability,
+ RANKING_STRENGTH_LABELS,
+ RankingStrength,
+ rankingStrength,
+} from './rankingFormat'
import { RankingLiftBar } from './RankingLiftBar'
-function rankingLift(ranking: NonNullable<SignalReport['ranking']>, head: string): number | null {
+type Ranking = NonNullable<SignalReport['ranking']>
+
+const STRENGTH_TAG_TYPES: Record<RankingStrength, LemonTagType> = {
+ very_likely: 'success',
+ likely: 'highlight',
+ average: 'default',
+ unlikely: 'muted',
+}
+
+function rankingLift(ranking: Ranking, head: string): number | null {
const lift = ranking.lifts?.[head]
return typeof lift === 'number' && Number.isFinite(lift) ? lift : null
}
-function RankingTooltip({
- ranking,
- active,
-}: {
- ranking: NonNullable<SignalReport['ranking']>
- active: InboxRankingScore
-}): JSX.Element {
- const scores = [active, ...INBOX_RANKING_SCORES.filter((score) => score !== active)].filter(
+/** Raw probabilities and the model version come only to staff. Other users get lifts alone. */
+function rankingProbability(ranking: Ranking, head: string): number | null {
+ const probability = ranking.scores[head]
+ return typeof probability === 'number' ? probability : null
+}
+
+function RankingHoverCard({ ranking, active }: { ranking: Ranking; active: InboxRankingScore }): JSX.Element {
+ const lift = rankingLift(ranking, active.head)
+ const others = INBOX_RANKING_SCORES.filter(
(score) =>
- typeof ranking.scores[score.head] === 'number' &&
- (score === active || ranking.readable_heads.includes(score.head))
+ score !== active &&
+ ranking.readable_heads.includes(score.head) &&
+ (rankingLift(ranking, score.head) !== null || rankingProbability(ranking, score.head) !== null)
)
return (
- <div className="flex min-w-72 flex-col gap-1 text-xs">
- {scores.map((score) => {
- const probability = ranking.scores[score.head]
- const lift = rankingLift(ranking, score.head)
- return (
- <div key={score.head} className={clsx('flex items-center gap-2', score === active && 'font-bold')}>
- <span className="w-28 shrink-0">{score.name}</span>
- <span className="flex-1">
- <RankingLiftBar lift={lift} />
- </span>
- <span className="w-10 shrink-0 text-right tabular-nums">
- {lift !== null ? formatRankingLift(lift) : null}
- </span>
- <span className="w-10 shrink-0 text-right font-normal tabular-nums opacity-70">
- {formatRankingProbability(probability)}
- </span>
- </div>
- )
- })}
- <div className="opacity-70">Compared with the average report</div>
- <div className="mt-1 border-t border-primary pt-1 font-mono opacity-70">
- {ranking.model_name}@{ranking.model_version}
+ <div className="flex max-w-80 min-w-72 flex-col gap-2 text-xs">
+ <div>
+ <div className="font-semibold">
+ <span>{active.name}</span>:{' '}
+ <span>{lift !== null ? RANKING_STRENGTH_LABELS[rankingStrength(lift)] : 'no comparison'}</span>
+ </div>
+ <div className="opacity-70">{active.description}</div>
+ </div>
+ {lift !== null && (
+ <div>
+ The model rates this report <span>{formatRankingLift(lift)}</span> as likely as the average report.
+ </div>
+ )}
+ <div className="flex flex-col gap-1">
+ {[active, ...others].map((score) => {
+ const scoreLift = rankingLift(ranking, score.head)
+ const probability = rankingProbability(ranking, score.head)
+ return (
+ <div
+ key={score.head}
+ className={clsx('flex items-center gap-2', score === active && 'font-bold')}
+ >
+ <span className="w-16 shrink-0">{score.name}</span>
+ <span className="flex-1">
+ <RankingLiftBar lift={scoreLift} />
+ </span>
+ <span className="w-24 shrink-0 text-right whitespace-nowrap">
+ {scoreLift !== null ? RANKING_STRENGTH_LABELS[rankingStrength(scoreLift)] : null}
+ </span>
+ {probability !== null && (
+ <span className="w-10 shrink-0 text-right font-normal tabular-nums opacity-70">
+ {formatRankingProbability(probability)}
+ </span>
+ )}
+ </div>
+ )
+ })}
</div>
+ <div className="opacity-70">
+ Very likely means 2x the average or more. The model estimates this from past reports.
+ </div>
+ {ranking.model_name && (
+ <div className="border-t border-primary pt-1 font-mono opacity-70">
+ {ranking.model_name}@{ranking.model_version}
+ </div>
+ )}
</div>
)
}
-/** The active model sort's lift for one report, in the card's meta row. Falls back to the probability when the head has no lift, and shows no score when the report was edited after it was scored. */
+/**
+ * How likely the report is to reach the active model sort's outcome, in the card's meta row. A report
+ * edited after it was scored, or not scored yet, says so, because the model sort puts it after the scored ones.
+ */
export function ReportCardRankingTag({
report,
sortField,
@@ -62,29 +107,58 @@ export function ReportCardRankingTag({
sortField: InboxRankingSortField
}): JSX.Element {
const score = rankingScoreForField(sortField)
- const { head, tagLabel } = score
- const probability = report.ranking?.scores[head]
- const lift = report.ranking ? rankingLift(report.ranking, head) : null
- if (!report.ranking || typeof probability !== 'number') {
+ const ranking = report.ranking
+ const lift = ranking ? rankingLift(ranking, score.head) : null
+ const probability = ranking ? rankingProbability(ranking, score.head) : null
+ const state = !ranking || (lift === null && probability === null) ? 'unscored' : ranking.stale ? 'stale' : 'scored'
+ const strength = lift !== null ? rankingStrength(lift) : null
+ // Tooltip re-fires onOpen when the callback identity changes, so a new one each render would double count views.
+ const onOpen = useCallback(
+ (): void =>
+ captureInboxRankingDetailsViewed({
+ report,
+ head: score.head,
+ state,
+ strength: state === 'scored' ? strength : null,
+ }),
+ [report, score.head, state, strength]
+ )
+
+ if (!ranking || state === 'unscored') {
return (
- <LemonTag size="small" type="muted" data-attr="inbox-ranking-tag">
- Not scored
- </LemonTag>
+ <Tooltip
+ title="The model has not scored this report yet. Until it does, the report sorts after the scored ones."
+ onOpen={onOpen}
+ >
+ <LemonTag size="small" type="muted" className="cursor-help" data-attr="inbox-ranking-tag">
+ Not scored yet
+ </LemonTag>
+ </Tooltip>
)
}
- if (report.ranking.stale) {
+ if (state === 'stale') {
return (
- <Tooltip title="The title or summary changed after this report was scored, so the score describes the old text.">
+ <Tooltip
+ title="The title or summary changed after the model scored this report. Until the model scores it again, it sorts after the scored ones."
+ onOpen={onOpen}
+ >
<LemonTag size="small" type="muted" className="cursor-help" data-attr="inbox-ranking-tag">
- Edited since scored
+ Score out of date
</LemonTag>
</Tooltip>
)
}
return (
- <Tooltip title={<RankingTooltip ranking={report.ranking} active={score} />}>
- <LemonTag size="small" className="cursor-help tabular-nums" data-attr="inbox-ranking-tag">
- {lift !== null ? formatRankingLift(lift) : formatRankingProbability(probability)} {tagLabel}
+ <Tooltip title={<RankingHoverCard ranking={ranking} active={score} />} onOpen={onOpen}>
+ <LemonTag
+ size="small"
+ type={strength ? STRENGTH_TAG_TYPES[strength] : 'default'}
+ className="cursor-help tabular-nums"
+ data-attr="inbox-ranking-tag"
+ >
+ {strength
+ ? RANKING_STRENGTH_LABELS[strength]
+ : `${formatRankingProbability(probability ?? 0)} ${score.tagLabel}`}
</LemonTag>
</Tooltip>
)
diff --git a/products/signals/frontend/inbox/components/cards/rankingFormat.test.ts b/products/signals/frontend/inbox/components/cards/rankingFormat.test.ts
index be7fb27fefa2..4034fc1c00b5 100644
--- a/products/signals/frontend/inbox/components/cards/rankingFormat.test.ts
+++ b/products/signals/frontend/inbox/components/cards/rankingFormat.test.ts
@@ -1,4 +1,4 @@
-import { formatRankingLift, rankingLiftBarPercent } from './rankingFormat'
+import { formatRankingLift, rankingLiftBarPercent, rankingStrength } from './rankingFormat'
describe('rankingFormat', () => {
test.each([
@@ -23,6 +23,18 @@ describe('rankingFormat', () => {
expect(rankingLiftBarPercent(lift)).toBeCloseTo(expected)
})
+ test.each([
+ [3.1, 'very_likely'],
+ [2, 'very_likely'],
+ [1.99, 'likely'],
+ [1.25, 'likely'],
+ [1, 'average'],
+ [0.8, 'unlikely'],
+ [0.2, 'unlikely'],
+ ])('reads a lift of %s as %s', (lift, expected) => {
+ expect(rankingStrength(lift)).toBe(expected)
+ })
+
it('places a lift and its inverse at equal distances from 1x', () => {
expect(rankingLiftBarPercent(4) - 50).toBeCloseTo(50 - rankingLiftBarPercent(0.25))
})
diff --git a/products/signals/frontend/inbox/components/cards/rankingFormat.ts b/products/signals/frontend/inbox/components/cards/rankingFormat.ts
index f1a7da948548..56d368e3ef8d 100644
--- a/products/signals/frontend/inbox/components/cards/rankingFormat.ts
+++ b/products/signals/frontend/inbox/components/cards/rankingFormat.ts
@@ -22,3 +22,26 @@ export function rankingLiftBarPercent(lift: number): number {
const position = (Math.log10(lift) + 1) / 2
return Math.min(1, Math.max(0, position)) * 100
}
+
+export type RankingStrength = 'very_likely' | 'likely' | 'average' | 'unlikely'
+
+export const RANKING_STRENGTH_LABELS: Record<RankingStrength, string> = {
+ very_likely: 'Very likely',
+ likely: 'Likely',
+ average: 'About average',
+ unlikely: 'Unlikely',
+}
+
+/** A lift as a word. The bands sit at equal distances from 1x on the bar's log scale. */
+export function rankingStrength(lift: number): RankingStrength {
+ if (lift >= 2) {
+ return 'very_likely'
+ }
+ if (lift >= 1.25) {
+ return 'likely'
+ }
+ if (lift > 0.8) {
+ return 'average'
+ }
+ return 'unlikely'
+}
diff --git a/products/signals/frontend/inbox/filterOptions.tsx b/products/signals/frontend/inbox/filterOptions.tsx
index 6ddff1141cc7..358c73d1dadd 100644
--- a/products/signals/frontend/inbox/filterOptions.tsx
+++ b/products/signals/frontend/inbox/filterOptions.tsx
@@ -94,7 +94,7 @@ export const INBOX_SORT_OPTIONS: InboxSortOption[] = [
]
/**
- * The three ranking model scores the staff UI shows, in display order. Each reads one outcome head.
+ * The three ranking model scores the inbox shows, in display order. Each reads one outcome head.
* The model serves more heads, but the sort menu, the card tag and the activity log lead with these.
*/
export interface InboxRankingScore {
@@ -102,7 +102,7 @@ export interface InboxRankingScore {
head: string
name: string
sortLabel: string
- /** The short word the card tag uses after the lift ("2.1x fix"). */
+ /** The short word the card tag uses after a probability with no lift ("12% fix"). Staff only. */
tagLabel: string
description: string
}
@@ -134,7 +134,7 @@ export const INBOX_RANKING_SCORES: InboxRankingScore[] = [
},
]
-/** Staff-only sorts by the ranking model's served probability for one score. Descending only. */
+/** Sorts by the ranking model's served probability for one score, behind the model sort flag. Descending only. */
export const INBOX_MODEL_SORT_OPTIONS: InboxSortOption[] = INBOX_RANKING_SCORES.map((score) => ({
label: score.sortLabel,
field: score.field,
diff --git a/products/signals/frontend/inbox/inboxAnalytics.ts b/products/signals/frontend/inbox/inboxAnalytics.ts
index fd96b48ffaed..641defae7660 100644
--- a/products/signals/frontend/inbox/inboxAnalytics.ts
+++ b/products/signals/frontend/inbox/inboxAnalytics.ts
@@ -49,6 +49,8 @@ export const INBOX_EVENTS = {
REPORT_SOURCE_SUGGESTION_SHOWN: 'Inbox report source suggestion shown',
REPORT_SOURCE_SUGGESTION_CLICKED: 'Inbox report source suggestion clicked',
REPORT_FEEDBACK_NOTE: 'Inbox report feedback note',
+ // Cloud-only for now: the desktop inbox has no model sorts.
+ RANKING_DETAILS_VIEWED: 'Inbox ranking details viewed',
SETTINGS_CHANGED: 'Inbox settings changed',
SOURCE_CONNECTED: 'Signal source connected',
SOURCE_DISABLED: 'Signal source disabled',
@@ -571,6 +573,21 @@ export function captureInboxReportScrolled(params: {
})
}
+/** The hover card on a report's model score opened, under one of the model sorts. */
+export function captureInboxRankingDetailsViewed(params: {
+ report: SignalReport
+ head: string
+ state: 'scored' | 'stale' | 'unscored'
+ strength: string | null
+}): void {
+ captureInboxEvent(INBOX_EVENTS.RANKING_DETAILS_VIEWED, {
+ ...baseReportProperties(params.report),
+ ranking_head: params.head,
+ ranking_state: params.state,
+ ranking_strength: params.strength,
+ })
+}
+
export function captureInboxReportAction(params: {
/** Omitted for bulk actions, which act on a selection rather than a single report. */
report?: SignalReport | null
diff --git a/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts b/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
index 4445da318b6d..90212a19fef8 100644
--- a/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/inboxFiltersLogic.test.ts
@@ -286,13 +286,13 @@ describe('inboxFiltersLogic', () => {
'asc',
],
[
- 'resets the stored sort for a non-staff user',
+ 'keeps a stored model sort for a non-staff user with the flag',
'ranking_action',
true,
false,
- 'recommended',
- 'recommended',
- 'asc',
+ 'ranking_action',
+ 'ranking_action',
+ 'desc',
],
[
'falls back to the default for a stored head the menu no longer offers',
diff --git a/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts b/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
index 6c57784915f0..b2db4615c25c 100644
--- a/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
+++ b/products/signals/frontend/inbox/logics/inboxFiltersLogic.ts
@@ -427,7 +427,7 @@ export interface inboxFiltersLogicMeta {
activeCreatedWindow: InboxCreatedWindow | null
) => boolean
isScopedToMe: (scope: InboxScope, user: UserType | null) => boolean
- modelSortAvailable: (featureFlags: FeatureFlagsSet, user: UserType | null) => boolean
+ modelSortAvailable: (featureFlags: FeatureFlagsSet) => boolean
activeSortField: (
sortField: InboxSortField,
sortDirection: InboxSortDirection,
@@ -753,11 +753,11 @@ export const inboxFiltersLogic = kea<inboxFiltersLogicType>([
(scope: InboxScope, user: UserType | null): boolean =>
!!user?.uuid && (scope === INBOX_SCOPE_FOR_YOU || parseTeammateInboxScope(scope) === user.uuid),
],
- // Staff only, the same rule as the `ranking` field the backend returns.
+ // The flag is the rollout. The backend also lets every staff user sort by the model, but the menu stays
+ // behind the flag so that staff on an instance with no scores do not get it.
modelSortAvailable: [
- (s) => [s.featureFlags, s.user],
- (featureFlags: FeatureFlagsSet, user: UserType | null): boolean =>
- !!featureFlags[FEATURE_FLAGS.INBOX_MODEL_SORT] && !!user?.is_staff,
+ (s) => [s.featureFlags],
+ (featureFlags: FeatureFlagsSet): boolean => !!featureFlags[FEATURE_FLAGS.INBOX_MODEL_SORT],
],
// The sort the list requests and renders with. A persisted sort the menu no longer offers, or a
// model sort persisted while it was available, falls back to the default.
diff --git a/products/signals/frontend/inbox/types.ts b/products/signals/frontend/inbox/types.ts
index 1e4c15fd1027..06c6fa7367d2 100644
--- a/products/signals/frontend/inbox/types.ts
+++ b/products/signals/frontend/inbox/types.ts
@@ -149,7 +149,7 @@ export interface SignalReport extends Pick<SignalReportApi, 'monitoring_started_
billing_exempt_reason?: string | null
/** Backend-owned refund eligibility: why a refund would be rejected right now, null when it would be accepted. */
refund_ineligibility_reason?: string | null
- /** The served ranking model's score. Staff only: null for other users and for unscored reports. */
+ /** The served ranking model's score. Null for users outside staff and the model sort flag, and for unscored reports. Raw scores and model metadata are staff only. */
ranking?: ReportRankingApi | null
/** Coarse sort key from the list response's ranker, for the Recommended sort only. Lower keys rank first. */
inbox_merge_key?: number | null
diff --git a/products/signals/frontend/inbox/utils/reportOrdering.test.ts b/products/signals/frontend/inbox/utils/reportOrdering.test.ts
index 6ee0ab36da96..f6165ce0c87a 100644
--- a/products/signals/frontend/inbox/utils/reportOrdering.test.ts
+++ b/products/signals/frontend/inbox/utils/reportOrdering.test.ts
@@ -66,4 +66,25 @@ describe('compareSignalReports', () => {
rows.sort(compareSignalReports('created_at', 'desc'))
expect(rows.map((r) => r.id)).toEqual(['fractional', 'whole-second'])
})
+ // Non-staff users get lifts without probabilities, and the merged list must keep the server's model order.
+ it('orders a model sort by the lift when the report has no probability', () => {
+ const ranking = {
+ served_key: '',
+ model_name: '',
+ model_version: '',
+ manifest_version: '',
+ scored_at: '2026-06-01T00:00:00Z',
+ scores: {},
+ readable_heads: ['fixed'],
+ stale: false,
+ }
+ const rows = [
+ report('unscored', { ranking: null }),
+ report('low', { ranking: { ...ranking, lifts: { fixed: 0.5 } } }),
+ report('stale-high', { ranking: { ...ranking, lifts: { fixed: 9 }, stale: true } }),
+ report('high', { ranking: { ...ranking, lifts: { fixed: 3 } } }),
+ ]
+ rows.sort(compareSignalReports('ranking_fixed', 'desc'))
+ expect(rows.map((r) => r.id)).toEqual(['high', 'low', 'unscored', 'stale-high'])
+ })
})
diff --git a/products/signals/frontend/inbox/utils/reportOrdering.ts b/products/signals/frontend/inbox/utils/reportOrdering.ts
index f039ee3f96d1..04f2ab65ae94 100644
--- a/products/signals/frontend/inbox/utils/reportOrdering.ts
+++ b/products/signals/frontend/inbox/utils/reportOrdering.ts
@@ -47,12 +47,17 @@ function timestampKey(value: string): string {
return value.includes('.') ? value : value.replace(/(Z|[+-]\d\d:?\d\d)$/, '.000000$1')
}
-/** The served probability a model sort orders by, or null when the report has no score for that head or the score is stale. */
+/**
+ * The served probability a model sort orders by, or null when the report has no score for that head or the score is stale.
+ * Non-staff users get no probabilities, so their rows order by the lift. The lift is the probability over the head's
+ * base rate, so it gives the same order.
+ */
export function rankingSortScore(report: SignalReport, field: InboxRankingSortField): number | null {
if (report.ranking?.stale) {
return null
}
- const score = report.ranking?.scores[rankingScoreForField(field).head]
+ const head = rankingScoreForField(field).head
+ const score = report.ranking?.scores[head] ?? report.ranking?.lifts?.[head]
return typeof score === 'number' ? score : null
}
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 04a808cb61f7..4af68ef5f75b 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -74846,7 +74846,7 @@ export namespace Schemas {
} as const;
/**
- * Outcome head name to its calibrated probability. Empty when the served model skipped the report.
+ * Outcome head name to its calibrated probability. Empty when the served model skipped the report, and always empty for non-staff users.
*/
export type ReportRankingScores = {[key: string]: number};
@@ -74856,17 +74856,17 @@ export namespace Schemas {
export type ReportRankingLifts = {[key: string]: number};
export interface ReportRanking {
- /** Key of the served model in the scoring pass, as `<model_name>@<model_version>`. */
+ /** Key of the served model in the scoring pass, as `<model_name>@<model_version>`. Empty for non-staff users. */
served_key: string;
- /** Feature family of the served model. */
+ /** Feature family of the served model. Empty for non-staff users. */
model_name: string;
- /** Training partition of the served model, as `YYYY-MM-DD`. */
+ /** Training partition of the served model, as `YYYY-MM-DD`. Empty for non-staff users. */
model_version: string;
- /** Version of the serving manifest that chose the model. */
+ /** Version of the serving manifest that chose the model. Empty for non-staff users. */
manifest_version: string;
/** When the scoring sweep scored the report. */
scored_at: string;
- /** Outcome head name to its calibrated probability. Empty when the served model skipped the report. */
+ /** Outcome head name to its calibrated probability. Empty when the served model skipped the report, and always empty for non-staff users. */
scores: ReportRankingScores;
/** Outcome head name to its probability divided by the head's training base rate, e.g. 2.7 means 2.7x as likely as the average report. A head without a saved base rate has no entry. */
lifts: ReportRankingLifts;
@@ -74997,7 +74997,7 @@ export namespace Schemas {
* @nullable
*/
readonly channel_id: string | null;
- /** The served model's score from the latest ranking score artefact. Staff only: null for other users, and null when the report has no score. */
+ /** The served model's score from the latest ranking score artefact. Null for users who are neither staff nor in the inbox model sort rollout, and null when the report has no score. */
readonly ranking: ReportRanking | null;
/**
* Coarse sort key from the ranker named by the list response's ranker field, for sort=recommended only. Lower keys rank first. It is the score decile of the ranker's head (open, action or fixed), then the priority as a tiebreak. The priority ranker uses the priority only. Reports without a usable score sort after scored ones. Null for every other sort.
@@ -96697,7 +96697,7 @@ export namespace Schemas {
* @nullable
*/
readonly channel_id: string | null;
- /** The served model's score from the latest ranking score artefact. Staff only: null for other users, and null when the report has no score. */
+ /** The served model's score from the latest ranking score artefact. Null for users who are neither staff nor in the inbox model sort rollout, and null when the report has no score. */
readonly ranking: ReportRanking | null;
}
@@ -130975,7 +130975,7 @@ export namespace Schemas {
*/
offset?: number;
/**
- * Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They are staff only: other users get a 400.
+ * Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They need staff or the inbox model sort rollout: other users get a 400.
*/
ordering?: string;
/**
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 60cc5a6f1734..f6406adaf07d 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -211,7 +211,7 @@ export const SignalsReportsListQueryParams = () => zod.object({
.string()
.optional()
.describe(
- "Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_\* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They are staff only: other users get a 400."
+ "Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_\* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They need staff or the inbox model sort rollout: other users get a 400."
),
priority: zod
.string()
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 3b6ba0ab590c..589d4af6a069 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
@@ -51,7 +51,7 @@
"type": "number"
},
"ordering": {
- "description": "Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They are staff only: other users get a 400.",
+ "description": "Comma-separated ordering clauses. Each clause is a field name optionally prefixed with '-' for descending. Allowed fields: status, is_suggested_reviewer, signal_count, total_weight, priority, created_at, updated_at, id, ranking_pr_merged, ranking_pr_created, ranking_action, ranking_open, ranking_fixed, ranking_discuss, ranking_thumbs_up, ranking_reviewer_fix, ranking_refund, ranking_dismiss_wrong, ranking_dismiss_lowvalue. Defaults to '-is_suggested_reviewer,status,-updated_at'. The ranking_* fields sort by the served ranking model's probability for that outcome head, with unscored reports last in either direction. They need staff or the inbox model sort rollout: other users get a 400.",
"type": "string"
},
"priority": {