[pull] master from getsentry:master#1841
Merged
Merged
Conversation
…t defaults into project creation (#111697) Fixes CW-1120 Register new org option `sentry:default_automated_run_stopping_point` and wire all org-level Seer defaults (stopping point, coding agent, auto_open_prs) into both project creation and the existing-org migration task. Project creation and the org migration task to new seat-based pricing now: - Read the org's `defaultAutomatedRunStoppingPoint` and `defaultCodingAgent` and `defaultCodingAgentIntegrationId` - For external agents, configure automation_handoff with `auto_create_pr` from `auto_open_prs` - For Seer agent, `auto_open_prs=true` forces `open_pr`; `auto_open_prs=false` caps `open_pr` down to `code_changes` - Also adds ChoiceField validation for `defaultCodingAgent` (with alias mapping for cursor → cursor_background_agent, claude_code → claude_code_agent) and `defaultAutomatedRunStoppingPoint`. --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
Adds button labeled "Add Integration" to the bottom of the dropdown for coding agent handoff. This is only in explorer v3 as this will be EA and then GA very soon. The button links to the integrations page and filters to "Coding Agents". Pictures provided below of the dropdown with and without agents configured + the page it links to. A test has also been written for the frontend. <img width="394" height="197" alt="Screenshot 2026-03-24 at 4 52 05 PM" src="https://github.com/user-attachments/assets/c0b374da-9d29-4900-b651-ee05028b2ad4" /> <img width="501" height="217" alt="Screenshot 2026-03-24 at 4 46 10 PM" src="https://github.com/user-attachments/assets/efe347c5-e286-4d34-934f-193d72e97604" /> <img width="638" height="400" alt="Screenshot 2026-03-24 at 4 46 23 PM" src="https://github.com/user-attachments/assets/59c38982-5b10-42e9-a48a-aea89482d757" />
It's possible that the hook is for an explorer autofix run so if no autofix state is found, try to look for an explorer state and record any analytics.
The tooltips say the same thing as the button.
see getsentry/getsentry#19716 these changes don't affect existing infra
We have a parameterization test case for our git sha parameterization which was meant to show that if the value doesn't include any numbers, it doesn't match our the pattern. But our git sha pattern only matches strings with exactly 7 characters, and the test case currently has 8, so of course it doesn't match! This fixes things so we're actually testing against a valid git sha.
) Adds infrastructure for Seer Explorer to read structured semantic state from the currently rendered page — without scraping the DOM. ## What Three cooperating primitives: **`LLMContextProvider`** — drop-in root provider (mounted in the app shell). Owns a flat node registry stored in refs and exposes read/write operations via internal React context. Uses pure ref-based state — no reducer, no re-renders on registration — since consumers read data imperatively via `getSnapshot()`. **`registerLLMContext(nodeType, Component)`** — HOC that auto-registers a component as a named node on mount and removes it (plus all descendants) on unmount. `nodeType` is strictly typed (`LLMContextNodeType`) for typeahead and to prevent naming drift. Nesting follows React component hierarchy automatically via `LLMNodeContext`, which carries each component's `useId()`-generated node ID downward so child HOC wrappers can declare their `parentId` synchronously during render. **`useLLMContext(data)`** / **`useLLMContext()`** — write and read overloads. The write overload accepts any non-undefined value (objects, arrays, strings, numbers — polymorphic) and pushes it into the nearest registered context node. The read overload returns `getLLMContext(componentOnly?)` for full-tree or subtree snapshots. Named `LLMContext` (not `SeerContext`) since the system is generic and could be used by any LLM integration. ## Why Seer Explorer needs to understand what the user is currently looking at (dashboard, widgets, charts, etc.) to give grounded AI responses. This system lets any component opt in by wrapping with `registerLLMContext` and calling `useLLMContext(data)` — no manual tree wiring, no DOM inspection. ## Design notes - **Flat storage, lazy tree assembly** — nodes stored as `Map<id, {nodeType, parentId}>` in a ref; tree assembled at `getSnapshot()` time. Avoids ordering dependencies: a child can declare its `parentId` before the parent's registration effect has fired. - **Imperative ref for data** — `useLLMContext(data)` writes to a `useRef<Map>` rather than dispatching state updates. This sidesteps a fundamental timing issue: child effects fire before parent effects, so data writes happen before `registerNode`. The ref is always read fresh at `getSnapshot()` time. - **Zero re-renders** — the provider uses refs for all state and `useCallback(fn, [])` for all operations. The memoized context value is referentially stable, so neither the provider nor its consumers ever re-render from context changes. - **Strict context requirement** — `useLLMContextRegistry()` throws if called outside the provider (which lives at the app root), treating missing context as a bug rather than silently returning undefined. - **JSON dedup with circular-reference safety** — write path uses `JSON.stringify` equality to skip redundant writes, with a `try/catch` that falls back to always-write for non-serializable values. - **Cleanup on unregister** — `unregisterNode` removes descendant entries from both the node map and the data ref so stale entries don't accumulate. ## Tests 9 integration tests covering: empty state, nesting (Dashboard → Widget → Chart with full shape assertion), unmount cleanup, data updates across re-renders, non-object data types (strings, arrays, numbers), full-tree vs `componentOnly` subtree reads. --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com> Co-authored-by: Jeremy Stanley <git@azulus.com> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
…p.prune_old_fire_history (#111792) It has done the backlog clearing that was necessary; now we can lean on incinerator.
… preference (#111967) I made [this change](https://github.com/getsentry/sentry/pull/111697/changes#diff-204df1d50b6d80eb112a1bafcdc4bb853e274f0e56ae3e082897b201aa0de550L391-L392) in my previous PR which I now realize is incorrect. This needs to read from project preferences and can be updated once the settings migration is complete. For now we can just use CODE_CHANGES. Functionally there is not much difference between the two except the change in my previous PR allows the autoOpenPrs org option to override the stopping point. The project preference should always have the correct stopping point. Let's change it back.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )