@@ -2729,12 +2729,24 @@ https://github.com/nodeca/pako/blob/main/LICENSE
// Fetch children of a directory in server mode.
// path must end with '/' so the request hits the directory route.
+ //
+ // 404 is treated as "empty directory" rather than a hard error.
+ // A directory that doesn't exist on the server (e.g. a fresh
+ // project's working/ before any drafts have been created, or a
+ // dir deleted between listing and expand) is functionally
+ // indistinguishable from an empty one for tree-rendering purposes.
+ // Server-side, zddc-server already returns 200 + [] for canonical
+ // project folders that are missing on disk; this fallback covers
+ // the same UX for anything else and for non-zddc-server backends.
async function fetchServerChildren(path) {
if (!path.endsWith('/')) path += '/';
var resp = await fetch(path, {
headers: { 'Accept': 'application/json' },
credentials: 'same-origin'
});
+ if (resp.status === 404) {
+ return [];
+ }
if (!resp.ok) {
throw new Error('HTTP ' + resp.status + ' fetching ' + path);
}
diff --git a/zddc/internal/apps/embedded/classifier.html b/zddc/internal/apps/embedded/classifier.html
index 676ea2b..c0c215c 100644
--- a/zddc/internal/apps/embedded/classifier.html
+++ b/zddc/internal/apps/embedded/classifier.html
@@ -1464,7 +1464,7 @@ body.help-open .app-header {