Skip to content

Run.numSites sums Alignment objects instead of site counts #259

Closed

Description

@jtklein-agents

Found while typing the run store (#248, PR #258).

Problem

src/app/store/Run.ts:1440:

get numSites(): number {
  return this.alignments.reduce( ( sum, n ) => sum + n, 0 );
}

n is an Alignment, not a number, so sum + n concatenates object strings ("0[object Object]") instead of adding Alignment.numSites. Run.computeds.test.js only checks the empty case (0), so it passes. tsc reports TS2365; #258 keeps the behaviour under @ts-expect-error.

Expected

numSites is the total site count across the run's alignments (sum + n.numSites). Check whether any page reads Run.numSites before choosing the fix; git grep numSites shows no non-test reader of the run's value today.

Acceptance criteria

  • Run.numSites returns the sum of each alignment's numSites
  • A Jest test covers two or more alignments
  • The @ts-expect-error above the reduce is removed

Activity

  1. added
    bug
    needs-triage
    on Nov 17, 2026
  2. added a commit that references this issue on Nov 19, 2026
    e4e8bda
  3. added a commit that references this issue on Nov 22, 2026
    2044cbc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions