Skip to content

Decide on and add coverage for Graph.tsx node-selection behavior #73

Description

@pinecone-groundskeeper

Background

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

Generated by GitHub Maintenance Fixer · sonnet50 · 117.2 AIC · ⌖ 8.31 AIC · ⊞ 9.4K · ◷

Activity

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

    maintenanceIn scope for the maintenance agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions