Skip to content

Commit a203177

Browse files
ABCrimsonclaude
andcommitted
fix: resolve CI build and test failures from noImplicitReturns and mockReset
Add explicit `return undefined` to useEffect callbacks that conditionally return cleanup functions (pde, shortcuts-modal, command-palette, webgpu-heatmap). Remove `mockReset: true` from API vitest config since it clears module-level mock implementations between tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d6c5cd7 commit a203177

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

apps/api/vitest.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export default defineConfig({
77
passWithNoTests: true,
88
restoreMocks: true,
99
clearMocks: true,
10-
mockReset: true,
1110
include: ['src/**/*.{test,spec}.{ts,tsx}'],
1211
exclude: ['node_modules', 'dist'],
1312
coverage: {

apps/web/app/[locale]/pde/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ export default function PDESolverPage() {
517517
}
518518
};
519519
}
520+
return undefined;
520521
}, [isPlaying, simulationData, playbackSpeed]);
521522

522523
/**

apps/web/components/calculator/shortcuts-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ export function ShortcutsModal({ registerGlobalHotkey = true }: ShortcutsModalPr
313313
}
314314
};
315315
}
316+
return undefined;
316317
}, []);
317318

318319
const dismissOnboarding = useCallback(() => {

apps/web/components/layout/command-palette.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ export function CommandPalette({ className }: CommandPaletteProps) {
600600
});
601601
return () => cancelAnimationFrame(raf);
602602
}
603+
return undefined;
603604
}, [open]);
604605

605606
// Reset activeIndex when results change

apps/web/components/plots/webgpu-heatmap.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ export function WebGPUHeatmap({
890890
{ width: cols, height: rows },
891891
);
892892
}
893+
return undefined;
893894
}, [data, gpuSolverEnabled, dataVersion]);
894895

895896
// -------------------------------------------------------------------------
@@ -1048,6 +1049,7 @@ export function WebGPUHeatmap({
10481049
size: rows * cols * 4,
10491050
usage: GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST,
10501051
});
1052+
return undefined;
10511053
}, [gpuSolverEnabled, equationType, gpuAvailable, dataVersion, data, solverAlpha]);
10521054

10531055
// -------------------------------------------------------------------------

0 commit comments

Comments
 (0)