LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-julia
createdAtNov 3, 2026, 8:12 PM
updatedAtNov 4, 2026, 1:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/20264
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 4, 2026, 1:19 PM

A Workstation subclass cannot choose its status readout

Closed v13.4.0/archive-v13-4-0-chunk-3 enhancementgood first issuedeveloper-experienceai
neo-opus-vega
neo-opus-vega commented on Nov 3, 2026, 8:12 PM

Context

#20223 (PR #20225) let a Workstation subclass choose the Workspace its viewport creates. Its Out of Scope notes that panes and stores were already swappable (createPane, stateProvider.stores). The status readout is not. A subclass that swaps the scale store changes what scale.count means, but it can't change the readout that prints it.

The Problem

Workstation.view.StatusComponent prints scale.count as "N scale rows" (apps/workstation/view/StatusComponent.mjs l.22).

  • For the shipped flat Scale store, count is the row count.
  • For a TreeStore, count counts the visible projection. TreeStore keeps the full population in its private structural layer and exposes only the expanded nodes as items (src/data/TreeStore.mjs l.18–25).

So a Workstation subclass whose scale store is a TreeStore with collapsed parents reports the parents it shows, not the rows it holds. Today it has no clean way to say otherwise:

  • Workspace#construct composes the controls row inline: items: [{module: StatusComponent, flex: 1}, {module: TopologyToolbar, workspace: me}] (apps/workstation/view/Workspace.mjs l.264–269).
  • Overriding construct copies its document and topology setup, which then drift. That's the trap #20223 avoided for createRoot.
  • Patching StatusComponent.prototype from the extending app changes the readout for every consumer.

A subclass that wants a different readout altogether (other stores, other numbers) hits the same wall.

The Architectural Reality

  • The Workstation's subclass seams are plain class configs that name a module. ViewportController#workspaceModule (apps/workstation/view/ViewportController.mjs l.35–40) is read where the instance gets created (createWorkspace, l.265–267).
  • The readout binds through the Workspace's root state provider: bind.html() reads getStore('feed') and getStore('scale'). A replacement readout therefore gets the same stores and the same reactivity with no extra wiring.
  • StatusComponent is created in exactly one place (Workspace.mjs l.268).

The Fix

  1. apps/workstation/view/Workspace.mjs:
    • add a class config statusModule: StatusComponent, with JSDoc in the workspaceModule style: what it is, and how a subclass or a config names its own;
    • l.268 creates {module: me.statusModule, flex: 1}.
  2. test/playwright/unit/apps/workstation/Workspace.spec.mjs: a subclass that names its own status module gets that class in the controls row, and the default stays StatusComponent.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
Workstation.view.Workspace#statusModule (new) the workspaceModule precedent, ViewportController.mjs l.35–40 the controls row creates its readout from this class StatusComponent, output unchanged JSDoc on the config unit spec

Decision Record impact

none.

Acceptance Criteria

  • AC-1 Workstation.view.Workspace has a statusModule class config that defaults to StatusComponent and is documented like workspaceModule.
  • AC-2 The controls row creates its readout from statusModule. With the default, the shipped Workstation's readout is unchanged.
  • AC-3 A unit spec shows that a subclass, or a config, naming its own module gets an instance of that class in the controls row.

Out of Scope

  • A public count of a TreeStore's full population. That is a data-layer API with its own design, and the readout seam doesn't need it.
  • The controls row's other item (TopologyToolbar) and the tour toolbar.
  • Changing what the shipped readout prints.

Avoided Traps

  • Overriding construct in a subclass: it copies setup that drifts.
  • Patching StatusComponent.prototype from an app: it mutates a shared class.
  • A createControls() method that returns the row's items. A subclass would replace the readout by array index, and that breaks as soon as the row changes.

Related

  • #20223 / PR #20225: the workspaceModule seam this mirrors.

Live latest-open + closed sweep: checked the latest 20 open issues and closed searches (Workstation status readout count, Workstation subclass) at 2026-11-03 19:2xZ; read Out of Scope / Avoided Traps on the same-surface hits #20223, #19540, #18460. No equivalent and no prior exclusion; #20223 scoped Workspace changes out, it didn't rule against them. A2A in-flight sweep: no claim on this scope in the last 60 minutes. MC sweep: Workstation status bar scale rows count tree store visible projection, 6 results, no prior decision. Own-assignment sweep: 6 open, none on this surface.

unowned-rationale: Ready for a contributor; maintainers provide planning and review.

Origin Session ID: 901214bc-bd2e-4eb6-ac5d-3d3b3ca5c3d2

Retrieval Hint: "Workstation subclass status readout statusModule scale count TreeStore projection"

tobiu referenced in commit 3027a99 - "feat(workstation): add statusModule config seam on Workspace (#20264) (#20266)" on Nov 4, 2026, 1:19 PM
tobiu closed this issue on Nov 4, 2026, 1:19 PM