ZDDC/tables/js
ZDDC e5ba2b6168 fix(tables): handle bare-directory URLs served as default_tool
Visiting `/Project-1/archive/PartyA/mdl` (no trailing slash) errored with
`Unrecognized table URL` because tableNameFromUrl only matched
`…/<rowsdir>/table.html`. The cascade declares `default_tool: tables` at
`archive/<party>/mdl`, so the server serves the tables HTML at the bare
directory URL — a shape the client didn't recognize.

Two coordinated fixes:

- shared/zddc-source.js `pathToDir`: was over-eagerly stripping the last
  segment when the URL didn't end in `/`. Now checks whether the last
  segment contains a dot — file URLs strip to parent (original behavior
  preserved), bare-directory URLs append the missing slash. Only call
  site is detectServerRoot, so blast radius is contained.
- tables/js/context.js `tableNameFromUrl` + `rowEditUrl`: accept both
  legacy `…/<rowsdir>/table.html` and the new bare-directory shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:12:06 -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): editable cells phase 4 — copy/paste from Excel/Sheets 2026-05-09 10:30:05 -05:00
context.js fix(tables): handle bare-directory URLs served as default_tool 2026-05-14 12:12:06 -05:00
editor.js feat(tables): editable cells phase 5 — undo + multi-cell ops 2026-05-09 10:39:26 -05:00
filters.js refactor(tables): in-dir convention + unified table+form HTML bundle 2026-05-09 09:15:26 -05:00
main.js feat(tables): editable cells phase 3 — row-level save + ETag conflict UX 2026-05-09 10:26:22 -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
save.js fix(tables): use fetch keepalive on the beforeunload save path 2026-05-09 18:39:42 -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