Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: serapiis/acode-plugin-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Acode-Foundation/acode-plugin-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 49 files changed
  • 5 contributors

Commits on Mar 2, 2024

  1. v1.1.1

    Ajit Kumar Ajit Kumar
    Ajit Kumar authored and Ajit Kumar committed Mar 2, 2024
    Configuration menu
    Copy the full SHA
    cca41f2 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2025

  1. chore(update pyodide)

    Ajit Kumar
    Ajit Kumar committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    fe28a51 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2025

  1. updated changelog

    Ajit Kumar
    Ajit Kumar committed Aug 10, 2025
    Configuration menu
    Copy the full SHA
    51fadd8 View commit details
    Browse the repository at this point in the history
  2. updated changelog

    Ajit Kumar
    Ajit Kumar committed Aug 10, 2025
    Configuration menu
    Copy the full SHA
    53c607e View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2025

  1. feat(new run icon)

    Ajit Kumar
    Ajit Kumar committed Aug 14, 2025
    Configuration menu
    Copy the full SHA
    89f63a3 View commit details
    Browse the repository at this point in the history
  2. feat(new run icon)

    Ajit Kumar
    Ajit Kumar committed Aug 14, 2025
    Configuration menu
    Copy the full SHA
    04795a6 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2026

  1. Configuration menu
    Copy the full SHA
    4967709 View commit details
    Browse the repository at this point in the history
  2. feat: add development scripts and server setup

    - Implemented `packZip.js` to create a zip package of the plugin including necessary files.
    - Added `run-webpack.js` to spawn a webpack process for development mode with watch support.
    - Created `start-dev.js` to manage the development server and webpack process.
    - Introduced `start-server.js` to set up an HTTP server with ngrok tunneling for remote access.
    - Configured `.vscode/settings.json` for code actions on save.
    - Added `biome.json` for project configuration with linting and formatting rules.
    deadlyjack committed Feb 2, 2026
    Configuration menu
    Copy the full SHA
    e80afc5 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2026

  1. chore: migrate to esbuild tooling and update Pyodide to 314.0.7 (Acod…

    …e-Foundation#38)
    
    * chore: migrate to esbuild tooling and update Pyodide to 314.0.7
    
    Align the build with the official Acode plugin template and fix Python
    failing to load on some devices.
    
    Tooling:
    - Replace webpack/babel/postcss/sass with esbuild (dev server on :3000)
    - Restore pack-zip.js at the repo root (webpack config imported a moved file)
    - Copy the Pyodide runtime from npm into dist/lib on every build; dist/lib
      had been dropped from git, so clean builds shipped without Python
    - Add tsconfig for acode-plugin-types, Biome dev dependency and check script
    - Replace JSX with tag() calls and SCSS with plain CSS
    
    Pyodide:
    - Update to 314.0.7 (Python 3.14); run the worker as a module worker
    - Bundle the Pyodide loader into worker.js so .mjs MIME types do not matter
    - Fall back to ArrayBuffer wasm compilation when .wasm is not served as
      application/wasm, which otherwise hung on "loading..."
    - Load packages on demand from the matching jsDelivr CDN (numpy, micropip...)
    - Route stderr correctly and show clear load errors with retry on next run
    
    Also bump to 1.2.0, add contributor, fix plugin.json main path.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: address review feedback on build and worker startup
    
    - pack-zip: resolve the root with fileURLToPath (import.meta.dirname
      needs Node 20.11+), run in-process and write via temp file + rename
    - esbuild: await packing in onEnd so failures exit non-zero and rebuilds
      never pack concurrently; start from a clean dist so stale files are
      not shipped
    - main: construct the worker inside try so an unsupported module worker
      shows an error and allows retry instead of leaving init stuck
    - worker: only dispatch own action handlers (CodeQL dynamic method call)
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: avoid Object.hasOwn in worker message dispatch
    
    Object.hasOwn needs Chrome 93+ but the build targets Chrome 90 and
    esbuild does not polyfill it. On older WebViews the worker threw on the
    first init message and the page stayed on "loading..." with no error.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: dispatch worker actions through a Map
    
    CodeQL still flagged `actions[action](...)` as an unvalidated dynamic
    method call even with the hasOwnProperty guard. Looking handlers up in a
    Map means a message's action name can only reach the defined handlers,
    never inherited Object methods, and avoids Object.hasOwn (Chrome 93+).
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: validate worker action with Map.has and a function check
    
    Follow CodeQL's recommended pattern for js/unvalidated-dynamic-method-call:
    check the name with Map.prototype.has and verify the handler is a
    function before calling it.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * feat: add header toggle for wrapping console lines
    
    Long output lines scroll horizontally per line (unchanged default). A
    new header button wraps them instead; the choice is saved in
    localStorage. Also keep the >> marker from shrinking or breaking when
    lines wrap.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * feat: show a spinner while Python loads or code runs
    
    Adds Acode's header loader to the console page so it is clear whether a
    program is still running or has finished. It hides while the program is
    waiting for input(). Also drops the tooltip and active state from the
    wrap toggle.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * feat: replace header spinner with a thin progress line
    
    The icon-sized spinner was too heavy for the console header. Use a 2px
    indeterminate progress line along the bottom edge of the header in the
    theme's active color instead.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * feat: show matplotlib/Pillow images and add experimental SDL support
    
    - Move Pyodide setup into src/runtime.js, shared by the worker and the
      new SDL runtime; Python helpers live in src/python and are installed
      into site-packages
    - matplotlib: custom Agg backend (MPLBACKEND) posts figures as PNG to
      the console on plt.show(); unshown figures are shown when a run ends
    - Pillow: Image.show() displays in the console
    - Experimental SDL (pygame): programs with an async game loop run in a
      main-thread Pyodide drawing to a <canvas id="canvas"> in the console.
      SDL setup is checked with pygame.display.init() and any failure falls
      back to the worker. Keyboard input is limited to the canvas, Acode's
      document title is restored, and re-running or closing the console
      cancels the game
    - Worker runs pygame headless (SDL_VIDEODRIVER=dummy): without a canvas
      Emscripten's SDL video crashed Pyodide fatally
    - Handle Pyodide fatal errors: report them and restart Python on the
      next run instead of leaving the console stuck
    - Hide "already loaded" package messages on every run
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * feat: run blocking pygame loops and render plots for the console
    
    pygame:
    - Ordinary blocking game loops now use SDL mode: with JSPI, the calls a
      game loop makes (display.flip/update, Clock.tick, time.wait/delay,
      event.wait) pause via run_sync so the browser can draw and Acode stays
      responsive (python/acode_pygame.py)
    - Check JSPI inside a task before running a blocking loop; without it,
      fall back with an explanation instead of freezing Acode
    - Stop blocking loops through a flag checked at those pauses, since
      they never reach an await; stopped runs no longer print into the next
      console
    - Explain the worker's "dummy not available" error
    
    Images:
    - Default matplotlib figure size to the console width (via the
      matplotlibrc read on first import), so text stays readable on phones
    - Render at the device pixel ratio and display at true size, so plots
      are sharp on HiDPI screens
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: load the SDL runtime with the browser's own fetch
    
    On a device, SDL failed with "Failed to connect to localhost/127.0.0.1:443":
    on Acode's main page window.fetch can be replaced (e.g. by another plugin
    using native HTTP to avoid CORS), and native HTTP cannot reach the
    plugin's files at https://localhost, which only exist inside the WebView.
    The worker has its own fetch, so it was unaffected.
    
    Requests for the plugin's files and Pyodide packages now go through the
    browser's fetch taken from a hidden same-origin iframe; all other
    requests still use the page's fetch.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * docs: update README and changelog for 1.2.0
    
    Rewrite the README around current features (packages, micropip, plots,
    experimental pygame, console features), limitations and development
    notes, replacing outdated sections. Group the 1.2.0 changelog into new,
    improved, fixed and development changes, and add the missing 1.1.4 entry.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * docs: remove source layout from README
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: address SDL review feedback
    
    - Ask before running a pygame program on Acode's main page, where it can
      reach the app (Python there is not isolated like the worker); declining
      runs it in the worker without a display, with an option to not ask again
    - Do not start a game that was stopped while the SDL runtime or its
      packages were still loading, including while sdl.js itself loads
    - Detect real await expressions with ast instead of matching the word,
      and stop blocking loops that cannot pause (no JSPI) after a few frames
      with a clear error instead of freezing Acode
    - dispose() on unmount restores window.fetch (or makes the wrapper a
      pass-through if another plugin wrapped it since) and removes the iframe
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: keep SDL fetch routing after a plugin remount
    
    dispose() removed the fetch route but kept the cached SDL runtime, and
    the route was only installed on first load, so a re-initialised plugin
    could reuse the runtime and download packages through a replaced fetch.
    
    - install the route at the start of every run (no-op while active)
    - dispose() drops the cached runtime so it is freed, not reused
    - main.js clears its cached sdl.js promise and removes the script tag on
      destroy, so a later init loads a fresh module
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    * fix: keep overlapping sdl.js loads from replacing each other
    
    Removing a <script> tag does not cancel a load in flight, so after an
    unmount and remount a stale sdl.js could finish last, overwrite the
    shared window.acodePythonSdl, and closing the console would then stop
    the wrong SDL instance.
    
    - each load is tagged with a unique data-load-id; sdl.js registers its
      API under that id (via document.currentScript) instead of one global
    - main.js keeps the API from its own current load for stop/dispose and
      ignores loads that finish after a newer one started or after destroy
    - destroy bumps the run id so runs waiting for sdl.js never start
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
    bajrangCoder and claude authored Oct 3, 2026
    Configuration menu
    Copy the full SHA
    223e05a View commit details
    Browse the repository at this point in the history
Loading