Skip to content

Refactor: Both warnings are dispatched inside handleSelectChange — i.e. as soon as the user picks **HELM** from the format dropdown, before any Save action. A user who selects HELM, sees the toast, then cancels the dialog (or switches to another format) has been warned about an export that never happens. The PR description also says the warning is "dispatched on HELM export", which doesn't match the actual call site. #10155

Description

@AlexeyGirin

Both warnings are dispatched inside handleSelectChange — i.e. as soon as the user picks HELM from the format dropdown, before any Save action. A user who selects HELM, sees the toast, then cancels the dialog (or switches to another format) has been warned about an export that never happens. The PR description also says the warning is "dispatched on HELM export", which doesn't match the actual call site.

Consider moving the dispatch into handleSave (gated by currentFileFormat === 'helm') so it only fires when the user commits to exporting.

Also: the message "The molecule will be exported … appear as a CHEM monomer" is singular, but molecules.length can be > 1. Suggest pluralizing, e.g. "Molecules will be exported using inline SMILES, and on load will appear as CHEM monomers."

Originally posted by @claude[bot] in #10140 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode refactoring, without changing the functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions