@marimo-team/islands 0.25.3-dev464 → 0.25.3-dev467

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{ErrorBoundary-BUp3s8bW.js → ErrorBoundary-CR8e5bMo.js} +1 -1
  2. package/dist/{chat-ui-DFoH-uxc.js → chat-ui-BJSYaekC.js} +3 -3
  3. package/dist/{code-visibility-JyOG3ytM.js → code-visibility-DLTP6i-P.js} +3 -3
  4. package/dist/{common-DsPeHITU.js → common-DukgEIMM.js} +3 -3
  5. package/dist/{data-grid-overlay-editor-D6RpA9b2.js → data-grid-overlay-editor-BIXKY4J7.js} +1 -1
  6. package/dist/{error-entries-C9OKfJKe.js → error-entries-CNH4hNt-.js} +7 -4
  7. package/dist/{feedback-button-w5jJOd6o.js → feedback-button-CnN5kiMI.js} +3 -3
  8. package/dist/{glide-data-editor-lWcwB0Si.js → glide-data-editor-8lsksfCr.js} +3 -3
  9. package/dist/{globals-BFICoaLo.js → globals-JDBmTk6Y.js} +1 -1
  10. package/dist/{html-to-image-BiWLL4Tu.js → html-to-image-BBX2UucV.js} +1 -1
  11. package/dist/main.js +4552 -4541
  12. package/dist/{number-overlay-editor-BDYmg8YM.js → number-overlay-editor-DtTi13TP.js} +1 -1
  13. package/dist/{process-output-ClyiXL-f.js → process-output-DatAq1xF.js} +2 -2
  14. package/dist/{reveal-component-B63xZtLQ.js → reveal-component-DUkHWx-E.js} +2 -2
  15. package/package.json +1 -1
  16. package/src/__mocks__/executions.ts +5 -4
  17. package/src/components/editor/cell/__tests__/useRunCells.test.tsx +2 -1
  18. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
  19. package/src/core/cells/__tests__/runs.test.ts +1 -0
  20. package/src/core/cells/session.ts +1 -0
  21. package/src/core/executions/__tests__/atoms.test.ts +1 -0
  22. package/src/core/executions/__tests__/freshness.test.ts +1 -0
  23. package/src/core/executions/__tests__/input.test.ts +1 -1
  24. package/src/core/executions/__tests__/interrupt.test.ts +3 -6
  25. package/src/core/executions/__tests__/output-lifecycle.test.ts +1 -0
  26. package/src/core/executions/__tests__/run.test.ts +36 -24
  27. package/src/core/executions/__tests__/select.test.ts +2 -0
  28. package/src/core/executions/atoms.ts +15 -6
  29. package/src/core/islands/__tests__/bridge.test.ts +1 -0
  30. package/src/core/notebook/replica/__tests__/executions.test.ts +8 -1
  31. package/src/core/notebook/replica/__tests__/results.test.ts +1 -0
  32. package/src/core/notebook/replica/__tests__/runtime.test.ts +9 -10
  33. package/src/core/notebook/replica/resources/runtime.ts +1 -1
  34. package/src/core/runtime/__tests__/adapter.test.ts +1 -1
  35. package/src/core/runtime/adapter.ts +1 -1
  36. package/src/core/transports/__tests__/static.test.ts +1 -0
  37. package/src/core/wasm/__tests__/bridge.test.ts +7 -6
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
- import { a as n } from "./glide-data-editor-lWcwB0Si.js";
3
+ import { a as n } from "./glide-data-editor-8lsksfCr.js";
4
4
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
5
5
  var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
6
6
  name: "NumberOverlayEditorStyle",
@@ -1,6 +1,6 @@
1
- import { T as e } from "./html-to-image-BiWLL4Tu.js";
1
+ import { T as e } from "./html-to-image-BBX2UucV.js";
2
2
  import { h as t } from "./tooltip-CiJ919pg.js";
3
- import { Tt as n, wt as r } from "./error-entries-C9OKfJKe.js";
3
+ import { Tt as n, wt as r } from "./error-entries-CNH4hNt-.js";
4
4
  import { r as i } from "./assertNever-DOTNJ2Y4.js";
