mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-20 23:13:07 +00:00
Merge remote-tracking branch 'upstream/v0.15.0rc' into feat/duplicate-festure
# Conflicts: # apps/ui/src/components/views/board-view/components/kanban-card/card-header.tsx # apps/ui/src/components/views/board-view/components/kanban-card/kanban-card.tsx # apps/ui/src/components/views/board-view/hooks/use-board-persistence.ts
This commit is contained in:
@@ -225,7 +225,13 @@ export function useBoardActions({
|
||||
};
|
||||
const createdFeature = addFeature(newFeatureData);
|
||||
// Must await to ensure feature exists on server before user can drag it
|
||||
await persistFeatureCreate(createdFeature);
|
||||
try {
|
||||
await persistFeatureCreate(createdFeature);
|
||||
} catch (error) {
|
||||
// Remove the feature from state if server creation failed (e.g., duplicate title)
|
||||
removeFeature(createdFeature.id);
|
||||
throw error;
|
||||
}
|
||||
saveCategory(featureData.category);
|
||||
|
||||
// Handle child dependencies - update other features to depend on this new feature
|
||||
@@ -276,6 +282,7 @@ export function useBoardActions({
|
||||
},
|
||||
[
|
||||
addFeature,
|
||||
removeFeature,
|
||||
persistFeatureCreate,
|
||||
persistFeatureUpdate,
|
||||
updateFeature,
|
||||
|
||||
Reference in New Issue
Block a user