fix(library): SQL workspace — (workspace != '' OR workspace_id IS NOT NULL)
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

Les pages du workspace local ont workspace='' mais workspace_id=27.
Le filtre workspace != '' les excluait, retournant 0 items.
Ajout de OR workspace_id IS NOT NULL pour inclure les pages locales.
Simplification du frontend: le workspace tab appelle l'API standard avec workspace_id.
This commit is contained in:
2026-07-19 14:14:07 -04:00
parent 1bafbf1eff
commit a94794ec81
2 changed files with 4 additions and 15 deletions
+3 -14
View File
@@ -464,14 +464,8 @@ function libraryPage() {
try {
var url = '/api/library/' + this.tab;
var sep = '?';
// Workspace tab: if local workspace is active, show local workspace items
if (this.tab === 'workspace' && this.workspaceId && !this.isGiteaActive) {
url = '/api/library/local-workspace' + sep + 'workspace_id=' + this.workspaceId;
sep = '&';
} else {
if (this.workspaceId && (this.tab === 'recents')) {
url += sep + 'workspace_id=' + this.workspaceId; sep = '&';
}
if (this.workspaceId && (this.tab === 'recents' || this.tab === 'workspace')) {
url += sep + 'workspace_id=' + this.workspaceId; sep = '&';
}
if (this.tab === 'repository' && this.isGiteaActive) {
url += sep + 'gitea_owner=' + encodeURIComponent(this.giteaOwner) + '&gitea_repo=' + encodeURIComponent(this.giteaRepo);
@@ -528,12 +522,7 @@ function libraryPage() {
this.expanded = Object.assign({}, this.expanded);
if (!item.children || !item.children.length) {
try {
// Route to correct children endpoint based on source type
var childrenUrl = '/api/library/children/' + item.id;
if (item.source_type === 'local-ws') {
childrenUrl = '/api/library/local-workspace-children/' + item.id;
}
var r = await fetch(childrenUrl);
var r = await fetch('/api/library/children/' + item.id);
var d = await r.json();
item.children = d.items || [];
// Mark the tree for depth calculation