Skip to content

Notebooks, cells, and tabs

Molt borrows the useful parts of a notebook interface without implementing the Jupyter document format or kernel protocol.

The application always creates four notebooks, labeled Tab 1 through Tab 4. The frontend constructs exactly those four tabs; the tab_count configuration field is reserved and does not alter the release interface.

A tab is useful as a durable topic boundary. For example:

  • Tab 1 for a current calculation.
  • Tab 2 for a data-format check.
  • Tab 3 for a package experiment.
  • Tab 4 for reusable snippets.

The labels cannot be renamed in this release.

Each notebook contains one or more cells. A cell has:

  • A stable UUID.
  • A type field, currently used only for code cells.
  • Python source text.
  • A transient execution count.
  • Transient output records.
  • A transient state such as idle, running, success, or error.

Cell order matters because Run All executes from top to bottom and because later cells can depend on names created earlier.

The store prevents a notebook from becoming empty. Deleting its final cell creates a new empty cell immediately.

The runtime type includes a reserved markdown value, but the interface creates code cells and renders every cell through the Python CodeMirror editor. There is no Markdown rendering mode.

The reserved value appears in persisted data for forward compatibility; it should not be treated as a current feature.

Notebook-like behavior without notebook files

Section titled “Notebook-like behavior without notebook files”

Molt implements several familiar conventions:

  • Stateful execution within a tab.
  • A displayed execution number.
  • Automatic display of a final expression.
  • Automatic creation of a new cell after running the last cell.
  • Run All in top-to-bottom order.

It does not implement:

  • .ipynb import or export.
  • Jupyter kernels or ZeroMQ.
  • Markdown cells.
  • Rich display MIME bundles.
  • Notebook metadata, attachments, or widget state.

Saved Molt content lives in one application JSON file rather than one file per notebook.

Cell UUIDs, types, ordering, and source form the durable notebook document. Execution counts, outputs, and cell states are a view of the current app session.

This distinction explains why a relaunched tab contains the same code but looks unexecuted: the durable document was restored, while the execution history was intentionally rebuilt.