Skip to content

Fix frontend CI build break by aligning SimulationFrame type with visualizer usage - #96

Merged
Sanan507 merged 2 commits into
masterfrom
copilot/fix-frontend-actions-job
Aug 2, 2026
Merged

Fix frontend CI build break by aligning SimulationFrame type with visualizer usage#96
Sanan507 merged 2 commits into
masterfrom
copilot/fix-frontend-actions-job

Conversation

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The frontend GitHub Actions job failed during TypeScript build because CanvasVisualizer reads frame.comparing, but SimulationFrame did not define that field. This PR updates the shared frame type so the existing visualization logic type-checks correctly.

  • Type contract alignment

    • Added optional comparing?: number[] to SimulationFrame in frontend/src/models/types.ts.
    • Keeps compatibility with frames that only provide highlight while supporting code paths already using comparing.
  • Why this unblocks CI

    • Removes TS2339 in CanvasVisualizer.tsx without changing runtime behavior.
export type SimulationFrame = {
  frame: number;
  array: number[];
  highlight: number[];
  comparing?: number[]; // added
  // ...
};

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
algorithm-race-visualizer Ready Ready Preview Aug 2, 2026 8:38am

Copilot AI changed the title [WIP] Fix failing GitHub Actions job frontend Fix frontend CI build break by aligning SimulationFrame type with visualizer usage Aug 2, 2026
Copilot AI requested a review from Sanan507 August 2, 2026 08:38
@Sanan507
Sanan507 marked this pull request as ready for review August 2, 2026 08:41
@Sanan507
Sanan507 merged commit c80293e into master Aug 2, 2026
4 checks passed
@Sanan507
Sanan507 deleted the copilot/fix-frontend-actions-job branch August 2, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants