Skip to content

Make the devtools overlay opt-in: nothing GenClass sets up draws on a page - #250

Merged
MeharPro merged 1 commit into
mainfrom
fix/no-overlay-by-default
Nov 16, 2026
Merged

MeharPro merged 1 commit into
mainfrom
fix/no-overlay-by-default

Conversation

@MeharPro

Copy link
Copy Markdown
Contributor

Nothing GenClass sets up draws on a page any more. The dev overlay (the "GenClass observe" widget, bottom right) is opt-in everywhere. The overlay feature itself is unchanged: a developer can still turn it on in their own code.

What changes

where before now
npx @genclass/runtime init added a dev-only overlay line (--no-devtools to skip) adds none; --devtools adds it. --no-devtools still accepted, does nothing
npx genclass never added it unchanged
@genclass/nuxt, @genclass/astro devtools: "dev" by default devtools: "never" by default; "dev" / "always" opt in
@genclass/sv always added the overlay line never adds it
templates/ (8 starters) overlay line in each removed; each README has a short opt-in note

init run again on a setup that still has the overlay (from init 0.3.0-beta.6 or earlier) prints one line naming the file and what to delete. It changes nothing by itself.

Production visitors never saw the overlay (the line is dev-only; data-devtools="local" only mounts on local hosts). Developers did.

Existing apps

The overlay line is in the app's own source, so updating a package does not remove it. To take it out, delete one statement:

  • the if (...) import("@genclass/runtime/devtools")... statement: one line in most apps, a 3-line if block in Next.js, part of the <script> line in Astro layouts; or
  • data-devtools="local" on a plain HTML script tag.

remove still works afterwards. init --sync does not help: it only makes a plain HTML tag blocking. remove then init also works, but keeps the token only when .genclass.local holds it.

Releases needed (owner's yes)

  • @genclass/runtime next beta (0.3.0-beta.7) through release.yml: until then npx @genclass/runtime@beta init still adds the overlay.
  • Optional: latest is still 0.2.3, so npx @genclass/runtime init without @beta still adds it.
  • Optional: a genclass CLI release, so npx genclass shows the re-run hint (it never added the overlay).
  • @genclass/nuxt, @genclass/astro, @genclass/sv: none. They are not on npm yet; their first release has the new default.

Checks

  • runtime: typecheck, build, vitest (main step and review-perf)
  • @genclass/nuxt, @genclass/astro (Node 24): typecheck, build, vitest
  • @genclass/sv: typecheck, build, unit tests
  • Not run here: sv e2e, compat/templates-check.mjs (templates.yml runs it), the install suite. They need Chromium, pnpm or the network. Their expectations are updated to "no overlay".

🤖 Generated with Claude Code

… draws on a page

- runtime init: no overlay line unless --devtools (--no-devtools still accepted, a no-op); a re-run on a setup
  that still loads the overlay names the file and what to delete
- @genclass/nuxt, @genclass/astro: devtools defaults to "never" ("dev" / "always" opt in)
- @genclass/sv: never adds the overlay line
- templates: overlay lines removed, opt-in notes in their READMEs; compat/templates-check.mjs expects no overlay
- docs, changelogs and tests updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MeharPro
MeharPro merged commit 3c684c7 into main Nov 16, 2026
9 of 10 checks passed
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