feat: workspace drag-to-reorder (#492)#1233
feat: workspace drag-to-reorder (#492)#1233bergeouss wants to merge 2 commits intonesquena:masterfrom
Conversation
- Add POST /api/workspaces/reorder endpoint to reorder workspace list - Implement HTML5 drag-and-drop in workspace panel (panels.js) - Add grip-vertical drag handle icon (icons.js) - Add drag visual states: dragging, drag-over, cursor styles (style.css) - Add i18n keys (workspace_drag_hint, workspace_reorder_failed) in all 7 locales - 11 tests: 7 backend (order, strip, preserve, dedup, unknown, validation) + 4 frontend Closes nesquena#492
|
Thanks for this PR! Drag-to-reorder for workspaces is a clean UX improvement, and the backend endpoint with proper input validation (dedup, whitespace stripping, unknown path handling) is the right approach. A few things to confirm before merge: API endpoint conflict Unmentioned workspaces appended Touch device fallback Optimistic vs. confirmed reorder 11 tests with 7 backend + 4 frontend, including drag attribute and CSS class coverage, looks thorough. This looks close to ready once the above are confirmed! |
…1233) - Remove raw err.message from error toast to prevent leaking internal error details to the UI (Path Trust Boundary Rule) - Use i18n key workspace_reorder_failed for the sanitized message - Addresses reviewer concern about optimistic vs confirmed reorder: the reorder is confirmed (API-first), not optimistic
|
@nesquena-hermes: confirmed reorder, not optimistic. Visual re-render only after API res.ok. Backend _handle_workspace_reorder (routes.py:3317) preserves unmentioned workspaces (appends at end, lines 3337-3340). Path-based ordering (not index). Synchronous backend, no race condition. Last-write-wins for concurrent clients. Ready for merge! |
|
Thanks for the clear confirmation, @bergeouss! Confirmed reorder (not optimistic): Visual re-render only after Backend path-based ordering with appended unmentioned workspaces: Lines 3337-3340 preserving unmentioned workspaces at the end is the correct safe behavior. Race condition / concurrent clients: Synchronous backend with last-write-wins is acceptable for this use case — workspace reordering is a low-frequency user action. The drag-to-reorder endpoint is clearly scoped and the backend implementation handles all the edge cases flagged in review. This looks ready to merge! 🎉 🤖 Automated triage via nesquena-hermes |
… them going forward Two artifacts from a contributor's local graphify (code-graph) tooling slipped into PR #1233 (workspace drag-to-reorder): .graphify_cached.json (3.5MB) .graphify_uncached.txt (refs /home/fr33m1nd/hermes-webui-src/...) Neither belongs in source control: the .json is an autogenerated cache of node IDs for a graph visualisation tool, and the .txt is a file-discovery index pointing at the contributor's local workspace (/home/fr33m1nd/hermes-webui-src/) — paths that aren't valid for any other developer. The repo already ignores graphify-out/ but these two top-level dotfiles weren't covered. Add explicit ignore entries and remove the tracked copies. No code change. CI remains green on 3.11/3.12/3.13. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Merged in v0.50.237 via #1243. Thank you @bergeouss! 🎉 |
…1233) - Remove raw err.message from error toast to prevent leaking internal error details to the UI (Path Trust Boundary Rule) - Use i18n key workspace_reorder_failed for the sanitized message - Addresses reviewer concern about optimistic vs confirmed reorder: the reorder is confirmed (API-first), not optimistic
…1233) - Remove raw err.message from error toast to prevent leaking internal error details to the UI (Path Trust Boundary Rule) - Use i18n key workspace_reorder_failed for the sanitized message - Addresses reviewer concern about optimistic vs confirmed reorder: the reorder is confirmed (API-first), not optimistic
… them going forward Two artifacts from a contributor's local graphify (code-graph) tooling slipped into PR nesquena#1233 (workspace drag-to-reorder): .graphify_cached.json (3.5MB) .graphify_uncached.txt (refs /home/fr33m1nd/hermes-webui-src/...) Neither belongs in source control: the .json is an autogenerated cache of node IDs for a graph visualisation tool, and the .txt is a file-discovery index pointing at the contributor's local workspace (/home/fr33m1nd/hermes-webui-src/) — paths that aren't valid for any other developer. The repo already ignores graphify-out/ but these two top-level dotfiles weren't covered. Add explicit ignore entries and remove the tracked copies. No code change. CI remains green on 3.11/3.12/3.13. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Implements drag-and-drop reordering for workspaces in the sidebar panel.
Changes
Backend ()
Frontend ()
Icon ()
Styles ()
i18n ()
workspace_drag_hintandworkspace_reorder_failedin all 7 locales (en, ru, es, de, zh, zh-Hant, ko)Tests (11)
All pass: 2847 passed (1 pre-existing failure in test_sprint31).
Closes #492