v0.237.005
(v0.237.005)
Bug Fixes
-
Retention Policy Field Name Fix
- Fixed retention policy to use the correct field name
last_updatedinstead of the non-existentlast_activity_atfield. - Root Cause: The retention policy query was looking for
last_activity_atfield, but all conversation schemas (legacy and current) uselast_updatedto track the conversation's last modification time. - Impact: After the v0.237.004 fix, NO conversations were being deleted because the query required a field that doesn't exist on any conversation document.
- Schema Support: Now correctly supports all 3 conversation schemas:
- Schema 1 (legacy): Messages embedded in conversation document with
last_updated - Schema 2 (middle): Messages in separate container with
last_updated - Schema 3 (current): Messages with threading metadata with
last_updated
- Schema 1 (legacy): Messages embedded in conversation document with
- Solution: Changed SQL query to use
last_updatedfield which exists on all conversation documents. - (Ref: retention policy execution, conversation deletion,
delete_aged_conversations(),last_updatedfield)
- Fixed retention policy to use the correct field name
-
Sidebar Conversations DOM Manipulation Fix
- Fixed JavaScript error "Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node" that prevented sidebar conversations from loading.
- Root Cause: In
createSidebarConversationItem(), the code was appendingoriginalTitleElementtotitleWrapperfirst (which removes it fromheaderRow), then attempting to inserttitleWrapperbeforedropdownElement. This failed because onceoriginalTitleElementwas moved,dropdownElementwas no longer a valid child reference in the expected DOM position. - Impact: Users experienced a complete failure loading the sidebar conversation list, with the error appearing in browser console and preventing any conversations from displaying in the sidebar.
- Solution: Reordered DOM manipulation to insert the empty
titleWrapperbeforedropdownElementFIRST, then moveoriginalTitleElementinto thetitleWrapper. This ensuresdropdownElementremains a valid child ofheaderRowwheninsertBeforeis called. - (Ref: chat-sidebar-conversations.js,
createSidebarConversationItem(), DOM manipulation order, line 164)