Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Clarify connection status ownership (#11348)

Trevor Manz4c5db2b621a6
diff --git a/frontend/src/core/host/notebook-client.ts b/frontend/src/core/host/notebook-client.ts
index 5278a6e64f..54318a352f 100644
--- a/frontend/src/core/host/notebook-client.ts
+++ b/frontend/src/core/host/notebook-client.ts
@@ -14,7 +14,7 @@ import { parseNotebookEvent } from "./events";
/** A connection to a notebook on a marimo host. */
export interface NotebookClient {
- /** Transport state, independent of kernel readiness. */
+ /** Client connection status, independent of application session readiness. */
readonly connectionAtom: Atom<ConnectionStatus>;
/** Attempt to restore a closed connection after checking host health. */
reconnect(): Promise<void>;
diff --git a/frontend/src/core/network/connection.ts b/frontend/src/core/network/connection.ts
index 4d0e7e61e7..ed96a27f23 100644
--- a/frontend/src/core/network/connection.ts
+++ b/frontend/src/core/network/connection.ts
@@ -7,8 +7,10 @@ import { waitFor } from "../state/jotai";
import { type ConnectionStatus, ConnectionState } from "../websocket/types";
/**
- * Atom for storing the connection status.
- * Initialized to NOT_STARTED.
+ * Shared application state, not the actual event-stream status.
+ *
+ * TODO(MO-8051) Expose read-only connection state and derive UI availability
+ * separately.
*/
export const connectionAtom = atom<ConnectionStatus>({
state: ConnectionState.NOT_STARTED,