Skip to content

fix(people): Count dashboard conversations in personal spend - #2432

Merged
dcramer merged 2 commits into
mainfrom
fix/people-spend-web-actors
Oct 30, 2026
Merged

dcramer merged 2 commits into
mainfrom
fix/people-spend-web-actors

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Personal spend (profile menu 7d/30d), the People profile, and the People list left out conversations started from the dashboard.

verifiedActorWhere required juniorIdentities.provider = "slack". That filter came in with the SQL people API (#738). At that time, Slack was the only provider with human identities; junior identities were only system actors (scheduler, local CLI). Dashboard actors were added later (#1371) as kind: "user", provider: "junior" identities that have a verified email and a linked user. The Slack-only filter skipped them.

The predicate now matches verified identities with kind = "user" from any provider. System identities stay out explicitly, even if one were linked to a user. Identity upsert links users only for user-kind identities. The predicate checks this directly so the guard does not depend on that write-path rule.

With web identities included, the grouped MAX(providerSubjectId) / MAX(handle) columns could return a web identity's email as slackUserId. Those columns now read only Slack identities. locations/query.ts already uses the same pattern.

The Slack provider filter in api/mentions.ts stays. It resolves Slack mention ids, so Slack-only is correct there.

Refs #2431 (bug 1 only; bug 2 is handled separately).

via David Cramer.

--

View Session [Sentry]

People queries filtered actor identities to provider = slack, which
predates dashboard (web) actors. Web conversations store a verified
junior provider user identity, so their spend and activity were missing
from the profile menu, People profile, and People list.

Match verified user-kind identities from any provider instead, and keep
system identities out. Read slackUserId and slackUserName only from
Slack identities so web-only people do not show their email as a Slack
user id.

Refs #2431

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 30, 2026 3:46pm UTC

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b1162b6. Configure here.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

2 screenshot changes — 2 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed

Recent People profile rows now read Slack subject and handle only from
Slack identities, so a web identity email never shows as slackUserId.
The People profile surface rollup now maps source web to the api
surface, which matches the recent conversation projection.

Refs #2431
@dcramer
dcramer merged commit 43446bd into main Oct 30, 2026
44 checks passed
@dcramer
dcramer deleted the fix/people-spend-web-actors branch October 30, 2026 16:17

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 3e3fb3c1 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant