-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Context
Root cause fix for this error: #41
For now we'll just fix to get the visualization working again, but I had claude write this user story to come back to later.
The current visualization places a pseudo-repository node ("DevSeed Team") at the center, with all contributors linked to it via synthetic links. Every real repository orbits this hub. This pattern was inherited from the original ORCA visualization, where a central node represented the award program. For our use case, this node doesn't represent a real repository — it's a fabricated anchor point.
Desired Outcome
The visualization should render as a force-directed network where repositories and contributors are positioned based on their actual collaboration relationships, without a single artificial center. The layout should naturally cluster around highly-connected repos and contributors.
Scope of Change
Configuration (config.toml)
- Remove
central_repositoryfield - Update
Configmodel inpython/contributor_network/config.pyto remove the field
Data Generation (python/contributor_network/cli.py)
- Stop generating the synthetic central repo entry in
repositories.csv - Stop generating synthetic contributor-to-central links in
links.csv - These are created at lines 93-104 (repo) and 116-124 (links)
JavaScript — Data Preparation (js/data/prepare.js)
- Remove central repo lookup and validation (lines 325-331)
- Remove central repo exclusion from owner group creation (line 416)
- Rethink how the visualization finds its "anchor" — may need a different layout strategy
JavaScript — Force Simulation (js/simulations/collaborationSimulation.js)
- Remove special central node handling in force simulation (line 70, 107)
- Will need a new positioning strategy — possibly multi-focal or gravity-based
JavaScript — Rendering (js/render/draw.js)
- Remove central node exclusion from rendering pipeline (line 118)
- Remove central link filtering (line 143)
- Remove central node lookup for contributor ring positioning (line 156)
- Remove central label skip (line 191)
- The contributor ring positioning currently depends on the central node's position — needs a replacement anchor
JavaScript — Rendering (js/render/shapes.js)
- Remove
IS_CENTRALdetection and muted styling (lines 84-87)
JavaScript — Interactions (js/interaction/hover.js, click.js)
- Remove central node guards from hover (line 53) and click (line 69) handlers
- All nodes become interactive
JavaScript — Main Chart (js/chart.js)
- Remove
REPO_CENTRALvariable declaration (line 137) - Remove
chart.repository()accessor (lines 1291-1292) - Remove central node exclusions in filter logic (line 691)
- Remove central exclusions in link filtering (lines 1002, 1018)
- Remove central exclusions in neighbor calculations (line 1012)
- Remove central handling in rebuild (lines 1329, 1360, 1391)
- Update
createContributorNetworkVisual()signature — removeinitial_repo_centralparameter
JavaScript — Layout (js/layout/resize.js)
- Contributor ring positioning currently uses the central node as the origin — needs a replacement
Templates
index.html: RemoveREPOSITORYconstant, updatecreateContributorNetworkVisual()callindex.html.jinja: Remove{{ central_repository }}usage, update function call- Both: The title "The Contributor Network of [DevSeed Team]" needs rethinking
Key Risks
- Layout collapse: Without a central anchor, the force simulation may not converge to a readable layout. Will need experimentation with multi-focal forces or gravity wells.
- Contributor ring: Contributors are currently arranged in a ring around the central node. Without it, contributor positioning needs a completely different strategy.
- Scale factor calculations:
SF(scale factor) and radius calculations reference the central node's position. These need new reference points. - Filter behavior: The central node is always preserved during org filtering. Removing it changes how filtered views look.
Suggested Approach
- Start by replacing the single central node with a gravity-based layout (e.g.,
d3.forceCenter()ord3.forceRadial()) - Test with the existing dataset to see if the layout is readable
- Progressively remove
REPO_CENTRALreferences file by file - Keep the contributor ring concept but anchor it to the viewport center instead of a node
- Visual regression test at each step
Acceptance Criteria
- No synthetic "DevSeed Team" node appears in the visualization
- All real repositories and contributors are visible and interactive
- The layout is readable and doesn't collapse into a ball
- Org filtering still works
- Hover and click interactions work on all nodes
- No console errors