mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
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:
committed by
GitHub
parent
47a6033b43
commit
4f584f9a89
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user