diff --git a/LOTUS_TODO.md b/LOTUS_TODO.md index 871e4a322..1564ba398 100644 --- a/LOTUS_TODO.md +++ b/LOTUS_TODO.md @@ -321,60 +321,6 @@ Parse the `contacts` array and `support_page` URL. Display in Settings → Help --- -## INFRASTRUCTURE / BUG FIXES — Resolved June 2026 - -These were not planned features but bugs and infrastructure gaps found during P0 testing. - ---- - -### [x] BUG · GIF sending broken (CSP + domain allowlist) - -**Root cause:** Two independent issues: -1. `connect-src` CSP on LXC 106 nginx included `https://api.giphy.com` (search API) but NOT `https://*.giphy.com` (CDN). Browser blocked `fetch()` to `media2.giphy.com` with CSP violation. -2. Domain allowlist in `RoomInput.tsx` was a hardcoded list of `media0-4.giphy.com` — didn't cover all Giphy CDN shards. - -**Fix:** LXC 106 nginx CSP updated: `https://*.giphy.com` added to `connect-src` (live, no deploy needed). Domain check changed to `hostname.endsWith('.giphy.com')`. All silent failure paths now show user-facing error messages. - ---- - -### [x] BUG · Unhandled promise rejections from fire-and-forget useEffect loads - -**Root cause:** `useAsync` (in `useAsyncCallback.ts`) re-throws errors after storing them in `AsyncState.Error`. When `load()` / `loadThumbSrc()` etc. are called in `useEffect` without `.catch()`, the rejected promise hits the global `onunhandledrejection` handler → Sentry error JAVASCRIPT-REACT-M. - -**Fix:** Added `.catch(() => undefined)` to all 6 fire-and-forget patterns: `useAsyncCallbackValue`, `ThumbnailContent`, `ImageContent`, `VideoContent`, `ClientConfigLoader`, `EditHistoryModal`. Error is already captured in state for UI display. - ---- - -### [x] BUG · Copy Link buried in three-dot menu - -**Fix:** Removed Copy Link from both `RoomViewHeader` three-dot menu and `RoomNavItem` sidebar context menu. Added "Copy Link" button with 2s "Copied!" confirmation to `InviteUserPrompt` modal header — naturally co-located with the invite flow. - ---- - -### [x] BUG · `useLocalRoomName` MaxListeners warning (51+ rooms) - -**Fix:** `initMatrix.ts` bumped `mx.setMaxListeners(50)` → `mx.setMaxListeners(150)`. - ---- - -### [x] BUG · General.tsx hardcoded hex colors violating TDS - -**Fix:** `#980000` → `color.Critical.Main` (chat background selector). `#FF6B00` / `rgba(255,107,0,0.35)` → `var(--accent-orange)` / `var(--accent-orange-border)` (Lotus Terminal replay button). - ---- - -### [x] SERVER · CORS missing for `/.well-known/matrix/support` - -**Fix:** LXC 139 (Nginx Proxy Manager) — added dedicated location block for `/.well-known/matrix/support` with `add_header Access-Control-Allow-Origin * always` and static JSON response: `{"contacts":[{"matrix_id":"@jared:matrix.lotusguild.org","role":"m.role.admin"}],"support_page":"https://matrix.lotusguild.org"}`. Matches existing pattern for `/.well-known/matrix/client` and `/server` blocks. - ---- - -### [x] SERVER · Relations API returning 404 (wrong endpoint version) - -**Fix:** `EditHistoryModal` was using `mx.http.authedRequest` which prepends `/_matrix/client/v3/`. Matrix relations API lives at `/_matrix/client/v1/`. Changed to raw `fetch()` with explicit `/_matrix/client/v1/rooms/.../relations/.../m.replace` path. - ---- - ## PRIORITY 1 — High value, moderate effort Core features that meaningfully expand what users can do every day.