Skip to content

Conversation

@roaga
Copy link
Member

@roaga roaga commented Dec 6, 2025

The explorer client can now enable/disable coding tools, view returned file patches, and make and view PRs

Part of AIML-1698

Requires https://github.com/getsentry/seer/pull/4200/

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 6, 2025
@linear
Copy link

linear bot commented Dec 6, 2025

@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

❌ Patch coverage is 97.22222% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/explorer/client_models.py 96.29% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #104502    +/-   ##
=========================================
  Coverage   80.50%    80.51%            
=========================================
  Files        9352      9352            
  Lines      400285    400464   +179     
  Branches    25704     25704            
=========================================
+ Hits       322264    322418   +154     
- Misses      77553     77578    +25     
  Partials      468       468            

@roaga roaga requested a review from aliu39 December 8, 2025 15:51
@roaga roaga marked this pull request as ready for review December 8, 2025 15:51
@roaga roaga requested a review from a team as a code owner December 8, 2025 15:51
)

if not any_creating:
return state
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Polling loop exits early if PR state not yet initialized

The push_changes polling loop will exit immediately if repo_pr_states is empty or doesn't contain any PR with pr_creation_status == "creating". Since any() on an empty iterable returns False, if the server hasn't yet populated repo_pr_states with the new PR being created by the time the first fetch_run_status call returns, the method will return prematurely with stale data instead of waiting for the PR creation to complete.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

wrong, the update endpoint call won't return until the state is updated already with "creating"

"insert_index": insert_index,
"on_page_context": on_page_context,
"is_interactive": self.is_interactive,
"enable_coding": self.enable_coding,
Copy link
Member

Choose a reason for hiding this comment

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

This is set in init so maybe we don't need this?
Do we expect users to update client.enable_coding to disable/enable coding after the run starts? Maybe we can have an optional param for this fx to pass the new value of the flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is following the same pattern as is_interactive where if users change the flag on the client, then future iterations in the run will update the flag. Otherwise, this doesn't have any impact

loading: bool = False
artifacts: list[Artifact] = []
file_patches: list[ExplorerFilePatch] = []
pr_commit_shas: dict[str, str] | None = None
Copy link
Member

Choose a reason for hiding this comment

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

whats this mapping between? could we add a comment

@roaga roaga merged commit 46c3eb2 into master Dec 8, 2025
67 checks passed
@roaga roaga deleted the explorer/client-coding branch December 8, 2025 20:26
ryan953 pushed a commit that referenced this pull request Dec 9, 2025
…4502)

The explorer client can now enable/disable coding tools, view returned
file patches, and make and view PRs

Part of AIML-1698

Requires getsentry/seer#4200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants