fix(ui): bulk update cache invalidation and model dropdown display (#633)

Fix two related issues with bulk model updates in Kanban view:

1. Bulk update now properly invalidates React Query cache
   - Changed handleBulkUpdate and bulk verify handler to call loadFeatures()
   - This ensures UI immediately reflects bulk changes

2. Custom provider models (GLM, MiniMax, etc.) now display correctly
   - Added fallback lookup in PhaseModelSelector by model ID
   - Updated mass-edit-dialog to track providerId after selection
This commit is contained in:
Stefan de Vogelaere
2026-01-20 23:01:06 +01:00
committed by GitHub
parent 47a6033b43
commit 4f584f9a89
3 changed files with 48 additions and 11 deletions

View File

@@ -415,6 +415,44 @@ export function PhaseModelSelector({
}
}
// Fallback: Check ClaudeCompatibleProvider models by model ID only (when providerId is not set)
// This handles cases where features store model ID but not providerId
for (const provider of enabledProviders) {
const providerModel = provider.models?.find((m) => m.id === selectedModel);
if (providerModel) {
// Count providers of same type to determine if we need provider name suffix
const sameTypeCount = enabledProviders.filter(
(p) => p.providerType === provider.providerType
).length;
const suffix = sameTypeCount > 1 ? ` (${provider.name})` : '';
// Add thinking level to label if not 'none'
const thinkingLabel =
selectedThinkingLevel !== 'none'
? ` (${THINKING_LEVEL_LABELS[selectedThinkingLevel]} Thinking)`
: '';
// Get icon based on provider type
const getIconForProviderType = () => {
switch (provider.providerType) {
case 'glm':
return GlmIcon;
case 'minimax':
return MiniMaxIcon;
case 'openrouter':
return OpenRouterIcon;
default:
return getProviderIconForModel(providerModel.id) || OpenRouterIcon;
}
};
return {
id: selectedModel,
label: `${providerModel.displayName}${suffix}${thinkingLabel}`,
description: provider.name,
provider: 'claude-compatible' as const,
icon: getIconForProviderType(),
};
}
}
return null;
}, [
selectedModel,