Fix #67: Create button crash — guard missing DOM element #70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "batch/67"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The structured panel was removed from the DOM during a UI redesign, but loadStructured() still unconditionally calls getElementById('structuredList'). Add an early return guard if the element is not found. Also refresh loadCurrentSession() after creating a structured transcript instead of the removed loadStructured(), since the structured panel lives in the current-session panel.Two bugs fixed: 1. Structured panel HTML was missing from the page body. loadStructured() and createStructured() reference document.getElementById('structuredList') and document.getElementById('structuredReloadBtn'), but the structured-panel div with those IDs was never added to the DOM. This caused 'Cannot set properties of null (innerHTML)' when clicking Create. 2. createStructured() only searched for buttons inside .structured-item elements. The Create button rendered in session-item (.session-btn.structured-create) was never found, so the in-progress feedback never worked and the fallback alert firing after the API call was confusing. Fixes: - Added missing structured-panel HTML to the page body (matching the CSS already in the stylesheet). - Added a fallback selector to find .session-item button.structured-create when no .structured-item button matches. - Added transcript.txt write in chunk_transcription_mode so stopSession persists the merged transcript to the folder.