Commit Graph

10 Commits

Author SHA1 Message Date
Matt ‘TK’ Taylor
5b3e33c26b fix: adds optimize indexes (33) to migration runner (#330)
* fix: adds optimize indexes (33) to migration runner

* chore: add changeset for migration 033 runner registration fix

* test: update migration count assertions for 033_optimize_content_indexes
2026-04-07 11:52:55 +01:00
Hasan Smadi
dbaf8c6f85 fix(visual-editing): don’t open admin for portableText; simplify starter PT markup (#40)
* fix(visual-editing): PT inline editing; align starter templates

* chore(admin): format router.tsx

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-06 20:10:09 +00:00
Benjamin Price
8c693b582d fix: prevent media upload OOM on Workers for large images (#262)
* fix: prevent media upload OOM on Workers via client thumbnails + server safety net

Large image uploads (5MB+) crash Cloudflare Workers (128MB limit) because
generatePlaceholder() decodes entire images to raw RGBA pixels. A 4000x3000
JPEG becomes ~48MB RGBA, exceeding the isolate memory budget.

Two-layer fix:
- Client-side: browser generates a 64px canvas thumbnail for oversized images
  and sends it alongside the upload. Server generates blurhash from the
  thumbnail (~16KB RGBA) instead of decoding the full image.
- Server-side: reads dimensions from image headers via image-size and skips
  placeholder generation when estimated decoded size exceeds 32MB. This covers
  API/CLI uploads that don't provide thumbnails.

* chore: add changeset for media upload OOM fix

* fix: clamp upload thumbnail to 64x64 box for extreme aspect ratios

Naive sizing (thumbW=64, thumbH=(h/w)*64) could produce an enormous canvas
for very tall or very wide images — e.g. a 100x840000 image would allocate
a 64x537600 canvas client-side, reintroducing the memory blowup this feature
exists to prevent.

Extract computeThumbnailSize() that fits the image within a 64x64 box by
scaling against max(width, height), wrap canvas allocation and drawImage
in try/catch with a no-thumbnail fallback, and add unit tests covering
extreme aspect ratios.

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-06 07:14:39 +00:00
seslly
d2114523a5 fix: passkeys behind TLS reverse proxy (#225)
* fix: passkeys behind TLS reverse proxy

Add passkeyPublicOrigin and wire it through passkey routes so origin/rpId match
the browser when dev runs behind nginx. Expose dev-only /_emdash/api/dev/passkey-url,
add admin messaging for insecure WebAuthn contexts, nginx repro under demos/simple,
and direct kysely dependency for the simple demo Node adapter bundle.

Made-with: Cursor

* docs: add passkeyPublicOrigin to configuration reference

Adds the new passkeyPublicOrigin option and reverse proxy guidance
to the public-facing configuration docs as requested in PR review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* update tests and more docs

* fix: add missing refresh-server-pat fixture and restore docs heading

---------

Co-authored-by: Joseph Eftekhari <jdeftekhari@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 07:41:07 +01:00
Justin White
9269759674 fix: magic links missing root prefix (#133)
* Fix magic links

* Include changeset

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-04 19:47:05 +01:00
Matt Kane
953815969a fix(tests): use global hookTimeout for integration test beforeAll hooks (#125)
* fix(tests): remove explicit beforeAll timeouts that override global hookTimeout

Integration tests passed 60s timeouts to beforeAll, overriding the
120s hookTimeout in vitest.smoke.config.ts. On CI the dev server
startup can consume the full 60s, leaving no time for setup + seeding.

Also bumps createTestServer's default waitForServer timeout from 60s
to 90s, leaving 30s margin within the 120s hook budget.

* fix(tests): don't remove shared node_modules symlink during cleanup

Multiple integration test suites run concurrently and share the
fixture/node_modules symlink. When the suite that created it finishes
first, its cleanup deletes the symlink, causing other suites to fail
with MODULE_NOT_FOUND when their server process tries to resolve astro.

The symlink is gitignored so it's safe to leave in place.
2026-04-02 20:33:07 +01:00
Matt Kane
8e28cfc5d6 fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs 2026-04-02 15:30:36 +01:00
Matt Kane
ca3c2b77e1 Format 2026-04-01 11:51:57 +01:00
Matt Kane
2e863566b3 Fix scope 2026-04-01 10:58:32 +01:00
Matt Kane
43fcb9a131 first commit 2026-04-01 10:44:22 +01:00