Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jan 6, 2026

Each request now will either: "throwError" | "dropRequest" | "startConnection" | "waitForConnectionOpen". This is a bit cumbersome to manage but i think getting it right will have a good UX. For example, we can let the user type and make edits, but not start the kernel. Once the user hits "run", then we can actually start the kernel.

@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 6, 2026 10:03pm
@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Jan 6, 2026
@github-actions

This comment was marked as duplicate.

@github-actions

This comment was marked as duplicate.

2 similar comments
@github-actions

This comment was marked as duplicate.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Breaking changes detected in the OpenAPI specification!

==========================================================================
== API CHANGE LOG ==

                            marimo API                                

-- What's Changed --

  • POST /api/kernel/takeover
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/ai/completion
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/ai/inline_completion
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/ai/invoke_tool
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/ai/mcp/refresh
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/cache/clear
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/cache/info
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/datasources/preview_column
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/datasources/preview_datasource_connection
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/datasources/preview_sql_table
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/datasources/preview_sql_table_list
    Parameter:
    • Add Marimo-Session-Id in header
  • GET /api/documentation/snippets
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/auto_export/html
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/auto_export/ipynb
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/auto_export/markdown
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/html
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/markdown
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/export/script
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/code_autocomplete
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/copy
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/delete
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/function_call
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/install_missing_packages
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/instantiate
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/interrupt
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/pdb/pm
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/read_code
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/rename
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/restart_session
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/run
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/save
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/save_app_config
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/save_user_config
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/scratchpad/run
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/set_cell_config
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/set_ui_element_value
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/shutdown
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/stdin
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/sync/cell_ids
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/secrets/create
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/secrets/keys
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/sql/validate
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/ai/chat
    Parameter:
    • Add Marimo-Session-Id in header
  • POST /api/kernel/set_model_value
    Parameter:
    • Add Marimo-Session-Id in header

-- Result --

             API changes broke backward compatibility                 

@dmadisetti
Copy link
Collaborator

Breaks uv run marimo edit example/ (home) for me
image

@mscolnick
Copy link
Contributor Author

@dmadisetti, thanks fixed

@github-actions

This comment was marked as duplicate.

@github-actions

This comment was marked as duplicate.

@mscolnick mscolnick added the bug Something isn't working label Jan 6, 2026
@mscolnick mscolnick merged commit 850f266 into main Jan 6, 2026
45 of 53 checks passed
@mscolnick mscolnick deleted the ms/handle-lazy-requests-differently branch January 6, 2026 22:30
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.18.5-dev149

Copy link
Contributor

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the post-merge review. Nice implementation, just a couple clarifying comments.

// Start connection and wait for it to be open
await initOnce(runtimeManager);
await waitForConnectionOpen();
if (key !== "sendInstantiate") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth adding a comment explaining why sendInstantiate is exempt (it's the one that creates the instantiation?)


switch (action) {
case "dropRequest":
// Silently drop the request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe consider logging?

Comment on lines +15 to +19
// We have various requests that act different when called and not connected to a Kernel. They are:
// - throw an Error
// - drop the request
// - start the connection
// - wait for the connection to be open
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// We have various requests that act different when called and not connected to a Kernel. They are:
// - throw an Error
// - drop the request
// - start the connection
// - wait for the connection to be open
// We have various requests that act differently when called and not connected to a Kernel:
//
// - throwError: Throws NoKernelConnectedError, caught by requests-toasting.tsx
// and shown as a toast with a "Connect" button. Use for operations that
// shouldn't silently fail but also shouldn't auto-start the kernel.
//
// - dropRequest: Silently returns undefined. Only for requests where failure is
// expected and doesn't matter (e.g., background polling).
//
// - startConnection: Initializes the runtime and waits for connection before
// executing. Use for user-initiated actions that should "just work" and
// kick off the kernel if needed (e.g., clicking Run).
//
// - waitForConnectionOpen: Waits for an existing connection but won't start one.
// Use for operations that depend on a running kernel but shouldn't be the
// trigger to start it (e.g., saving, interrupting).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, great comments, followed up with all them here: #7710

manzt pushed a commit that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash bug Something isn't working

4 participants