LearnNewsExamplesConnect
Frontmatter
assigneesneo-fable-mnemosyne
createdAtNov 18, 2026, 3:13 PM
updatedAtNov 18, 2026, 4:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/21330
authorneo-fable-mnemosyne
commentsCount1
parentIssue21358
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 18, 2026, 4:15 PM

The Colors dashboard keeps updating when its backend does not answer

Closed v14.0.0/archive-v14-0-0-chunk-4 enhancementaiportal
neo-fable-mnemosyne
neo-fable-mnemosyne commented on Nov 18, 2026, 3:13 PM

Not offered to contributors: owned by its filer for the Engine 14 cut (the Platform groups' first content is due in review by Fri 20 Nov 12:00 CET).

Context

The Colors dashboard (apps/colors) is a featured card of the Multi-Window group, and the Portal's home page runs it in a live preview (apps/portal/view/home/parts/Colors.mjs). Its grid and both charts get every batch from a WebSocket backend on a third-party host (apps/colors/remotes-api.json).

The Engine 14 slate asked for this card's renewal with the verdict "the data is generated in the app" (my rows on the slate). That verdict was wrong, and this ticket replaces it: the backend is the example's proof, not its flaw. What is missing is an answer for the day the backend is away.

The Problem

  1. No answer means an empty dashboard, for good. Measured on dev 0128668721 in headless Chromium at 1440×900, seven seconds after load: with the backend reachable the grid shows its rows (90 coloured cells) and both charts draw; with the backend's host cut off (--host-resolver-rules) the grid has 0 rows and both charts stay empty, with no message. Start then adds sixty calls a second that never settle.
  2. The caption says the opposite of what happens. The catalog record colors-dashboard carries scope: "Allow popups. The color data is generated inside the example."
  3. Removing the backend would break two published claims. learn/blog/one-websocket-across-browser-windows-with-sharedworkers.md sends its readers to the live Colors demo as the 30-second proof that a socket in a SharedWorker feeds a page ("Click Start … no WebSocket appears on the page, because the socket lives in a SharedWorker"), and learn/benefits/body/RPCLayer.md quotes Colors.backend.ColorService.read(…) from this controller as its backend example.

The Architectural Reality

  • apps/colors/neo-config.json sets remotesApiUrl and useSharedWorkers: true. Neo.remotes.Api registers Colors.backend.ColorService.read in the app worker; a call travels to the data worker (src/remotes/Api.mjs:29), where Neo.manager.rpc.Message keeps one Neo.data.connection.WebSocket per URL (src/manager/rpc/Message.mjs:134). With shared workers that is one socket for every window.
  • A call on that connection resolves when its answer arrives (src/data/connection/WebSocket.mjs:226). Its reject is stored (:255) and never called: after the last reconnect attempt the connection only fires reconnectFailed (:113). A call to a backend that is away therefore never settles.
  • Colors.view.ViewportController#updateWidgets() (apps/colors/view/ViewportController.mjs:250) reads the three amounts from the state provider, awaits the call, and hands data.tableData to the grid and data.summaryData to both charts. Start runs it on a 60 Hz interval.
  • The payload is produced by the project's own MIT code, backend/ColorService.mjs in neomjs/multiwindowcolors: rows {id: 'rowN', columnA…: 1..amountColors} and one {color, count} per colour over ten fixed blues.
  • The Portal declares the same remote (apps/portal/remotes-api.json), because its home page runs the dashboard inside the Portal's own app worker.
  • Design authority: "each published example is current, captioned and shown at its best" (the terminal predicate of #21140), and the blog post's sentence quoted above, which has to stay true.

The Fix

  1. A fallback in the app. updateWidgets() gives the remote call a deadline. When it passes, or the call rejects, the controller writes dataSource: 'local' to the state provider and from then on takes each batch from a generator in the app that returns the backend's payload shape (ported from backend/ColorService.mjs). No further remote call starts in that session; a reload asks the backend again. While the backend answers, nothing changes.
  2. The page says which source is live. One line in the header toolbar, bound to dataSource: the WebSocket backend, or data generated in the app because the backend is not reachable.
  3. The caption follows. The record's scope says that the data streams from a WebSocket backend through the RPC layer, and that the app generates the same data itself when the backend does not answer.
  4. The Portal home's preview uses the same controller and gets the fallback with it.

Contract Ledger

Target surface Source of authority Proposed behavior Fallback Docs Evidence
Colors.view.ViewportStateProvider data dataSource (new) this ticket 'backend' at start, 'local' after the deadline or a rejection none JSDoc on the provider unit spec
The call Colors.backend.ColorService.read({amountColors, amountColumns, amountRows}) in ViewportController#updateWidgets() (read on dev 0128668721, :260) learn/benefits/body/RPCLayer.md:58, the blog post moves into ViewportController#readFromBackend(); call and arguments unchanged the generator JSDoc of updateWidgets() unit spec on the existing stub
Catalog record colors-dashboard, field scope (read on dev 0128668721) design 7 of #21140 the two-source sentence none the catalog the record

Acceptance Criteria

  • The backend answers: grid and charts fill from the remote call, the header names the backend, and the call Colors.backend.ColorService.read({…}) stays in the controller as RPCLayer.md quotes it.
  • The backend is silent (a stub that never answers; in the browser, its host cut off): within three seconds of load the grid shows its rows and both charts draw, the header names the app as the source, and Start, Stop and the three amount controls work.
  • After the fallback no further remote call starts. A call that passed its deadline stays unsettled inside the engine's connection: the defect-note under Out of Scope.
  • A widget detached into its own window keeps updating in both cases.
  • The record's scope no longer says without a condition that the data is generated inside the example.
  • A unit spec covers both sources; an e2e spec covers the cut-off host.
  • The look on the pull request: the first frame at 1440×900 and 390×844 with the host cut off, before and after.

Out of Scope

  • Rejecting pending calls in Neo.data.connection.WebSocket (captured as a defect-note on 18 Nov, fingerprint 02b6baa56fdbfa61): an engine change with a design of its own.
  • Hosting the backend on the project's infrastructure.
  • A new look for the dashboard, or a phone layout.
  • The two existing e2e specs under test/playwright/e2e/colors/, beyond what the fallback changes for them.

Avoided Traps

  • Generating the data in the app only (the slate row this replaces): it removes the proof a published post and a benefit page point at.
  • Asking the backend again on a timer after the fallback: two sources alternating under one header line. A reload is the retry.
  • A silent fallback: a reader who came for the socket proof would watch generated data and take it for the socket's.

Related

#21140 (parent) · #21142 (the slate; the Colors line of my rows is corrected with this ticket) · #18763 (closed: a destroyed grid in updateGrid()) · neomjs/multiwindowcolors (the backend's source).

Live latest-open + closed sweep: latest 20 open read and open and closed searches ("colors dashboard backend", "ColorService", "herokuapp", "colors app websocket fallback"; #18763, #12132 and #9455 read by title, none governs this) at 2026-11-18T14:09Z: no equivalent. 68 open (red band): no leaf owns this card, the Multi-Window row of #21140 is its owner and this is the close target of its first pull request. A2A in-flight sweep: latest 30 messages at 14:04Z and the latest 6 at 14:13Z, all read-states: no claim on Colors. MC sweep: "Colors dashboard grid and charts stay empty when the websocket backend on the third-party host does not answer", 5 results, no prior decision. Own-assignment sweep: 5 open, none on this surface. Structure-map: N/A, an example app; no Agent OS placement.

Decision Record impact: none.

Origin Session ID: cc768f7c-fed5-4e1d-bdc1-855e31373396

Retrieval Hint: "Colors dashboard websocket backend fallback, RPC layer live proof, remote call never settles on a dead socket"

Mnemosyne (Claude Fable 5.2, Claude Code)