You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: v0.0.16 regression: drag-and-drop project reordering silently fails when sort is set to Manual #1902
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Add two or more projects that have git remotes (origin, upstream, etc.)
In the sidebar, open the project sort dropdown and select "Manual"
Try to drag a project to a different position in the sidebar
Expected behavior
The dragged project moves to the new position and the reordered list persists across sessions.
Actual behavior
The drag animation plays but the project snaps back to its original position. The order never changes. This is a regression introduced in v0.0.16; drag-and-drop reordering worked in v0.0.15.
Switching to "Manual" also does not preserve the order that was visible under the previous sort mode (e.g. "Last updated"); it reverts to whatever order was last stored in projectOrder.
No errors in ~/.t3/userdata/logs/. The failure is silent.
Workaround
None found. Projects without git remotes are unaffected because their logical key falls back to the physical key.
Analysis and fix plan
Commit b7559c4 (#1768) changed sidebarProjects to group projects by logical key (from deriveLogicalProjectKey, which returns repositoryIdentity.canonicalKey for projects with git remotes, e.g. github.com/owner/repo). The drag-end handler at Sidebar.tsx:2699 passes these logical keys to reorderProjects() in uiStateStore.ts, but state.projectOrder still stores physical keys (local:<uuid>). The findIndex calls at lines 491-492 return -1 and the function returns state unchanged.
The fix is small: reorderProjects needs to operate on the same key space used by the sidebar. One approach is to have the drag handler resolve logical keys back to physical keys before calling reorderProjects; another is to migrate projectOrder to use logical keys. The first option is more contained.
I'm planning to open a small PR for this shortly in the hope that it's useful.
Activity
fix(web): resolve logical-to-physical key mismatch in project drag re…