2026-06-09 18:35:59 -04:00
# Lotus Chat — Bug Report & Technical Audit
2026-06-10 22:55:32 -04:00
2026-06-09 18:35:59 -04:00
**Date: ** June 2026
2026-06-10 00:05:25 -04:00
This document tracks identified bugs, edge cases, and architectural discrepancies.
2026-06-09 18:35:59 -04:00
---
2026-06-10 00:05:25 -04:00
## ✅ Resolved Issues (Recently Fixed)
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **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.
2026-06-09 18:35:59 -04:00
---
2026-06-10 00:05:25 -04:00
## 🛡️ Critical Security & Logic
2026-06-09 18:35:59 -04:00
2026-06-10 00:05:25 -04:00
### 1. Edit History Broken for E2EE
2026-06-10 22:55:32 -04:00
2026-06-10 00:05:25 -04:00
**File: ** `src/app/features/room/message/EditHistoryModal.tsx`
**Status: ** **OPEN **
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **Issue:** The modal fetches edit history via raw `fetch` . The returned events are not decrypted.
- **Impact:** In encrypted rooms, the edit history shows ciphertext or "(no text)" for all previous versions.
- **Recommended Fix:** After fetching raw events, check if they are encrypted. Use `mx.decryptEventIfNeeded(event)` for each event in the chunk before rendering.
2026-06-09 18:35:59 -04:00
2026-06-10 15:39:35 -04:00
### 2. Service Worker Ephemeral Sessions
2026-06-10 22:55:32 -04:00
2026-06-10 00:05:25 -04:00
**File: ** `src/sw.ts`
**Status: ** **OPEN **
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **Issue:** Access tokens are stored in an in-memory `sessions` Map within the SW.
- **Impact:** Closing all app tabs wipes the sessions. Background tasks (like future push notification handling or media pre-fetching) will fail.
- **Recommended Fix:** Persist the session info (accessToken/baseUrl) in IndexedDB within the Service Worker so it survives app restarts.
2026-06-09 18:35:59 -04:00
---
2026-06-10 00:05:25 -04:00
## 📱 PWA & Mobile Issues
2026-06-09 18:35:59 -04:00
2026-06-10 00:05:25 -04:00
### 1. No PWA Precaching (Offline Mode Broken)
2026-06-10 22:55:32 -04:00
2026-06-10 00:05:25 -04:00
**File: ** `src/sw.ts` , `vite.config.js`
**Status: ** **OPEN **
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **Issue:** The Service Worker is missing the `self.__WB_MANIFEST` injection point and `precacheAndRoute` call.
- **Impact:** The app does not work offline and fails PWA installation requirements in most browsers.
- **Recommended Fix:** Add `precacheAndRoute(self.__WB_MANIFEST)` to `sw.ts` and ensure `vite.config.js` has a valid `injectionPoint` .
2026-06-09 18:35:59 -04:00
2026-06-10 00:05:25 -04:00
### 2. PiP Resize Impossible on Mobile
2026-06-10 22:55:32 -04:00
2026-06-10 00:05:25 -04:00
**File: ** `src/app/components/CallEmbedProvider.tsx`
**Status: ** **OPEN **
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **Issue:** Resizing the PiP window uses `onMouseDown` handlers which do not trigger on touch devices.
- **Impact:** Mobile users cannot resize the PiP window.
- **Recommended Fix:** Implement `onTouchStart` handlers for the resize corners, mapping touch coordinates to the same resize logic.
2026-06-09 18:35:59 -04:00
2026-06-10 00:05:25 -04:00
### 3. Double Background Animation (GPU Waste)
2026-06-10 22:55:32 -04:00
2026-06-10 00:05:25 -04:00
**File: ** `src/app/pages/client/SidebarNav.tsx` , `src/app/features/room/RoomView.tsx`
**Status: ** **OPEN **
2026-06-09 18:35:59 -04:00
2026-06-10 22:55:32 -04:00
- **Issue:** When Glassmorphism is enabled, the chat background is mirrored to `document.body` while the `RoomView` also renders it.
- **Impact:** Two identical animations (e.g., Digital Rain) run simultaneously, doubling GPU usage on mobile.
- **Recommended Fix:** When Glassmorphism is active, make the `RoomView` background transparent and rely on the `document.body` background.