Repository navigation
Tags
Tags
v2.40.0 — opt-in widget padding and a minified Worker Highlights: - feat(widget): new opt-in `--garrul-padding` theming var adds inner padding to the widget (single length only, e.g. `16px`). The name field and form options now sit inside the composer card. - chore(wrangler): `wrangler.example.toml` now sets `minify = true` (about a third smaller upload, no behavior change). `npm run upgrade` does not sync wrangler.toml keys — add the line to your own `wrangler.toml` by hand. - fix(seed-demo): `npm run seed-demo` re-runs cleanly; it clears comment child rows before re-seeding. Notes: - Drop-in upgrade: no new env vars, no migrations. - If you serve from a custom domain, set `workers_dev = false` (and `preview_urls = false`) in `wrangler.toml` so the `workers.dev` hostname is not public.
v2.39.0 — a static iframe shell and fewer D1 reads and KV writes Highlights: - Static iframe shell: `/embed/?slug=<slug>` is served by Workers Static Assets, so an iframe pageview no longer runs the Worker for the shell. `/embed/<slug>` is unchanged. - Fewer D1 reads and KV writes: page vote/reaction totals are stored on write (no per-pageview counting), new admin-list indexes, sessions read once per request and refreshed at half-life, `/feed/:slug` and `/c/:id` edge-cached for 5 minutes. Anonymous comment posts no longer write KV (Workers AI verdict cache removed). - Cost visibility: `/admin/usage` counts D1 rows read/written (not queries) and adds a Workers AI neurons panel; each anti-spam control on `/admin/settings` states its per-comment cost. - Siteverify, Akismet and Workers AI calls now time out (5 s / 3 s / 5 s). Notes for operators: - Run `npm run upgrade` (migrations 0031, 0032), **then run once**: `npx wrangler d1 execute DB --remote --file src/db/post-deploy/0032_page_engagement_totals.sql`. It recounts vote/reaction totals the old Worker changed between migrate and deploy. It is idempotent. Upgrades from this release on run it automatically. - To use the static shell, point iframe embeds at `/embed/?slug=…`. Its CSP comes from top-level `ALLOWED_ORIGINS` in `wrangler.toml` at build time, so redeploy after changing it. With `ENV = "dev"`, `[env.*]` tables or no `ALLOWED_ORIGINS`, the Worker serves that URL instead. - Dashboard figures can trail a moderation action by up to a minute; the queue stays live.
v2.38.0 — Clef-flash spam scoring and fewer billed requests Highlights: - Workers AI spam checks now use Cloudflare's Clef-flash decision model and score each comment. New optional `SPAM_AI_THRESHOLD` (1–100, default 70) sets the queue cut-off; also editable on /admin/settings. - Fewer billed requests: `/embed.js` can be served from Workers Static Assets via a new `[assets]` block (`npm run upgrade` prints it), and the form-timing token is minted on first composer focus instead of at mount. - Less KV and D1 load: settings use a 60 s per-isolate memo instead of a KV cache, reply notifications fan out in one query, and thread paging seeks on new indexes. Notes for operators: - Run `npm run migrate` — migration 0030 adds paging and retention indexes. - Add the `[assets]` block to `wrangler.toml` to take `/embed.js` off the Worker quota; without it nothing breaks. - Sign-out, token exchange and OAuth callback are now rate-limited. docs/ANTISPAM.md has an optional Cloudflare WAF rule for the sign-out route. - Settings edits can take up to 60 s to reach every isolate.
Highlights: - **Replies survive a removed parent.** Marking a comment spam, holding it for moderation, or a moderator delete no longer hides its approved replies. The parent renders as an anonymous "[removed by a moderator]" placeholder; a hidden comment with no visible replies renders nothing (KingPin#189). - **Spam thread.** The admin comment detail page has a **Spam thread** action that marks a comment and every reply below it spam in one atomic step, up to 100 comments. Each changed row gets a `thread.spam` audit entry with `prev_status`, so it can be undone. One `comment.spam` webhook fires, for the root only. - **Queue reply hint.** Spam and pending rows show "↳ N direct replies". fix: - Replies to a spam comment, or to someone else's pending comment, are refused like a missing parent. - Admin bulk moderation runs a fixed number of D1 queries and no longer 404s or hits the bind-parameter cap on large selections. Bulk delete now records the removal as a moderator delete. - New log events: `comment.requarantined` when an edit sends an approved comment back to pending; `comments.page_truncated` also fires on the 4,000-row scan cap (`scan_limit`). No new env vars, endpoints or migrations. Drop-in upgrade.
v2.36.1 — clearer GitHub sign-in failures and safe slugs for odd impo… …rt links fix: - Sign-in: when GitHub answers the token exchange with 429 (its block on some Cloudflare Workers egress addresses), the Worker retries a few times; if every try is blocked, the popup stays open and says so. Other providers' 429s are not retried and forward their Retry-After. (KingPin#187) - Sign-in: a failed sign-in popup now stays open on every provider instead of closing after 250 ms. - Import: a thread link the read API would reject (percent-encoding, odd characters, >200 chars) gets a stable synthetic slug instead of an unreachable page; the import plan counts these as fallback_slugs. Earlier imports may have stranded comments — see AGENTS-OPERATE.md. (KingPin#186, KingPin#117)
- **Arabic (`ar`) locale**, Garrul's first right-to-left language. Th… …e widget sets its direction from the locale. Select it with `data-lang="ar"`; an Arabic `<html lang>` alone still selects English until a native speaker reviews the machine-seeded translation. - Drop-in upgrade. No new env vars, secrets, bindings or migrations. - Dependency updates: `hono` 4.13.13, `marked` 18.1.0, `wrangler` 4.149.0. The `wrangler` bump moves the dev-only `sharp` to 0.35.5 (GHSA-wq5f-xc86-pv6w); it never reached the Worker runtime. - `marked` 18.1.0 rejects link destinations with unbalanced parentheses. Existing stored comments are unchanged; the renderer version is not bumped.
- `npm run upgrade` now prints the notes for **every release since yo… …ur installed version**, not just the target's. The newest three releases show in full; older ones show as one title line each (up to 20). The section is capped at 100 lines, with a link to the releases page for anything cut off. - If GitHub refuses the releases list (for example, the unauthenticated rate limit), the target's own notes still print, with a note that earlier releases could not load. - Drop-in upgrade. No new env vars, secrets, bindings or migrations. - The upgrade now makes one extra GitHub API request (the releases list). Set `GITHUB_TOKEN` if you hit the 60/hour unauthenticated limit.
**Highlights:** The widget composer no longer paints its Write/Previe… …w tabs and Markdown toolbar in the accent color, and the docs and admin dashboard now point at the theme builder on garrul.com. **feat:** - The dashboard embed card links to the theme builder at `https://garrul.com/theme`, which emits ready-to-paste `--garrul-*` overrides for the mount. **fix:** - Composer buttons: only the submit button carries the accent palette. The inactive Write/Preview tab and the Markdown toolbar buttons were previously painted accent-on-white too. - Turnstile frame: a pinned `data-theme="light|dark"` on `#garrul` is now forwarded to the Turnstile iframe, so its chrome matches the widget instead of following the OS. **docs:** - THEMING, README and the examples point at the theme builder. THEMING notes that `--garrul-font` only takes effect when the host page loads that font. **Notes:** no new env vars, no migrations. Upgrade with `npm run upgrade`.
v2.33.0 — "Comments by Garrul" attribution **feat:** - The widget attribution line under the comment list now reads "Comments by Garrul" instead of "Powered by Garrul", in English and all 10 translated locales. `BRANDING_HIDDEN` still hides it. **docs:** - README and `docs/architecture.md` gain an architecture diagram of the Worker, D1, KV, Cache API and Turnstile. **Notes:** no new env vars, no migrations. Upgrade with `npm run upgrade`.
**feat:** - **Hostname-first install**: `npm run setup` now asks for the hostname first and needs far fewer prompts. It picks the Cloudflare account once, up front, and reuses existing database and KV ids that belong to that account. - **Owner sign-in link**: `npm run owner-link` prints a single-use admin sign-in link. The admin has a new owner sign-in page. Migration adds the login-token table. - The Analytics Engine binding is now opt-in. **fix:** - Setup checks `ALLOWED_ORIGINS`, `PUBLIC_BASE_URL`, `OAUTH_CALLBACK_BASE` and `ADMIN_EMAILS` at the prompt. It rejects origins a browser never sends (query, fragment, user info, default port) and URLs with no host. - Setup exits nonzero when a required check fails. It flags a placeholder `ADMIN_EMAILS` after deploy and explains the 7404 and 10089 failures. - `wrangler.toml` now ships with `ADMIN_EMAILS` and `EMAIL_FROM` empty, so no placeholder address gets admin and a fresh install does not offer subscriptions. **Notes:** new migrations apply through `npm run upgrade`. No new required env vars.
PreviousNext