Conversation
A drawer running mat3ra.made.tools in-browser via Pyodide. Materials bind in as materials_in/material before each run; Material variables sync back after, merged by materialsSyncScope: round-tripped ids upsert in place, REPL-created materials replace the previous python-repl batch, everything else untouched. One repo, no new npm dependencies: the editor and drawer come from published cove, the environment recipe is one constants file mirroring AX's made profile, and the host bridge is ~20 lines of inline Python pending a released notebooks-utils. Wheels that do not build under Pyodide are provisioned to public/repl-wheels on prestart/prebuild and served same-origin. Pyodide loads with an explicit indexURL: the bundled node polyfills make its own asset detection resolve to a filesystem path (caught by the e2e). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Deploy Preview for mat3ra-materials-designer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Each interim solution now carries a TODO(repl-vN) naming where it moves and what deletes it, anchored to the ladder in agents/plan/, so nothing temporary can outlive its step unnoticed. grep -rn "TODO(repl-" src scripts lists them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The REPL panel becomes an iframe of github.com/mat3ra/pyodide-repl, driven
over the same data bridge as the JupyterLite session: get-data answers with
{materials, selectedIndex}, set-data payloads route into materialsSyncScope,
which is unchanged. All Pyodide and Python concerns leave this repo — the
environment, the wheels and their provisioning script, and the dead
PythonTransformation dialog (the last consumer of cove's PyodideLoader).
The e2e keeps the same assertions, driving the embedded page cross-origin
like the JupyterLite specs; tagged @ignore in CI until a shared deploy
exists to embed. Verified locally against a vite preview of the built page:
46 s to a passing run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
VsevolodX
force-pushed
the
feature/SOF-7961-v1
branch
from
August 28, 2026 03:51
c35e0be to
d86f4d5
Compare
The REPL page knows no domain: everything material-specific now travels to
it as configuration over the bridge — the package lists, the Python that
binds materials_in/material from this app's data, and the scan that produces
the {syncScope, entities} payload the reducer merges. It lives in
madeReplConfig and reaches the panel as a prop, so a host can swap it.
Wheels come straight from the JupyterLite deploy that already hosts them
(it sends access-control-allow-origin: *), so nothing in this stack
provisions or serves wheels any more.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
The smallest working Python REPL: a View → Python REPL drawer running
mat3ra.made.toolsin-browser via Pyodide. Materials bind in asmaterials_in/materialbefore each run; anyMaterialvariable syncs back after, merged by one reducer rule (materialsSyncScope): round-tripped ids upsert in place, REPL-created materials replace the previouspython-replbatch, hand-made materials are never touched.One repo, 14 files, ~700 lines, no new npm dependencies. The editor and drawer come from published cove; the environment recipe is one constants file mirroring AX's
madeprofile; the host bridge is ~20 lines of inline Python, marked temporary pending a released notebooks-utils.Deliberately omitted (each a later, separate PR): autocomplete, editable requirements, preloading, structured tracebacks, any cove/AX change. Architecture memo with the full build ladder:
plan/repl-minimal-architecture.md.How it's tested
tests/cypress/e2e/repl/python-repl.feature— the same pattern as the JupyterLite session: drive the panel against a real interpreter, assert the materials that come back, including the two merge invariants (derived material never inherits its source_id; selection survives a scope replacement). Passing locally in 52 s.Notes for review
pymatgen,spglib,pydantic) are downloaded topublic/repl-wheels(gitignored) onprestart/prebuildand served same-origin — browsers block cross-origin wheel fetches without CORS. Host apps embedding MD serve the same path or passreplWheelBaseUrl.indexURL: the bundled node polyfills make its own asset detection resolve to a filesystem path (the e2e caught this against cove'sPyodideLoader).🤖 Generated with Claude Code