Skip to content

Node Info panel shows "Type: unknown" / "Source: -" for every node (field name mismatch in generated graph.html) #3914

Closed

Description

@SaymonSilva-hotmart

Bug: Node Info panel shows Type: unknown and Source: - for every node (field name mismatch in generated graph.html)

Summary

In the generated graph.html visualization, clicking any node shows a Node Info panel where Type is always unknown and Source is always -, even though the underlying graph.json has correct file_type and source_file values for every node.

Root cause: the Node Info click handler reads node fields with a leading underscore (n._file_type, n._source_file, n._community_name, n._degree), but the node objects embedded in the HTML (and in graph.json) use the non-underscore keys (file_type, source_file, community_name, degree).

Version

  • graphifyy 0.9.71 (installed via uvx --from graphifyy graphify)

Evidence

Generated graph.html — Node Info handler (reads _-prefixed keys):

document.getElementById('info-content').innerHTML = `
  <div class="field"><b>${esc(n.label)}</b></div>
  <div class="field">Type: ${esc(n._file_type || 'unknown')}</div>
  <div class="field">Community: ${esc(n._community_name)}</div>
  <div class="field">Source: ${esc(n._source_file || '-')}</div>
  <div class="field">Degree: ${n._degree}</div>

The embedded node data in the same graph.html (and in graph.json) uses non-underscore keys. Counting occurrences in the generated HTML:

 502 "community_name":
 502 "degree":
 502 "file_type":
 502 "source_file":

(zero occurrences of _file_type / _source_file / _community_name / _degree in the data.)

A sample node object (graph.json):

{
  "id": "packages_app_src_leaddetailview",
  "label": "LeadDetailView.tsx",
  "community_name": "LeadDetailView.tsx",
  "file_type": "code",
  "source_file": "packages/app/src/LeadDetailView.tsx",
  "source_location": "L1"
}

Keys present: id, label, _origin, community, community_name, file_type, norm_label, source_file, source_location. There is no _file_type, _source_file, _community_name, or _degree.

Impact

  • Every node's Node Info shows Type: unknown and Source: -, making the panel effectively useless for identifying what a node is or where it lives — which is one of the main navigation affordances of the HTML export.
  • Affects all languages/repos, since it's purely a field-name mismatch in the generator.

Expected

Node Info should read the same keys that are emitted into the node objects, e.g.:

<div class="field">Type: ${esc(n.file_type || 'unknown')}</div>
<div class="field">Community: ${esc(n.community_name)}</div>
<div class="field">Source: ${esc(n.source_file || '-')}</div>
<div class="field">Degree: ${n.degree}</div>

Suggested fix

In the HTML generator template, drop the leading underscore from the four Node Info fields (_file_type → file_type, _source_file → source_file, _community_name → community_name, _degree → degree) — or, conversely, emit the node objects with underscore-prefixed keys. The two sides just need to agree; the non-underscore form matches graph.json, so aligning the handler to the data is the smaller change.

Notes

  • Community may appear correct in some builds via the vis.js tooltip/title, but the click-panel handler is still inconsistent with the emitted data.
  • Happy to send a PR aligning the handler to the non-underscore keys if useful.

Activity

  1. github-actions commented on Sep 29, 2026

    @github-actions

    Thanks for opening this issue, @SaymonSilva-hotmart. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  2. safishamsi commented on Sep 29, 2026

    @safishamsi
    Member
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions