Repository navigation
Studio: the drag-and-drop switches go, the gesture has one behaviour - #11441
Merged
Merged
Conversation
The Organize menu carried three switches for the drag gesture: whether the hint shows, whether a reorder in a sorted list switches it to Manual, and whether a closed folder opens under a resting pointer. Each has one sensible answer and nobody needs the other one, so the switches, their store fields and their strings are gone. The hint shows, a reorder in a sorted list switches it to Manual, a closed folder opens, and the menu is back to its width.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Sep 22, 2026
…unslothai#11503) Frontend build + bundle sanity is red on main and on every PR that inherits it: tests/sidebar-row-drag.test.ts(906,17): error TS2352: Conversion of type 'SidebarOrganizationState' to type 'Record<string, unknown>' may be a mistake because neither type sufficiently overlaps with the other. Index signature for type 'string' is missing in type 'SidebarOrganizationState'. Introduced by unslothai#11441 (432b4db), which added both the test and the store change it guards. Its own Frontend build lane failed at the time, so main inherited it. The PR's intent is right: the three drag preference keys are gone on purpose and should not come back. What is wrong is only the test's cast. SidebarOrganizationState has no index signature, so `as Record<string, unknown>` is a conversion tsc refuses, and a test that does not compile guards nothing. Rather than widen the cast through unknown, the loop now asks `key in state`. That needs no cast at all, and it is the stricter question: the old indexed read also passed for a key that came back holding undefined, which is still the key being back in the store. Verified: tsc -p tsconfig.test.json and tsc -b are both clean, where the first failed before, and the file is 25 passed under node --test. Sabotage check: putting dragHints back on the interface and in the initial state fails this test with "dragHints is back in the store".
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…nslothai#11441) The Organize menu carried three switches for the drag gesture: whether the hint shows, whether a reorder in a sorted list switches it to Manual, and whether a closed folder opens under a resting pointer. Each has one sensible answer and nobody needs the other one, so the switches, their store fields and their strings are gone. The hint shows, a reorder in a sorted list switches it to Manual, a closed folder opens, and the menu is back to its width. Co-authored-by: Unsloth <[email protected]>
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…unslothai#11503) Frontend build + bundle sanity is red on main and on every PR that inherits it: tests/sidebar-row-drag.test.ts(906,17): error TS2352: Conversion of type 'SidebarOrganizationState' to type 'Record<string, unknown>' may be a mistake because neither type sufficiently overlaps with the other. Index signature for type 'string' is missing in type 'SidebarOrganizationState'. Introduced by unslothai#11441 (432b4db), which added both the test and the store change it guards. Its own Frontend build lane failed at the time, so main inherited it. The PR's intent is right: the three drag preference keys are gone on purpose and should not come back. What is wrong is only the test's cast. SidebarOrganizationState has no index signature, so `as Record<string, unknown>` is a conversion tsc refuses, and a test that does not compile guards nothing. Rather than widen the cast through unknown, the loop now asks `key in state`. That needs no cast at all, and it is the stricter question: the old indexed read also passed for a key that came back holding undefined, which is still the key being back in the store. Verified: tsc -p tsconfig.test.json and tsc -b are both clean, where the first failed before, and the file is 25 passed under node --test. Sabotage check: putting dragHints back on the interface and in the initial state fails this test with "dragHints is back in the store".
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.
What this changes
The Organize menu in the sidebar carried a Drag and drop group with three switches: show a hint while dragging, whether reordering a sorted list switches it to Manual order, and whether folders open while hovering. They came in with #11373.
Each of the three has one sensible answer, and nothing is gained by offering the other one. The hint says what a drop will do, and there is no reason to drag without it. A reorder in a list sorted by Priority or Last updated has to switch the list to Manual, or the sort runs again and undoes the drop; refusing the reorder instead just makes the row snap back. A closed folder opening under a resting pointer is how every file manager behaves, and the only way to drop into a closed folder's slot. So the switches go, and the gesture has one behaviour.
Checked
In the running app: the Organize menu ends at the sort group; the hint shows while dragging; a reorder inside a folder sorted by Priority switches the sort to Manual with the toast; a closed folder opens under a resting drag. Full frontend suite, build, typecheck and locale parity pass.