Skip to content

feat: accept local HTML and URLs as conversion sources, not just Stitch screens - #21

Merged
gabelul merged 1 commit into
mainfrom
feat/any-html-source
Jul 20, 2026
Merged

feat: accept local HTML and URLs as conversion sources, not just Stitch screens#21
gabelul merged 1 commit into
mainfrom
feat/any-html-source

Conversation

@gabelul

@gabelul gabelul commented Jul 20, 2026

Copy link
Copy Markdown
Owner

The six framework-conversion skills each demanded a Stitch project and a generated screen before they'd do anything. That gate was never structural.

The finding

Every conversion skill downloads to a single local file at temp/source.html, and not one references Stitch MCP after Step 1. Verified per skill, not assumed. The coupling lived entirely in how the source got fetched — so opening it up is a Step 1 change, not a rewrite.

What changed

Step 1 now resolves from three sources:

Input Needs Stitch?
Stitch screen yes
Local HTML file no
URL no
Screenshot via stitch-mcp-upload-screens-from-images first

Everything downstream is untouched. Point any of these skills at a template you bought or a page you already built, and you get the same output — production components with dark mode, design tokens, TypeScript, and ARIA.

stitch-html-components was the sharpest case of the old problem: it billed itself as the platform-agnostic target and still required a Google account.

Details worth reviewing

  • Per-skill prerequisites preserved — Xcode 15+, Expo CLI, Svelte 5 runes, next-themes. Only the Stitch-specific pair became the three-source list.
  • Mobile-layout check extended. React Native and SwiftUI previously got that guarantee free from Stitch's deviceType: MOBILE. It now applies explicitly to all three routes, since a local file carries no such promise.
  • RN and SwiftUI don't convert markup — they read the source as a structural reference and emit native components. Their wording says that rather than implying HTML output.
  • Orchestrator gained a "convert non-Stitch HTML" intent that skips generation entirely, so it won't push someone through Stitch to manufacture a screen they didn't ask for.
  • fetch-stitch.sh collapsed from three drifted copies to one. I initially assumed the drift was functional; diffing proved the variants differed only in comments. Nothing functional was lost.

Why it matters

The conversion layer is the most broadly useful part of this repo and it was gated behind a Google account for no good reason. Stitch is now the best-supported input rather than the only one.

Validator: Passed with 29 warning(s) — no errors (all pre-existing "no examples/ directory" notices).

…ch screens

The six framework-conversion skills each demanded a Stitch project and a
generated screen before they'd do anything. That gate was never structural:
every one of them downloads to a single local file at `temp/source.html`,
and not one references Stitch MCP after Step 1. The coupling lived entirely
in how the source got fetched.

So Step 1 now resolves from any of three sources — a Stitch screen, a local
HTML file, or a URL — and everything downstream is untouched. Point any of
these skills at a template you bought or a page you already built and you
get the same output: production components with dark mode, design tokens,
TypeScript, and ARIA. Only the Stitch route needs an API key.

`stitch-html-components` is the sharpest case of the old problem — it billed
itself as the platform-agnostic target and still required a Google account.

- Add the three-source Step 1 to all six conversion skills, with a
  documented fallback for screenshots via stitch-mcp-upload-screens-from-images
- Keep genuine per-skill prerequisites (Xcode 15+, Expo, Svelte 5 runes,
  next-themes) and the mobile-layout check on React Native and SwiftUI,
  which previously rode on Stitch's deviceType and now applies to all routes
- Route "user already has HTML" straight to conversion in the orchestrator
  instead of pushing them through generation for a screen they didn't want
- Collapse fetch-stitch.sh from three drifted copies to one; the variants
  differed only in comments, so nothing functional was lost
- State in the README which half needs a Google account and which doesn't

React Native and SwiftUI read the source as a structural reference rather
than converting markup, so their wording says that rather than implying
HTML output.
@gabelul
gabelul merged commit ebb0a86 into main Jul 20, 2026
1 check passed
@gabelul
gabelul deleted the feat/any-html-source branch July 20, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant