Repository navigation
ref(cli): Derive replay explore fields from the @sentry/api schema - #1617
Merged
Merged
Conversation
The replay explore field list was a hand-maintained resolver table plus a switch mapping each nested field to its API root. Build it from @sentry/api instead: every dotted path in a vListReplays row whose root the index endpoint accepts in `field=`. Values are read by path, and the request root is the path's first segment. The CLI now owns only its aliases and convenience columns (url, release, user.display, count_traces, ...). Fields the published schema does not offer are no longer accepted: device.model_id (never in the response) and info_id(s)/warning_id(s) (withheld from the public schema as internal). Fields newly accepted from the schema include user.display_name, clicks, segment_names and tags; ota_updates.* and replay_type follow once @sentry/api is bumped past 0.356. Co-Authored-By: Burak Yigit Kaya <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Oct 23, 2026
This was referenced Oct 23, 2026
BYK
added a commit
that referenced
this pull request
Oct 23, 2026
Upgrades the CLI's `@sentry/api` dependency from `^0.399.0` (#1643) to `^0.400.0`, the first release with getsentry/sentry#128639. That change withholds `info_ids` and `warning_ids` from the public replay `field` enum. The 0.400.0 types differ from 0.399.0 only in that enum, on the replay index and details endpoints. The lockfile change only covers `@sentry/api`. `pnpm-workspace.yaml` moves the `minimumReleaseAgeExclude` entry to 0.400.0, because it was published today. Since #1617, replay explore builds its fields from the schema. New assertions in `test/lib/replay-search.test.ts` check that: - `replay_type` and `ota_updates.channel` are supported. - `info_ids` and `warning_ids` are neither supported fields nor requestable roots. Verification: typecheck and lint pass, and a frozen-lockfile install passes. The replay, explore, and issue-app-links tests pass (149 tests). I didn't rerun the full suite, because the schema change is limited to that enum. <!-- 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: BYK <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #1605.
sentry explore --dataset replayschecked--fieldagainst a hand-written resolver table, plus aswitchthat 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:vListReplaysrow whose root appears in thefield=enum ofvListOrganizationReplaysData.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
device.model_idwas never in the response, so it always resolved to empty.info_id(s)andwarning_id(s)are withheld from the public response as internal UI fields.user.display_name,clicks,segment_names,tags.ota_updates.*andreplay_typebecome available once@sentry/apimoves past 0.356, where the index started accepting them. At that point, flip thereplay_typeassertion intest/lib/replay-search.test.tsandtest/commands/explore.test.ts.Related: getsentry/sentry#128639 removes
info_ids/warning_idsfrom the publicfieldenum, so request and response agree. This PR doesn't depend on it, because response paths are already filtered by the enum.Checks
pnpm run typecheckandpnpm run lint.vitest runfortest/lib/replay-search.test.ts,test/commands/explore.test.ts, andtest/commands/replay.test/lib+test/commandsrun had 7 failures in permission and daemon tests unrelated to replays. The sandbox doesn't enforcechmod, so those tests can't pass there.via BYK.
--
View Junior Session [Sentry]