Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: graphify tree ignores the repo tag on merged graphs: no per-repo roots, and identical relative paths from different repos collapse together

Open Beginner friendly
#4,524 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@AromalBiju1 is already working on this.

Since Oct 17, 2026.

  • #4525 by @AromalBiju1 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in tree_html.py at build_tree, which currently ignores the merged nodes’ repo attribute; then read the tree tests in tests/test_tree_html.py. Reproduce with two repos that share src/engine.py and inspect whether their nodes collapse into one file node. Done when the tree shows separate repo roots and preserves each repo’s directory and file hierarchy, including with --root.

Written by the indexing model from the issue text.

Description

bug
Pre-flight checks
  • I have checked the Troubleshooting section in the README
What happened?

On a graph produced by graphify merge-graphs, graphify tree does not use the repo attribute that merge-graphs sets on every node. As a result:

  1. There are no per-repo roots. The root is the common prefix of the repo-relative source_file values, which is empty when the repos differ, so the viewer title is "/".
  2. Files that share a repo-relative path in different repos (e.g. src/engine.py in both) collapse into ONE file node with all of their symbols interleaved.

Expected: each repo tag is a top-level root with its own directory/file hierarchy built from that repo's relative paths. This would also fix --root on merged graphs, since each repo subtree would be anchored by its tag rather than an absolute path.

Steps to reproduce
1. Create two graph.json files (repo-a, repo-b) whose nodes have source_file "src/engine.py".
2. graphify merge-graphs repo-a/graphify-out/graph.json repo-b/graphify-out/graph.json --out world/graphify-out/graph.json
3. graphify tree --graph world/graphify-out/graph.json --output WORLD_TREE.html
4. Or inspect directly: python3 -c "import json; from graphify.tree_html import build_tree; print(build_tree(json.load(open('world/graphify-out/graph.json'))))"

Merged nodes do carry `repo: "repo-a"` / `"repo-b"` and `local_id`, so the data needed to group by repo is present. tree_html.py never reads `repo`.
Error output or graph output
build_tree output (name, total_count), both repos sharing src/engine.py:

engine.py (8)
  src (8)
    engine.py (8)
      Cls (1) x4
      fn (1) x4

Symbols from repo-a and repo-b are mixed under one file node. Viewer title: "/".
Graphify version

0.9.92

Operating System

Linux

Python Version

3.13

Installation Method

uv tool install (recommended)

Additional Environment Details

No provider environment variables set. Reproduced on a fresh shallow clone of main at the 0.9.92 release commit.Also reproduced with a fresh uv venv; same result.”

Additional context

Suggested fix: in build_tree (tree_html.py), if nodes carry repo, group by it first and build each repo's subtree independently under a root named after the tag. A test in tests/test_tree_html.py with two repos sharing a relative path would cover it.

Related to #4522 (merged-graph tree rendering), but a different cause: here source_file is intact and the repo tag is simply unused by tree.

Dominant language
Python
Stars
124k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Graphify-Labs/graphify

All issues in Graphify-Labs/graphify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.