Skip to content

fix(cli): Accept user.display as a replay explore field - #1605

Merged
BYK merged 1 commit into
mainfrom
fix/cli-replay-user-display
Oct 23, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/cli-replay-user-display

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

sentry explore --dataset replays --field user.display failed with a ValidationError because the replay field map had no user.display entry (CLI-1EZ). Agents reach for it because the Discover datasets support it.

It now resolves to the same user label the replay list already shows (display name, then username, email, id, IP) and requests the user root field from the API.

Ported from getsentry/cli#1639, which is being closed with the repo archive.

via BYK.

--

View Junior Session in Sentry

`sentry explore --dataset replays --field user.display` failed with a
ValidationError because the replay field map had no user.display entry
(CLI-1EZ). Agents reach for it because Discover datasets support it.
Resolve it to the same user label the replay list shows and request the
user root field from the API.

Ported from getsentry/cli#1639.

Co-Authored-By: BYK <[email protected]>
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 22, 2026 6:30pm UTC

Request Review

@BYK
BYK merged commit 43ffcd4 into main Oct 23, 2026
26 checks passed
@BYK
BYK deleted the fix/cli-replay-user-display branch October 23, 2026 11:17
BYK added a commit that referenced this pull request Oct 23, 2026
…1617)

This is a follow-up to #1605. `sentry explore --dataset replays` checked
`--field` against a hand-written resolver table, plus a `switch` that
mapped each nested field to its API root. Every new replay field meant
another CLI change.

The field list now comes from `@sentry/api/valibot`:
- **API fields:** every dotted path in a `vListReplays` row whose root
appears in the `field=` enum of `vListOrganizationReplaysData`.
- **Request root:** the first segment of the path.
- **Value:** read from the replay row by path.

The CLI keeps only its own aliases and convenience columns: `url`,
`release`, `user`/`user.display`, `count_traces`, `screens`,
`seen_by_me`, and similar.

**Behavior changes**
- No longer accepted, because the published schema doesn't offer them:
- `device.model_id` was never in the response, so it always resolved to
empty.
- `info_id(s)` and `warning_id(s)` are withheld from the public response
as internal UI fields.
- Newly accepted: `user.display_name`, `clicks`, `segment_names`,
`tags`.
- `ota_updates.*` and `replay_type` become available once `@sentry/api`
moves past 0.356, where the index started accepting them. At that point,
flip the `replay_type` assertion in `test/lib/replay-search.test.ts` and
`test/commands/explore.test.ts`.

**Related:** getsentry/sentry#128639 removes `info_ids`/`warning_ids`
from the public `field` enum, so request and response agree. This PR
doesn't depend on it, because response paths are already filtered by the
enum.

**Checks**
- Pass: `pnpm run typecheck` and `pnpm run lint`.
- Pass: `vitest run` for `test/lib/replay-search.test.ts`,
`test/commands/explore.test.ts`, and `test/commands/replay`.
- The full `test/lib` + `test/commands` run had 7 failures in permission
and daemon tests unrelated to replays. The sandbox doesn't enforce
`chmod`, so those tests can't pass there.

<!-- junior-request-attribution:start -->
via **BYK**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC010884QHLG%3A1792754298.933159 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC010884QHLG%3A1792754298.933159)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC010884QHLG%3A1792754298.933159/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Burak Yigit Kaya <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — 7f2369ba Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant