Skip to content

genclass 0.3.14: the setup turns visitor analytics on (init --analytics, analytics on | off) - #263

Merged
MeharPro merged 1 commit into
mainfrom
feat/setup-analytics-default
Nov 21, 2026
Merged

MeharPro merged 1 commit into
mainfrom
feat/setup-analytics-default

Conversation

@MeharPro

Copy link
Copy Markdown
Contributor

Owner, 2026-11-20: "Turn on analytics in genclass setup by default so they can see visitors".

Until now genclass setup never wrote the analytics option, so genclass analytics and the dashboard's Visitors stayed empty for every app set up from the terminal, with a line that said analytics is opt-in.

What changes

  • Setup turns visitor analytics on. The runtime step hands the runtime CLI's init a new --analytics flag, which writes analytics: true next to the app's token (data-analytics="on" on a script tag, analytics=on in the Astro meta line), inside init's markers, so remove takes it out. genclass setup --no-analytics leaves it out.
  • Said before it is written. The step's sentence says visitors are counted, the change is shown first, and init prints what is counted and kept (no cookies, one localStorage entry, never from localhost), the consent advice for the EU, EEA and UK (runtime.analytics.start() after the visitor agrees) and the command that turns it off.
  • genclass analytics on / off: the switch for this folder's app. off, and init --no-analytics, pass without Pro and signed out, like every opt-out (AGENTS.md rule 8).
  • init --analytics / --no-analytics in the runtime CLI. The runtime's own default stays off. No token, no option: a usage error with --no-telemetry or --no-token, a setup without a token is told so, and when a token cannot be made the option is left out with it.
  • genclass analytics and the dashboard's Visitors line say why no visit is counted: off in this app (with the command), or on and waiting for the deployed site's visitors.
  • An app set up before this release is not changed.

Not in this PR

  • Nothing is published: genclass 0.3.14 needs the cli-v0.3.14 tag and the release run's approval. The runtime CLI's own flag ships with the next runtime release; the genclass command bundles init, so it needs no runtime release.
  • genclass.dev's /docs/cli and /docs/analytics (the private site repository) still describe analytics as something to turn on by hand.

Tests

  • Runtime: typecheck clean, build, 1,284 passed and 16 skipped; review-perf 4 passed. New install tests: the three written forms round-trip through remove, the statement is what /auto reads, on and off on an existing setup restore the files exactly, a user's own key survives, no token means no option, the usage errors, the disclosure.
  • CLI: 231 passed. New: the step's arguments and sentence, --no-analytics, analytics on | off, off without Pro, the no-visits lines.
  • Not run: a real browser page with the written config (analytics never run on localhost, by design), and the walk against a live collector.

🤖 Generated with Claude Code

…cs / --no-analytics; analytics on | off

Owner, 2026-11-20: "Turn on analytics in genclass setup by default so they can see visitors".

- runtime init: --analytics writes analytics: true in the option file (data-analytics="on" on a script tag,
  analytics=on in the Astro meta line), --no-analytics takes it out again; both work on an existing setup and
  remove takes them out. init says what is counted and kept, the consent advice for the EU, EEA and UK and the
  switch before anything is written. No token, no option: a usage error with --no-telemetry or --no-token, a
  setup without a token is told so, and a token that cannot be made leaves the option out. The runtime's own
  default stays off.
- genclass setup: the runtime step passes --analytics (setup --no-analytics leaves it out); the step's sentence
  and its fuller text say so, and status names the command that does it.
- genclass analytics on | off: the switch for this folder's app; off (and init --no-analytics) passes without
  Pro and signed out, like every opt-out.
- genclass analytics and the dashboard's Visitors line say why no visit is counted: off in this app (with the
  command), or on and waiting for the deployed site's visitors.
- docs: TELEMETRY.md, PRIVACY.md, ANALYTICS.md, API.md, INSTALL.md, both READMEs, both changelogs, AGENTS.md rule 8.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@genclass-dev

genclass-dev Bot commented Nov 20, 2026

Copy link
Copy Markdown

GenClass runtime review

2 findings in this pull request's tests at 900b051 · 2 reproducible · 5 tests read

# Status Finding Test Seen
1 New Witness, overwrote-newer · GET /api/search [chromium] search.spec.ts > search > buggy page: results of the last query 2 of 2 seeds, reproducible
2 New Witness, overwrote-newer · GET /api/search search.spec.ts > search > buggy page: results of the last query 5 of 5 seeds, reproducible

Reply @genclass-dev replay 1 for the steps to reproduce a finding, or @genclass-dev fix 1 for a brief a coding agent can work from.

The race report, test by test

Race report

2 signatures in 2 tests, 2 reproducible (flagged in 2 or more seeds of the same test) · 19 files read · mode observe

signatures reproducible
Duplicate submits 0 0
Stale responses 0 0
Failing endpoints 0 0
Other detections 0 0
Witnesses (facts measured without the model) 2 2
[chromium] search.spec.ts > search > buggy page: results of the last query

2 seeds (1, 2) · 1 signature · chaos: latency 0–600 ms, reorder

Witnesses (facts measured without the model)

  • Reproducible: 2 of 2 seeds (1, 2) · GET /api/search · witness:overwrote-newer

    The response of GET /api/search#​1 wrote search.results over what newer GET /api/search#​2, started 0.09s after GET /api/search#​1, had written (2 items ["re one", "re two"] → 2 items ["r one", "r two"]).

search.spec.ts > search > buggy page: results of the last query

5 seeds (1, 2, 3, 4, 5) · 1 signature · chaos: latency 0–600 ms, reorder

Witnesses (facts measured without the model)

  • Reproducible: 5 of 5 seeds (1, 2, 3, 4, 5) · GET /api/search · witness:overwrote-newer

    The response of GET /api/search#​1 wrote search.results over what newer GET /api/search#​4, started 0.25s after GET /api/search#​1, had written (2 items ["reac one", "reac two"] → 2 items ["r one", "r two"]).

3 tests with nothing flagged
  • [chromium] search.spec.ts > search > fixed page: results of the last query (2 seeds: 1, 2)
  • search.spec.ts > search > fixed page: results of the last query (5 seeds: 1, 2, 3, 4, 5)
  • search.spec.ts > search > latency only > buggy page, latency only: results of the last query (5 seeds: 1, 2, 3, 4, 5)

Lines under "Witnesses (facts measured without the model)" are happens-before facts the runtime measured in the page without the model, one per signature (witness kind, operation): overwrote-newer, a response wrote a field over what a newer request or the user had written since the request started; identical-in-flight, two identical requests in flight together from separate user actions. They carry no confidence: a fact is listed when it happened. Reproducible: seen in 2 or more seeds of the same test. Whether a fact is a bug is for you to decide (some overwrites are intended; many are repaired a moment later).


genclass-dev[bot] read 19 race files from the artifacts genclass-races-unmodified, genclass-races of this pull request's workflow run, never your source code. What the lines mean · Setup and settings · reply @genclass-dev help

@MeharPro
MeharPro merged commit 7ba7767 into main Nov 21, 2026
16 of 17 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