LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-euclid
createdAtAug 27, 2026, 7:26 PM
updatedAtAug 27, 2026, 8:46 PM
githubUrlhttps://github.com/neomjs/neo/issues/17814
authorneo-gpt-euclid
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 27, 2026, 8:46 PM

Dock example replaces Viewport composition with theme emulation

Closed v13.2.0/archive-v13-2-0-chunk-16 bugdocumentationaitestingregressionarchitecture
neo-gpt-euclid
neo-gpt-euclid commented on Aug 27, 2026, 7:26 PM

Context

examples/dashboard/dock/MainContainer.mjs currently extends Neo.dashboard.DockWorkspace while imitating an application Viewport through copied configs and side effects: autoMount, cls: ['neo-viewport'], a manual body-class write, and additionalThemeFiles: ['Neo.dashboard.Container', 'Neo.container.Viewport']. The dock guide series presents that imitation as the recommended application-root pattern.

Exact history identifies the drift:

  • commit 7c157c4e84374b4763812cc5d18b78845a0f9ffc replaced the example's Viewport root with DockWorkspace while lifting the reusable dock host;
  • commits 5a2ae151f3af381e895488de1daff694437d6bd8 and 23071d35de37ee8859dfeb0c1a89d8f2ab5839c2 copied Viewport class/style responsibilities onto the new root to repair the resulting geometry;
  • commit e6923326e65412be9fdc30bb66e9a94862780623 then codified that workaround in DockLayoutsAdoption.md.

The semantic Memory Core and Knowledge Base searches were unavailable during intake because their embedding canaries timed out. That instrument failure is not treated as a prior-art miss; exact Git history, blame, and current source decide this ticket.

The Problem

The example and guide invert Neo's composition model. A dashboard workspace is application content. The application root remains a Neo.container.Viewport, which owns the root sizing class, automatic mount, body class, and Viewport stylesheet by being an actual Viewport instance.

additionalThemeFiles declares styles a class consumes; it is not a substitute for inheritance or composition. Loading 'Neo.container.Viewport' from a DockWorkspace while copying Viewport configs creates a visual impersonation of the root without the root class contract. It also teaches adopters to repair missing composition with CSS dependencies.

The 583×154 rendering failure described in the guide was therefore a diagnostic signal that the Viewport had been removed. Adding its stylesheet to the dashboard child hid the architectural error rather than curing it.

The Architectural Reality

  • src/container/Viewport.mjs owns autoMount: true, baseCls: ['neo-viewport'], applyBodyCls: true, and the body-class side effect.
  • src/dashboard/DockWorkspace.mjs is the reusable dock holder and already declares the dashboard theme dependency it needs.
  • apps/workstation/app.mjs proves the supported configured-root shape: mainView: {module: Viewport, ...}.
  • Neo.container.Base defaults to a stretching vbox; a single dock holder child with flex: 1 fills the Viewport without copying root traits.
  • Keeping Neo.examples.dashboard.dock.MainContainer as the dock child preserves the holder identity consumed by Neural Link and existing dock tests.

The Fix

  1. Compose a real Neo.container.Viewport as the example's mainView in examples/dashboard/dock/app.mjs; place MainContainer beneath it with flex: 1.
  2. Keep MainContainer extending DockWorkspace, but remove every Viewport impersonation: the Viewport theme entry, autoMount, neo-viewport class, manual body-class write, and their explanatory prose.
  3. Correct both public dock guides: applications keep a Viewport root; docking workspaces are children; never load the Viewport theme as a replacement for composition. Remove internal implementation-error trails while preserving the current architectural guarantees and the valid warning that a DockWorkspace subclass overriding additionalThemeFiles must retain its inherited dashboard dependency.
  4. Keep the CI unit guard scoped to MainContainer's own contract: DockWorkspace inheritance and the absence of copied Viewport traits. The runtime whitebox witness owns the application root/child composition.
  5. Extend the existing standalone dock whitebox-E2E witness to assert DOM composition: one direct body Viewport root containing a distinct dashboard child.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Example application root Neo.container.Viewport app.mjs configures a real Viewport inline None; root emulation is rejected Adoption guide Source config + mounted whitebox DOM
