Skip to content

feat(seer): Scope /conversations slash command lookup with start/end/project#115785

Merged
chromy merged 2 commits into
masterfrom
chromy/2026-05-19-seer-conversations-url-scope
May 19, 2026
Merged

feat(seer): Scope /conversations slash command lookup with start/end/project#115785
chromy merged 2 commits into
masterfrom
chromy/2026-05-19-seer-conversations-url-scope

Conversation

@chromy
Copy link
Copy Markdown
Contributor

@chromy chromy commented May 19, 2026

The Seer Explorer's /conversations slash command opened the AI conversation view with only the conversation ID, leaving the page filter at its 30d default. The detail page then scanned a 30-day window to locate spans for the conversation.

  • getConversationsUrlForExternalUse now accepts optional start, end, and project query params. The other two callers (blockComponents.tsx, seerExplorer/utils.tsx) are unaffected.
  • The /conversations handler in explorerDrawerContent.tsx derives start/end from the min/max of the session blocks' timestamps and passes project=SEER_AGENTS_PROJECT_ID.
  • Pulled the hardcoded sentry.io seer-agents project ID (6178942) out of prebuiltDashboardRenderer.tsx and the new drawer code into a shared SEER_AGENTS_PROJECT_ID constant in sentry/constants.

…project

The Seer Explorer's `/conversations` slash command opened the AI
conversation view with only the conversation ID, leaving the page filter
at its 30d default. The detail page then scanned a 30-day window to
locate spans for the conversation.

Pass `start`/`end` derived from the min/max of the session blocks'
timestamps, plus `project=6178942` (sentry.io seer-agents project), so
the conversation lookup is narrowed to the actual run window. The new
URL options on `getConversationsUrlForExternalUse` are optional, so the
other two callers are unaffected.

Agent transcript: https://claudescope.sentry.dev/share/i18cYDMV5-hJR8QQjBdmbwYdc_bCGs7JmzocWZqF7JM
@chromy chromy requested review from a team as code owners May 19, 2026 12:29
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

Comment thread static/app/views/seerExplorer/components/drawer/explorerDrawerContent.tsx Outdated
Both `prebuiltDashboardRenderer.tsx` and the Seer Explorer drawer
hardcoded `6178942` (the sentry.io seer-agents project). Pull it into
`sentry/constants` so the two callsites share one definition.
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 1 potential issue.

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 0683188. Configure here.

}
return getConversationsUrlForExternalUse('sentry', runId, {
start: minTs === Infinity ? undefined : new Date(minTs).toISOString(),
end: maxTs === -Infinity ? undefined : new Date(maxTs).toISOString(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing time buffer on conversation URL timestamps

Medium Severity

The start and end timestamps are set to the exact min/max block timestamps with no padding. The existing getConversationDetailUrl in conversationsTable.tsx intentionally adds a ±1 hour buffer (ONE_HOUR_MS) because the conversation detail page's useConversation hook passes URL-provided datetimes straight through to the API query via normalizeDateTimeParams without adding its own buffer. Without this padding, the detail page's span query may miss spans at the boundaries of the conversation whose timestamps don't align exactly with block timestamps.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0683188. Configure here.

@chromy chromy merged commit 6a1b959 into master May 19, 2026
78 checks passed
@chromy chromy deleted the chromy/2026-05-19-seer-conversations-url-scope branch May 19, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants