Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
6d3264c
Fail CI on implicit any in TypeScript and apply full-typing lint to a…
jtklein-agents Nov 16, 2026
5187d88
Add cut-worktree script and a spawn test for the second typecheck pass
jtklein-agents Nov 16, 2026
780e95a
Label the clear console icon with titleAccess
jtklein-agents Nov 16, 2026
03c23f0
Merge pull request #255 from jtklein-agents/234-clear-console-icon-title
jtklein-agents Nov 16, 2026
86b79e3
Return a validation error or null from MultistateNumber.error (#235)
jtklein-agents Nov 16, 2026
a9f7145
Merge pull request #254 from jtklein-agents/237-no-implicit-any-check
jtklein-agents Nov 16, 2026
d223b17
Rename the preload to TypeScript
jtklein-agents Nov 16, 2026
91dc86b
Merge pull request #256 from jtklein-agents/235-multistate-number-error
jtklein-agents Nov 16, 2026
e2f34e8
Declare the renderer bridge type and type the preload
jtklein-agents Nov 16, 2026
a1542a2
Merge pull request #257 from jtklein-agents/238-renderer-bridge-type-…
jtklein-agents Nov 16, 2026
eac0412
Rename the run list and the store entry to TypeScript
jtklein-agents Nov 16, 2026
6b6b26f
Rename the run store to TypeScript
jtklein-agents Nov 17, 2026
d7d5b17
Type the run store
jtklein-agents Nov 17, 2026
ea61d9a
Type the run list and the store entry
jtklein-agents Nov 17, 2026
d77296c
Add a --write mode to the typecheck baseline script
jtklein-agents Nov 17, 2026
d163682
Merge pull request #258 from jtklein-agents/248-typescript-run-store
jtklein-agents Nov 17, 2026
7a9da45
Merge spec/236-page-typescript into 249-typescript-run-list-and-store…
jtklein-agents Nov 17, 2026
22b7380
Rewrite the App baseline line for the typed run list
jtklein-agents Nov 17, 2026
ebbb2f2
Merge pull request #260 from jtklein-agents/249-typescript-run-list-a…
jtklein-agents Nov 17, 2026
3e9b38b
Rename the alignment parsers to TypeScript
jtklein-agents Nov 16, 2026
2b3a304
Type the alignment parsers and typecheck
jtklein-agents Nov 17, 2026
bf9676e
Rename Option.js to Option.ts
jtklein-agents Nov 16, 2026
eb4c6c5
Type the option base as a generic class
jtklein-agents Nov 17, 2026
a759d0d
Return a ValidationError from MultistateNumber
jtklein-agents Nov 17, 2026
03bae65
Rename page helpers to TypeScript
jtklein-agents Nov 16, 2026
7ba9cfd
Type the page helpers
jtklein-agents Nov 17, 2026
6cfdefc
Merge pull request #261 from jtklein-agents/240-typescript-alignment-…
jtklein-agents Nov 17, 2026
19ab633
Merge pull request #262 from jtklein-agents/239-typescript-option-base
jtklein-agents Nov 17, 2026
bb763b5
Merge pull request #263 from jtklein-agents/241-typescript-page-helpers
jtklein-agents Nov 17, 2026
0ef4fea
Rename alignment and part options to TypeScript
jtklein-agents Nov 17, 2026
b399a3c
Rename run options to TypeScript
jtklein-agents Nov 17, 2026
ee0a2fe
Type the alignment and part options
jtklein-agents Nov 17, 2026
e28bb67
Type the run options
jtklein-agents Nov 17, 2026
a521dd3
Rename the Page store bases to TypeScript
jtklein-agents Nov 16, 2026
0962900
Type the Page store bases
jtklein-agents Nov 17, 2026
2055c8b
Merge pull request #266 from jtklein-agents/242-typescript-store-bases
jtklein-agents Nov 17, 2026
8ab652e
Merge pull request #265 from jtklein-agents/244-typescript-run-options
jtklein-agents Nov 17, 2026
657907b
Merge pull request #264 from jtklein-agents/243-typescript-alignment-…
jtklein-agents Nov 17, 2026
285a454
Rename the final alignment to TypeScript
jtklein-agents Nov 17, 2026
8d49278
Type the final alignment
jtklein-agents Nov 17, 2026
8598c9e
Rename the partition family to TypeScript
jtklein-agents Nov 16, 2026
7b9c4c7
Shelter the Alignment.js option calls in the typecheck baseline
jtklein-agents Nov 17, 2026
673cbc6
Type the partition family
jtklein-agents Nov 17, 2026
f300846
Merge pull request #268 from jtklein-agents/246-typescript-final-alig…
jtklein-agents Nov 17, 2026
6b57cbc
Rename the alignment store to TypeScript
jtklein-agents Nov 16, 2026
c04e328
Merge remote-tracking branch 'origin/spec/236-page-typescript' into 2…
jtklein-agents Nov 17, 2026
44c49cb
Type the alignment store
jtklein-agents Nov 17, 2026
9eb13f2
Type what FinalAlignment hands to FinalPartition
jtklein-agents Nov 17, 2026
490bd2d
Merge pull request #271 from jtklein-agents/247-typescript-alignment-…
jtklein-agents Nov 17, 2026
a0a62a9
Merge pull request #270 from jtklein-agents/245-typescript-partition-…
jtklein-agents Nov 17, 2026
726060b
Rename the input-file cards to TypeScript
jtklein-agents Nov 17, 2026
51c3879
Rename the run panels to TypeScript
jtklein-agents Nov 17, 2026
18b6e04
Type the run panels
jtklein-agents Nov 17, 2026
159875b
Type the input-file cards
jtklein-agents Nov 17, 2026
c728dd4
Merge pull request #275 from jtklein-agents/250-typescript-input-file…
jtklein-agents Nov 17, 2026
e3f2795
Merge pull request #276 from jtklein-agents/251-typescript-run-panels
jtklein-agents Nov 17, 2026
7624104
Rename the app shell to TypeScript
jtklein-agents Nov 17, 2026
f25db54
Type the app shell
jtklein-agents Nov 17, 2026
bea7308
Merge pull request #277 from jtklein-agents/252-typescript-app-shell
jtklein-agents Nov 17, 2026
47a1407
Close out the page TypeScript move
jtklein-agents Nov 17, 2026
7ce017a
Merge pull request #279 from jtklein-agents/253-page-typescript-close…
jtklein-agents Nov 17, 2026
d599ba0
Give the matrix-name select its notAvailable, hoverInfo and error (#273)
jtklein-agents Nov 18, 2026
03c0d8e
Carry notAvailable, hoverInfo and error on modelExtra (#273)
jtklein-agents Nov 18, 2026
8cdaca1
Merge pull request #280 from jtklein-agents/273-matrix-select-missing…
jtklein-agents Nov 18, 2026
cef0029
Delete FinalAlignment.modelFlagName, which read a member Alignment ne…
jtklein-agents Nov 18, 2026
035a1cd
Merge pull request #283 from jtklein-agents/267-final-alignment-model…
jtklein-agents Nov 18, 2026
80139ee
Delete unused Run.numSites
jtklein-agents Nov 18, 2026
ebff31c
Remove the tree card spinner that the store never drives (#278) (#281)
jtklein-agents Nov 18, 2026
92b1a36
Match OptionSelect's option type to the run's select options (#274) (…
jtklein-agents Nov 18, 2026
69945eb
Delete unused Alignment.numSites
jtklein-agents Nov 18, 2026
e4e8bda
Delete unused Run.numSites and Alignment.numSites (#284)
jtklein-agents Nov 19, 2026
d36ccaf
Remove the cut-worktree script, which stays local
jtklein-agents Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = {
default: 'array',
},
],
'@typescript-eslint/no-explicit-any': 'error',
'import/consistent-type-specifier-style': [
'error',
'prefer-top-level',
Expand All @@ -70,8 +71,8 @@ module.exports = {
},
},
{
// Main TypeScript (#67): full typing under non-strict — typed catch, typed exports.
files: ['src/main/**/*.{ts,tsx}', 'src/common/**/*.{ts,tsx}'],
// Full typing under non-strict for all TypeScript (#67 main process, #236 page): typed catch, typed exports.
files: ['src/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'error',
'no-restricted-syntax': [
Expand Down
2 changes: 1 addition & 1 deletion e2e/modeltest-outcome.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { checkFixture } = require('./helpers/fixtures');
const outputDir = path.join(repoRoot, 'static', 'test-results');
const modelTestOutput = path.join(outputDir, 'RAxML_GUI_ModelTest_nucleotide');

// Same choice as src/app/store/Run.js
// Same choice as src/app/store/Run.ts
const binary =
process.platform === 'win32'
? 'modeltest-ng.exe'
Expand Down
19 changes: 1 addition & 18 deletions electron.vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,8 @@ export default defineConfig( ( { command } ) => ( {
filenamify: resolve( __dirname, 'node_modules/filenamify/filenamify.js' ),
},
},
optimizeDeps: {
// The page keeps JSX in .js files. The dep scanner parses those only when .js is jsx.
rolldownOptions: {
moduleTypes: {
'.js': 'jsx',
},
},
},
plugins: [
// plugin-react 5: its babel option compiles JSX in .js files. 6 dropped babel.
// Vite's oxc parser does not treat .js as JSX.
react( {
babel: {
plugins: [
['@babel/plugin-proposal-class-properties', { loose: false }],
['@babel/plugin-transform-react-jsx', { runtime: 'automatic' }],
],
},
} ),
react(),
...sourceMapUpload( command ),
],
build: {
Expand Down
2 changes: 1 addition & 1 deletion jest/babelTransform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const babelJest = require( 'babel-jest' );

// Plugins match the page build. preset-env and preset-typescript
// Define-semantics class fields and the automatic JSX runtime, as the page build emits. preset-env and preset-typescript
// are what Jest needs to load the page's ESM and .tsx imports.
module.exports = babelJest.default.createTransformer( {
babelrc: false,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"postinstall-postinstall": "^2.1.0",
"prismjs": "^1.30.0",
"prismjs-bibtex": "^2.1.0",
"prop-types": "^15.8.1",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-dropzone": "^20.2.0",
Expand All @@ -94,6 +93,8 @@
"@electron/notarize": "^3.1.2",
"@sentry/bundler-plugins": "11.12.0",
"@sentry/cli": "^3.8.2",
"@types/d3-array": "^3.2.2",
"@types/lodash": "^4.17.27",
"@types/node": "^22.19.1",
"@types/prismjs": "^1.26.5",
"@types/react": "^19.2.7",
Expand Down
79 changes: 0 additions & 79 deletions scripts/page-store-coverage.js

This file was deleted.

56 changes: 43 additions & 13 deletions scripts/typecheck-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,38 @@ function renameLines(known, actual, from, to) {
return { renamed, missing };
}

function main() {
if (!fs.existsSync(baselinePath)) {
console.error('typecheck baseline is missing: ' + baselinePath);
process.exit(1);
}
const baseline = diagnosticLines(fs.readFileSync(baselinePath, 'utf8'));
if (baseline.length === 0) {
console.error('typecheck baseline is empty: ' + baselinePath);
process.exit(1);
}
/** Keep tsc diagnostics (and their continuation lines) reported in a .ts or .tsx file. */
function typeScriptLines(lines) {
let inTypeScript = false;
return lines.filter((line) => {
const match = /^(src\/\S+?)\(/.exec(line);
if (match) {
inTypeScript = /\.tsx?$/.test(match[1]);
}
return inTypeScript;
});
}

function runTsc(args) {
const tsc = path.join(root, 'node_modules', 'typescript', 'bin', 'tsc');
const result = spawnSync(process.execPath, [tsc, '--noEmit', '--pretty', 'false'], {
const result = spawnSync(process.execPath, [tsc, '--noEmit', '--pretty', 'false', ...args], {
cwd: root,
encoding: 'utf8',
});
if (result.error || (result.status !== 0 && result.status !== 2)) {
console.error(result.error || result.stderr || result.stdout);
process.exit(result.status || 1);
}
const actual = diagnosticLines(`${result.stdout || ''}\n${result.stderr || ''}`);
return diagnosticLines(`${result.stdout || ''}\n${result.stderr || ''}`);
}

function main() {
if (!fs.existsSync(baselinePath)) {
console.error('typecheck baseline is missing: ' + baselinePath);
process.exit(1);
}
const baseline = diagnosticLines(fs.readFileSync(baselinePath, 'utf8'));
const actual = runTsc([]);
const renameAt = process.argv.indexOf('--rename');
if (renameAt !== -1) {
const [from, to] = process.argv.slice(renameAt + 1, renameAt + 3);
Expand All @@ -105,6 +117,21 @@ function main() {
fs.writeFileSync(baselinePath, renamed.join('\n') + '\n');
return;
}
if (process.argv.includes('--write')) {
const typed = typeScriptLines(actual);
if (typed.length) {
console.error('a .ts/.tsx file has diagnostics:\n' + typed.join('\n'));
process.exit(1);
}
fs.writeFileSync(baselinePath, actual.join('\n') + '\n');
return;
}
// Second pass: no allowlist. A .ts/.tsx file may not have any diagnostic under --noImplicitAny.
const implicitAny = typeScriptLines(runTsc(['--noImplicitAny']));
if (implicitAny.length) {
console.error('noImplicitAny:\n' + implicitAny.join('\n'));
process.exitCode = 1;
}
const fresh = freshLines(actual, baseline);
const unused = unusedLines(baseline, actual);
if (fresh.length || unused.length) {
Expand All @@ -116,10 +143,13 @@ function main() {
}
process.exit(1);
}
if (process.exitCode) {
process.exit(process.exitCode);
}
}

if (require.main === module) {
main();
}

module.exports = { diagnosticLines, freshLines, unusedLines, ownedFingerprints, renameLines };
module.exports = { typeScriptLines, diagnosticLines, freshLines, unusedLines, ownedFingerprints, renameLines };
33 changes: 0 additions & 33 deletions scripts/typecheck-baseline.txt
Original file line number Diff line number Diff line change
@@ -1,33 +0,0 @@
src/app/App.js(322,24): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: { component: ElementType<any, keyof IntrinsicElements>; } & SvgIconOwnProps & CommonProps & Omit<any, "fontSize" | ... 10 more ... | "titleAccess">): Element', gave the following error.
Property 'component' is missing in type '{ onClick: any; sx: { '&:hover': { color: "#999"; }; }; title: string; }' but required in type '{ component: ElementType<any, keyof IntrinsicElements>; }'.
Overload 2 of 2, '(props: DefaultComponentProps<SvgIconTypeMap<{}, "svg">>): Element', gave the following error.
Type '{ onClick: any; sx: { '&:hover': { color: "#999"; }; }; title: string; }' is not assignable to type 'IntrinsicAttributes & SvgIconOwnProps & CommonProps & Omit<SVGProps<SVGSVGElement>, "fontSize" | ... 10 more ... | "titleAccess">'.
Property 'title' does not exist on type 'IntrinsicAttributes & SvgIconOwnProps & CommonProps & Omit<SVGProps<SVGSVGElement>, "fontSize" | ... 10 more ... | "titleAccess">'.
src/app/App.js(466,12): error TS2739: Type '{ error: any; onClose: any; }' is missing the following properties from type '{ error: any; onClose: any; needReload: any; title: any; }': needReload, title
src/app/App.js(512,10): error TS2741: Property 'needReload' is missing in type '{ error: any; title: any; onClose: () => void; }' but required in type '{ error: any; onClose: any; needReload: any; title: any; }'.
src/app/App.test.js(5,1): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
src/app/App.test.js(13,3): error TS2304: Cannot find name 'expect'.
src/app/store/AlignmentOptions.js(10,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/AlignmentOptions.js(37,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/AlignmentOptions.js(121,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/index.js(5,8): error TS2551: Property 'store' does not exist on type 'Window & typeof globalThis'. Did you mean 'Storage'?
src/app/store/Option.js(12,14): error TS2304: Cannot find name 'yup'.
src/app/store/RunOptions.js(265,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(278,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(293,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(300,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(310,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(320,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(340,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(384,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(396,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(409,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(446,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/RunOptions.js(506,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/RunOptions.js(541,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/RunOptions.js(572,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/RunOptions.js(617,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(649,5): error TS2554: Expected 5-6 arguments, but got 4.
src/app/store/RunOptions.js(668,5): error TS2554: Expected 5-6 arguments, but got 3.
src/app/store/RunOptions.js(680,5): error TS2554: Expected 5-6 arguments, but got 4.
Loading
Loading