-
-
Notifications
You must be signed in to change notification settings - Fork 213
Description
Preview Displays Stale Agreement HTML After Processing Errors.
Discussion 🗣
When an error occurs during template, model, or data processing, the Preview panel continues to render the last successfully generated agreement HTML. This behavior can be misleading because it does not reflect the current invalid state of the editors.
Context
During the rebuild process, errors are captured and displayed in the Problem Panel. However, the agreementHtml state is not cleared or updated when a failure occurs. As a result, the Preview still renders previously generated HTML even though the latest changes failed to compile.
Detailed Description
The Preview panel is currently driven solely by the agreementHtml state. When a processing error happens, the error state is updated, but agreementHtml retains its previous valid value. This causes the UI to display outdated content, creating inconsistency between the editor state and the Preview output.
Ideally, the Preview rendering should be controlled by an explicit error state. If a rebuild fails, the Preview should display an appropriate error message (or clear the rendered content) instead of showing stale agreement HTML. This would ensure that the Preview accurately reflects the current validity of the template/model/data configuration.