Skip to content

fix(anywidget): preserve virtual ESM URLs - #10687

Open
Light2Dark wants to merge 2 commits into
mainfrom
codex/fix-anywidget-virtual-esm-url
Open

fix(anywidget): preserve virtual ESM URLs#10687
Light2Dark wants to merge 2 commits into
mainfrom
codex/fix-anywidget-virtual-esm-url

Conversation

@Light2Dark

@Light2Dark Light2Dark commented Aug 28, 2026

Copy link
Copy Markdown
Member

📝 Summary

Anywidget _esm values may already be importable URLs, including marimo virtual files produced by mo_data.js. EsmSpec.from_esm() previously sent those virtual-file URLs back through JavaScript virtualization, creating a second file whose contents were only the first URL. Importing that file failed with Unexpected token '.'.

Preserve supported virtual-file, HTTP(S), and JavaScript data URLs when minting an EsmSpec. Inline JavaScript still becomes a virtual file, including source that begins with a URL-like JavaScript label. URL recognition mirrors the frontend's trusted virtual-file shape so malformed paths are not passed through.

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (not applicable: focused bug fix with no public API change).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (not applicable: backend URL handling only).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes (not applicable: no public API change).
  • Tests have been added for the changes made.

Written by GPT-5.6 on Codex

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview Aug 28, 2026 12:33pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

You’re at about 99% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread marimo/_messaging/notification.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant