Context & Agents · Applications
Code map
See a picture of how the parts of an application depend on each other.
The Map tab draws an application’s code graph as a picture. Each circle is a part of the code, such as a folder or a file, and each line shows that one part relies on another.
It is the quickest way to get a feel for how an application is put together: which areas are biggest, which are tightly connected, and which stand on their own. That helps when you are judging how far a change might reach, or explaining the shape of a system to someone new.
Before you start
- Open an application, select Open code graph, then select the Map tab. See Application detail.
- The version must have finished processing.
- Use a wide screen. On narrow screens the details panel is hidden.
Understanding the map
Above the map, a line summarises what is drawn, for example 48,000 definitions in 3,500 files, 120,000 edges. Drawn as 40 units. A definition is a named piece of code, such as a function or class; an edge is a connection between two of them; a unit is one circle on the map.
Circles and lines
| What you see | What it means |
|---|---|
| A circle | A closed folder or file. Its size reflects how much code is inside it. |
| A line | Every call, import or “extends” running between two circles, combined into one line. |
The three kinds of connection are:
- calls – code in one part runs code in another.
- imports – one part brings in another so it can use it.
- extends – one part is built on top of another, adding to it.
Reading the colours
The legend at the bottom of the map explains the colours.
| Legend item | What it marks |
|---|---|
| folder | A folder. |
| file | A file. |
| class | A class – a blueprint for a kind of object in the code. |
| function | A function – a named piece of code that does one job. |
| test | Test code that checks the rest works. |
| libraries | Outside code the application uses but did not upload. |
| calls, imports, extends | The colour of each kind of line. |
The details panel
The panel on the right shows what you have selected.
| You have | The panel shows |
|---|---|
| Selected nothing | Click a circle, with a list of the Biggest units. Select one to jump to it. |
| Selected a circle | Its name, path and size, and how many files it contains. |
| Selected a line | The two units it joins, the kind of connection and how many there are, then each individual edge listed in both directions. |
Explore the map
- Scroll to zoom in and out.
- Drag to move around.
- Select a circle to see its details on the right.
- Double-click a folder or file to open it in place and see what is inside.
- Select a line to list the edges running between those two units.
Change the view
Use the buttons in the top-right corner.
| Button | What it does |
|---|---|
| Fit | Brings the whole map back into view. |
| Open everything | Expands every folder at once. |
| Collapse all | Folds every folder back up. |
What to expect
- While the map is being arranged, it says Laying out….
- If there is nothing to draw, it says Nothing to draw for this version.
- When you select a line, the panel says Reading the edges… while it loads. If none are found, it says No edges between these two.
- A line’s edge list shows up to 50 edges in each direction.
Good to know
- The map shows shape, not detail. To follow one definition’s connections step by step, use the Relations tab. To read the code, use the Files tab.
- The version carries across. The version shown in the top-right corner is the same on all three tabs.
- Take the tour. The help (?) menu in the top bar replays this tab’s guided tour.