Summary
Gene selection and work rendering contain logic bugs and undefined references that can allow invalid state, fail silently, or throw runtime errors.
Why this matters
Incorrect boolean conditions and missing guards can lead to broken flows, incorrect error messages, and hard-to-debug crashes when gene data is missing or malformed.
Scope
- core/scripts/crispr_scripts.js
Tasks
- Fix always-true / always-false conditionals in select_Gene and loadWork.
- Initialize string builders before concatenation in fillGeneList to avoid 'undefined' prefix.
- Replace undefined backgroundInfo reference and add explicit null checks with clear user-facing errors.
- Add minimal unit coverage for the corrected branches.
Acceptance criteria
- Gene selection never falls into invalid state silently.
- loadWork only renders when required data is present; otherwise shows a deterministic error.
- Tests cover success and failure paths.
Summary
Gene selection and work rendering contain logic bugs and undefined references that can allow invalid state, fail silently, or throw runtime errors.
Why this matters
Incorrect boolean conditions and missing guards can lead to broken flows, incorrect error messages, and hard-to-debug crashes when gene data is missing or malformed.
Scope
Tasks
Acceptance criteria