Conversation
The CodeGraph website at firlab.app/codegraph is built to the design of the Voltip site in sunerpy/firlab. Its words, screenshots and logo live here, next to the code they describe: docs/site/ holds the Chinese pages at the root and the English pages under en/, and firlab publishes the canonical references in docs/ unchanged. - docs/site/: home, what CodeGraph is, install and removal, quick start, coding agents, the browser viewer, keeping the index current, configuration, FAQ, data and network, contributing; both languages. - docs/site/public/screens/: captures of the browser viewer reading this repository's own index, light and dark, taken by docs/site/tools/capture-screens.sh. - docs-site.yml checks a pull request's pages against firlab's site; publish-site.yml pushes them to firlab after a merge and needs the FIRLAB_DOCS_TOKEN secret. - The READMEs link the site, docs/README.md and AGENTS.md describe it, and godot.md keeps two code spans on one line so the site's checks read them.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b3cb5e8ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| corpus=/tmp/codegraph-rust | ||
|
|
||
| # A fresh directory every time, so nothing from an earlier run reaches the corpus. | ||
| rm -rf -- "$corpus" |
There was a problem hiding this comment.
Avoid deleting a fixed temporary checkout path
When the repository itself is checked out at /tmp/codegraph-rust, or that path contains another developer's checkout, this unconditional rm -rf destroys the entire worktree—including uncommitted changes—before the following git archive fails. Create a unique directory with mktemp -d, clean only that directory via a trap, and never reuse a fixed shared path.
AGENTS.md reference: AGENTS.md:L194-L196
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #313 +/- ##
=======================================
Coverage 95.07% 95.07%
=======================================
Files 198 198
Lines 108998 108998
=======================================
+ Hits 103631 103633 +2
+ Misses 5367 5365 -2 see 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
… page capture-screens.sh built its corpus by deleting and recreating a fixed /tmp/codegraph-rust, which could hold a checkout or another task's files. It now extracts the corpus into a directory mktemp creates for the run and removes that directory, index included, when it exits. The viewer guide gains a Start section with the start-page capture, which was committed but not shown on any page. The quick start now says that init and status take the project as a positional `.` and the queries take `-p .`.
Summary
This adds the words, screenshots and publishing workflows of the CodeGraph website at
firlab.app/codegraph. Chinese is at
/codegraph/and English at/codegraph/en/. It is built to the design ofthe Voltip site in sunerpy/firlab (DESIGN.md §10).
The owner chose the pt-tools arrangement: the site takes over firlab.app's
/codegraph/product page, and theindexed
/en/codegraph/redirects. The site shell, the sync script and the deploy live in firlab, in a companionpull request. The plan passed the kirocodex plan gate in round 4 (6 → 2 → 1 → 0).
What is here
docs/site/holds the pages, Chinese at the root and English underen/, at the same paths:hero:/home:frontmatter;viewer, keeping the index current, configuration, an FAQ, data and network, and contributing.
Pages link each other and the canonical references by repository-relative
.mdpaths (../../cli.md), soGitHub and
docs-check.pyfollow them; the firlab sync rewrites them to site paths. The canonical referencesstay English and are published unchanged under
/en/reference/and/en/dev/, with a generated Chinese pointerpage for each.
docs/site/public/holds 14 WebP captures of the real browser viewer, plus the logo:f7424cd.docs/site/tools/capture-screens.shandcapture-screens.mjsretake the captures reproducibly:mktemp -d), with the viewer bundleexcluded. It indexes the corpus, serves it with
codegraph ui, and removes the directory when it exits;waits for the network to go idle, the loading markers to clear and the DOM to settle, then checks the address
and an expected text before saving.
match.
docs/site/README.mdis for maintainers and is not published. It covers the paths, how a change reachesthe site, local preview, writing rules, components, the home-page fields, screenshots and the one-time token
setup.
.github/workflows/docs-site.ymlruns on pull requests. It syncs the pages into firlab's publicmain,builds the site and runs its
check-dist.sh. It is advisory, outsideCI Success, and reads no secret..github/workflows/publish-site.ymlruns after a merge and pushes the synced pages to firlab asdocs(codegraph): sync from codegraph-rust@<sha>. It needsFIRLAB_DOCS_TOKEN, which does not exist yet; itsfirst step fails with a message that says so. Both workflows pin actions by SHA.
Other changes:
docs/README.mdand theAGENTS.mdchange-to-proof matrix describe it;docs/godot.mdkeeps two code spans on one line, so the site's checks read them as code.Content rules followed
code. The quick start's output blocks are pasted from real runs on a four-file sample.
uninitneeds--forceand leaves.codegraph/state; that HTTP-server logs outlive
http stop; and where the PowerShell profile line goes. They also cover--debug-logandexport -ofiles, and thatserve --httphas no authentication and can bind a non-loopbackaddress.
page.
Not in this pull request
search,callers,calleesandimpactprint the kind and the name with no space between them(
functionapplyDiscount).NodeKind'sDisplayuseswrite_str, so{:<12}never pads. The quick starttherefore shows those commands without pasting their output. The fix is left to a separate change.
Verification
make pre-ciat rustc 1.98 on this tree: 4,360 Rust tests and 569 frontend tests passed.docs-check(60Markdown files),
oxfmt,actionlint,check-action-pinsand the guardrail all passed.synced.jsonnames3b3cb5e):check-dist.shemits 25 Chinese and 24 English pages, and every in-site link resolves.deploy.ymlassembles it and served with GitHub Pages'lookup rules. All 400 distinct root-relative links in its 159 pages resolve.
/en/codegraph/lands on/codegraph/en/;b725e94, and its deploy run 37132736973passed.
/codegraph/,/codegraph/en/, a guide page, a reference page and the screenshots./en/codegraph/redirects to/codegraph/en/, and the footer namescodegraph-rust@3b3cb5e.Chinese viewer page (desktop).
docs-site.ymlfailed on the first head because firlab'smainhad nocodegraph/yet. It runs again on thecurrent head, now that the site is on firlab's
main.capture-screens.shno longer deletes a fixed/tmp/codegraph-rust. Re-running it reproduced the committedcaptures: 13 of the 14 are byte-identical, and the 14th differs in one pixel.
-p.🤖 Generated with Claude Code