ZDDC/browse/js
ZDDC d44e1b01bf feat(browse): unify the .zddc lint onto the JSON schema (baked, single source)
The .zddc lint used a hand-kept TOP_KEYS/ROLE_KEYS/ACL_KEYS/CONVERT_KEYS list
with bespoke type tags — a parallel grammar that drifted from the Go structs
(we'd already had to patch in party_source/history/etc.). Replace it with one
schema-driven validator over the same JSON Schema that now drives completion +
hover, so lint/completion/hover/form all share ONE grammar.

- Bake zddc.schema.json into the bundle at build time (window.__ZDDC_SCHEMA__),
  the exact file the server serves at /.api/zddc-schema. Synchronous + works
  offline (file://), where that endpoint is unreachable — drops the runtime
  fetch entirely.
- validateZddc() now walks the parsed doc against the schema: type, enum,
  pattern, properties, additionalProperties (false|schema), patternProperties,
  items, and the recursive $ref:"#" (paths:). Same {keyPath,severity,message}
  shape, so findLine + the CM lint helper are unchanged.
- Delete TOP_KEYS/ALLOWED_TOOLS/ROLE_KEYS/ACL_KEYS/CONVERT_KEYS + walkObject/
  checkValue/addTypeErr. preview-yaml completion now reads getZddcSchema too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 09:30:17 -05:00
..
accept-transmittal.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
app.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
conflict.js feat(browse): lost-update protection for editors + shared conflict dialog 2026-06-03 16:24:15 -05:00
create-transmittal.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
download.js feat(browse): unify export formats via one matrix; add PDF to Export menu 2026-06-05 08:12:01 -05:00
events.js feat(browse): generalize the in-pane tool embed to fold classifier/transmittal/archive 2026-06-06 19:17:41 -05:00
grid.js feat(browse): generalize the in-pane tool embed to fold classifier/transmittal/archive 2026-06-06 19:17:41 -05:00
history.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
hovercard.js refine(browse): leaner menu — fold Navigate-into into Open, hide unpermitted actions, URL link in info box 2026-06-04 07:59:21 -05:00
init.js feat(browse): capability/role/tier-driven, context-correct menu system 2026-06-04 07:21:02 -05:00
loader.js feat(browse): render default_tool=tables dirs (mdl/rsk/ssr) as click-to-table leaves 2026-06-05 17:18:47 -05:00
menu-model.js feat(browse): unify export formats via one matrix; add PDF to Export menu 2026-06-05 08:12:01 -05:00
plan-review.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
preview-markdown.js feat(browse): shared schema completion + hover docs; bring it to the .zddc editor 2026-06-08 09:18:07 -05:00
preview-yaml.js feat(browse): unify the .zddc lint onto the JSON schema (baked, single source) 2026-06-08 09:30:17 -05:00
preview-zddc-form.js fix(browse): shorten the .zddc form intro so it doesn't dominate the space above Title 2026-06-07 09:11:28 -05:00
preview.js feat(browse): render default_tool=tables dirs (mdl/rsk/ssr) as click-to-table leaves 2026-06-05 17:18:47 -05:00
stage.js refactor(browse): consolidate duplicated helpers into util.js; fix YAML save divergence 2026-06-03 15:07:00 -05:00
tree.js feat(browse): render default_tool=tables dirs (mdl/rsk/ssr) as click-to-table leaves 2026-06-05 17:18:47 -05:00
upload.js refactor(browse): remove dead code, document state shape 2026-06-03 15:32:05 -05:00
util.js feat(browse): render default_tool=tables dirs (mdl/rsk/ssr) as click-to-table leaves 2026-06-05 17:18:47 -05:00
yaml-complete.js feat(browse): shared schema completion + hover docs; bring it to the .zddc editor 2026-06-08 09:18:07 -05:00