fix(ui): show synthesis as a 'Linking dynamic dispatch' phase; mute node:sqlite warning spam (#1299)
Two first-run UX bugs surfaced by indexing a real 1,342-file C repo: 1. After 'Resolving refs' hit 100%, the ~40 dynamic-dispatch synthesis passes ran with no progress surface, so the bar sat frozen at 100% long enough to read as a hang (the C fn-pointer pass alone can hold for a while on C-heavy repos). Synthesis now reports per-pass progress through a new 'linking' IndexProgress phase, rendered as 'Linking dynamic dispatch'. The step total is pinned by a test to the synthesizer's actual __mark() count so adding a pass without bumping it fails loudly. 2. node:sqlite's ExperimentalWarning is emitted once per THREAD, so the main process plus every parse worker printed it mid-index, interleaved with the progress UI. All launch paths now pass --disable-warning=ExperimentalWarning: both bundle launchers, the Windows npm-shim invocation, and the CLI self-relaunch (NODE_RUNTIME_FLAGS, deliberately excluded from the re-exec gate so an older installed launcher never triggers a pointless re-exec, and version-gated off nodes older than the flag). Verified end-to-end on the same repo: zero warnings, live linking bar, byte-identical graph (50,520 nodes / 148,232 edges). Full suite green. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
243ef1d3e2
commit
ad5300a601
+53
-23
@@ -509,13 +509,22 @@ export class CodeGraph {
|
||||
total: unresolvedCount,
|
||||
});
|
||||
|
||||
await this.resolveReferencesBatched((current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
});
|
||||
await this.resolveReferencesBatched(
|
||||
(current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
},
|
||||
(done, totalPasses) => {
|
||||
options.onProgress?.({
|
||||
phase: 'linking',
|
||||
current: done,
|
||||
total: totalPasses,
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
// Second pass: chained calls whose method lives on a supertype the
|
||||
// receiver conforms to (protocol-extension / inherited / default-
|
||||
@@ -735,13 +744,22 @@ export class CodeGraph {
|
||||
total: unresolvedCount,
|
||||
});
|
||||
|
||||
await this.resolveReferencesBatched((current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
});
|
||||
await this.resolveReferencesBatched(
|
||||
(current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
},
|
||||
(done, totalPasses) => {
|
||||
options.onProgress?.({
|
||||
phase: 'linking',
|
||||
current: done,
|
||||
total: totalPasses,
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,13 +784,22 @@ export class CodeGraph {
|
||||
total: orphanCount,
|
||||
});
|
||||
|
||||
await this.resolveReferencesBatched((current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
});
|
||||
await this.resolveReferencesBatched(
|
||||
(current, total) => {
|
||||
options.onProgress?.({
|
||||
phase: 'resolving',
|
||||
current,
|
||||
total,
|
||||
});
|
||||
},
|
||||
(done, totalPasses) => {
|
||||
options.onProgress?.({
|
||||
phase: 'linking',
|
||||
current: done,
|
||||
total: totalPasses,
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (filesChanged || orphanCount > 0) {
|
||||
@@ -1001,8 +1028,11 @@ export class CodeGraph {
|
||||
* Resolve references in batches to keep memory bounded on large codebases.
|
||||
* Processes chunks of unresolved refs, persisting results after each batch.
|
||||
*/
|
||||
async resolveReferencesBatched(onProgress?: (current: number, total: number) => void): Promise<ResolutionResult> {
|
||||
return this.resolver.resolveAndPersistBatched(onProgress);
|
||||
async resolveReferencesBatched(
|
||||
onProgress?: (current: number, total: number) => void,
|
||||
onSynthesisProgress?: (done: number, total: number) => void
|
||||
): Promise<ResolutionResult> {
|
||||
return this.resolver.resolveAndPersistBatched(onProgress, undefined, onSynthesisProgress);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user