7 Commits
Author SHA1 Message Date
Evie Gauthier b7f46e10ca fix(caddy): add cache-control headers for assets, sw.js, and index.html 2026-04-06 12:33:58 -04:00
7w1 e921be4cac Update Caddyfile 2026-03-16 22:53:51 -05:00
Evie Gauthier 3ce9e54145 feat(sentry): initialize SDK, performance instrumentation, developer settings, and error capture
Adds Sentry error tracking, performance monitoring, and session replay:

- Environment-based sampling: production 10%, preview/dev 100%
- Session replay with full privacy masking (text, media, inputs)
- Hashed MXID as anonymous user ID with homeserver tag
- Error rate limiting (50 events/session) to protect quota

Performance spans and metrics across all critical paths: auth login,
message send, timeline jump-load, per-event decryption, sliding sync
cycles, key backup, store wipe, UTD failures, sync degradation,
background notification clients, media uploads.

Developer settings panel (Settings → General → Diagnostics & Privacy):
error reporting toggle, session replay opt-in, breadcrumb category
controls, debug log export.

Crash page shows Sentry event ID with one-click feedback dialog.
Bug report modal sends structured reports to Sentry feedback API
with optional debug log attachment.

CI: Sentry env vars injected into preview (100% sampling) and
production (10% sampling) builds. Source maps uploaded via
@sentry/vite-plugin.
2026-03-15 23:40:58 -04:00
Evie Gauthier 918f72c295 fix: use port 8080 instead of 80 in Caddyfile
Caddy is run with --cap-drop=ALL which removes CAP_NET_BIND_SERVICE,
so binding to privileged ports (<1024) fails. Use port 8080 instead,
consistent with the previous nginx-based config.
2026-03-08 00:24:19 -05:00
Bea b18d1e77e0 feat(caddy): enable HTTP/2 Cleartext (h2c) for proxy use 2026-03-07 19:19:39 +00:00
Bea f252568ede perf: add build-time Brotli pre-compression
Generate .br sidecar files at max quality (level 11) during the Vite
build for all compressible assets (JS, CSS, HTML, WASM, SVG, etc.).
Compressible assets shrink from ~17 MB to ~3.4 MB — an 80% reduction.

Configure Caddy to serve pre-compressed .br files via file_server
precompressed, with on-the-fly zstd/gzip fallback for assets without
sidecars.
2026-03-07 19:18:23 +00:00
Bea 4beb29b01a refactor(docker): replace nginx with Caddy
Caddy handles SPA routing and static file serving natively without
rewrite rules, resulting in a simpler setup.
2026-03-07 19:15:58 +00:00