Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/tui/apps/tag/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ function ConfirmStep({
})
const customCurrentTags = currentTags.filter((t) => t !== "latest")
const tagsChanged =
tags.length !== customCurrentTags.length ||
[...tags].sort().join(",") !== [...customCurrentTags].sort().join(",")
tags.length !== customCurrentTags.length || tags.some((t, i) => t !== customCurrentTags[i])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Order-dependent tag comparison gives false change detection

The tagsChanged comparison uses positional index matching (tags.some((t, i) => t !== customCurrentTags[i])), which detects tags as "changed" when they contain the same values but in different order. Since tags are semantically a set where order is irrelevant, this causes false positives in the confirmation UI—showing tags as changed when the user simply typed them in a different order than they were stored.

Fix in Cursor Fix in Web

return (
<Box flexDirection="column">
<Text bold>Confirm update for {expertKey}:</Text>
Expand Down
Loading