Migrating an existing app

Strange Quark runs client-rendered React apps. An app built on a React meta-framework (Next.js, TanStack Start, Remix, React Router framework mode) or inside a desktop shell (Electron, Tauri, Electrobun) has parts Strange Quark does not run: a server, or the shell's backend. Such an app needs a migration first, and whether that migration is worth doing depends on how much of the app lives in those parts.

The repository ships an agent skill, strange-quark-migrate, that does this work for you and tells you how it went. This page is for the person running it: how to install and run it, what it gives back, and what changes for each kind of app. The skill's own files are written for the agent; you don't need to read them to use it.

What the skill does

You ask your coding agent to migrate the app, or just whether it would work on Strange Quark. The agent then works through four steps:

  1. Inventory. It reads the app without changing it: what kind of app it is, which React version and bundler it uses, and what runs on a server or in the shell's backend. It writes down the 3 to 6 core flows, the things users mainly do with the app, before it migrates anything, so the measurements cannot be chosen to flatter the result.
  2. Migration. On a new branch, it turns the app into a single-page React app that builds to static files, normally with Vite. It changes only what Strange Quark needs and records each change with its reason.
  3. Measurement. It builds the migrated app twice, for headless Chromium and with squark build, then runs the same scripted flows in both. It compares DOM state and screenshots at every checkpoint, and records startup time, memory, input latency and binary size. For a desktop shell it measures the original app too, if it can build it.
  4. Verdict. It writes a report that ends in viable, partially viable or blocked. Fixed rules pick the verdict, and every claim in the report points at the measurement behind it.

The skill works on its own git branch, strange-quark-migration (or strange-quark-migration-2 and so on, if that name is taken). It never commits to your branch, never pushes, and never rewrites history. It needs a clean working tree, and it stops and asks if yours is dirty. What happens to the branch afterwards is up to you.

Before you start

  • A git repository with a clean working tree. Commit or stash your work first.

  • Strange Quark, installed the way the app will use it (npm install -D strange-quark; see Using it). Without it, the skill still does the inventory, the migration and the Chromium baseline, but the report says Strange Quark was not measured.

  • Chromium. The measurement script looks for $SQUARK_CHROMIUM_PATH, then /usr/bin/chromium, then chromium or google-chrome on PATH.

  • The measurement dependencies, installed once per machine outside your project:

    npm install --prefix ~/.cache/strange-quark-migrate playwright-core@1 pngjs@7
    
  • For a desktop shell: whatever builds the original app (Electron, the Rust toolchain and WebView packages for Tauri, Bun for Electrobun). The skill can still run without it, but the report can't compare against the original.

  • For a Tauri app: a checkout of this repository. The Rust core builds against crates in it (see Tauri apps).

Installing the skill

The skill is the directory skills/strange-quark-migrate: a SKILL.md with instructions, references/ with one playbook per kind of app, and scripts/ with the scanner, the runtime probe and the measurement script. Keep the directory together; the instructions call the scripts by their path inside it.

Claude Code loads skills from ~/.claude/skills/ (for every project) and from .claude/skills/ inside a project. Copy or link the directory into one of them:

git clone https://github.com/project-strange-quark/strange-quark
mkdir -p ~/.claude/skills
ln -s "$PWD/strange-quark/skills/strange-quark-migrate" ~/.claude/skills/

A link keeps the skill current when you pull the checkout.

Other agents that read skills in the same format (a directory with a SKILL.md whose front matter has a name and a description) load it from their own skills directory. See that agent's documentation for where that is.

Running a migration

Start the agent in the root of the app's repository and ask in plain words, for example:

  • "Would this app work on Strange Quark?"
  • "Migrate this Next.js app to Strange Quark and tell me if it's viable."
  • "Port this Electron app's renderer to Strange Quark."

In Claude Code you can also name the skill: /strange-quark-migrate.

The agent may ask you:

  • to clean the working tree, if it is dirty;
  • whether to run git init, if the app is not in a repository;
  • which flows matter most, if the app's purpose isn't clear from the code;
  • whether to move server code into a server/ package or stub it, when extracting it would be a large piece of work.

