You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the test-coverage work tracked in #38, which flagged that explorer/src/app/components/Graph.tsx node selection may need Playwright rather than the existing Vitest + jsdom setup, since the component renders via react-force-graph-2d/3d-force-graph on canvas/WebGL — surfaces jsdom does not implement.
Problem
Graph.tsx has zero automated coverage today. Before writing tests, someone needs to decide the right tool:
jsdom + mocked force-graph library — mock react-force-graph-2d/3d-force-graph entirely and unit-test the selection callback wiring (onNodeClick, the useEffects syncing selectedData/selectedNode into local state) in isolation from the actual canvas rendering. Cheap, but doesn't exercise real rendering.
Playwright (or similar browser-based runner) — exercise real canvas/WebGL rendering and click-to-select interaction end-to-end. More realistic, but is new test infrastructure/tooling for this repo, which is a maintainer call, not something to add unilaterally in a maintenance slice.
Scope
Decide which approach fits this repo (or whether both are warranted: an isolated logic test now, browser testing later).
Implement the chosen automated coverage for node-selection behavior in Graph.tsx.
Acceptance criteria
Node-selection logic in Graph.tsx is exercised by an automated test that runs in CI without live credentials, or
If new tooling (e.g. Playwright) is the right call, that decision is made explicitly (not guessed at) before implementation, since introducing a new test runner/browser dependency is a bigger footprint than a single test file.
Related to Expand explorer test coverage (Graph, API routes, streaming) #38
Background
Part of the test-coverage work tracked in #38, which flagged that
explorer/src/app/components/Graph.tsxnode selection may need Playwright rather than the existing Vitest + jsdom setup, since the component renders viareact-force-graph-2d/3d-force-graphon canvas/WebGL — surfaces jsdom does not implement.Problem
Graph.tsxhas zero automated coverage today. Before writing tests, someone needs to decide the right tool:react-force-graph-2d/3d-force-graphentirely and unit-test the selection callback wiring (onNodeClick, theuseEffects syncingselectedData/selectedNodeinto local state) in isolation from the actual canvas rendering. Cheap, but doesn't exercise real rendering.Scope
Graph.tsx.Acceptance criteria
Graph.tsxis exercised by an automated test that runs in CI without live credentials, orRelated to Expand explorer test coverage (Graph, API routes, streaming) #38