Repository navigation
improvement: refresh static notebook run dialog - #10741
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes are covered by new tests and the remaining feedback is a minor naming clarity nit.
Pull request overview
Refreshes the “Run or Edit” dialog shown on static notebooks to provide clearer run instructions, safer copy/paste commands, and better configurability around Molab.
Changes:
- Reworked the static notebook dialog UI to use package-manager tabs (uv/pip/conda) and added “copy command” buttons.
- Added URL/filename handling helpers for safer shell command output (quoting + URL eligibility + Windows basename handling).
- Added regression tests covering Molab visibility and command/tab rendering, plus URL-target selection logic.
File summaries
| File | Description |
|---|---|
| frontend/src/components/static-html/static-banner.tsx | Updates the static notebook dialog UI, adds command blocks + URL run-target selection helper, and gates Molab link generation behind config. |
| frontend/src/components/static-html/tests/static-banner.test.tsx | Adds tests for Molab visibility, tabbed command rendering, and getStaticNotebookRunTarget behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+172
to
+182
| const isHtmlFile = url.pathname.endsWith(".html") && url.search === ""; | ||
| const isMarimoHost = | ||
| url.protocol === "https:" && | ||
| (url.hostname === "marimo.app" || | ||
| url.hostname === "links.marimo.app" || | ||
| (url.hostname === "static.marimo.app" && | ||
| url.pathname.startsWith("/static")) || | ||
| url.pathname.includes("/notebooks/nb")); | ||
| if (!isHtmlFile && !isMarimoHost) { | ||
| return filename; | ||
| } |
Contributor
Coverage Report for ./frontend
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Light2Dark
previously approved these changes
Sep 3, 2026
williambdean
pushed a commit
to williambdean/marimo
that referenced
this pull request
Sep 6, 2026
- Molab is hidden when sharing is disabled, now covered by regression tests. - Added package-manager tabs: uv (recommended), pip, and conda. - Added copy buttons for commands. - Safely quotes filenames and URLs. - Handles Windows path basenames. - Only suggests direct URLs supported by marimo edit. - Avoids generating the molab URL when its section is hidden. <img width="1212" height="480" alt="image" src="https://github.com/user-attachments/assets/922dc5f2-fa6c-42fa-b631-181c47ef65ad" />
This branch was successfully deployed
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.
Uh oh!
There was an error while loading. Please reload this page.