ZDDC/tables/js
ZDDC 03fa366814 feat(server): table/form specs resolve from .zddc.d/ + server-inject the table spec
The supporting config files (table.yaml, form.yaml) can now live in the
admin-gated, hidden `<dir>/.zddc.d/` reserve instead of the directory root —
the `.zddc`-declares / `.zddc.d/`-carries split. Backward-compatible: the
legacy root location still resolves (preferred order: .zddc.d/ → root →
embedded default).

Because `.zddc.d/` is non-fetchable over HTTP for non-admins, the spec is
resolved server-side and INJECTED:
- handler: LoadViewSpec(dir, name) resolves .zddc.d/ → root → embedded
  (classifyDefaultSpec is now location-agnostic — strips a `.zddc.d` segment).
- ServeTable injects the parsed table spec + row schema into the existing
  #table-context as {spec, rowSchema}; RecognizeTableRequest also recognizes a
  spec under .zddc.d/.
- formhandler loadFormSpec + specEligible prefer .zddc.d/form.yaml (forms
  already inject #form-context, so server-only).
- client (tables/js/context.js): walkServer uses the injected spec/rowSchema
  when present (server mode) and still walks the directory for ROW files; FS-
  Access mode reads .zddc.d/<name> (then legacy root) via readYamlFirst. load()
  passes the injected context through. Regenerated the embedded tables.html.

go build/vet/test ./... green; all 40 tables Playwright specs pass; the
ServeTable test now asserts the injected spec.

Remaining (next): file→form URL shape, retiring the recognizers in favour of
ServeView/views:, defaults.zddc.yaml views declaration, writers→.zddc.d/, and
the migration script.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 10:20:55 -05:00
..
add-row.js feat(tables): row editor — inline Add Row, Delete, multi-row paste, min row height 2026-05-15 16:07:28 -05:00
app.js feat(tables): editable cells phase 5 — undo + multi-cell ops 2026-05-09 10:39:26 -05:00
clipboard.js feat(tables): row editor — inline Add Row, Delete, multi-row paste, min row height 2026-05-15 16:07:28 -05:00
context.js feat(server): table/form specs resolve from .zddc.d/ + server-inject the table spec 2026-06-04 10:20:55 -05:00
editor.js feat(tables): read-only cells, show server-derived fields on create, clearer conflict 2026-05-21 15:34:22 -05:00
export.js feat(tables): Export CSV button in the table toolbar 2026-05-19 07:00:23 -05:00
filters.js refactor(tables): in-dir convention + unified table+form HTML bundle 2026-05-09 09:15:26 -05:00
main.js fix: clear the 14 stale Playwright baseline failures 2026-05-21 11:24:30 -05:00
mode.js refactor(tables): in-dir convention + unified table+form HTML bundle 2026-05-09 09:15:26 -05:00
render.js feat(tables): editable cells phase 1 — selection + keyboard nav 2026-05-09 09:16:39 -05:00
row-ops.js feat(browse,tables): flat-peer clients + dual-mode cross-party aggregate 2026-06-03 12:35:31 -05:00
save.js feat(browse,tables): flat-peer clients + dual-mode cross-party aggregate 2026-06-03 12:35:31 -05:00
sort.js feat(tables): new sortable/filterable grid tool for directories of YAML files 2026-05-05 20:32:01 -05:00
undo.js feat(tables): editable cells phase 5 — undo + multi-cell ops 2026-05-09 10:39:26 -05:00
util.js feat(tables): new sortable/filterable grid tool for directories of YAML files 2026-05-05 20:32:01 -05:00