5
5
  var a = t("file", [["path", {
6
6
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
@@ -3,14 +3,14 @@ import { g as t, h as n, i as r, m as i, t as a } from "./button-qQhINE7z.js";
3
3
  import { t as o } from "./react-Bgs_wQh3.js";
4
4
  import { t as s } from "./compiler-runtime-C5KHtL5D.js";
5
5
  import { h as c, t as l } from "./tooltip-CiJ919pg.js";
6
- import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-DsPeHITU.js";
6
+ import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-DukgEIMM.js";
7
7
  import { M as w } from "./select-PQHWLm64.js";
8
8
  import { X as T } from "./dropdown-menu-B12Nf3Zf.js";
9
9
  import { t as E } from "./jsx-runtime-D8btoEHk.js";
10
10
  import { Rt as D, Vt as O, f as k, i as ee } from "./use-restore-focus-BLj45Ibw.js";
11
11
  import { t as A } from "./useEvent-BoN7U38T.js";
12
12
  import { o as te } from "./static-state-CWXd6dYX.js";
13
- import { n as ne, t as re } from "./code-visibility-JyOG3ytM.js";
13
+ import { n as ne, t as re } from "./code-visibility-DLTP6i-P.js";
14
14
  /* empty css */
15
15
  var j = c("sticky-note", [["path", {
16
16
  d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.25.3-dev464",
3
+ "version": "0.25.3-dev467",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -33,6 +33,7 @@ const T1 = "2026-10-01T09:20:12.500Z";
33
33
 
34
34
  let sequence = 0;
35
35
 
36
+ const READY: Protocol.RuntimeState = { status: "ready" };
36
37
  const SUCCEEDED: Protocol.Outcome = { kind: "succeeded" };
37
38
 
38
39
  /** An execution, or the output it set, as the stream delivers them. */
@@ -65,6 +66,7 @@ function execution(
65
66
  caused_by: null,
66
67
  cell_id: cellId,
67
68
  code_fingerprint: "0f71456db2ea83f4",
69
+ created_at: T0,
68
70
  state,
69
71
  };
70
72
  }
@@ -231,14 +233,13 @@ export const MockExecutions = {
231
233
  };
232
234
  },
233
235
 
234
- runtime(status: Protocol.RuntimeStatus): Protocol.Runtime {
236
+ runtime(state: Protocol.RuntimeState = READY): Protocol.Runtime {
235
237
  return {
236
238
  id: "r1",
237
239
  notebook_id: "n1",
238
- status,
239
- message: null,
240
240
  marimo_version: null,
241
- started_at: T0,
241
+ created_at: T0,
242
+ state,
242
243
  };
243
244
  },
244
245
 
@@ -41,6 +41,7 @@ function accepted(cells: Protocol.CellId[]): Protocol.Run {
41
41
  notebook_id: "n1",
42
42
  runtime_id: "r1",
43
43
  origin: { kind: "cells", cell_ids: cells },
44
+ created_at: "2026-10-01T09:20:00Z",
44
45
  state: { status: "queued" },
45
46
  };
46
47
  }
@@ -66,7 +67,7 @@ describe("useRunStaleCells", () => {
66
67
  const replica = MockExecutions.seed(
67
68
  store,
68
69
  records,
69
- MockExecutions.runtime("running"),
70
+ MockExecutions.runtime(),
70
71
  document,
71
72
  );
72
73
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -133,7 +133,7 @@ const VerticalLayoutRenderer: React.FC<VerticalLayoutProps> = ({
133
133
  if (cells.length === 0 && !invisible) {
134
134
  // Until the host reports the runtime running, show loading state.
135
135
  // A static notebook has no runtime to wait for.
136
- if (runtimeStatus !== "running" && !isStaticNotebook()) {
136
+ if (runtimeStatus !== "ready" && !isStaticNotebook()) {
137
137
  return (
138
138
  <div className="flex-1 flex flex-col items-center justify-center py-8">
139
139
  <Loader2Icon className="w-8 h-8 animate-spin text-muted-foreground" />
@@ -20,6 +20,7 @@ const queued = {
20
20
  caused_by: null,
21
21
  cell_id: "cell",
22
22
  code_fingerprint: "fp",
23
+ created_at: "2026-10-01T09:20:00Z",
23
24
  state: { status: "queued" },
24
25
  } satisfies Execution;
25
26
 
@@ -266,6 +266,7 @@ function resultRecord(
266
266
  caused_by: null,
267
267
  cell_id: cell.id,
268
268
  code_fingerprint: cell.code_fingerprint,
269
+ created_at: null,
269
270
  state: {
270
271
  status: "completed",
271
272
  started_at: null,
@@ -36,6 +36,7 @@ function run(
36
36
  notebook_id: "n1",
37
37
  runtime_id: "r1",
38
38
  origin: { kind: "cells", cell_ids: cells },
39
+ created_at: "2026-10-01T09:20:00Z",
39
40
  state:
40
41
  status === "completed"
41
42
  ? {
@@ -62,6 +62,7 @@ function record(
62
62
  run_id: "run-1",
63
63
  runtime_id: "r1",
64
64
  caused_by: null,
65
+ created_at: null,
65
66
  state: completed(),
66
67
  ...fields,
67
68
  };
@@ -36,7 +36,7 @@ describe("replyInput", () => {
36
36
  const replica = MockExecutions.seed(
37
37
  store,
38
38
  [],
39
- MockExecutions.runtime("running"),
39
+ MockExecutions.runtime(),
40
40
  documentOf(),
41
41
  );
42
42
  store.set(replica.backendAtom, fakeBackend({ input }));
@@ -29,6 +29,7 @@ function run(
29
29
  notebook_id: "n1",
30
30
  runtime_id: runtimeId,
31
31
  origin: { kind: "code", code: "pass" },
32
+ created_at: "2026-10-01T09:20:00Z",
32
33
  state:
33
34
  status === "completed"
34
35
  ? {
@@ -45,15 +46,11 @@ function run(
45
46
 
46
47
  function setup(runs: Protocol.Run[]) {
47
48
  const store = createStore();
48
- const replica = MockExecutions.seed(
49
- store,
50
- [],
51
- MockExecutions.runtime("running"),
52
- );
49
+ const replica = MockExecutions.seed(store, [], MockExecutions.runtime());
53
50
  const interrupt = vi.fn<FakeInterrupt>(async () => ({
54
51
  ok: true,
55
52
  status: 202,
56
- data: MockExecutions.runtime("running"),
53
+ data: MockExecutions.runtime(),
57
54
  }));
58
55
  store.set(replica.backendAtom, fakeBackend({ interrupt }));
59
56
  store.set(replica.executionsAtom, {
@@ -122,6 +122,7 @@ describe("output lifetime", () => {
122
122
  notebook_id: "n1",
123
123
  runtime_id: "r1",
124
124
  origin: { kind: "cells", cell_ids: [C1] },
125
+ created_at: "2026-10-01T09:20:00Z",
125
126
  state: { status: "queued" },
126
127
  };
127
128
  const pending = requestRun(store, [C1])!;
@@ -40,6 +40,7 @@ function accepted(cells: Protocol.CellId[]): Protocol.Run {
40
40
  notebook_id: "n1",
41
41
  runtime_id: "r1",
42
42
  origin: { kind: "cells", cell_ids: cells },
43
+ created_at: "2026-10-01T09:20:00Z",
43
44
  state: { status: "queued" },
44
45
  };
45
46
  }
@@ -90,7 +91,7 @@ describe("runCells", () => {
90
91
  const replica = MockExecutions.seed(
91
92
  store,
92
93
  [],
93
- MockExecutions.runtime("running"),
94
+ MockExecutions.runtime(),
94
95
  documentOf(),
95
96
  );
96
97
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -125,7 +126,7 @@ describe("runCells", () => {
125
126
  const replica = MockExecutions.seed(
126
127
  store,
127
128
  [],
128
- MockExecutions.runtime("running"),
129
+ MockExecutions.runtime(),
129
130
  withCells(documentOf(), {
130
131
  c2: cell("c2", "y = 2", { config: { ...CONFIG, disabled: true } }),
131
132
  }),
@@ -146,7 +147,7 @@ describe("runCells", () => {
146
147
  const replica = MockExecutions.seed(
147
148
  store,
148
149
  [],
149
- MockExecutions.runtime("starting"),
150
+ MockExecutions.runtime({ status: "starting", message: null }),
150
151
  documentOf(),
151
152
  );
152
153
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -157,7 +158,7 @@ describe("runCells", () => {
157
158
  expect(status(C1)).toBe("queued");
158
159
  expect(run).not.toHaveBeenCalled();
159
160
 
160
- store.set(replica.runtimeAtom, MockExecutions.runtime("running"));
161
+ store.set(replica.runtimeAtom, MockExecutions.runtime());
161
162
  await pending;
162
163
  expect(run).toHaveBeenCalledOnce();
163
164
  });
@@ -173,7 +174,7 @@ describe("runCells", () => {
173
174
  expect(run).not.toHaveBeenCalled();
174
175
 
175
176
  // The real replica reports both at once, from one snapshot.
176
- store.set(replica.runtimeAtom, MockExecutions.runtime("running"));
177
+ store.set(replica.runtimeAtom, MockExecutions.runtime());
177
178
  store.set(replica.notebookAtom, MockExecutions.notebook());
178
179
  await pending;
179
180
 
@@ -196,24 +197,35 @@ describe("runCells", () => {
196
197
  );
197
198
  });
198
199
 
199
- it("withdraws the submission and reports when the runtime has failed", async () => {
200
- const replica = MockExecutions.seed(
201
- store,
202
- [],
203
- { ...MockExecutions.runtime("failed"), message: "The kernel exited" },
204
- documentOf(),
205
- );
206
- store.set(replica.backendAtom, fakeBackend({ run }));
207
- model();
200
+ it.each<[Protocol.RuntimeOutcome, string]>([
201
+ [{ kind: "failed", message: "The kernel exited" }, "The kernel exited"],
202
+ [{ kind: "failed", message: null }, "The runtime failed"],
203
+ [{ kind: "stopped" }, "The notebook has no runtime"],
204
+ ])(
205
+ "withdraws the submission and reports when the runtime ended %o",
206
+ async (outcome, description) => {
207
+ const replica = MockExecutions.seed(
208
+ store,
209
+ [],
210
+ MockExecutions.runtime({
211
+ status: "ended",
212
+ ended_at: "2026-10-01T09:30:00Z",
213
+ outcome,
214
+ }),
215
+ documentOf(),
216
+ );
217
+ store.set(replica.backendAtom, fakeBackend({ run }));
218
+ model();
208
219
 
209
- await runCells(store, [C1]);
220
+ await runCells(store, [C1]);
210
221
 
211
- expect(run).not.toHaveBeenCalled();
212
- expect(status(C1)).toBe("idle");
213
- expect(toast).toHaveBeenCalledWith(
214
- expect.objectContaining({ description: "The kernel exited" }),
215
- );
216
- });
222
+ expect(run).not.toHaveBeenCalled();
223
+ expect(status(C1)).toBe("idle");
224
+ expect(toast).toHaveBeenCalledWith(
225
+ expect.objectContaining({ description }),
226
+ );
227
+ },
228
+ );
217
229
 
218
230
  it("withdraws the submission and reports when the notebook has no runtime", async () => {
219
231
  const replica = MockExecutions.seed(store, [], null, documentOf());
@@ -233,7 +245,7 @@ describe("runCells", () => {
233
245
  const replica = MockExecutions.seed(
234
246
  store,
235
247
  [],
236
- MockExecutions.runtime("starting"),
248
+ MockExecutions.runtime({ status: "starting", message: null }),
237
249
  documentOf(),
238
250
  );
239
251
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -313,7 +325,7 @@ describe("runCells", () => {
313
325
  const replica = MockExecutions.seed(
314
326
  store,
315
327
  [],
316
- MockExecutions.runtime("running"),
328
+ MockExecutions.runtime(),
317
329
  documentOf(),
318
330
  );
319
331
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -335,7 +347,7 @@ describe("runCells", () => {
335
347
  const replica = MockExecutions.seed(
336
348
  store,
337
349
  [],
338
- MockExecutions.runtime("running"),
350
+ MockExecutions.runtime(),
339
351
  documentOf(),
340
352
  );
341
353
  store.set(replica.backendAtom, fakeBackend({ run }));
@@ -32,6 +32,7 @@ function record(
32
32
  caused_by: null,
33
33
  cell_id: "c1",
34
34
  code_fingerprint: "0f71456db2ea83f4",
35
+ created_at: null,
35
36
  state: {
36
37
  status: "completed",
37
38
  started_at: T0,
@@ -63,6 +64,7 @@ function run(
63
64
  notebook_id: "n1",
64
65
  runtime_id: "r1",
65
66
  origin: { kind: "cells", cell_ids: cells },
67
+ created_at: "2026-10-01T09:20:00Z",
66
68
  state:
67
69
  status === "completed"
68
70
  ? {
@@ -255,7 +255,9 @@ export function clearCellOutputs(
255
255
  /** The runtime's status, null while the notebook has none or the stream is not ready. */
256
256
  export const runtimeStatusAtom = atom((get) => {
257
257
  const replica = get(activeNotebookReplicaAtom);
258
- return replica === null ? null : (get(replica.runtimeAtom)?.status ?? null);
258
+ return replica === null
259
+ ? null
260
+ : (get(replica.runtimeAtom)?.state.status ?? null);
259
261
  });
260
262
 
261
263
  export const notebookIsRunningAtom = atom((get) =>
@@ -272,7 +274,7 @@ type RuntimeReadiness = "running" | "waiting" | { refused: string };
272
274
  * Whether a run can go to the host now, should wait, or has nothing to wait for.
273
275
  *
274
276
  * A runtime that is starting, or a stream that has not reported yet, will
275
- * settle one way or the other. A failed or absent runtime, or a connection
277
+ * settle one way or the other. An ended or absent runtime, or a connection
276
278
  * that has closed, will not, so a run waiting on it is refused instead.
277
279
  */
278
280
  const runtimeReadinessAtom = atom((get): RuntimeReadiness => {
@@ -292,11 +294,18 @@ const runtimeReadinessAtom = atom((get): RuntimeReadiness => {
292
294
  if (runtime === null) {
293
295
  return { refused: "The notebook has no runtime" };
294
296
  }
295
- switch (runtime.status) {
296
- case "running":
297
+ switch (runtime.state.status) {
298
+ case "ready":
297
299
  return "running";
298
- case "failed":
299
- return { refused: runtime.message ?? "The runtime failed" };
300
+ case "ended": {
301
+ const { outcome } = runtime.state;
302
+ return {
303
+ refused:
304
+ outcome.kind === "failed"
305
+ ? (outcome.message ?? "The runtime failed")
306
+ : "The notebook has no runtime",
307
+ };
308
+ }
300
309
  default:
301
310
  return "waiting";
302
311
  }
@@ -821,6 +821,7 @@ describe("IslandsPyodideBridge", () => {
821
821
  notebook_id: "n1",
822
822
  runtime_id: "r1",
823
823
  origin: { kind: "cells", cell_ids: ["c1"] },
824
+ created_at: "2026-10-01T09:20:00Z",
824
825
  state: { status: "queued" },
825
826
  },
826
827
  });
@@ -220,7 +220,14 @@ describe("executions resource", () => {
220
220
  event: "run",
221
221
  id: cursor,
222
222
  data: {
223
- run: { id, notebook_id: "n1", runtime_id: "r1", origin, state },
223
+ run: {
224
+ id,
225
+ notebook_id: "n1",
226
+ runtime_id: "r1",
227
+ origin,
228
+ created_at: time,
229
+ state,
230
+ },
224
231
  time,
225
232
  },
226
233
  });
@@ -40,6 +40,7 @@ const restored = {
40
40
  caused_by: null,
41
41
  cell_id: "c3",
42
42
  code_fingerprint: "0f71456db2ea83f4",
43
+ created_at: null,
43
44
  state: {
44
45
  status: "completed",
45
46
  started_at: "2026-09-30T09:20:01Z",
@@ -17,22 +17,22 @@ describe("runtime resource", () => {
17
17
  const state = confirmed();
18
18
  const running = current(state);
19
19
  expect(running?.id).toBe("r1");
20
- expect(running?.status).toBe("running");
20
+ expect(running?.state).toEqual({ status: "ready" });
21
21
 
22
- const terminating = reducer.reduce(state, {
22
+ const stopping = reducer.reduce(state, {
23
23
  event: "runtime",
24
24
  id: "98",
25
- data: { runtime: { ...running!, status: "terminating" } },
25
+ data: { runtime: { ...running!, state: { status: "stopping" } } },
26
26
  });
27
- expect(current(terminating)?.status).toBe("terminating");
28
- expect(current(state)?.status).toBe("running");
27
+ expect(current(stopping)?.state).toEqual({ status: "stopping" });
28
+ expect(current(state)?.state).toEqual({ status: "ready" });
29
29
 
30
- const other = reducer.reduce(terminating, {
30
+ const other = reducer.reduce(stopping, {
31
31
  event: "runtime.removed",
32
32
  id: "99",
33
33
  data: { id: "r0", time },
34
34
  });
35
- expect(current(other)).toBe(current(terminating));
35
+ expect(current(other)).toBe(current(stopping));
36
36
 
37
37
  const removed = reducer.reduce(other, {
38
38
  event: "runtime.removed",
@@ -58,10 +58,9 @@ describe("runtime resource", () => {
58
58
  const replacement = {
59
59
  ...current(state)!,
60
60
  id: "r2",
61
- status: "starting" as const,
62
- message: "Starting the kernel",
63
61
  marimo_version: null,
64
- started_at: "2026-10-01T09:31:00Z",
62
+ created_at: "2026-10-01T09:31:00Z",
63
+ state: { status: "starting" as const, message: "Starting the kernel" },
65
64
  };
66
65
  const starting = reducer.reduce(removed, {
67
66
  event: "runtime",
@@ -3,7 +3,7 @@
3
3
  import type { Runtime } from "@marimo-team/client/protocol";
4
4
  import type { NotebookResource } from "@marimo-team/client";
5
5
 
6
- /** The notebook's runtime record while it has one. */
6
+ /** The notebook's runtime record, kept after the runtime ends. */
7
7
  export const runtime: NotebookResource<Runtime | null, "runtime"> = {
8
8
  initial: null,
9
9
  on: {
@@ -128,7 +128,7 @@ describe("canRunCellsAtom", () => {
128
128
  store.set(connectionAtom, { state: ConnectionState.OPEN });
129
129
  expect(store.get(canRunCellsAtom)).toBe(false);
130
130
 
131
- MockExecutions.seed(store, [], MockExecutions.runtime("running"));
131
+ MockExecutions.seed(store, [], MockExecutions.runtime());
132
132
  expect(store.get(canRunCellsAtom)).toBe(true);
133
133
  });
134
134
 
@@ -169,7 +169,7 @@ export const canRunCellsAtom = atom<boolean>((get) => {
169
169
  return false;
170
170
  }
171
171
  if (adapter.kind === "remote") {
172
- return get(runtimeStatusAtom) === "running";
172
+ return get(runtimeStatusAtom) === "ready";
173
173
  }
174
174
  return true;
175
175
  });
@@ -113,6 +113,7 @@ describe("static notebook backend", () => {
113
113
  caused_by: null,
114
114
  cell_id: cell.id,
115
115
  code_fingerprint: cell.code_fingerprint,
116
+ created_at: null,
116
117
  state: {
117
118
  status: "completed",
118
119
  started_at: null,
@@ -275,6 +275,7 @@ it("raises the interrupt buffer for a cancelled running run before the worker ta
275
275
  notebook_id: "n1",
276
276
  runtime_id: "r1",
277
277
  origin: { kind: "code", code: "pass" },
278
+ created_at: "2026-10-01T09:20:00Z",
278
279
  state: { status: "running", started_at: "2026-10-01T09:20:11Z" },
279
280
  };
280
281
  const replicaWith = (status: string) =>
@@ -324,6 +325,7 @@ it.each(["running", "completed", null])(
324
325
  notebook_id: "n1",
325
326
  runtime_id: "r1",
326
327
  origin: { kind: "code", code: "pass" },
328
+ created_at: "2026-10-01T09:20:00Z",
327
329
  state: { status: "running", started_at: "2026-10-01T09:20:11Z" },
328
330
  };
329
331
  const replicaWith = (status: string) =>
@@ -341,10 +343,9 @@ it.each(["running", "completed", null])(
341
343
  body: {
342
344
  id: "r1",
343
345
  notebook_id: "n1",
344
- status: "running",
345
- message: null,
346
346
  marimo_version: null,
347
- started_at: "2026-10-01T09:20:11Z",
347
+ created_at: "2026-10-01T09:20:11Z",
348
+ state: { status: "ready" },
348
349
  },
349
350
  };
350
351
  mockNotebookCall.mockImplementation(async () => {
@@ -401,6 +402,7 @@ it("raises the interrupt buffer once a run cancelled while queued starts", async
401
402
  notebook_id: "n1",
402
403
  runtime_id: "r1",
403
404
  origin: { kind: "code", code: "pass" },
405
+ created_at: "2026-10-01T09:20:00Z",
404
406
  state: { status: "queued" },
405
407
  };
406
408
  store.set(activeNotebookReplicaAtom, {
@@ -479,10 +481,9 @@ it("signals an interrupt once across pending, completed, and lost-reply retries"
479
481
  body: {
480
482
  id: "r1",
481
483
  notebook_id: "n1",
482
- status: "running",
483
- message: null,
484
484
  marimo_version: null,
485
- started_at: "2026-10-01T09:20:11Z",
485
+ created_at: "2026-10-01T09:20:11Z",
486
+ state: { status: "ready" },
486
487
  },
487
488
  };
488
489
  mockNotebookCall.mockImplementation(() => pending.promise);