fix: surface failed component list loads in expose components form - #106
Open
0717lee wants to merge 1 commit into
Open
fix: surface failed component list loads in expose components form#1060717lee wants to merge 1 commit into
0717lee wants to merge 1 commit into
Conversation
A failed /tools, /resources, or /prompts request rendered identically to a successful empty one: the section showed a zero count with no error. Read the useQuery error per section, show the count line as "Failed to load ..." with an error notification and a retry action, and keep real counts (including legitimate zeros) for sections whose request succeeded. Signed-off-by: Li Fengmin <2080291162@qq.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #6549
Summary
In the expose step, the three component lists are loaded with
useQuerybut onlydata,isLoading, andrefetchare destructured —erroris never read. A failed/tools,/resources, or/promptsrequest therefore renders identically to a successful empty one: the section shows "0 tools" / "0 resources" / "0 prompt templates" and invites pressing "Expose components" on what looks like a server offering nothing.STATUS_TONE_CLASS) instead of a zero count, and the section renders an errorInlineNotificationwith the API error message and a Retry action that refetches just that list.Unit tests cover the failed/empty distinction, per-section independence (some sections fail while others keep their counts), and recovery through Retry.