Skip to content

Conversation

@samuv
Copy link
Collaborator

@samuv samuv commented Oct 28, 2025

In this PR:

  • I'v fixed the invalidation after the check server status (polling) we were invalidating the list without the current group
  • Move the status stopping to the one returned by the API
  • Remove some unnecessary type assertions

@samuv samuv self-assigned this Oct 28, 2025
Copilot AI review requested due to automatic review settings October 28, 2025 09:44
Copy link
Contributor

Copilot AI left a 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 workload list invalidation during server status polling by including the current group in the query key, and refactors mutation handlers to use properly typed parameters. The changes align with the reported issue where invalidation after checking server status wasn't scoped to the current group.

Key changes:

  • Fixed query invalidation to include the group parameter when polling server status
  • Refactored mutation context parameters for better type clarity
  • Removed unnecessary type assertions throughout the codebase

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
renderer/src/common/hooks/use-check-server-status.tsx Added group parameter to query key when invalidating workload list after server status check
renderer/src/features/mcp-servers/hooks/use-mutation-update-workload.ts Added explicit typing to getQueryData call and renamed context parameters for clarity
renderer/src/features/mcp-servers/hooks/use-mutation-restart-server.ts Removed unnecessary type assertion from status response mapping
renderer/src/features/mcp-servers/components/actions-mcp-server.tsx Reordered status check for 'stopping' to appear before 'updating'

@samuv samuv merged commit 24b142d into main Oct 28, 2025
21 of 24 checks passed
@samuv samuv deleted the fix-after-check-validation branch October 28, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants