Skip to content

Conversation

@matejminar
Copy link
Member

Fixes an issue where the AI Conversations agent selector did not restore previously saved agent selections from local storage when the project context changed.

Previously, the agent selection was only restored on initial page load. This PR updates the useEffect hook that listens for project changes to explicitly restore the storedAgents from local storage for the newly selected project(s), leveraging the existing project-scoped local storage key.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Slack Thread

Open in Cursor Open in Web

The AgentSelector component already had localStorage persistence, but
it only restored the stored agents on initial mount. When switching
between different project selections, the URL params were cleared
but the stored agents for the new project were not restored.

This fix updates the project change effect to also restore the stored
agents from localStorage for the new project selection, ensuring the
agent filter is properly remembered per project.

Co-authored-by: matej.minar <matej.minar@sentry.io>
@cursor
Copy link
Contributor

cursor bot commented Jan 27, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

3 participants