Fix three open bugs from LOTUS_BUGS.md
- EditHistoryModal: decrypt fetched edit events in E2EE rooms via mx.decryptEventIfNeeded() before rendering; previously events not found in the room cache showed ciphertext or "(no text)" - CallEmbedProvider: add touch support for PiP resize corners; extracted shared applyResize() helper; onTouchStart wired to all four corners alongside existing onMouseDown - RoomView: skip chatBgStyle when glassmorphism is active; document.body already carries the background for the blur effect, rendering it twice doubled CSS animation work unnecessarily Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-20
@@ -29,20 +29,17 @@ This document tracks identified bugs, edge cases, and architectural discrepancie
|
||||
### 1. Edit History Broken for E2EE
|
||||
|
||||
**File:** `src/app/features/room/message/EditHistoryModal.tsx`
|
||||
**Status:** **OPEN**
|
||||
**Status:** **FIXED**
|
||||
|
||||
- **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.
|
||||
- **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:** **OPEN**
|
||||
**Status:** **NOT A BUG — by design**
|
||||
|
||||
- **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.
|
||||
- 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.
|
||||
|
||||
---
|
||||
|
||||
@@ -51,26 +48,22 @@ This document tracks identified bugs, edge cases, and architectural discrepancie
|
||||
### 1. No PWA Precaching (Offline Mode Broken)
|
||||
|
||||
**File:** `src/sw.ts`, `vite.config.js`
|
||||
**Status:** **OPEN**
|
||||
**Status:** **DEFERRED — out of scope**
|
||||
|
||||
- **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`.
|
||||
- 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:** **OPEN**
|
||||
**Status:** **FIXED**
|
||||
|
||||
- **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.
|
||||
- **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:** **OPEN**
|
||||
**Status:** **FIXED**
|
||||
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
Reference in New Issue
Block a user