Skip to content

telemetry-worker: /start/open-source, onboarding with no account - #121

Closed
Karanvir1729 wants to merge 1 commit into
copy-promptsfrom
oss-start
Closed

Karanvir1729 wants to merge 1 commit into
copy-promptsfrom
oss-start

Conversation

@Karanvir1729

Copy link
Copy Markdown
Collaborator

Stacked on #118 (copy-prompts): merge that first, then this one retargets to main.

What

genclass.dev/start/open-source lets teams that won't use a hosted dashboard set GenClass up with no sign-in and no token, using only the open-source parts. The setup it gives has telemetry: false.

  • One copy-prompt. Checkboxes change it: Guard, Eager (only with Guard), Logs, the coding-agent link, and a self-hosted model. With every box off it sets up observe, which only reports.
  • What the prompt sets up:
    • installs the runtime;
    • starts it with the discover import first, so React, Redux and Zustand state are found;
    • adds the dev-only overlay;
    • connects the MCP server with GENCLASS_DASHBOARD and GENCLASS_REPORT unset;
    • checks pages with scan --local.
  • Plain-language list of everything that still goes outside the network:
    • jsDelivr serves the model and onnxruntime-web, about 13 MB, or 18 MB on WebGPU devices, unless the app serves them itself;
    • the npm registry and Playwright's download servers, from dev machines;
    • the hosted page check, which is not open source and is used only with hosted: true, or when scan runs without --local and Playwright or its Chromium is missing.
  • Three short commands below the prompt for people who'd rather copy by hand: init --no-telemetry, mcp init and scan --local. There are also two connect snippets for the MCP server, one for Vite and one for Next.js and webpack.
  • Links to the new page from /start and from the sign-in page ("The runtime needs no account: set it up without one").

Also in this PR

  • Back keeps the boxes. Ticked boxes, and the prompt they produce, come back after the Back button, here and in the dashboard's Connect dialog. Chromium restores checkboxes without firing a change event and skips disabled ones, so the page syncs on pageshow and only disables Eager after load.
  • Copying is steadier. Copy no longer scrolls the page and leaves focus on the button.
  • Wrangler-build test. Prompt sources ship through fnSource(). The new test/bundle.test.ts bundles pages.ts the way Wrangler does (esbuild keepNames). It fails if an inline script calls __name( or a page holds a raw control character; this broke the page once with __name is not defined.
  • Route safety. The route writes no database rows, and a POST falls through to the site.
  • Version. SNIPPET_RUNTIME and RUNTIME_ON_NPM are now 0.3.0-beta.4.

Testing

  • cd telemetry-worker && npx vitest run: 349 passed.
  • wrangler deploy --dry-run builds, and the page has no raw control characters.
  • Real Chromium (wrangler dev):
    • the default prompt is 8 steps;
    • Back keeps the boxes and the prompt, with Eager in markup and with a reload;
    • copying works with a refused clipboard, which leaves the text selected;
    • the dashboard's sample, account and locked modes work;
    • copying doesn't jump the page;
    • at 375 px there is no sideways scroll;
    • the only console errors are localhost CSP image errors.
  • npx @genclass/runtime@0.3.0-beta.4 init --no-telemetry --mode guard --sink console-json --model-url /genclass-model/ --dry-run --yes on a plain HTML page shows the script tag the prompt describes.

Not in this PR

  • Not deployed. The worker deploy still needs to be approved.
  • Not linked from the site. genclass.dev's home and scan pages, which live in genclass-site, don't link here yet. Worker pages are noindex, so search engines won't find it until the site links to it.
  • 18 MB is a little low. The WebGPU download is closer to 19 MB, and the same figure appears in README.md and packages/sv; that fix is left for a follow-up.

🤖 Generated with Claude Code

…only the open-source parts

A page at /start/open-source for teams that won't use a hosted dashboard: no sign-in, no
token, telemetry: false. Checkboxes (Guard, Eager, Logs, the coding-agent link, a
self-hosted model) rewrite one copy-prompt that installs the runtime, starts it with the
discover import first, adds the dev-only overlay, connects the MCP server with
GENCLASS_DASHBOARD and GENCLASS_REPORT unset, and checks pages with scan --local. The page
lists every host the app or the dev machine still reaches (jsDelivr for the model and
onnxruntime-web unless self-hosted, the npm registry, Playwright's download servers) and
says the hosted page check is not open source and needs hosted: true.

- choices come back after Back (Chromium restores checkboxes without a change event and
  skips disabled ones), here and in the dashboard's Connect dialog
- copying by execCommand no longer scrolls the page and keeps focus on the button
- prompt sources ship through fnSource(); bundle.test.ts bundles pages.ts as Wrangler does
  (keepNames) and fails on __name( in an inline script or a raw control character
- the route writes no database rows; POST falls through to the site
- SNIPPET_RUNTIME and RUNTIME_ON_NPM are 0.3.0-beta.4
- /start and the account pages link to it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Karanvir1729

Copy link
Copy Markdown
Collaborator Author

Merged into main with #118 through the merge commit 49c8c03 (the stacked branch was merged whole, so GitHub did not mark this PR itself as merged). /start/open-source is on main.

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