Before submitting
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.
Impact
Minor bug or occasional failure
Version or commit
v0.0.16 (a3dadf3)
Environment
Linux (CachyOS), desktop app
Logs or stack traces
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.
Before submitting
Area
apps/web
Steps to reproduce
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.Impact
Minor bug or occasional failure
Version or commit
v0.0.16 (a3dadf3)
Environment
Linux (CachyOS), desktop app
Logs or stack traces
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
sidebarProjectsto group projects by logical key (fromderiveLogicalProjectKey, which returnsrepositoryIdentity.canonicalKeyfor projects with git remotes, e.g.github.com/owner/repo). The drag-end handler atSidebar.tsx:2699passes these logical keys toreorderProjects()inuiStateStore.ts, butstate.projectOrderstill stores physical keys (local:<uuid>). ThefindIndexcalls at lines 491-492 return-1and the function returns state unchanged.The fix is small:
reorderProjectsneeds 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 callingreorderProjects; another is to migrateprojectOrderto 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.