Skip to content

Inventory the in-scope files for the page TypeScript conversion #226

Closed

Description

@jtklein-agents

Question

For every in-scope production file (see the map's Notes): what does it import and what imports it, giving a leaf-first order? How many diagnostics does each file gain under tsc --noImplicitAny? Which third-party packages the page imports ship no types? Which tests, scripts, or config entries open an in-scope file by fixed path or extension and would break on a rename?

Activity

  1. added
    wayfinder:task
    on Nov 16, 2026
  2. jtklein-agents commented on Nov 16, 2026

    @jtklein-agents
    OwnerAuthor

    Resolution

    Full inventory: docs/research/page-typescript-inventory.md on research/page-ts-inventory (measured on master at b0d2729, MobX 7.1.7, TypeScript 5.9.3).

    Set. 40 files, 7,976 lines. 14 hold JSX (.tsx targets), 26 do not.

    Import graph and order. No import cycles. Leaf-first by depth (a file imports in-scope files only from lower depths):

    • Depth 0 (21 files): the panels AlignmentCard, AstralTreeCard, CitationModal, Console, Model, PartitionEditor, PartitionFileCard, Raxml, TreeCard; helpers paths, promisedComputed, report; store Citation, FinalPartition, host, Option, StoreBase; the three src/common parsers; src/preload/index.js.
    • Depth 1 (9): githubIssue, Input, Output, store AlignmentOptions, Config, FinalAlignment, InputFile, PartOptions, RunOptions.
    • Depth 2 (4): components/ErrorDialog, store AppStore, AstralTree, Partition.
    • Depths 3 to 8, one file each: store/Alignment → store/Run → store/RunList → store/index → App → app/index.

    --noImplicitAny. Plain tsc reports 26 diagnostics, all in in-scope files. With --noImplicitAny it reports 475: 449 extra, 414 of them in in-scope files. Heaviest: store/RunOptions.js 89, store/Run.js 59, preload/index.js 46, store/Alignment.js 26, store/AlignmentOptions.js 16, common/typecheckAlignment.js 16, Input.js 15 (267 of the 414). 62 of the extras are TS2339 on this.run in the option classes, typed Object by the JSDoc at store/Option.js:7. The counts are for .js files: 47 JSDoc type lines and 14 propTypes assignments feed tsc today and stop doing so in a .ts file.

    Untyped packages. Two: lodash (lodash/union, lodash/intersection in store/FinalAlignment.js:2-3, lodash/remove in store/Run.js:39) and d3-array (store/RunOptions.js:2). No @types/* for either. prop-types resolves only through a transitive @types/prop-types.

    Fixed paths that break on a rename.

    • src/pageNodeImports.test.js:41, :42, :46 read app/store/Alignment.js, app/store/Run.js, app/index.js by path.
    • scripts/page-store-coverage.js:12 and :19 select store files by .js.
    • scripts/typecheck-baseline.txt:1-31: all 26 baseline diagnostics sit in five in-scope files (App.js 3, store/AlignmentOptions.js 3, store/index.js 1, store/Option.js 1, store/RunOptions.js 18). scripts/typecheck-baseline.js has a --rename mode.

    Not affected: the preload entry (electron-vite finds src/preload/index.{js,ts,mjs,cjs}; the tests read the built out/preload/index.js), jest.config.js, the package.json lint globs, and every import specifier (none carries .js). A rename does change lint: .eslintrc.cjs:37 applies the TypeScript rules to every renamed file, and .eslintrc.cjs:74 applies the main-process rules to the three src/common parsers but not to src/app or src/preload. There is no src/packagingBridge.test.js on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:task

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions