Repository navigation
fix(api-access): keep health dialog key stable during checks - #526
wenbaolu6666-design wants to merge 1 commit into
Conversation
Remove row.models from providerHealthIdentity so refreshing the model list does not remount ProviderHealthDialog mid-check and discard in-flight results.
|
This pull request targeted The base branch has been automatically changed to |
|
I tested “Check all models” on the current version. The checks completed normally and the results were preserved; I couldn’t reproduce the dialog resetting. Also, Could you share the affected version, reproduction steps, or a screen recording? A regression test that fails before this change and passes afterward would also help confirm the fix. |
|
You're right — my root-cause analysis doesn't hold up. Intended change was a one-line removal of
Say which you prefer and I'll do it. Thanks for checking the actual call path. |
Problem
In the model health dialog, clicking "检测全部" could randomly reset the dialog and discard all in-flight results.
Root cause
providerHealthIdentityincludedrow.modelsin the React key. WhencheckAllModelstriggerssetModels, the dialog's key changes, React unmounts and remounts the entire dialog, losing all check progress.Fix
Remove
row.modelsfrom the identity key. The remaining fields (section,index,name,baseUrl,authIndex,apiKeys) are stable for the lifetime of a provider row.