**Plan** 1. **Fix the selector dead code in `MessagesLayout.js`** - File: `devplacepy/static/js/MessagesLayout.js` - In `handleIncoming()` (~line 336), change: ```js const oldBody = pending.querySelector(".rendered-content"); ``` to: ```js const oldBody = pending.querySelector("dp-content"); ``` - The block that follows (lines 337–343) creates a new ``, sets its `textContent` to `frame.content` (verify that line exists – if missing, add `content.textContent = frame.content;` before the `replaceWith` call), and replaces `oldBody` with the new element. - **Move the removal of the `pending` CSS class** out of the `if (oldBody ...)` block so it always executes regardless of whether the content was replaced. The exact line (currently ~343) should be placed after the `if` block ends, or duplicated outside. This ensures the `pending` class is always removed when an incoming message matches a pending one. 2. **Update stale documentation** - File: `services/messaging/CLAUDE.md`, line 41 - Replace the reference to `.rendered-content data-render` with a description of the current `` component and the fix applied. 3. **No Python code changes** – existing unit tests and lint checks remain unaffected. --- **Definition of done** - [ ] `pip install -e '.[dev]' -q && make test-unit` exits 0. - [ ] `pip install -q ruff && ruff check .` exits 0 (no Python lint errors – the JS changes do not affect Python). - [ ] Code review confirms: - Query selector changed from `.rendered-content` to `dp-content`. - New `` element receives `textContent = frame.content` before replacement. - The `pending` class is removed unconditionally after the content replacement block. - [ ] `CLAUDE.md` now accurately reflects the component and no longer mentions `.rendered-content`. - [ ] Manual verification (optional but recommended): in a running dev instance, force an AI-modified message (e.g., by editing `schedule_modification` output) and confirm the bubble content updates to the corrected text.