NuGetBrowserPanel.waitForInitialLoad() resolves on a load that never ran
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript, vscode
Direzione di ricerca
The bug is in src/editors/vscode/src/nuget-browser.ts lines 159-173, in the initialLoad method. Start by reading the method and understanding the flow when selectedTargetId is undefined. Look at the callers of waitForInitialLoad to see how they expect to be notified. The fix involves modifying the promise resolution logic and adding a test for the unresolved target state as per the spec. Check the logs in the issue for the exact sequence of events.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
NuGetBrowserPanel.waitForInitialLoad() resolves successfully in a state where the browse tab was never populated and no search was ever issued. Callers cannot distinguish "loaded, and there is nothing" from "never loaded anything".
Filed separately from the browse tab is populated on initial load flake at the request of the agent driving #291: the two have opposite signatures and one would mask the other. The flake makes that test time out; this makes it fail fast. If this lands while the flake is live, the fast failure hides the slow one and the wrong cause gets chased.
Cause
src/editors/vscode/src/nuget-browser.ts:159-173:
private async initialLoad(): Promise<void> {
await this.loadTargets();
...
if (this.selectedTargetId !== undefined) {
await this.loadInstalledPackages();
await this.performSearch('');
}
this.updateContent();
log.info('NuGetBrowserPanel: initial load complete');
}
When loadTargets() leaves selectedTargetId undefined, the installed-package load and the browse search are both skipped, updateContent() renders an empty tab, and the method logs initial load complete and resolves. waitForInitialLoad() awaits that same promise, so it reports success.
Evidence
From vsix-logs-win32-workspace, run 35800116593, SharpLsp.log. Note the completion arriving before any search, with packages=0:
00:19:05.524 NuGetBrowserPanel: creating panel for PropsProj
00:19:05.524 NuGetBrowserPanel: rendering tab=browse packages=0 installed=0 loading=0
00:19:05.525 nuget/lsp: fetchTargets workspace=...
00:19:05.525 NuGetBrowserPanel: initial load complete <-- resolves here, packages=0
00:19:05.525 nuget/lsp: fetchInstalled target=props-1
00:19:05.526 nuget/lsp: searchPackages target=props-1 query=""
00:19:05.526 NuGetBrowserPanel: search returned 1 results
00:19:05.526 NuGetBrowserPanel: rendering tab=browse packages=1 installed=0 loading=0
00:19:05.526 NuGetBrowserPanel: initial load complete <-- and again, packages=1
initial load complete is emitted twice for the same logical load, and the first one is the promise's resolution with an empty tab.
Why it matters beyond the test
The panel is a user-facing webview. A user opening the NuGet browser on a project whose target resolution has not settled gets a permanently empty Browse tab with no spinner (loading=0) and no error — the panel believes it finished. That is the same defect class as [SE-ACTIONS-BUILD] (an invisible build) and the blank Test Explorer tree: the failure path produces the same observation as success.
Suggested fix
initialLoad()MUST NOT report completion for a load it did not perform. WhenselectedTargetIdis undefined, that is a distinct outcome — render an explicit empty/unresolved state, and make it observable.- Emit initial load complete exactly once per load.
- Give
waitForInitialLoad()a result callers can branch on, rather than a barePromise<void>that resolves identically in both cases. - Cover it with a test that opens a panel with unresolved targets and asserts the panel reports the unresolved state rather than silent emptiness — per [NUGET-BROWSER-SPEC].
Note
Found while diagnosing the Windows workspace leg timeout, which is a different bug: that one is waitForInitialLoad() blocking on a live azuresearch-usnc.nuget.org query inside a 15s budget. Both were invisible in the mocha output and only appeared in the uploaded VSIX log artifacts.
- Lingua principale
- TypeScript
- Stelle
- 132
- Fork
- 5
- Merge medio
- 9h 20m
- PR unite (30g)
- 51
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Nimblesite/SharpLsp
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nimblesite/SharpLsp#202 ·
I maintainer di solito rispondono entro 1 giorno
-
.NET bug cluster:sidecar-lifecycle critical
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Nimblesite/SharpLsp#153 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Nimblesite/SharpLsp#318 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Nimblesite/SharpLsp#314 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
Nimblesite/SharpLsp#310 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Nimblesite/SharpLsp
Issue simili
-
refactor
Difficoltà 2/5 Mezza giornata Idoneità per principianti 84/100
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OHDSI/Data2Evidence#3450 ·
I maintainer di solito rispondono entro 2 giorni
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
automation missing-model model-sync provider:ofox
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/models.dev#8421 ·
I maintainer di solito rispondono entro 1 giorno
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno