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

@@ -636,10 +636,8 @@ export function BoardView() {
const result = await api.features.bulkUpdate(currentProject.path, featureIds, finalUpdates);
if (result.success) {
// Update local state
featureIds.forEach((featureId) => {
updateFeature(featureId, finalUpdates);
});
// Invalidate React Query cache to refetch features with server-updated values
loadFeatures();
toast.success(`Updated ${result.updatedCount} features`);
exitSelectionMode();
} else {
@@ -655,7 +653,7 @@ export function BoardView() {
[
currentProject,
selectedFeatureIds,
updateFeature,
loadFeatures,
exitSelectionMode,
getPrimaryWorktreeBranch,
addAndSelectWorktree,
@@ -783,10 +781,8 @@ export function BoardView() {
const result = await api.features.bulkUpdate(currentProject.path, featureIds, updates);
if (result.success) {
// Update local state for all features
featureIds.forEach((featureId) => {
updateFeature(featureId, updates);
});
// Invalidate React Query cache to refetch features with server-updated values
loadFeatures();
toast.success(`Verified ${result.updatedCount} features`);
exitSelectionMode();
} else {
@@ -798,7 +794,7 @@ export function BoardView() {
logger.error('Bulk verify failed:', error);
toast.error('Failed to verify features');
}
}, [currentProject, selectedFeatureIds, updateFeature, exitSelectionMode]);
}, [currentProject, selectedFeatureIds, loadFeatures, exitSelectionMode]);
// Handler for addressing PR comments - creates a feature and starts it automatically
const handleAddressPRComments = useCallback(