Skip to content

feat(web): drag project rows in the sidebar's Projects section to reorder - #141

Merged
mfituri merged 1 commit into
mainfrom
t3/1cb4f0d5
Nov 21, 2026
Merged

mfituri merged 1 commit into
mainfrom
t3/1cb4f0d5

Conversation

@mfituri

@mfituri mfituri commented Nov 21, 2026

Copy link
Copy Markdown

Project rows in the sidebar's Projects section could previously only be reordered by opening the project filter popover (#128).

This adds direct drag-to-reorder on the Projects section rows without showing any drag grip icons at rest:

  • Rows drag directly via a nested DndContext in SidebarProjectsSection with a 6px pointer activation distance and post-drag click suppression so clicks, context menus, and collapsing (feat(web): collapse the sidebar's Projects section #138) work normally.
  • Extracts commitProjectGroupReorder in ProjectScopeReorder.tsx and reuses it so dropping a row saves the manual projectOrder on this device and switches Project order to Manual, keeping the Projects section, project filter, pickers, and command palette in sync.
  • Enforces the same invariants as feat(web): drag projects in the sidebar's project filter to reorder them #128: pinned projects stay first (both visually via same-pin-group collision filtering and on drop via moveProjectScopeKey), multi-checkout projects move together, and reordering inside a filtered Projects section preserves unselected projects' relative order.
  • Adds browser tests in SidebarProjectsSection.browser.test.tsx and updates docs/user/project-settings.md and fork/README.md.

Client only, with no contract or server changes. Mobile is unchanged.

Built with Gemini 4 Neon via Antigravity in 1001 Code.

@cursor

cursor Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Client-only sidebar UI and local settings/state updates; no server or contract changes, with browser test coverage for reorder rules.

Overview
The sidebar Projects section now supports direct drag-to-reorder on project rows (no grip icons), using a nested DndContext with a 6px activation distance, vertical-only dragging, and post-drag click suppression so normal clicks and collapse behavior still work.

InboxSidebarRow accepts optional sortable props (transform, listeners, drag styling). Reorder logic is centralized in new commitProjectGroupReorder, shared with the project-filter grip reorder UI so drops update device projectOrder, switch Project order to Manual, keep multi-checkout keys together, block unpinned→pinned moves, and preserve unfiltered projects' order when the section is scoped.

Browser tests cover drag reorder, pinned boundaries, filtered sections, and collapse. User docs and fork/README.md note reordering from the Projects section.

Reviewed by Cursor Bugbot for commit f33b90d. Bugbot is set up for automated code reviews on this repo. Configure here.

@mfituri
mfituri merged commit 573690b into main Nov 21, 2026
27 checks passed
@mfituri
mfituri deleted the t3/1cb4f0d5 branch November 21, 2026 22:07
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