docs: clarify that marimo run does not send code to the client#9534
Open
mokashang wants to merge 1 commit into
Open
docs: clarify that marimo run does not send code to the client#9534mokashang wants to merge 1 commit into
mokashang wants to merge 1 commit into
Conversation
Without `--include-code`, `marimo run` blanks the cell source before sending kernel-ready over the WebSocket, so the source is not just visually hidden but also unretrievable from the client. The previous wording could be read as merely "hidden in the UI". Update the deploying guide and the `--include-code` help text to make this explicit, which matters for notebooks whose source is confidential. Fixes marimo-team#9489
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant User as User (Browser)
participant WSS as WebSocket Server
participant K as Kernel
participant NB as Notebook Source
Note over User,NB: Default behavior (--include-code not set)
User->>WSS: Connect WebSocket
WSS->>K: Trigger kernel ready
K->>NB: Read notebook source
K->>K: Blank cell source code
K-->>WSS: NEW: kernel-ready message (cell names only, no code)
WSS-->>User: Forward kernel-ready (no source)
User->>User: Attempt dev tools inspection
Note over User: Source not retrievable<br/>from client side
Note over User,NB: With --include-code
User->>WSS: Connect WebSocket (include-code flag set)
WSS->>K: Trigger kernel ready
K->>NB: Read notebook source
K-->>WSS: kernel-ready message (cell names + source code)
WSS-->>User: Forward kernel-ready (includes source)
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Closes #9489
The previous wording in the deploying guide and the
--include-codeCLI help could be read as "the code is hidden by default, but maybe still sent to the browser and accessible via dev tools." That ambiguity matters when the notebook source is confidential.Without
--include-code,marimo runblanks the cell source before sending thekernel-readymessage over the WebSocket (seetests/_server/api/endpoints/test_ws.py::test_kernel_ready_sends_names_but_not_code_when_include_code_false), so the source is not retrievable from the client. This PR makes that explicit in two places:docs/guides/deploying/index.md— expand the "Including code in your application" section to state that by default the source is hidden and not sent to the client.marimo/_cli/cli.py— update the--include-codehelp text (which feeds the auto-generated CLI reference atdocs/cli.mdviamkdocs-click) with the same clarification.No behavior change; docs only.
📋 Pre-Review Checklist
marimo runnever sends the code to the client #9489.✅ Merge Checklist
test_kernel_ready_sends_names_but_not_code_when_include_code_falsealready covers the underlying behavior.