Source: PR #156 review (round 1, item 2)
Problem
In R/mod_search_notebook.R, when a synthesis preset (overview, conclusions, research questions) hits an API error, show_error_toast() fires while the synthesis modal is still open. The toast renders behind/under the modal, and the modal briefly shows "Processing response..." before removeModal() runs a few lines later.
Affected lines: ~3320-3342, 3374-3384, 3426-3436.
Suggested Fix
Either:
- Call
removeModal() before show_error_toast() inside the error handler
- Restructure to use
tryCatch(finally = removeModal()) so the modal is always removed first
Context
The document notebook (mod_document_notebook.R) doesn't have this issue because its error handler is simpler (sprintf("Error: %s", e$message)) and doesn't call show_error_toast().
Source: PR #156 review (round 1, item 2)
Problem
In
R/mod_search_notebook.R, when a synthesis preset (overview, conclusions, research questions) hits an API error,show_error_toast()fires while the synthesis modal is still open. The toast renders behind/under the modal, and the modal briefly shows "Processing response..." beforeremoveModal()runs a few lines later.Affected lines: ~3320-3342, 3374-3384, 3426-3436.
Suggested Fix
Either:
removeModal()beforeshow_error_toast()inside the error handlertryCatch(finally = removeModal())so the modal is always removed firstContext
The document notebook (
mod_document_notebook.R) doesn't have this issue because its error handler is simpler (sprintf("Error: %s", e$message)) and doesn't callshow_error_toast().