Commit Graph

5 Commits

Author SHA1 Message Date
Innei 1bd6c6c56c 🐛 fix(desktop): stop bundling web SPA artifacts into the renderer dist (#18644) 2026-08-24 15:34:45 +08:00
Innei a608bd3f1d 🐛 fix(python-interpreter): run the worker as classic, and publish workers where a page can load them (#18277)
* 🐛 fix(python-interpreter): construct the worker as classic, not a module

The worker was constructed with `type: 'module'` while the bundler emits it
as an IIFE, so the declared type never matched the output. It also loads
Pyodide through `importScripts`, and a module worker rejects that call:

    TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope':
    Module scripts don't support importScripts().

The failure lands inside `init()`, so nothing surfaces until the interpreter
is first used — construction succeeds and the tool then fails on its first
real call.

Verified end to end in a browser against the built worker: Pyodide loads,
`print("hello from", sys.platform)` writes `hello from emscripten`, and
`6*7` returns 42.

* ✨ feat(build): publish web workers to the public root

`new Worker(url)` only accepts a same-origin script — no CORS header lifts
that, unlike a crossorigin script tag. So once the SPA's assets move to an
asset host, workers are the one thing that has to stay behind, served from
the page's own origin.

The build emits them into `app-workers/`, but `copyDirs` is an allowlist and
did not carry the directory across, so the files reached neither `public/`
nor the asset upload and the emitted URL resolved to nothing.

Copy them to `public/app-workers/` rather than into each SPA directory: the
files are byte-identical across variants, so one path keeps one copy and
gives the origin a single prefix to recognise.
2026-08-14 01:28:22 +08:00
Innei 5287fe849f ✨ feat: add standalone workbench SPA target (#17786)
* ✨ feat: add standalone workbench SPA target

* ⚡️ perf(verify): stabilize acceptance callbacks to keep CheckList memoized

* 🔧 chore(docker): copy workbench SPA assets into the runtime image

Mirror the existing public/_spa copy for public/_spa-workbench so the
workbench bundle is present in the runtime image regardless of Next.js
output file tracing.
2026-08-02 17:59:57 +08:00
Innei 71532e1ba7 🐛 fix: ship devtools chunks in production and stop DevDock load failure crashing the app (#17814)
* 🐛 fix: ship devtools chunks in production and stop DevDock load failure crashing the app

* 🐛 fix: stop paired chunk-error events from looping the auto-reload

A failed dynamic import surfaces as vite:preloadError, the rethrown unhandledrejection and the router ErrorBoundary render, all carrying the same Error. notifyChunkError now dedupes by error identity and keeps the sessionStorage reload guard monotonic, so a persistently missing chunk stops at the toast instead of reloading forever.
2026-08-02 15:18:20 +08:00
Innei 93213a51fb ⚡️ perf: make SPA startup demand-aware (#17577)
* ⚡️ perf(vite): make route chunk warmup demand-aware

* ⚡️ perf(spa): preload routes through shared lazy loaders

* ⬆️ chore(deps): align UI editor and Shiki versions

* ⚡️ perf(pwa): cache lazy code on demand

* ⚡️ perf(spa): reduce initial JavaScript dependency closure

* ⚡️ perf(desktop): simplify renderer startup

* ⚡️ perf: refine imperative modal loading boundaries

* 🐛 fix(ci): restore production SPA startup

* ♻️ refactor: share deferred PWA cache rules

* 🐛 fix(ci): execute SPA copy entry with Node
2026-07-29 15:00:26 +08:00