Skip to content

v0.237.005

Choose a tag to compare

@paullizer paullizer released this 30 Jan 18:16
· 489 commits to main since this release
09861db

(v0.237.005)

Bug Fixes

  • Retention Policy Field Name Fix

    • Fixed retention policy to use the correct field name last_updated instead of the non-existent last_activity_at field.
    • Root Cause: The retention policy query was looking for last_activity_at field, but all conversation schemas (legacy and current) use last_updated to 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
    • Solution: Changed SQL query to use last_updated field which exists on all conversation documents.
    • (Ref: retention policy execution, conversation deletion, delete_aged_conversations(), last_updated field)
  • 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 appending originalTitleElement to titleWrapper first (which removes it from headerRow), then attempting to insert titleWrapper before dropdownElement. This failed because once originalTitleElement was moved, dropdownElement was 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 titleWrapper before dropdownElement FIRST, then move originalTitleElement into the titleWrapper. This ensures dropdownElement remains a valid child of headerRow when insertBefore is called.
    • (Ref: chat-sidebar-conversations.js, createSidebarConversationItem(), DOM manipulation order, line 164)