Serves: #18474 — the declarative dock layout capability. Its first tutorial teaches an affordance against the grain of the feature.
The Problem
learn/tutorials/DockLayoutsFirstLayout.md has a section called "The ids you did not have to invent" whose closing code block teaches the reader to invent one.
The section argues, correctly:
The engine derives them from what you wrote… The benefit is that there is nothing to keep in sync. You never invented center-split-0, so you can never misspell it, never leave it behind after a rename, and never have two nodes accidentally sharing one.
and then immediately:
You can name a node when you want to address it later:
> zones: {center: {id: 'main-split', …, children: [{id: 'code-tabs', items: ['editor']}, …]}}
> ```
In a tutorial the last code block is the one people copy. The prose earns a benefit and the example spends it, in the same section.
<h2 class="neo-h2" data-record-id="3">The Architectural Reality</h2>
⚠️ Two distinct problems, and only the first is certain.
1. Self-contradiction — certain, and independent of any engine behaviour. A section titled "the ids you did not have to invent" cannot end by teaching invention. Whatever the engine does, the guide is teaching against its own lesson, and this is the beginner's first exposure to the feature.
2. Multi-instance safety — NOT established, in either direction. @tobiu's framing: "component ids must be unique. If the id does get passed to a component, it would be bad for your explained code example." Two workspaces in one main thread, both declaring </span><span class="hljs-attr">id</span>: <span class="hljs-string">'main-split'</span><span class="hljs-string">, is an ordinary thing for a reader to end up with — two live previews on one page already put two Workspaces in one thread.
What is known:
Authoring.mjs:237 duplicate node id is refused — WITHIN ONE DOCUMENT ("duplicate or reserved node ID")
LayoutAdapter.mjs:1003 projectSplitNode returns {cls, dockNodeId: nodeId, …, ntype: 'container'} — no id
LayoutAdapter.mjs:670 railId = ${nodeId}:edge-rail:${edge} → assigned to dockNodeId, not id
So on a source read the node key travels as `dockNodeId`, and the duplicate guard is **per document** — it cannot see a second workspace. **That read is not a verification.** A probe creating two Workspaces with the same authored zone id returned `{"success": false, "error": {"className": "TypeError"}}` for both `createNeoInstance` calls, so nothing was created and the probe proves nothing. It is recorded here so the next person does not mistake it for evidence.
<h2 class="neo-h2" data-record-id="4">The Fix</h2>
**Cut the code block.** The section's own argument is the correct guidance and it needs no counter-example: the engine derives the ids, and a beginner tutorial's job is to show that there is nothing to do.
Replace the trailing affordance with the honest boundary — that addressing a node by name is beyond a first layout, and that if a reader reaches for it they own the uniqueness question across every instance of that workspace.
<h2 class="neo-h2" data-record-id="5">AC</h2>
- **AC-1** The `id`-authoring code block is removed from the tutorial. The section keeps its argument, which was never the problem.
- **AC-2** Whatever replaces it does **not** teach a hand-authored node id as a routine affordance, and does not imply the reader has a use for one at this stage.
- **AC-3** ⚠️ **Do not silently assert the multi-instance case is safe.** It is unverified in both directions. If the replacement text says anything about it, it says what is known — the duplicate-node guard is per-document — and not a reassurance nobody has measured.
- **AC-4** The tutorial still renders and both live previews still run; the change is prose plus a deletion, so a render check is sufficient and no new arm is owed.
<h2 class="neo-h2" data-record-id="6">Out of Scope</h2>
Whether a node id reaches a component id — that is a real question and it wants its own measurement, not a paragraph in a tutorial. Committed topologies that legitimately name nodes (`denseWorkstation.mjs` names `split-right`, `right-bottom-tabs`) are a different surface from an authored `zones` declaration and are untouched. The adoption guide.
<h2 class="neo-h2" data-record-id="7">Avoided Traps</h2>
Do not replace the block with a caveated version of itself — *"you can name a node, but ensure uniqueness across instances"* puts the burden on a beginner in their first hour and still ends the section with the thing the section argues against. Do not assert the engine is safe here on the strength of a source read; the probe that would have settled it failed to create its instances and proves nothing. Do not extend this into the committed-topology surface, which names nodes for good reasons.
<h2 class="neo-h2" data-record-id="8">Decision Record impact</h2>
`none` — tutorial prose; no contract change.
<h2 class="neo-h2" data-record-id="9">Sweeps and ownership</h2>
Live latest-open sweep plus all-state search on tutorial/dock/id prior art: nothing equivalent; #18478 is closed and its PR merged. Raised by @tobiu on the merged content — *"you are promoting an anti-pattern here. yes, we can set ids manually. but 'can' does not mean 'should'."* Filed by @neo-opus-grace, who wrote the section and did not notice it refuting itself.
Retrieval Hint: `DockLayoutsFirstLayout authored node id anti-pattern component ids unique two workspaces one main thread`
Origin Session ID: c4dc8abc-31fa-4ecd-9aef-5209ccfd16c0
</div>
</div>
</div></div>
Serves:#18474 — the declarative dock layout capability. Its first tutorial teaches an affordance against the grain of the feature.The Problem
learn/tutorials/DockLayoutsFirstLayout.mdhas a section called "The ids you did not have to invent" whose closing code block teaches the reader to invent one.The section argues, correctly:
and then immediately:
> ```
In a tutorial the last code block is the one people copy. The prose earns a benefit and the example spends it, in the same section.
<h2 class="neo-h2" data-record-id="3">The Architectural Reality</h2>
⚠️ Two distinct problems, and only the first is certain.
1. Self-contradiction — certain, and independent of any engine behaviour. A section titled "the ids you did not have to invent" cannot end by teaching invention. Whatever the engine does, the guide is teaching against its own lesson, and this is the beginner's first exposure to the feature.
2. Multi-instance safety — NOT established, in either direction. @tobiu's framing: "component ids must be unique. If the id does get passed to a component, it would be bad for your explained code example." Two workspaces in one main thread, both declaring
</span><span class="hljs-attr">id</span>: <span class="hljs-string">'main-split'</span><span class="hljs-string">, is an ordinary thing for a reader to end up with — two live previews on one page already put two Workspaces in one thread.What is known: Authoring.mjs:237 duplicate node id is refused — WITHIN ONE DOCUMENT ("duplicate or reserved node ID") LayoutAdapter.mjs:1003 projectSplitNode returns {cls, dockNodeId: nodeId, …, ntype: 'container'} — no
idLayoutAdapter.mjs:670 railId =${nodeId}:edge-rail:${edge}→ assigned to dockNodeId, not id