fix: compare hiddenAppIds as a set for editor dirty state - #226
Merged
arpandhakal merged 1 commit intoJul 29, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThe PR corrects editor dirty-state detection for the unordered hidden-app deny-list.
Confidence Score: 5/5The PR appears safe to merge, with no actionable correctness or security issues identified. The new comparison matches the deny-list’s membership-based semantics, while the order-sensitive action sequence remains unchanged and the relevant edge cases are covered. Important Files Changed
Reviews (1): Last reviewed commit: "fix: compare hiddenAppIds as a set for e..." | Re-trigger Greptile |
`hiddenAppIds` is an unordered deny-list, but the toggle path rebuilds it by filter-then-append, so a hide/unhide/hide cycle returns the same members in a different position. The serialized comparison read that as a change and left Save/Cancel visible on a clean form. Adds `areArraysEqualAsSets` and uses it for `hiddenAppIds` only — `order` is a genuine sequence and keeps its serialized comparison. Reported by Greptile on #220. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
arpandhakal
force-pushed
the
arpandhakal/fix-hidden-app-ids-set-comparison
branch
from
July 29, 2026 08:49
70a2dd7 to
21e00e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Addresses the unresolved Greptile P1 on #220 (
useAppControls.tsx): Deny list order leaks.hiddenAppIdsis an unordered deny-list, but the editor's dirty check compared it withJSON.stringify, which is order-sensitive. The toggle path inuseActions.tsxrebuilds the array by filter-then-append, so hiding an app, unhiding it, and hiding it again yields the same members in a different position — and the editor reported a change that wasn't there.areArraysEqualAsSetstosrc/utils/array.tsand uses it forhiddenAppIds.orderis a genuine sequence, so it keeps its serialized comparison.Testing Criteria
pnpm typecheckandpnpm lintclean.Manual repro, in a workspace with two or more Studio apps carrying registered action labels:
[], CTAs hidden.["A","B"], CTAs hidden.["B","A"]. Before this fix: Save/Cancel stay visible even though the hidden set matches step 2. With this fix: CTAs correctly disappear.Re-toggle app A specifically — the first of the two hidden. Re-toggling the last element rebuilds the same order, so the old bug would not show.
Regression: reordering rows via drag still marks the form dirty (
ordercomparison untouched), and toggling a Studio app genuinely on/off still does too.Loom
Notes
feature/studio-apps-action, matching how OUT-3980 | API: per-app unread notification counts #222 and OUT-4014 | Capitalize actionLabel verb usage #225 landed.areArraysEqualAsSets: it is a six-line set comparison, and a test on the helper would not have covered the actual defect, which was in the caller's choice of comparison.Impact & Surface Area of Change
useAppControlsdrives the editor's Save Changes / Cancel CTAs. The only behavioural change is that a no-op reordering ofhiddenAppIdsno longer marks the form dirty.src/utils/array.tsgains a new exported helper; no existing exports were modified.hiddenAppIdsshape is untouched.