A migration takes a while: the agent builds the app several times and runs every flow in both engines, more than once.

What you get back

Everything lands on the migration branch:

strange-quark-migration/
├─ INVENTORY.md     what the app is, its core flows, what the scan found
├─ inventory.json   the scanner's output
├─ probe.json       what the installed Strange Quark runtime supports
├─ MIGRATION.md     every change, with its reason and category
├─ flows.json       the core flows, as measured
├─ results/         measurements, screenshots and diffs
└─ REPORT.md        the verdict and its evidence
src/strange-quark-stubs/  only if anything was stubbed
squark.config.ts

Start with REPORT.md. The agent's last message gives the branch name, the verdict and the three facts that decided it.

The verdict

  • Viable: the app builds and starts, every core flow passes in Strange Quark with equal DOM state and screenshots within tolerance, no core flow touches a stub or an unsupported API, nothing crashes, and performance is not materially worse than Chromium's.
  • Partially viable: the app starts and at least one core flow passes, but something is stubbed, unsupported or out of tolerance. The report lists exactly what stands between it and viable.
  • Blocked: the app can't be built or started, a core flow crashes, or the app's main purpose needs something Strange Quark doesn't support and no change to the app fixes (a WebGL scene, a contenteditable editor, an iframe-based core).

The skill's verdict rules give the exact thresholds. Screenshots count as matching when no more than 0.5% of pixels differ by more than 8 levels per colour channel. A flow that touches a stub never counts as passing, and anything the agent did not test is listed under "not tested".

Gaps

The report labels every gap with the side that would have to change:

  • a migration gap can be fixed in your app;
  • a Strange Quark gap is a missing feature or a bug in Strange Quark. The report describes it well enough to file an issue;
  • by design means Strange Quark does not plan to support it (server rendering, for example).

Changes

MIGRATION.md sorts every change into one of three kinds:

  • mechanical: same behaviour, different plumbing, such as next/link becoming a router Link;
  • behavioural: something works differently now, such as data fetched on the client instead of rendered on the server;
  • stub: functionality removed and replaced with a placeholder.

A stub lives in src/strange-quark-stubs/, keeps the original function's signature and starts with a // STRANGE-QUARK STUB: comment that says what the real code did. It returns clearly fake data or throws NotAvailableInStrangeQuark, whichever lets the rest of the UI keep working. Search for that comment to find every one.

What changes, by where you come from

Every migration ends at the same place: a client-rendered React app whose build writes static files, plus a squark.config.ts that names the window, the build command and every host the app fetches from (network.allow). What it takes to get there depends on where the app starts. The general limits, the same for every app, are under Compatibility.

A plain React app

A Vite, Rsbuild, webpack or Parcel single-page app on React 18.3 or 19 needs no migration. Add strange-quark and run squark build. The skill still helps here: it measures the app against Chromium and reports what doesn't match. React older than 18.3 has to be upgraded first, which is a risk of its own.

Next.js

  • Kept: components, styles (Tailwind, CSS Modules), TypeScript and path aliases.
  • Replaced:
    • The App Router or Pages Router becomes React Router in data mode, with page, layout, loading, error and not-found files mapped to routes.
    • next/link, next/image, next/font, next/head and next/dynamic become their plain React or web equivalents.
    • NEXT_PUBLIC_* variables become VITE_*.
  • Server code: server components that fetch, server actions, route handlers and getServerSideProps move behind an HTTP API in a server/ package that the app calls with fetch. The native app is then a client of that server, which has to run somewhere, and the report says so. Caching, ISR and revalidate are dropped.
  • Watch for: auth tied to Next's server (NextAuth or Auth.js, Clerk's Next SDK) is usually the biggest change and often the blocker. Static export (output: 'export') doesn't avoid the migration, because it still ships Next's client runtime.

Full playbook: references/nextjs.md.

TanStack Start

  • Kept: TanStack Router, its file-based routes, Link, search params, route context and loaders that only call server functions.
  • Replaced: Start's server and SSR entries go, and the router runs as a single-page app under plain Vite. head() becomes React 19 <title> and <meta>.
  • Server code: each createServerFn becomes an endpoint in server/ behind a fetch wrapper with the same signature, so most call sites don't change. API routes move there too.

