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
- 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.
- 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."
- 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
- 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.
- 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.
- 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.
- 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
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)
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
dev0128668721in 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.colors-dashboardcarriesscope: "Allow popups. The color data is generated inside the example."learn/blog/one-websocket-across-browser-windows-with-sharedworkers.mdsends 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 aSharedWorker"), andlearn/benefits/body/RPCLayer.mdquotesColors.backend.ColorService.read(…)from this controller as its backend example.The Architectural Reality
apps/colors/neo-config.jsonsetsremotesApiUrlanduseSharedWorkers: true.Neo.remotes.ApiregistersColors.backend.ColorService.readin the app worker; a call travels to the data worker (src/remotes/Api.mjs:29), whereNeo.manager.rpc.Messagekeeps oneNeo.data.connection.WebSocketper URL (src/manager/rpc/Message.mjs:134). With shared workers that is one socket for every window.src/data/connection/WebSocket.mjs:226). Itsrejectis stored (:255) and never called: after the last reconnect attempt the connection only firesreconnectFailed(: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 handsdata.tableDatato the grid anddata.summaryDatato both charts. Start runs it on a 60 Hz interval.backend/ColorService.mjsinneomjs/multiwindowcolors: rows{id: 'rowN', columnA…: 1..amountColors}and one{color, count}per colour over ten fixed blues.apps/portal/remotes-api.json), because its home page runs the dashboard inside the Portal's own app worker.The Fix
updateWidgets()gives the remote call a deadline. When it passes, or the call rejects, the controller writesdataSource: '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 frombackend/ColorService.mjs). No further remote call starts in that session; a reload asks the backend again. While the backend answers, nothing changes.dataSource: the WebSocket backend, or data generated in the app because the backend is not reachable.scopesays 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.Contract Ledger
Colors.view.ViewportStateProviderdatadataSource(new)'backend'at start,'local'after the deadline or a rejectionColors.backend.ColorService.read({amountColors, amountColumns, amountRows})inViewportController#updateWidgets()(read ondev0128668721,:260)learn/benefits/body/RPCLayer.md:58, the blog postViewportController#readFromBackend(); call and arguments unchangedupdateWidgets()colors-dashboard, fieldscope(read ondev0128668721)Acceptance Criteria
Colors.backend.ColorService.read({…})stays in the controller asRPCLayer.mdquotes it.scopeno longer says without a condition that the data is generated inside the example.Out of Scope
Neo.data.connection.WebSocket(captured as a defect-note on 18 Nov, fingerprint02b6baa56fdbfa61): an engine change with a design of its own.test/playwright/e2e/colors/, beyond what the fallback changes for them.Avoided Traps
Related
#21140 (parent) · #21142 (the slate; the Colors line of my rows is corrected with this ticket) ·
#18763(closed: a destroyed grid inupdateGrid()) ·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,#12132and#9455read 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)