Repository navigation
Conversation
|
|
✅ Deploy Preview for teaching-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been 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.
Websites can now register Python-controlled React integrations through explicit Pyodide plugin options. The clock showcase uses worker/client entry points and a shared payload type, replacing its package-file override and central
SiteStore.handleMessageswitch while preservingfrom clock import use_clockand the existing React view.API and clock example
defineWorkerExtension<Payload>()creates Python modules per execution and providessend(targetId, payload).defineClientExtension<Payload>()receives the current root store and typed delivery within the existing MobX action. The plugin generates separate worker/browser registries, including SSR aliases. Module names are independent of extension names and event payloads; duplicate/reserved names fail explicitly.The executable clock example is in
tdev-website/website/pyodide/clock/{protocol,worker,client}.ts. The package README includes the actual example source, registration, migration steps, and lifecycle semantics. Existing overrides and custom SiteStore messages remain supported during migration.Design re-evaluation and review
set_timeandreseteach deliver one update.voidsignature, cleanup after a later factory fails, and early rejection while other messages remain pending. The final API enforces synchronous handlers; execution cleanup closes contexts and drains all pending deliveries, including setup failures.Validation
yarn typecheck— passed, including compile-time payload, registry separation, and synchronous-handler assertions.yarn test --run— 23 files, 219 tests passed; 19 new extension configuration/lifecycle cases.yarn build— passed, including SSR and emitted module worker.yarn format:checkandgit diff --check— passed.The clock's appearance is unchanged.