Repository navigation
Redesign emails and sign-in pages; add public stats and one-click unsubscribe - #939
Merged
Merged
Conversation
GitHub stars, Docker Hub pulls, workspace count and tool calls in the last 30 days, cached for an hour with last-known fallback per source. Includes the shared rounding rules (always rounded down).
- email-layout.ts renders the approved design (no web fonts, hosted PNG logos, trust band with live numbers, footer) plus the text part - email-templates.ts holds every email as a pure function; user-supplied values are now escaped in all emails - marketing emails carry List-Unsubscribe with an RFC 8058 one-click endpoint (signed per user); transactional and trial notices do not - tests render every email and variant; preview script writes or sends them (helpcode.ai addresses only)
Consent, server picker, first-connector offer and cancelled page share one frame: client and AnythingMCP tiles, what the client will be able to do, the redirect host (amber when unknown), trust row under the card. The Claude logo and directory badge appear only when the code goes back to claude.ai; Cloud-only claims only on Cloud. Allow stays the first submit button so Enter never cancels.
Live numbers from /api/public/stats (tiles hidden when unavailable), badges, supported clients and trial contents; compact trust line under the sign-in card. Self-hosted keeps the single card without Cloud claims. Cloud users can turn tips and offers emails on or off in Settings.
keysersoft
enabled auto-merge (squash)
October 7, 2026 16:21
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Implements the approved email and sign-in redesign: one shared email layout for every email the backend sends, a public stats endpoint that feeds real trust numbers to emails and pages, a two-column Cloud sign-up page, and restyled MCP authorization pages. Website emails are redesigned in the website repo in parallel; the
/api/email/*fallback contract is unchanged.Changes
Public stats
GET /api/public/stats(no auth, throttled 30/min,Cache-Control: public) returns{ githubStars, dockerPulls, workspaces, toolCalls30d, updatedAt }. Aggregates only.TrustStatsService(global): GitHubstargazers_countof HelpCode-ai/anythingmcp, Docker Hubpull_countof helpcodeai/anythingmcp (5 s timeouts),countof organizations and of tool invocations in the last 30 days from the local DB. Cached for 1 h, stale-while-revalidate, single in-flight refresh, last known value kept per source.Emails (
settings/email-layout.ts,settings/email-templates.ts)https://anythingmcp.com/email/*.png), a trust band with live numbers and badges, a footer, a preheader and a plain-text part.List-Unsubscribe. Trial lifecycle notices and transactional emails get neither: the cron sends trial notices regardless of the opt-out.GET/POST /api/public/unsubscribe?u=<userId>&t=<HMAC>. GET only shows a confirmation button, so link scanners cannot unsubscribe anyone; POST setsemailMarketingOptOut. The token is an HMAC derived fromJWT_SECRET. The header includesList-Unsubscribe-Post: List-Unsubscribe=One-Click./settings/profile, which does not exist. Cloud users now have an "Email preferences" toggle in Settings (/settings#email-preferences), which is also the fallback link.scripts/send-email-previews.ts:--out <dir>writes every email and variant as HTML and text;--to <x@helpcode.ai>sends them with a "[Preview]" subject prefix and refuses any other domain. Also supports--self-hosted,--stats-urland--asset-base.MCP authorization pages (
auth/auth-page.ts,login.controller.ts)frame-ancestors 'none', CSRF double-submit, consent and deny semantics, SSO, sign-up return. The redirect host is still shown with the "only continue if you recognise this destination" warning, now in amber for unknown hosts. Allow is still the first submit button in the markup, so Enter never cancels.Sign-up / sign-in page (
login/page.tsx)public/logos/clients/.Testing
packages/backend:npx jest. 459 suites passed, 4 skipped, 9188 tests passed.email-templates.spec.ts: every email and variant × cloud/self-hosted/no-stats. Checks for text and HTML parts, no{{/undefined/NaN/null, hostile names escaped, < 90 KB, only https links to anythingmcp.com, cloud.anythingmcp.com, github.com and claude.ai, unsubscribe only on marketing, images with width/height/alt, no web fonts, Cloud claims only on Cloud.email.service.spec.ts: headers, signed unsubscribe link, escaping, fallback without stats.trust-stats.spec.ts: rounding, caching, stale refresh, fallback, malformed answers, controller.unsubscribe.controller.spec.ts: GET never unsubscribes, POST does, forged or foreign tokens are refused.login.controller.spec.ts: new consent design tests. Updated deliberately: "Use a different account" →href="/auth/login?switch=1">Switch account.packages/backend:npx tsc --noEmit -p tsconfig.jsonpasses;npm run lintreports 0 errors (the unrelated files rewritten by--fixwere reverted).packages/frontend:npx tsc --noEmit,npm run lint(0 errors),npm run buildall pass.packages/frontend:npx playwright test. 119 passed, including the newsignup-trust-panel.spec.ts. The Cloud sign-up button label is updated inneutral-signup-and-billing.spec.tsandbilling-awareness.spec.ts.Notes
/email/*.png), which is shipping in the website repo's redesign PR. Until that is deployed, email images will not load.