Repository navigation
Make the graph readable on big codebases: run order, paths, fewer boxes - #35
Merged
Merged
Conversation
- A function's box lists what it does in the order its code does it: a numbered row per call (its own functions, AWS, libraries, HTTP), indented inside loops and ifs, tagged with a loop mark or "if". Arrows leave from their row, and the boxes it calls are stacked in the same order. Calls not drawn are dimmed rows that open the function's own graph. - Pointing at a box keeps every path through it in sight, up to the entry point and down to what it reaches; clicking keeps them lit while its code is open. - 14 functions by default instead of 24; a function that only passes on to one other is drawn as a dashed "via" arrow instead of a box. - Boxes on graphs of more than 10 functions leave out docstrings and when pills, which stay in the hover card (now with "Called only when ..."). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a big codebase the graph showed about 25 boxes of the same weight, with each function's calls in no particular order. This PR makes it readable top to bottom and lets you drill in.
What changes
A function's box lists what it does, in run order
↻(in a loop) orif(only sometimes). Pointing at a row shows its line and theiftest.SQLite PRAGMA (+3)).Pointing at a box shows every path through it: up to the entry point and down to what it reaches. Pointing at S3 or a database shows every route there. Clicking a box keeps its paths lit while its code is open. Still CSS only.
Fewer boxes
Effect
lambda_handler()reads 1read_orders(), 2check(), 3save(), 4announce(), and those boxes stack in that order with no arrows crossing.Checks
make check: lint, 42 tests,mkdocs build --strict, package.iftags, merged rows, which row an arrow leaves from, run-order stacking) and for the paths kept in sight.run()only passes on towork(), somain()now reacheswork()through "via run()".CHANGELOG.md,README.md,docs/usage.mdanddocs/reading.mdupdated.🤖 Generated with Claude Code