Repository navigation
GenClass reports by email: daily by default, hourly to monthly, P0 alerts, design ideas - #232
Merged
Merged
Conversation
…thly) and P0 alerts A report about an account's apps goes to the account's email on the schedule it picks (hourly when something happened, daily at 13:00 UTC by default, weekly, monthly, or off), and an alert as soon as the hourly run sees a critical problem, at most once a day per app and rule. Sent through Cloudflare Email Sending (the EMAIL binding, report@genclass.dev only; genclass.dev is onboarded). What a report holds, all from what the dashboards already show under each app's plan: the model's summary (Pro apps; the owner's OPENAI_API_KEY via suggest.ts modelText, given appDigest and the listed items, never an email, account id, app key or the key), critical and important items with a prompt for a coding agent each, the apps' numbers against the period before, pull requests the GitHub App reviewed, visitors (Pro), security and unusual activity (new terminals, passkeys and password changes; request storms, odd behaviour, traffic that tripled; no IP addresses), setup (no data, data stopped, the model failing to load, GitHub not connected), the last genclass suggest answer, and "Upgrade your website design" (measured contrast and layout checks, suggest's designs with their prompts, three sites to learn from a day, one 3D). A Free app gets totals, setup and its silent/spike alerts, never its problems' kinds, pages or prompts, plus Pro's trial box. The recorded demo's estimate gives no item. Priorities are rules in appItems (P0: failing endpoint x3, a race or failure on a payment page, a blank page, a page that stopped taking clicks, an app silent for 6 hours after steady traffic, problems that jumped within the hour). Links to change how often, one-click unsubscribe (List-Unsubscribe-Post) and a prompt page with Copy and Open in Claude Code are HMAC-signed with a key derived from INTEGRATIONS_KEY. At most 30 emails an account a day. Migration 0020 (accounts.report_*, report_alerts, report_sends), cron "7 * * * *", /account/report (settings, Send me one now, Preview), Account settings > Notifications. PRIVACY.md "Reports and alerts by email", AGENTS.md rule 13, README "Reports by email". Two config tests now expect the third cron and no EMAIL binding when self-hosted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r setup step on many apps) The first test report was 7,000 px of prompt boxes. Now each section is a card, a prompt is a button to its signed page (printed only without a link, and only when short; the text part keeps them all), the same setup step on several apps is one row with a link per app, and the apps table becomes a status list until something is measured. A headline says what matters, and the footer picks how often. Also fixes a test that changed a link token's last character to x, which one token in 64 already ends with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MeharPro
added a commit
that referenced
this pull request
Nov 13, 2026
… applied to production) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
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.
The owner asked for a GenClass report by email: daily by default, changeable from the email itself (every hour up to every month, or off), plus P0 alerts as soon as something critical shows up.
What a report holds
appDigest) and the listed items. It never sees an email, account id, app key or secret.genclass suggestideas.How it runs
7 * * * *runs the hourly sweep. Each report is claimed atomically, so two overlapping runs never send the same report twice.List-Unsubscribe.[[send_email]] EMAILbinding, fromreport@genclass.devonly.0020_reports.sqlmust be applied before the deploy.Layout (second commit): each section is a card and each prompt is a button. Without a signed link, a short prompt is printed and a long one stays in the plain-text part. Rendered from the owner's real account (read-only), the email is 41 KB and about 3,600 px tall at 720 px wide, down from 7,000 px. Checked in light mode, dark mode and at 375 px with no sideways scroll.
Docs:
PRIVACY.mdgets a "Reports and alerts by email" section,AGENTS.mdgets rule 13, andtelemetry-worker/README.mdlists the routes and the migration.Checks: all 866 collector tests pass after the rebase onto #230. 24 of them are report tests, covering the schedule, priority rules, plan stripping, escaping, the model's input, sweep claims, alert dedupe, the cap, settings, tokens, unsubscribe, and the new layout. A worker typecheck in strict mode is clean. Also fixes a flaky token-tamper test: about one token in 64 already ends with the "x" the test wrote.
Not covered: the AI summary and signed links against production. They need the Worker's
OPENAI_API_KEYandINTEGRATIONS_KEY, so they are first seen after deploy.🤖 Generated with Claude Code