# Lotus Chat — Bug Report & Technical Audit **Date:** June 2026 This document tracks identified bugs, edge cases, and architectural discrepancies. --- ## ✅ Resolved Issues (Recently Fixed) - **GIF Sending Bypasses E2EE**: Fixed in `RoomInput.tsx`. - **Scheduled Messages Bypass E2EE**: Fixed in `scheduledMessages.ts`. - **Drag-and-Drop Overlay Persistence**: Fixed in `useFileDrop.ts`. - **Stale Member List in Verification Banner**: Fixed in `useDeviceVerificationStatus.ts`. - **Incomplete Python Comment Highlighting**: Fixed in `syntaxHighlight.ts`. - **Search Button Hidden in E2EE Rooms**: Fixed in `RoomViewHeader.tsx`. - **TDS Design Law Violations (Hardcoded Hex)**: Fixed in `GifPicker.tsx` and `VoiceMessageRecorder.tsx`. - **Recent Emoji Sort Order**: Fixed in `recent-emoji.ts` (recency order, not frequency). - **Encrypted Search Misses Historic Events**: Fixed in `useLocalMessageSearch.ts`. - **Presence Updater Base URL Hack**: Fixed in `usePresenceUpdater.ts`. - **Presence Badge Accessibility**: Fixed in `Presence.tsx` (`aria-label` on badge). - **Presence Updater Wipes Custom Status**: Fixed in `usePresenceUpdater.ts` (removed `status_msg: ''`). - **Manifest Main Icon Paths 404**: Fixed in `public/manifest.json` (`./public/android/` → `./res/android/`). Shortcut icon was already correct. --- ## 🛡️ Critical Security & Logic ### 1. Edit History Broken for E2EE **File:** `src/app/features/room/message/EditHistoryModal.tsx` **Status:** **FIXED** - **Issue:** The modal fetches edit history via raw `fetch`. Edit events not found in the room cache were constructed from raw encrypted content and never decrypted. - **Fix:** Each newly constructed `MatrixEvent` is now passed through `mx.decryptEventIfNeeded()` before rendering when `evt.isEncrypted()` is true. ### 2. Service Worker Ephemeral Sessions **File:** `src/sw.ts` **Status:** **NOT A BUG — by design** - The `sessions` Map is intentionally in-memory. The main window re-posts the session to the SW via `postMessage` on every load. Persisting access tokens in SW IndexedDB would duplicate credential storage unnecessarily and is not required for the current feature set. --- ## 📱 PWA & Mobile Issues ### 1. No PWA Precaching (Offline Mode Broken) **File:** `src/sw.ts`, `vite.config.js` **Status:** **DEFERRED — out of scope** - Full offline Matrix requires persisting sync state, E2EE keys, and an event send queue. The SW exists for authenticated media and notifications, which it handles correctly. Adding Workbox precaching is a multi-sprint project with limited benefit for a Matrix client. ### 2. PiP Resize Impossible on Mobile **File:** `src/app/components/CallEmbedProvider.tsx` **Status:** **FIXED** - **Issue:** Resize corner `onMouseDown` handlers did not fire on touch devices. - **Fix:** Added `handleResizeTouchStart` using touch events with the same geometry math extracted into a shared `applyResize` helper. `onTouchStart` is now wired to all four resize corners. ### 3. Double Background Animation (GPU Waste) **File:** `src/app/pages/client/SidebarNav.tsx`, `src/app/features/room/RoomView.tsx` **Status:** **FIXED** - **Issue:** When Glassmorphism is enabled, the chat background was rendered on both `document.body` and `RoomView`, running the same CSS animation twice. - **Fix:** `RoomView` now reads the `glassmorphismSidebar` setting and skips applying `chatBgStyle` when it is active, relying entirely on the `document.body` background that `SidebarNav` already mirrors.