-
Notifications
You must be signed in to change notification settings - Fork 6
fix: weird behavior with groups when restarting server #1022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where group-aware optimistic updates were hardcoded to use the 'default' group instead of respecting the actual group context. The fix ensures that when restarting servers, the optimistic UI updates correctly target the appropriate group's query cache.
- Updates query cache operations to be group-aware instead of hardcoded to 'default'
- Modifies restart server mutations to accept and use group parameters
- Refactors optimistic update logic to handle multiple query cache entries per group
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
renderer/src/routes/group.$groupName.tsx |
Conditionally uses group name based on sidebar visibility |
renderer/src/features/mcp-servers/hooks/use-mutation-restart-server.ts |
Major refactor to support group-aware optimistic updates and cache management |
renderer/src/features/mcp-servers/hooks/__tests__/use-mutation-restart-server.test.ts |
Removes unused test data and imports |
renderer/src/features/mcp-servers/components/card-mcp-server/index.tsx |
Passes group parameter to restart server mutation |
main/src/graceful-exit.ts |
Changes return type from string array to CoreWorkload array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context https://stacklok.slack.com/archives/C091GRYAG49/p1760033135113959?thread_ts=1760003349.102839&cid=C091GRYAG49
Make optimistic updates group-aware (use-mutation-restart-server.ts, graceful-exit.ts); (Optimistic updates were hardcoded to group: 'default)