feat: sidebar tree dynamically refreshes after CRUD in local-workspace
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- New endpoint GET /api/sidebar/workspace-tree returns sidebar tree HTML fragment
- refreshSidebarTree() in appState() fetches and replaces #sidebar-workspace-items
- Custom event 'flowdeck:sidebar-refresh' dispatched after doCreate/doRename/doDelete
- newFolderInWorkspace, deleteWorkspacePage, wsCtxAction('rename') now use
  refreshSidebarTree() instead of window.location.reload()
- Sidebar stays in sync without full page refresh
This commit is contained in:
2026-07-16 08:53:44 -04:00
parent 72636a77ea
commit 6f40c8953a
3 changed files with 95 additions and 3 deletions
+4
View File
@@ -1111,6 +1111,8 @@ window._wsInitData = (function() {
_reloadAfterAction() {
this._saveExpandedState();
this._loadFolder(this.currentFolder);
// Notify sidebar to refresh its tree
document.dispatchEvent(new CustomEvent('flowdeck:sidebar-refresh'));
},
// ── Inline Rename ──
@@ -1555,6 +1557,8 @@ window._wsInitData = (function() {
this.doFilter();
}
this._saveExpandedState();
// Notify sidebar to refresh its tree
document.dispatchEvent(new CustomEvent('flowdeck:sidebar-refresh'));
}
},