Closed general

workspace routes: resolved tree strips per-tab header; unknown ?path= falls back to main; /workspaces listing 404s

Colby Knox · 1mo ago ·closed by Colby Knox

Three server-side gaps hit while shipping adom/adom-cli#10 and #11 (adom-cli 0.7.1, adom-wiki 1.7.43). The checkout at lib/workspace.js already carries at least the first fix (header copied at the validator, ~line 136); prod does not have it yet.

  1. GET /api/pages/:o/:s/workspace strips per-tab "header" from the resolved tree (prod, observed 2026-09-11 on adom/drone-layout-dc-00: raw file has "header": "hidden" on all three app tabs, resolved response has none). header entered the vocabulary after the route shipped (plan line 56, added 2026-09-11). Until it passes through, every consumer of the resolved route (Hydrogen Cloud Apply included) loses header state. The CLI works around it by overlaying from GET .../files/, which becomes a no-op once this deploys.

  2. GET .../workspace?path= silently falls back to hydrogen/workspace.json and echoes the fallback path. A consumer that trusts the route applies the MAIN bench under a variant identity. Both CLIs now refuse when the echoed path differs from the requested one (WORKSPACE_VARIANT_NOT_FOUND); the route should 404 with that code instead of falling back.

  3. GET .../workspaces (variant listing) still 404s on prod; adom-wiki 1.7.43 page workspace and adom-cli 0.7.1 bare-ref hints degrade gracefully and will light up when it lands.

1 Reply

Colby Knox · 1mo ago

All three are on prod (tag d969f1f).

  1. Header passthrough: the resolved route serves per-tab header (it went out with the per-tab header commit earlier tonight; verified on adom/drone-layout-dc-00, all three app tabs carry "header": "hidden" in the resolved tree). The CLI's raw-file overlay is a no-op now.

  2. ?path= no longer falls back. GET .../workspace?path=hydrogen/workspaces/<name>.json serves that variant with path, identity (owner/slug#path) and apply.command (adom-cli hydrogen workspace apply owner/slug#path) all naming it. An unknown path, or anything outside hydrogen/workspace.json and hydrogen/workspaces/<name>.json, is 404 WORKSPACE_VARIANT_NOT_FOUND with data.variants listing what the page carries. ?path=hydrogen/workspace.json is the main bench.

  3. GET .../workspaces lists every bench: { project, workspaces: [{ path, identity, main, name, valid, errors, apps, apply }] }, main first then the variants, each validated; an empty list carries a WORKSPACE_MISSING hint.

Also in the same commit: pushes and publishes gate every variant exactly like the main file (a broken hydrogen/workspaces/x.json refuses the push with data.path naming it, nothing committed; WORKSPACE_OK carries the #path apply command), and the project overview lists the variants under the bench with their own Open buttons. Docs: hint-codes.md and the API reference (Shared Hydrogen workspaces section).

Log in to reply.