Skip to content

Commit 5743f4b

Browse files
committed
Fix: Detect workspace renames in sortedWorkspacesByProject
The comparison function only checked workspace IDs, so when a workspace was renamed (ID stays same, name changes), it didn't detect the change and the UI didn't update. Now checks both id and name to properly detect renames.
1 parent 5ee146e commit 5743f4b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,14 @@ function AppInner() {
356356
return result;
357357
},
358358
(prev, next) => {
359-
// Compare Maps: check if both size and workspace order are the same
359+
// Compare Maps: check if size, workspace order, and metadata content are the same
360360
if (
361361
!compareMaps(prev, next, (a, b) => {
362362
if (a.length !== b.length) return false;
363-
return a.every((metadata, i) => metadata.id === b[i].id);
363+
// Check both ID and name to detect renames
364+
return a.every((metadata, i) =>
365+
metadata.id === b[i].id && metadata.name === b[i].name
366+
);
364367
})
365368
) {
366369
return false;

0 commit comments

Comments
 (0)