Skip to content

docs(site): add the website pages, screenshots and publishing workflows - #313

Merged
sunerpy merged 2 commits into
mainfrom
docs/site
Oct 3, 2026
Merged

sunerpy merged 2 commits into
mainfrom
docs/site

Conversation

@sunerpy

@sunerpy sunerpy commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

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 of
the 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 the
indexed /en/codegraph/ redirects. The site shell, the sync script and the deploy live in firlab, in a companion
pull 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 under en/, at the same paths:

    • the home page, whose words are in its hero: / home: frontmatter;
    • what CodeGraph is, install / update / complete removal, a quick start, connecting coding agents, the browser
      viewer, keeping the index current, configuration, an FAQ, data and network, and contributing.

    Pages link each other and the canonical references by repository-relative .md paths (../../cli.md), so
    GitHub and docs-check.py follow them; the firlab sync rewrites them to site paths. The canonical references
    stay English and are published unchanged under /en/reference/ and /en/dev/, with a generated Chinese pointer
    page for each.

  • docs/site/public/ holds 14 WebP captures of the real browser viewer, plus the logo:

    • seven views (start, Symbol, type hierarchy, File, Flow, Map, Dead code), each light and dark, 1440 × 900;
    • they read this repository's own index at f7424cd.
    • The logo is the viewer's BrandMark on firlab's navy tile.
  • docs/site/tools/capture-screens.sh and capture-screens.mjs retake the captures reproducibly:

    • the shell script builds the corpus in a temporary directory of its own (mktemp -d), with the viewer bundle
      excluded. It indexes the corpus, serves it with codegraph ui, and removes the directory when it exits;
    • the Node script drives Chrome over CDP, with no package installed. It loads every view as a fresh document,
      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.
    • It stops on a console error, a failed request, a timeout, or a symbol lookup that does not find exactly one
      match.
  • docs/site/README.md is for maintainers and is not published. It covers the paths, how a change reaches
    the site, local preview, writing rules, components, the home-page fields, screenshots and the one-time token
    setup.

  • .github/workflows/docs-site.yml runs on pull requests. It syncs the pages into firlab's public main,
    builds the site and runs its check-dist.sh. It is advisory, outside CI Success, and reads no secret.

  • .github/workflows/publish-site.yml runs after a merge and pushes the synced pages to firlab as
    docs(codegraph): sync from codegraph-rust@<sha>. It needs FIRLAB_DOCS_TOKEN, which does not exist yet; its
    first step fails with a message that says so. Both workflows pin actions by SHA.

  • Other changes:

    • both READMEs link the site;
    • docs/README.md and the AGENTS.md change-to-proof matrix describe it;
    • docs/godot.md keeps two code spans on one line, so the site's checks read them as code.

Content rules followed

  • Written to match the current build. Every command, default and path was checked against v0.53.2 and the
    code. The quick start's output blocks are pasted from real runs on a four-file sample.
  • Removal and data pages are complete. They say that uninit needs --force and leaves .codegraph/
    state; that HTTP-server logs outlive http stop; and where the PowerShell profile line goes. They also cover
    --debug-log and export -o files, and that serve --http has no authentication and can bind a non-loopback
    address.
  • No counts and no performance claims in prose. firlab's sync enforces the "sub-millisecond" ban on every site
    page.

Not in this pull request

search, callers, callees and impact print the kind and the name with no space between them
(functionapplyDiscount). NodeKind's Display uses write_str, so {:<12} never pads. The quick start
therefore shows those commands without pasting their output. The fix is left to a separate change.

Verification

  • make pre-ci at rustc 1.98 on this tree: 4,360 Rust tests and 569 frontend tests passed. docs-check (60
    Markdown files), oxfmt, actionlint, check-action-pins and the guardrail all passed.
  • The site, built with the companion firlab branch from this head (synced.json names 3b3cb5e):
    • VitePress builds; check-dist.sh emits 25 Chinese and 24 English pages, and every in-site link resolves.
    • The full firlab.app artifact is assembled the way deploy.yml assembles it and served with GitHub Pages'
      lookup rules. All 400 distinct root-relative links in its 159 pages resolve.
    • Headless Chrome rendered 10 pages at 6 widths (320–1440) in both themes, 120 renders in all:
      • no horizontal overflow, no console error, no failed request and no broken image;
      • one h1 per page;
      • no purple computed colour;
      • the headline, facts and Install button sit above the fold at 1280 × 800 and 375 × 812;
      • the language switch maps every page, the pointers included;
      • /en/codegraph/ lands on /codegraph/en/;
      • Chinese and English search find results.
  • The live site. The firlab pull request (feat(codegraph): 新增 CodeGraph 文档站,取代产品页发布到 firlab.app/codegraph/ firlab#31) merged as b725e94, and its deploy run 37132736973
    passed.
    • Pages answer 200: /codegraph/, /codegraph/en/, a guide page, a reference page and the screenshots.
    • /en/codegraph/ redirects to /codegraph/en/, and the footer names codegraph-rust@3b3cb5e.
    • Lighthouse scores 100 for accessibility and 100 for best practices on the English home page (mobile) and the
      Chinese viewer page (desktop).
  • docs-site.yml failed on the first head because firlab's main had no codegraph/ yet. It runs again on the
    current head, now that the site is on firlab's main.
  • The second commit addresses the first review round:
    • capture-screens.sh no longer deletes a fixed /tmp/codegraph-rust. Re-running it reproduced the committed
      captures: 13 of the 14 are byte-identical, and the 14th differs in one pixel.
    • The viewer guide shows the start-page capture.
    • The quick start now says which commands take -p.

🤖 Generated with Claude Code

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/site/tools/capture-screens.sh Outdated
corpus=/tmp/codegraph-rust

# A fresh directory every time, so nothing from an earlier run reaches the corpus.
rm -rf -- "$corpus"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… 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 .`.
@sunerpy
sunerpy merged commit c03fcbd into main Oct 3, 2026
12 checks passed
@sunerpy
sunerpy deleted the docs/site branch October 3, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant