ZDDC/browse/js
ZDDC 360049f482 fix(browse): preserve undefined verbs to distinguish Caddy/FS-API from zddc
Three modes again behave consistently after Part 3's per-entry
gating:

  1. file:// (FS Access API picker) — fromHandle leaves verbs unset
     (now undefined, not ""). The events.js Rename/Delete gates
     skip the cap.has cascade check when typeof node.verbs is not
     'string', so the items stay enabled per the original canMutate
     contract.

  2. Caddy file-server — fromServerEntry sees no verbs in the
     listing and preserves undefined. Same skip applies; Rename /
     Delete stay enabled but the underlying server will 405 the
     POST/DELETE (same pre-Part-3 behavior). Markdown/yaml editors
     still mount read-only via cap.has's writable fallback.

  3. zddc-server — verbs is always emitted (possibly as "" for an
     explicit zero grant). cap.has interprets the string and the
     gates apply.

The previous "verbs ?? ''" normalisation collapsed (1)+(2) into the
explicit-zero case, which incorrectly disabled Rename/Delete in
offline mode. Tri-state verbs (string non-empty / string empty /
undefined) restores the intent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 09:00:12 -05:00
..
accept-transmittal.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
app.js feat(browse): persist selection + show-hidden in URL 2026-05-18 17:00:20 -05:00
create-transmittal.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
download.js refactor: virtual file extensions for subtree zip + MD conversion 2026-05-14 12:23:37 -05:00
events.js fix(browse): preserve undefined verbs to distinguish Caddy/FS-API from zddc 2026-05-21 09:00:12 -05:00
grid.js feat(zddc): Phase 4b — grid mode driven by cascade default_tool 2026-05-11 16:15:25 -05:00
hovercard.js feat(browse): extension chip under tree icon + archive refs in hovercard 2026-05-18 08:18:01 -05:00
init.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
loader.js fix(browse): preserve undefined verbs to distinguish Caddy/FS-API from zddc 2026-05-21 09:00:12 -05:00
plan-review.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00
preview-markdown.js feat(browse): verb-aware gating on rename/delete + editor save 2026-05-21 08:45:11 -05:00
preview-yaml.js feat(browse): verb-aware gating on rename/delete + editor save 2026-05-21 08:45:11 -05:00
preview.js feat(browse): SPA overhaul — context menu, YAML editor, icons, hovercard, deep links, autofilter 2026-05-14 12:12:42 -05:00
stage.js refactor: nest lifecycle slots per-party + add virtual top-level aggregators 2026-05-21 07:57:45 -05:00
tree.js fix(browse): preserve undefined verbs to distinguish Caddy/FS-API from zddc 2026-05-21 09:00:12 -05:00
upload.js feat: reviewing/ lifecycle — Plan Review endpoint, virtual received window, browse context-menu workflows 2026-05-15 16:08:04 -05:00