Dock holder Neo.dashboard.DockWorkspace Existing MainContainer remains the flex child and holder Existing class identity remains stable Adoption guide Unit inheritance assertion + Neural Link holder read
Theme dependency DockWorkspace.additionalThemeFiles Dashboard dependency is inherited; no Viewport theme is listed by the child A subclass with its own list repeats only its genuine dependencies Adoption guide Unit config assertion + themed E2E
Root geometry Viewport root/body contract Viewport fills the application surface and contains the dock workspace E2E fails on missing/wrong root or same-element impersonation Adoption guide Browser DOM composition assertion

Decision Record impact

aligned-with ADR 0029 — DockWorkspace remains the normative dock holder. This ticket corrects only how an application composes that holder beneath its Viewport.

Acceptance Criteria

  • The dock example starts with a real Neo.container.Viewport root and one MainContainer dock child configured with flex: 1.
  • MainContainer still extends DockWorkspace and retains its public holder identity, but declares no Viewport theme dependency, copied root class, auto-mount setting, or body-class side effect.
  • The public dock guide series teaches Viewport → DockWorkspace composition, explicitly rejects using additionalThemeFiles to emulate a Viewport, and contains no internal implementation-error trail for this correction.
  • A focused unit assertion pins only the dock holder's inherited dashboard-only theme contract and absence of copied Viewport responsibilities; no production helper exists solely for unit inspection.
  • The standalone dock whitebox-E2E witness observes a direct body Viewport root containing a distinct dashboard child, while the existing dock theme assertions remain green.
  • Existing focused dock unit/component/E2E coverage remains green; guide lint passes.
  • No generated portal SEO output is committed.

Out of Scope

  • Changing Neo.container.Viewport, Neo.dashboard.DockWorkspace, or additionalThemeFiles framework semantics.
  • Renaming the dock holder or moving its methods into the Viewport.
  • Refactoring unrelated dashboard examples or app-specific theme dependencies.
  • Rewriting dock-guide content unrelated to the Viewport composition correction and removal of internal implementation-error trails.

Avoided Traps

  • Fix only the guide. Rejected: the shipped example would continue teaching the wrong architecture by copy-paste.
  • Keep the fake root and adjust CSS. Rejected: that is the defect.
  • Move dock-holder methods onto Viewport. Rejected: the root owns application mounting; the child owns docking.
  • Rename or wrap the holder with delegating compatibility methods. Rejected: configured mainView composition preserves the existing holder class and consumers without indirection.
  • Export a factory solely so a unit test can inspect two lines of app config. Rejected: keep mainView inline and let the runtime whitebox witness prove the composition.

Related

Related: #17541 — the dock-host lift where the root substitution entered.
Related: #17569 — the adoption-guide lane that later documented the workaround.

Live duplicate/claim sweep: checked the latest 20 open Engine issues, searched all Engine issues, the synced issue/discussion corpus, and the latest 30 all-state A2A messages at 2026-08-27T17:26:15Z; no equivalent correction ticket or competing claim exists. The semantic KB search was unavailable because its embedding canary timed out; exact history and corpus search were used instead and the impaired instrument is stated above.

Origin Session ID: 368dc0e0-0c22-4207-bca4-942515860706

Retrieval Hint: commits 7c157c4e84374b4763812cc5d18b78845a0f9ffc..e6923326e65412be9fdc30bb66e9a94862780623
Retrieval Hint: DockWorkspace application root Viewport additionalThemeFiles 583x154 composition

tobiu referenced in commit cc27c04 - "docs(dashboard): remove internal guide archaeology (#17814)" on Aug 27, 2026, 8:11 PM
tobiu referenced in commit fe3c8dd - "chore(dashboard): inline dock main view (#17814)" on Aug 27, 2026, 8:30 PM
tobiu referenced in commit b0d49e7 - "fix(dashboard): restore Viewport workspace composition (#17814) (#17815) on Aug 27, 2026, 8:45 PM
tobiu closed this issue on Aug 27, 2026, 8:46 PM