ZDDC/zddc/internal
ZDDC 9c7858c60a feat(zddc): Phase 4c — stage strip driven by cascade-declared children
The shared/nav.js stage strip previously hardcoded four stages
(archive/working/staging/reviewing) with their labels and target
URLs baked into the file. Operators couldn't add a fifth stage or
rename "Working" to "In-Progress" without forking shared code.

Now cascade-driven end-to-end:

  Server-side:
    listing.FileInfo gains a Declared bool field. fs.ListDirectory
    stamps Declared=true on every entry whose name matches the
    cascade's ChildrenDeclaredAt(parent) — both real on-disk dirs
    and virtual canonical injections. Bugfix in the same patch:
    virtualCanonicalFolders was passing the relative dirPath to
    ChildrenDeclaredAt (which expects absolute); now passes absDir.

  Client-side:
    shared/nav.js fetches the project root's JSON listing on
    DOMContentLoaded, filters to declared+is_dir entries, sorts by
    canonical workflow order (archive → working → staging →
    reviewing, then any extras alphabetically), and renders the
    strip. Labels read e.display_name → falls back to titleCase(name).

    Hardcoded FALLBACK_STAGES kicks in only on fetch failure
    (offline / file:// / non-zddc-server backend). Rendered
    immediately so the strip appears without flicker, then the
    cascade-fetched list replaces it once available.

  Effect:
    Project-3 (which has display: { archive: "Records",
    working: "In-Progress", ... } in its .zddc) now shows
    "Records · In-Progress · Outbox · Pending Responses" in every
    tool's strip. Project-1 still shows "Archive · Working ·
    Staging · Reviewing". No code change to render either; the
    cascade decides.

Tests:
  - tests/nav.spec.js relies on the mock server returning HTML at
    every URL, so the fetch fails over to fallback stages — the
    test renders the same Archive/Working/Staging/Reviewing labels
    it always did, with no test changes needed.
  - All 248 Playwright + all Go tests green.

Remaining client-side hardcode: archive/js/source.js +
archive/js/app.js's mode detection. Phase 4d.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:34:56 -05:00
..
apps feat(zddc): Phase 3 completion — all canonical-folder behaviour now cascade-driven 2026-05-11 15:36:33 -05:00
archive refactor(archive): use shared zddc.ParseTransmittalFolder 2026-05-07 09:14:19 -05:00
auth feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
cache fix(cache): root-escape guard in mirror walker purgeOrphans 2026-05-09 09:10:14 -05:00
config fix(client): plug confused-deputy bind in client mode 2026-05-08 10:03:51 -05:00
fs feat(zddc): Phase 4c — stage strip driven by cascade-declared children 2026-05-11 16:34:56 -05:00
handler feat(zddc): Phase 4c — stage strip driven by cascade-declared children 2026-05-11 16:34:56 -05:00
jsonschema feat: form-data system v0 (sixth tool + zddc-server endpoints) 2026-05-02 20:12:16 -05:00
listing feat(zddc): Phase 4c — stage strip driven by cascade-declared children 2026-05-11 16:34:56 -05:00
policy feat(server): self-issued bearer tokens + --no-auth flag 2026-05-08 07:40:28 -05:00
tlsutil feat(server): TLS hardening per NIST SP 800-52 Rev. 2 + HSTS 2026-05-04 17:55:52 -05:00
zddc feat(zddc): Phase 4a — drop_target cascade key, browse upload zone migrated 2026-05-11 16:12:41 -05:00