feat(seer): Add browser-fetching autofixRef embed - #122099
Draft
ryan953 wants to merge 1 commit into
Draft
Conversation
The existing autofix embed takes the step's full markdown write-up as a prop, which requires Seer to poll the run to completion and format the result before emitting the tag. Add a sibling autofixRef embed that instead takes only the issue id/shortId, run id, and step, and fetches/polls the run state itself in the browser via useExplorerAutofix — narrowed to accept Pick<Group, 'id' | 'shortId'> so it doesn't need a full Group. Once a step completes it shows continue/retry actions; this lets callers emit the tag immediately after triggering a step instead of waiting on it. Includes a live-data stories page with an issue picker and step-trigger buttons for manual testing.
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.
Adds
autofixRef, a sibling to theautofixSeer markdown embed. Whereautofixtakes the full markdown write-up for a step as a prop ({step, result, id, shortId}) and has to be filled in by Seer once a run finishes,autofixReftakes just{step, id, shortId, runId}and fetches/polls the run itself in the browser viauseExplorerAutofix— showing progress while the step runs, the result once it completes, and buttons to continue to the next step or retry on error.This lets a caller (Seer's Code Mode, in a companion
getsentry/seerchange) emit the tag right after triggering a step instead of polling to completion and writing up the result first.useExplorerAutofix'sgroupparameter is narrowed fromGrouptoPick<Group, 'id' | 'shortId'>— it only ever read those two fields, and the embed only has an issue id/shortId, not a fullGroup. Existing callers are unaffected sinceGroupsatisfies the narrower type.Includes an
autofixRef.stories.tsxpage with a live issue picker and root-cause/plan/code-changes trigger buttons for manual testing, and the regeneratedembed_widgets.generated.json.Not yet manually verified in a running browser — typecheck and lint pass, but the stories page itself hasn't been visually checked.