Skip to content

Commit 9b2ec92

Browse files
committed
Simplify progressive loading: remove timeout fallback and return root items directly
1 parent 25a5942 commit 9b2ec92

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/views/dependencyDataProvider.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,9 @@ export class DependencyDataProvider implements TreeDataProvider<ExplorerNode> {
146146
this._resolveProgressiveItems = resolve;
147147
});
148148
}
149-
// Race with a timeout to prevent hanging indefinitely if no
150-
// progressive notifications arrive (e.g., small project or
151-
// server failure). After timeout, fall through to normal path.
152-
const timeout = new Promise<void>((resolve) => setTimeout(resolve, 30_000));
153-
await Promise.race([this._progressiveItemsReady, timeout]);
154-
}
155-
// If progressive items arrived, return them. Otherwise fall
156-
// through to the normal getRootNodes() path so the tree is
157-
// never left blank (e.g., when the JDTLS progressive
158-
// notifications are not available yet).
159-
if (this._rootItems && this._rootItems.length > 0) {
160-
return this._rootItems;
149+
await this._progressiveItemsReady;
161150
}
151+
return this._rootItems || [];
162152
}
163153

164154
const children = (!this._rootItems || !element) ?

0 commit comments

Comments
 (0)