Skip to content

Preview Shows Stale Content When Template/Data Processing Fails #774

@harsh-na

Description

@harsh-na

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions