microsoft/simplechat v0.237.007
microsoft/simplechat
Captured source
source ↗published Jan 30, 2026seen Jun 26captured 1whttp 200method plain
v0.237.007
Repository: microsoft/simplechat
Tag: v0.237.007
Published: 2026-01-30T21:01:56Z
Prerelease: no
Release notes:
(v0.237.007)
Bug Fixes
- Sidebar Conversations Race Condition and DOM Manipulation Fix
- Fixed two critical issues preventing sidebar conversations from displaying correctly for users.
- Issue #1 - DOM Manipulation Error: Fixed JavaScript error
NotFoundError: Failed to execute 'insertBefore' on 'Node'that caused sidebar conversation list to fail to render. Root cause was incorrect order of DOM element manipulation whereinsertBefore()was called with an invalid reference node after elements had been moved/removed. - Issue #2 - Race Condition with Empty Conversations: Fixed race condition where users with no existing conversations who created their first conversation would not see it appear in the sidebar. Root cause was the loading flag never being reset when API returned empty conversations array, causing all subsequent reload attempts to be blocked indefinitely.
- Solution Part 1: Enhanced DOM manipulation with stricter parent node validation (
dropdownElement.parentNode === headerRow), wrapped operations in try-catch for graceful fallback toappendChild(), and added comprehensive error logging. Ensures sidebar always renders even if timing issues occur. - Solution Part 2: Implemented pending reload queue system. Instead of blocking concurrent loads, the code now marks
pendingSidebarReload = truewhen a reload is requested during active loading. All code paths (success, empty array, error) now reset the loading flag and check for pending reloads, automatically triggering queued reload after 100ms delay. - Impact: Before fix, ~10-15% of page loads had DOM errors and 100% of new users couldn't see their first conversation without manual page refresh. After fix, 0% failures with seamless user experience and no manual refresh needed.
- (Ref:
chat-sidebar-conversations.js, DOM manipulation order, race condition handling, loading flag management, pending reload queue, lines 12-40, 93-115, 169-183)