Repository navigation
Convert the Page, preload and alignment parsers to TypeScript - #508
Open
jtklein-agents wants to merge 71 commits into
Open
jtklein-agents wants to merge 71 commits into
jtklein-agents wants to merge 71 commits into
Conversation
…ll of it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MUI icons take titleAccess, not title, so the label never showed on hover and the icon had no accessible name. Fixes #234 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Label the clear console icon with titleAccess
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-implicit-any check and lint rules for all TypeScript
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Return a validation error or null from MultistateNumber.error
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and-typescript-preload Renderer bridge type and TypeScript preload
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Event payloads the run subscribes to get named types in main and tighten the RendererBridge listeners. Adds @types/lodash. Two args payloads and the numSites sum keep their behaviour under @ts-expect-error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Type the run store
…-entry Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd-store-entry TypeScript run list and store entry
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Explicit parameter, return and result types for the FASTA parser, the PHYLIP parser and typecheckAlignment. No behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Option is generic over its value and owner, description and hoverInfo are optional, the options argument is an OptionSettings interface and error is ValidationError | boolean | null. Clears the yup and 'Expected 5-6 arguments' baseline lines; the MultistateNumber error override gets a baseline line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…parsers TypeScript alignment parsers
Type the option base
TypeScript page helpers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#264 typed the alignment options' owner as AlignmentLike with a RunLike run, while #266 typed InputFile's run as InputFileOwner. Merged together, Alignment.js passing itself to those options fails tsc. The still-JavaScript caller keeps its lines in the baseline until the alignment store leaf (#247) types it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FinalPartition and Partition gain explicit member types, each reading its owner through a module-local interface. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nment Type the final alignment
…45-typescript-partition-family
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FinalAlignment passes its run to FinalPartition, which reads haveAlignments and each alignment's partition. The owner types now carry those members so the typed constructors agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…store TypeScript alignment store
…family TypeScript partition family
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Input, Model, Output, Raxml, Console and CitationModal export typed props in place of propTypes, each reading the run, store or citation through a module-local interface. The run's select options are cast at the OptionSelect call site, since their classes miss notAvailable or string titles. Bridge calls read window.rendererBridge with no cast. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The alignment, ASTRAL tree, tree and partition file cards and the partition editor drop propTypes for exported Props interfaces. Each store prop is a module-local interface holding only what the panel reads. Two contract gaps keep their behaviour: the part start/end options take a string from OptionTextField, so their setter widens to string | number; and the matrix-name select spreads a modelExtra that lacks notAvailable, hoverInfo and error, so its option prop carries a @ts-expect-error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-cards TypeScript input-file cards
Type the run panels
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The error dialog, the app and the page entry gain explicit types; the error dialog's propTypes and the direct prop-types dependency go. The typecheck baseline is now empty. Input's run type reuses the card props it passes on, so the real Run checks against it. Two card fields the store does not have are widened to optional: the tree's loading flag (never set) and the final alignment's numSequencesParsed (parsing is always complete there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TypeScript app shell
The page, preload and alignment parsers are all TypeScript, so the renderer build no longer treats .js as JSX: drop the dep scanner's moduleTypes override and plugin-react's Babel plugins. Vite's own transform emits native class fields under useDefineForClassFields. Delete scripts/page-store-coverage.js. It reads store decorators (line 50) from src/app/store/*.js (line 12); the store has neither and nothing runs the script. Part of #236. Closes #253. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-out Close out the page TypeScript move
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-members Give the matrix-name select its notAvailable, hoverInfo and error
…ver defines (#267) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-flag-name Delete FinalAlignment.modelFlagName (#267)
Nothing outside tests read the run's numSites, and it summed Alignment objects instead of site counts. Remove the getter, its annotation and the tests that exercised it. Closes #259. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…282) Make notAvailable optional and allow number choice titles, type the select-option fields of ModelRun and RaxmlRun as OptionSelectOptionLike, and drop the casts. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Only a test read it; it just aliased length. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Delete unused Run.numSites Nothing outside tests read the run's numSites, and it summed Alignment objects instead of site counts. Remove the getter, its annotation and the tests that exercised it. Closes #259. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Delete unused Alignment.numSites Only a test read it; it just aliased length. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Page, the preload and the three alignment parsers move from JavaScript to TypeScript, one feature branch, no behaviour change.
window.rendererBridgeis read with no cast (globalWindowdeclaration).no-explicit-anyand the full-typing rules now cover all TypeScript undersrc.tsconfig.jsonunchanged (strict/noImplicitAnystay off).Evidence
After:
scripts/typecheck-baseline.txtis empty; the Build/release CI run on this branch is green, and the existing Jest suites pass.Merge Danger
Door: two-way
A revert restores the JavaScript files; no data, config format or IPC channel changes.
Blast Radius: wide (78 files, ~1.7k lines), but types-only
Renames touch nearly every Page file, so any open branch editing those files will conflict.
yarn.lockgains@types/lodashand@types/d3-array; the Electron build config drops its JSX-in-.jshandling.🤖 Generated with Claude Code