Add incremental global-data state and docs navigation indexing - #326
Merged
Merged
Conversation
Coverage Report for CI Build 35044786822Coverage increased (+0.6%) to 95.352%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
bcomnes
force-pushed
the
feat/incremental-global-data
branch
from
September 15, 2026 16:32
d5bb18b to
3060afa
Compare
bcomnes
added this pull request to stack #330
September 15, 2026 19:15
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Abort handling can start a full build after watcher cancellation, and the source identity documentation needs correction.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
index.js:258
- When
stopWatching()aborts the watcher before it emitsready, thereadypromise resolves through the AbortError handler in#createSourceWatcher, so thisawaitreturns and#prepareWatchimmediately starts discovery, esbuild, and the initial page build despite the cancelled signal.stopWatching()then waits for that full startup and resources are acquired after cancellation; short-circuit the preparation after an aborted readiness wait (while preserving the startup return contract).
await ready
- Files reviewed: 32/32 changed files
- Comments generated: 1
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add session-owned incremental global-data state and use it to update the documentation navigation index without rendering every document on ordinary Markdown edits.
Closes #325. Related: #289, #322/#323. Precise watch dependency tracking is split into follow-up #329; this PR keeps conservative invalidation and the existing dependency maps.
Feature
Base versus follow-up
This base reuses existing watch dependency maps without adding global-vars, Markdown-settings, or browser-helper analysis. When state is retained, Markdown/HTML source edits can use deltas; watched module and configuration edits conservatively reset the index and trigger a full rebuild. Sites without retained state keep their existing output-routing behavior.
Follow-up #329 adds targeted routing for ordinary module edits, browser-only skips, dependency-analysis recovery, and observation of known imported inputs such as JSON. Settings roots and their tracked imports share one detection set and always trigger a full rebuild and index reset; there is no fine-grained settings routing. JSON support connects dependencies discovered by the existing import tracker to file-watcher events, rather than adding a JSON analyzer. The producer API and documentation index are unchanged.
Static re-export analysis remains limited upstream: #328. Two test TODOs cite that issue, and the documentation describes an explicit-import/local-export workaround. Imported JSON changes require restarting watch mode until #329 is applied.
Validation
The browser suite was not rerun for this split. An earlier run passed 14 of 16 tests; two documentation-navigation interaction tests timed out and remain unresolved.
Part of the stack with #329, created using gh stack.