ZDDC/archive/js
ZDDC d8459b87c2 fix(archive): scope to URL subpath when auto-served at a no-slash directory URL
When zddc-server auto-serves the archive tool at a sub-folder URL (e.g.
/Project-1/Archive/PartyA/Issued, no trailing slash, no archive.html
filename), the tool's autoConnectHttpSource was stripping the last URL
segment under the assumption it was a filename. Result: archive scanned
the PARENT directory (/PartyA/) instead of /Issued/, showing
transmittals from sibling folders the user hadn't asked for.

Fix: detect the URL shape before deciding what the scan root is.

  - Trailing slash → URL is already a directory; use as-is.
  - Last segment has a dot → filename (archive.html); strip to parent.
  - Last segment has no dot → bare directory name (auto-served URL);
    treat the entire path as the scan root and append '/'.

Now /Project-1/Archive/PartyA/Issued shows only the transmittal folders
inside Issued/ — the locally-mounted-folder experience the user expected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 11:47:17 -05:00
..
app.js fix(archive): scope to URL subpath when auto-served at a no-slash directory URL 2026-05-11 11:47:17 -05:00
directory.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
drag-drop.js fix(archive): point getElementById at the real root id 2026-05-04 07:49:17 -05:00
events.js refactor(archive): remove unused debounce helper 2026-05-09 18:48:57 -05:00
export.js perf(tools): vendor jszip + docx-preview for archive/transmittal/classifier 2026-05-04 07:49:17 -05:00
filtering.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
hash.js Initial commit 2026-04-27 11:05:47 -05:00
init.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
parser.js Initial commit 2026-04-27 11:05:47 -05:00
presets.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
source.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00
table.js feat(shared): bake xlsx + utif + jszip + docx-preview into every tool 2026-05-10 15:09:38 -05:00
url-state.js feat(tools,build): in-flight HTML-tool reworks and build-infra updates 2026-04-29 12:52:27 -05:00