Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/platform/wiki/hover-trace-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/platform/wiki/search-results-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 30 additions & 18 deletions platform/wiki.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,37 @@ Use the wiki when you're onboarding to a repository, explaining it to someone ne
Open **Wiki** in the Console and choose a **Repository**.
</Step>
<Step title="Pick an article">
The sidebar starts with **Overview**, then **Subsystems**, the main parts of the code, with each one's areas underneath. **Areas** that aren't part of a subsystem come next, production code first, then tests, vendored code, tooling, and docs. The **Glossary** comes last. Use **Search pages** to jump to a topic. Search covers subsystem pages and the glossary too.
The sidebar starts with **Overview**, then **Subsystems**, the main parts of the code, with each one's areas underneath. **Areas** that aren't part of a subsystem come next, grouped in ways that depend on the repository, such as Other, Configuration, Tests, Examples, and Tooling. The **Glossary** and **Area reference** come last. Use the **Search pages** box at the top of the sidebar to jump to a topic. Each result has a type tag: Area, Subsystem, Guide, Reference or Glossary. The list ends with an **Ask the wiki about** row that hands your query to **Ask the wiki**.
</Step>
<Step title="Read">
Each article has **Key components**, diagrams you can expand, and **Relevant source files**. **On this page** lists its sections, and **Previous page** and **Next page** move through the wiki in order.
Each article has a **Key code** table (columns Code, Defined in, and What it does), diagrams you can expand, and **Relevant source files**. **On this page** lists its sections, and **Previous page** and **Next page** move through the wiki in order.
</Step>
<Step title="Go to the code">
**Open the source** opens the file. **Show in the graph** opens the component in [Graph explorer](/platform/graphs).
**Open the source** opens the file. **Show in the graph** opens the component in [Graph explorer](/platform/graphs). A function or type name in the body, such as `extract()`, is a link that opens Graph explorer on that node.
</Step>
</Steps>

<img src="/images/platform/wiki/search-results-light.png" alt="Wiki Search pages results for graph, each with an Area type tag, and an Ask the wiki about graph row at the bottom" width="1709" height="314" className="block h-auto w-full rounded-lg" />

Turn on **Reading mode** to hide the surrounding Console while you read.

Under the page title, the wiki shows **Wiki updated** with a time, then **Your next push or re-index refreshes it.** In the sidebar, **Last indexed** with a time links to the commit on GitHub. At the bottom of the **Overview**, **Up to date with** shows a short commit SHA and a date.

### Page sections

Subsystem pages include **Relevant source files**, **Overview**, **Key code**, topic sections (including a **Call flow** diagram), **Working with this code**, **Configuration and registries**, and **Tests**.

Area pages include **Relevant source files**, **Overview**, topic sections with a diagram, **Working with this code**, **Configuration and registries**, **Key code**, and an **Area map**.

### Diagrams

The **Overview** page has an architecture diagram of the repository. Click a box to open its page. If a diagram is bigger than its frame, drag it to see the rest, or expand it. The zoom and expand buttons sit under the diagram. On a phone, swipe sideways to pan and up or down to scroll the page.
The **Overview** page has an architecture diagram of the repository. Hover a box to fade the other boxes and edges and keep that box and its call path highlighted. Click a box to open its page. Call-flow diagrams work the same way.

The caption under each diagram reads "Arrows point from caller to callee. Hover a box to trace its calls; click to open it." The legend marks **Core** and **Foundations**.

**Ctrl + scroll** zooms the diagram. Plain scroll scrolls the page. If a diagram is bigger than its frame, drag it to see the rest, or expand it. The **Zoom in**, **Zoom out** and **Expand diagram** buttons sit under the diagram. On a phone, swipe sideways to pan and up or down to scroll the page.

<img src="/images/platform/wiki/hover-trace-light.png" alt="Wiki architecture diagram with one box hovered, its call path highlighted, other boxes faded, and a caption telling you to hover a box to trace its calls" width="608" height="428" loading="lazy" decoding="async" className="block h-auto w-full rounded-lg" />

A wiki built before subsystems were added keeps its older sidebar, grouped by folder.

Expand All @@ -78,7 +94,7 @@ A wiki built before subsystems were added keeps its older sidebar, grouped by fo

### Notes on general concepts

Some pages include short notes that explain a general concept the page relies on, such as how a B-tree works. These notes are general knowledge, not statements about your repository, so they aren't checked against your code. Every claim about your code links to the lines it came from.
Some pages include short notes that explain a general concept the page relies on, such as how a B-tree works. These notes are general knowledge, not statements about your repository, so they aren't checked against your code. Every claim about your code is followed by source chips, labeled like `serve.py 2016-2098`. Each chip opens that file on GitHub at the exact commit and line range, for example a URL that ends `#L2016-L2098`.

## How accurate is the wiki?

Expand All @@ -100,7 +116,13 @@ Of 116 general-concept notes in this benchmark, 114 were correct, 1 was partly w

## Ask the wiki

Select **Ask the wiki** (or **Ask about this project**) and type what you'd like to understand. Answers draw on the same graph as the wiki. For questions about one function or call path, [Ask](/platform/ask) is more direct. Overview questions asked from Ask can also be answered from the wiki, and those answers are labeled **From the repo wiki**.
Select **Ask the wiki**. The panel title is **Ask about** followed by the repository name. It offers starter questions, so you don't need code terms:

- "What does this project do?"
- "How do the main parts fit together?"
- "Where does a user action start?"

Type what you'd like to understand, or use the **Ask the wiki about** row at the bottom of **Search pages** results. Answers draw on the same graph as the wiki, and can list the wiki pages they drew on as chips. For questions about one function or call path, [Ask](/platform/ask) is more direct. Overview questions asked from Ask can also be answered from the wiki, and those answers are labeled **From the repo wiki**.

## Large repositories

Expand All @@ -115,17 +137,7 @@ For a very large graph, the wiki covers only its largest areas, and some cross-l
| <kbd>]</kbd> or <kbd>J</kbd> | Next page |
| <kbd>[</kbd> or <kbd>K</kbd> | Previous page |

Each page lists its **Relevant source files** and **Key components**. Use **Open the source** to see the code, or **Show in graph** to find it in [Graph explorer](/platform/graphs). When the wiki is **Behind the latest commit**, it shows **Updating to the latest commit** while a new build runs.

## Starter questions

**Ask about this project** opens a panel with starter questions. You don't need code terms:

- "What does this project do? Explain it in plain language."
- "What are the main parts of this project, and how do they work together?"
- "Where does a request or user action start in this project?"

Answers use the indexed code and say when evidence is missing.
Each page lists its **Relevant source files** and **Key code**. Use **Open the source** to see the code, or **Show in the graph** to find it in [Graph explorer](/platform/graphs). When the wiki is **Behind the latest commit**, it shows **Updating to the latest commit** while a new build runs.

## Wikis for Google Drive folders

Expand All @@ -147,7 +159,7 @@ A synced [Google Drive](/platform/connectors) folder gets a wiki too, built from

<AccordionGroup>
<Accordion title="How current is the wiki?">
It reflects the latest build of the repository. Check the build metadata on the page.
It reflects the latest build of the repository. Check **Wiki updated** under the page title, **Last indexed** in the sidebar (it links to the commit on GitHub), or **Up to date with** at the bottom of the **Overview**.
</Accordion>
<Accordion title="Can I generate a wiki locally?">
Yes. Open-source Graphify can export a Markdown wiki with `graphify export wiki`. See [Exports](/open-source/features/exports).
Expand Down
Loading