Repository navigation
Make the devtools overlay opt-in: nothing GenClass sets up draws on a page - #250
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
npx @genclass/runtime init--no-devtoolsto skip)--devtoolsadds it.--no-devtoolsstill accepted, does nothingnpx genclass@genclass/nuxt,@genclass/astrodevtools: "dev"by defaultdevtools: "never"by default;"dev"/"always"opt in@genclass/svtemplates/(8 starters)initrun again on a setup that still has the overlay (frominit0.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:
if (...) import("@genclass/runtime/devtools")...statement: one line in most apps, a 3-lineifblock in Next.js, part of the<script>line in Astro layouts; ordata-devtools="local"on a plain HTML script tag.removestill works afterwards.init --syncdoes not help: it only makes a plain HTML tag blocking.removetheninitalso works, but keeps the token only when.genclass.localholds it.Releases needed (owner's yes)
@genclass/runtimenext beta (0.3.0-beta.7) throughrelease.yml: until thennpx @genclass/runtime@beta initstill adds the overlay.latestis still 0.2.3, sonpx @genclass/runtime initwithout@betastill adds it.genclassCLI release, sonpx genclassshows 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
@genclass/nuxt,@genclass/astro(Node 24): typecheck, build, vitest@genclass/sv: typecheck, build, unit testscompat/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