Skip to content

Studio: the drag-and-drop switches go, the gesture has one behaviour - #11441

Merged
shimmyshimmer merged 1 commit into
mainfrom
studio-drag-switches-removed
Sep 21, 2026
Merged

shimmyshimmer merged 1 commit into
mainfrom
studio-drag-switches-removed

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

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.

  • The three settings, their setters and their persisted flags are removed from the sidebar organization store. A saved value from before is ignored.
  • The Drag and drop group is removed from the Organize menu, and the menu returns to its previous width.
  • The planner and the drag hook no longer take the two flags; the planner always switches a sorted list to Manual on a reorder, and the hook always opens a closed folder or section after the pointer rests on it.
  • The four strings are removed from all twelve locales.

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.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T10:21:19.504462Z 1b4b836 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 1b4b836e86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@shimmyshimmer
shimmyshimmer merged commit 432b4db into main Sep 21, 2026
38 of 43 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-drag-switches-removed branch September 21, 2026 10:22
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".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant