Skip to content

docs: explain auto-syncing in site guide + README collapsible#457

Merged
colbymchenry merged 1 commit into
mainfrom
docs/auto-sync-explained
May 26, 2026
Merged

docs: explain auto-syncing in site guide + README collapsible#457
colbymchenry merged 1 commit into
mainfrom
docs/auto-sync-explained

Conversation

@colbymchenry
Copy link
Copy Markdown
Owner

Originated from #438 ("Will newly created files be missing from query results if sync is not manually run?"). The answer to that question is no, the watcher handles it — but real users are second-guessing whether their agent's freshly-created files are getting indexed. They shouldn't have to test for themselves to find out.

Changes

site/src/content/docs/guides/indexing.md — "Stay fresh automatically"

Expanded the existing 2-sentence section into the full three-layer explanation:

  1. File watcher with debounced auto-sync (default 2000ms, tunable via CODEGRAPH_WATCH_DEBOUNCE_MS, clamp [100ms, 60s]).
  2. Per-file staleness banner (Expose file-watcher debounce window for MCP serve (currently hardcoded 2000ms) #403) — covers the debounce window. Quoted the actual banner format + the verified Claude Code follow-up Read behaviour ("Reading the file directly for the live content").
  3. Connect-time catch-up (fix(sync): filesystem-based change detection (catch git pull & non-git edits) #414) — covers gaps when the MCP server wasn't running.

Plus: how to verify state via codegraph_status's ### Pending sync: section, when manual codegraph sync DOES make sense (watcher disabled / CI scripting), and a link out to v0.9.5 release notes.

README.md — collapsible "How auto-syncing works"

Added a <details><summary> block right under the Key Features table — primed by the existing 'Always Fresh' row in that table. Condensed to ~10 lines covering the same three layers + a flow diagram + the verify command + a deep link to the full guide.

<details> is collapsed by default on GitHub so the README's visible scroll length doesn't grow. Anyone curious about auto-sync clicks once and sees the full explanation; anyone who isn't worried about it doesn't even notice it's there.

Why both

  • README collapsible: low-friction reassurance for a casual reader who's hovering over 'Always Fresh' wondering 'really?'
  • Site guide: complete reference for anyone who wants to understand the mechanism, tune the debounce, or troubleshoot.

940/942 tests still pass (2 pre-existing skips); no code changes.

🤖 Generated with Claude Code

Originated from issue #438 ("Will newly created files be missing from
query results if sync is not manually run?"). Real users are second-
guessing whether their agent's freshly-created files are getting
indexed. They shouldn't have to test for themselves to find out.

## site/src/content/docs/guides/indexing.md

Expanded the existing 2-sentence "Stay fresh automatically" section
into the full three-layer explanation:

  1. File watcher with debounced auto-sync (default 2000ms, tunable
     via CODEGRAPH_WATCH_DEBOUNCE_MS, clamp [100ms, 60s]).
  2. Per-file staleness banner (#403) — covers the debounce window.
     Quoted the actual banner format + the verified Claude Code
     follow-up Read behaviour.
  3. Connect-time catch-up (#414) — covers gaps when the MCP server
     wasn't running.

Plus: how to verify state via codegraph_status (### Pending sync:),
when manual codegraph sync DOES make sense (watcher disabled / CI
scripting), and a link out to the v0.9.5 release notes.

## README.md

Added a <details><summary> collapsible right under the Key Features
table — primed by the existing 'Always Fresh' row in that table.
Condensed to ~10 lines covering the same three layers + a code-block
flow diagram + the verify command, with a deep link to the full guide.
GitHub renders <details> blocks natively, so the section is collapsed
by default and doesn't make the README scroll-length grow visibly.

Heading kept as 'Stay fresh automatically' (single-word slug) so the
README's deep-link anchor is predictable; the longer tagline lives on
its own line below.

940/942 tests still pass; no code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@colbymchenry colbymchenry merged commit 7479c5e into main May 26, 2026
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.

2 participants