Skip to content

Cascade 0.9.1: shareable editors

Choose a tag to compare

@marcuswendt marcuswendt released this 12 Oct 03:58
· 80 commits to main since this release

Added

  • Share from the Inspector. Studio's Inspector has a share toggle per
    parameter that publishes it to the exported editor, with label, group and
    min/max/step fields.

Changed

  • The exported editor cooks in a module worker (editor-worker.js), so a
    slow stage no longer freezes the page while someone drags a slider.

Fixed

  • A fresh tree builds. npm run build compiles the workspace packages
    before vite, and no longer leaves dist/ without a CLI.

0.9.0

Added

  • Shareable editors (0.9.0). cascade export <graph> --out <dir> builds a
    static editor site from a graph's new editor section. It has the published
    parameters (with a UI generated from their types), presets, scene files, one
    export button per declared output, and a read-only inspect view of every
    stage. --plan prints the manifest without building, and
    --deploy vercel deploys the site and checks that Vercel Authentication is
    on.

    The export is an allowlist. It ships the subgraph the outputs need and the
    selected assets, and nothing else. It refuses Python and dynamic nodes,
    wired-in live sources, licensed/, hidden and gitignored files. It scans the
    built site for credentials, local paths and backend URLs.
    cascade freeze snapshots chosen fields of a live source, and
    cascade publish marks a prop as a parameter. Scenes (*.scene.json) open
    in the editor, in Studio (File › Open/Save Scene) and in the CLI
    (cascade scene, cascade run --scene --write), with versioned,
    degrade-gracefully matching.

    The runtime gains run({ reuse: true }), an early cutoff for hosts that
    re-run on every edit, and cascade.core.Frozen. Node definitions gain
    source: "live". See doc/EDITOR_EXPORT.md.

  • Bundle ports. A node can export one bundle port carrying named fields
    instead of a dozen loose outputs. A producer declares fields (name to type)
    and an optional schema; a consumer declares the fields it reads, sees only
    those, and in Studio re-cooks only when one of them changed (per-field
    versions on top of early cutoff). Expressions read a wired bundle's fields
    with ch("format.dpi"). cascade.core.Pick and cascade.core.Pack convert
    between bundles and single values. cascade check reports unknown fields with
    the nearest declared name, and refuses an absolute read of another node's
    bundle. Studio draws a bundle as one neutral port whose hover and Inspector
    list its fields and values. Bundles reach Python stages as dicts. See
    "Bundle ports" in doc/PROJECT_AUTHORING.md.

  • Node previews on the canvas. A project that sets
    settings.nodePreviews: true in cascade.json shows each node's first
    output as a readable preview card on the graph, refreshed per node cook. The
    same settings can carry a workspace used as the first-open dock layout when
    the browser has none saved; a layout that fails to load falls back to the
    built-in one.

  • Groups own their contents. A group frame keeps an explicit
    containedElements list, separate from subnet parenting. Drag the frame
    header to move its members (nested contents move once); drop an item's
    centre inside a frame to add it, outside to remove it, and the smallest
    enclosing frame wins. The target frame highlights before release, and
    membership and positions share one undo step. Deleting a frame leaves its
    contents. View → Clean Up Layout now treats each group as a cluster: it lays
    out members first, fits the frame, then places the groups.

  • The Agent console keeps a Codex conversation, and panels can hand it a
    draft.
    A Codex console resumes the thread id from thread.started, so
    later prompts continue one conversation per sketch as Claude's do; project
    --sandbox flags are normalised for exec resume. Codex item events
    (assistant messages, commands with their output, file changes) render in the
    console. Project panels get api.openAgent(prompt), which opens the Agent
    panel with a draft to review and send, never sending it.

Changed

  • Dragging a node re-renders only what moved. Each node reads its position
    through its own motion store, and the graph is published once when the drag
    ends rather than copied every frame. At 100 nodes a pointer move costs 1.6 ms
    of script instead of 8.9 (5.6 ms of task time instead of 13.1).

  • Node drags apply once per frame. Moving a node or a selection batches
    pointer moves to one update per animation frame instead of one per event.

  • Identical output stops invalidating the graph below it. A node that
    re-cooks and commits the same values (compared structurally; the same
    object reference counts as changed, since it may be mutated in place) keeps
    its output version, and a node stale only because of that upstream re-cook
    is skipped. A node whose own parameters, code or wiring changed always
    cooks, and node.earlyCutoff = false opts a node out. The cook status
    carries the count as cutOff. Python projects get the matching half by
    keying their stage cache on content; cloud-plots does (see its
    runtime/node_cli.py). There, a no-op edit to area-filter-mask now costs
    2 stage calls and 47 ms instead of 13 calls and 866 ms.

  • What a Viewer shows cooks first. A pass ran in plain topological order,
    so a sink nobody was looking at (an export, a plot check, the mockup) could
    run ahead of the node on screen. Now the selected or pinned node of each open
    Viewer and everything it depends on cook first, and the rest of the pass runs
    after, in the same order as before. With no Viewer (the CLI, tests, cook-all)
    nothing changes. On cloud-plots, a Viewer on hatch-curves showed its result
    after 3.4 s instead of 7.4 s on a cold cook.

  • An edit cancels the stage it supersedes. Changing a parameter while a
    long Python stage runs used to wait for that stage, and then for every
    request queued behind it. Now the superseded cook is aborted: its request is
    withdrawn from the worker (dropped if queued, interrupted with SIGINT if
    running, killed if it does not answer), its result is never applied, and the
    pass restarts from the edit. The cook strip shows how many cooks were
    superseded. Measured on cloud-plots, an edit during a 12 s stage now lands in
    0.6 s instead of 10.9 s. Project workers should answer an interrupt with
    {"cancelled": true} to stay warm; see doc/PROJECT_AUTHORING.md.

Fixed

  • Three wire and runtime fixes. Studio's browser-shell adapter sends
    execution options (stdin, timeout, cwd, env) at the top level of the
    /api/shell body again; nested under options the route dropped them. A
    Switch node's index is a document prop, serializes, and re-routes on cook.
    Project CLI instances of one module share a single executor build, so one
    cannot import the .mjs while another rewrites it.