ZDDC/browse/js
ZDDC 76e8dab009 fix(browse): treat 404 on directory fetch as empty, not an error
Expanding a folder that returns 404 used to throw "HTTP 404 fetching
…" through statusError, surfacing it as a red error toast. From the
user's POV, a missing or empty directory shouldn't be presented as a
load failure — empty IS the legitimate state.

fetchServerChildren now returns [] on 404; other non-2xx still throw.
Other failure modes (transport error, 500, malformed JSON) continue
to surface as before.

Server-side, zddc-server already returns 200 + [] for canonical
project folders that don't exist on disk (the prior commit). This
client fix covers the residual cases:
  - non-canonical paths that don't exist (deleted between listing
    and expand; race with concurrent writers)
  - non-zddc-server backends (Caddy file_server, plain nginx) where
    we can't change the 404 behavior

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 20:34:53 -05:00
..
app.js feat(browse): Phase 2 — preview popup, ZIP expansion, ext filter, breadcrumbs 2026-05-03 20:39:49 -05:00
events.js feat(browse): double-click a folder to navigate into it 2026-05-07 13:43:17 -05:00
init.js feat(browse): vendored JSZip, SVG home icon, auto-filter rows 2026-05-03 21:35:15 -05:00
loader.js fix(browse): treat 404 on directory fetch as empty, not an error 2026-05-09 20:34:53 -05:00
preview.js feat(browse): Phase 2 — preview popup, ZIP expansion, ext filter, breadcrumbs 2026-05-03 20:39:49 -05:00
tree.js feat(browse): vendored JSZip, SVG home icon, auto-filter rows 2026-05-03 21:35:15 -05:00