fix(shared/nav): stage strip uses no-slash targets so each stage opens its tool

The shared header strip pointed Working/Staging/Reviewing at the slash
form (working/, etc.), which now serves browse per the slash/no-slash
convention established earlier. The user expected those links to open
the stage's tool (mdedit for working, transmittal for staging, etc.) —
which is what the no-slash form serves.

Also drops the .html suffix from the archive target: <project>/archive
(no slash) → archive tool, same as the other stages. The currentStage
recognizer still accepts /archive.html as a fallback for any direct
URLs that survive in bookmarks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZDDC 2026-05-11 13:11:00 -05:00
parent e85d5fc660
commit 02bdf851c1
2 changed files with 33 additions and 29 deletions

View file

@ -10,17 +10,19 @@
// on DOMContentLoaded — no template changes required. Each tool just
// needs ../shared/nav.{js,css} in its build.sh.
//
// Stage URLs follow the canonical workflow folders documented at
// zddc.varasys.io/reference.html#transmittal-workflow:
// archive → <project>/archive.html (archive tool, project-root mode)
// working → <project>/working/ (directory listing → mdedit auto-serves)
// staging → <project>/staging/ (directory listing → transmittal auto-serves)
// reviewing → <project>/reviewing/ (directory listing)
// Stage URLs follow the slash/no-slash convention: no slash opens the
// stage's default tool; slash opens browse. The stage strip points
// users at the working tool for each stage:
// archive → <project>/archive (archive tool)
// working → <project>/working (mdedit rooted at working/)
// staging → <project>/staging (transmittal tool)
// reviewing → <project>/reviewing (mdedit at the virtual aggregator)
//
// If a deployment doesn't have one of these folders the link will 404 —
// the strip is convention-driven, not probed. Operators on non-standard
// layouts can override by setting window.zddc.nav.disabled = true before
// DOMContentLoaded.
// If a deployment doesn't have one of these folders the server's
// canonical-folder fallback still lands the user on a usable empty
// view — the strip is convention-driven, not probed. Operators on
// non-standard layouts can override by setting
// window.zddc.nav.disabled = true before DOMContentLoaded.
(function () {
'use strict';
@ -28,10 +30,10 @@
if (window.zddc.nav) return; // already loaded
var STAGES = [
{ key: 'archive', label: 'Archive', target: 'archive.html' },
{ key: 'working', label: 'Working', target: 'working/' },
{ key: 'staging', label: 'Staging', target: 'staging/' },
{ key: 'reviewing', label: 'Reviewing', target: 'reviewing/' },
{ key: 'archive', label: 'Archive', target: 'archive' },
{ key: 'working', label: 'Working', target: 'working' },
{ key: 'staging', label: 'Staging', target: 'staging' },
{ key: 'reviewing', label: 'Reviewing', target: 'reviewing' },
];
function projectSegment(pathname) {

View file

@ -1300,7 +1300,7 @@ body.help-open .app-header {
</svg>
<div class="header-title-group">
<span class="app-header__title" id="table-title">ZDDC Table</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-alpha · 2026-05-11 18:02:37 · ee67b9e-dirty</span></span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-alpha · 2026-05-11 18:10:39 · e85d5fc-dirty</span></span>
</div>
</div>
<div class="header-right">
@ -2404,17 +2404,19 @@ body.help-open .app-header {
// on DOMContentLoaded — no template changes required. Each tool just
// needs ../shared/nav.{js,css} in its build.sh.
//
// Stage URLs follow the canonical workflow folders documented at
// zddc.varasys.io/reference.html#transmittal-workflow:
// archive → <project>/archive.html (archive tool, project-root mode)
// working → <project>/working/ (directory listing → mdedit auto-serves)
// staging → <project>/staging/ (directory listing → transmittal auto-serves)
// reviewing → <project>/reviewing/ (directory listing)
// Stage URLs follow the slash/no-slash convention: no slash opens the
// stage's default tool; slash opens browse. The stage strip points
// users at the working tool for each stage:
// archive → <project>/archive (archive tool)
// working → <project>/working (mdedit rooted at working/)
// staging → <project>/staging (transmittal tool)
// reviewing → <project>/reviewing (mdedit at the virtual aggregator)
//
// If a deployment doesn't have one of these folders the link will 404 —
// the strip is convention-driven, not probed. Operators on non-standard
// layouts can override by setting window.zddc.nav.disabled = true before
// DOMContentLoaded.
// If a deployment doesn't have one of these folders the server's
// canonical-folder fallback still lands the user on a usable empty
// view — the strip is convention-driven, not probed. Operators on
// non-standard layouts can override by setting
// window.zddc.nav.disabled = true before DOMContentLoaded.
(function () {
'use strict';
@ -2422,10 +2424,10 @@ body.help-open .app-header {
if (window.zddc.nav) return; // already loaded
var STAGES = [
{ key: 'archive', label: 'Archive', target: 'archive.html' },
{ key: 'working', label: 'Working', target: 'working/' },
{ key: 'staging', label: 'Staging', target: 'staging/' },
{ key: 'reviewing', label: 'Reviewing', target: 'reviewing/' },
{ key: 'archive', label: 'Archive', target: 'archive' },
{ key: 'working', label: 'Working', target: 'working' },
{ key: 'staging', label: 'Staging', target: 'staging' },
{ key: 'reviewing', label: 'Reviewing', target: 'reviewing' },
];
function projectSegment(pathname) {