Full playbook: references/tanstack-start.md.

Remix and React Router framework mode

  • Kept: Link, NavLink, useNavigate, useParams, Outlet, useLoaderData, useFetcher and <Form>, which all work in data mode.
  • Replaced: the framework's Vite plugin and route config become createBrowserRouter with route objects. root.tsx moves into index.html and a root route. meta and links exports become <title>, <meta> and CSS imports.
  • Server code: server loaders and actions move to server/ endpoints, called from client loaders and actions. clientLoader and clientAction stay as they are.
  • Watch for: cookie sessions. Strange Quark has no cookies, so auth has to move to tokens the client keeps and sends. That is usually the largest change.

Full playbook: references/remix-react-router.md.

Electron

  • Kept: the renderer, which is usually already a client-rendered React app. The main process stays in the repository, untouched, but does not run.
  • Replaced: each API the preload script exposed gets a web equivalent:
    • open dialogs become <input type="file">, and save dialogs <a download>; Strange Quark shows native dialogs for both, but the app gets file contents, not paths;
    • clipboard becomes navigator.clipboard;
    • shell.openExternal becomes window.open, which opens the system browser;
    • electron-store becomes localStorage or IndexedDB; existing user data is not carried over;
    • window size and title move to squark.config.ts.
  • Stubbed: arbitrary file-system access, spawning processes, native addons, Tray, globalShortcut, autoUpdater, notifications, deep links, and more than one window. If the app's real work needs one of these, write it as a native module instead, or expect partially viable or blocked.
  • Watch for: an app whose main job is file-system or process work in the main process (an IDE's language servers, a git client), or a UI built on <webview>, BrowserView or iframes, is a sign of blocked.

The report compares startup, memory and package size against the original Electron app, which is usually the comparison Electron users care about.

Full playbook: references/electron.md.

Tauri 2

Tauri apps keep the most, because both halves can come along through the optional compatibility module:

  • Kept:
    • the frontend runs unchanged, through @strange-quark/tauri, which provides the surface @tauri-apps/api and the official plugins call;
    • the Rust core's commands, State, events, menus, and the dialog and opener plugins compile unchanged as a native module against the squark-tauri crate.
  • Changed: src-tauri/Cargo.toml gets a squark feature next to the Tauri one, so the same core builds for both shells. tauri::Builder setup moves into a Tauri-only module. Close and exit hooks become the native module's on_close_requested and on_exit.
  • Stubbed: the updater, tray, global shortcuts, deep links, window-state, custom URI schemes and convertFileSrc in iframes. The shim rejects those calls, so the app's error path runs.
  • Watch for: menus work through their accelerators, but Linux doesn't draw a menu bar yet. @strange-quark/tauri is not on npm yet, so it is added from the checkout.

The report compares against the original Tauri app, which renders through the system WebView.

Full playbook: references/tauri.md.

Electrobun

It goes the same way as Electron:

  • Kept: the React view, built on its own with Vite.
  • Replaced: each typed RPC call to the Bun side gets a web equivalent from the Electron list above.
  • Stubbed: Bun-side file access, Bun.spawn, bun:sqlite, tray, menus and the updater. More than one BrowserView or window counts against the verdict, since Strange Quark has one window.

Full playbook: references/electrobun.md.

Without an agent

The skill's scripts run on their own with Node, so you can follow SKILL.md by hand:

SKILL=path/to/strange-quark/skills/strange-quark-migrate

# What the app is and what it uses that Strange Quark lacks
node $SKILL/scripts/scan.mjs . --out strange-quark-migration/inventory.json

# What the installed runtime supports
node $SKILL/scripts/probe.mjs --squark-binary <runtime-or-built-app> \
  --out strange-quark-migration/probe.json

# The same flows in Chromium and Strange Quark
node $SKILL/scripts/measure.mjs --dist dist --squark-binary dist/<name> \
  --flows strange-quark-migration/flows.json --out strange-quark-migration/results

references/measuring.md describes the flows format and how to read the results, and references/report-template.md the report.