Skip to content

Feature: Add "Code Churn / Hotspots" Heatmap Mode to Dependency Graph #2359

@25032007

Description

@25032007

Is your feature request related to a problem? Please describe.

The current CodeDependencyGraph combined with the TimeTravelTimeline does a fantastic job of visualizing the repository structure and highlighting file changes on a per-commit basis. However, there is currently no way to visualize aggregate file churn over time. Users cannot easily see which parts of the codebase are modified the most frequently across the entire history.

Describe the solution you'd like

I propose adding a "Hotspots" or "Code Churn" Heatmap toggle to the graph visualization. When activated, the graph would colorize (and potentially resize) nodes based on how often they have been changed throughout the repository's commit history.

Proposed Implementation Steps:

  1. Analytics Calculation: Iterate through repository.commits to build a frequency map of changes per file path.
  2. UI Toggle: Add a "Heatmap Mode" or "Show Hotspots" toggle within the MapControls or FilterPanel in CodeDependencyGraph.tsx.
  3. D3 Rendering Update:
    • When the heatmap mode is active, map the node fill color using a D3 sequential color scale (e.g., d3.interpolateInferno or a custom cold-to-hot scale) based on the file's churn frequency instead of the default typeColors (purple/blue).
    • Optional: Scale the node's radius (r) slightly based on the churn metric.
  4. Tooltip Enhancement: Update the node hover tooltip to display the "Total Commits" or "Change Frequency" metric alongside the file name and path.

Describe alternatives you've considered

An alternative would be to just list the most changed files in a side panel, but mapping this data directly onto the dependency graph provides much better context, showing if highly volatile files are tightly coupled or centralized in specific directories.

Additional context

This feature would add massive analytical value to Gitverse. It allows developers to immediately spot heavily worked-on modules, identify unstable "god objects" in the architecture, and visually understand where the team's effort is concentrated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestuiThis is a ui change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions