Repository navigation
fix(validation): stop flagging every input as unknown after changing … - #400
Merged
eFAILution merged 1 commit intoNov 17, 2026
Merged
Conversation
…a component's version
X-Guardian
marked this pull request as ready for review
November 17, 2026 17:41
Owner
|
Switched the base to |
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
@refby typing could leave every input flaggedUnknown input '…'until the next edit. A validation pass started on a half-typed ref finished after the pass for the full ref and overwrote its results. The half-typed ref has no template, and the fetcher reported that as a component with no inputs.Change Type
Context
User-facing impact
Unable to fetch component '…'on thecomponent:line, instead of an unknown-input warning on every input.GitLab scope
Affected areas
What changed by bucket
src/providers/validationProvider.tsvalidate()recordsdocument.versionbefore the async pass. If the version has changed by the time the findings are ready, it skipsdiagnosticCollection.set.src/services/component/componentFetcher.tsfetchComponentMetadatathrows a 404NetworkError. The existingcatchturns that into the standard placeholder withfetchFailure: { kind: 'not-found' }.src/providers/validationProvider.ts,src/providers/completionProvider.ts,src/providers/componentDetector.tsfetchFailureset is treated as not fetched. Validation reports a fetch failure, completion falls back to another cached version, and hover falls back to the cached-version note. None of them add it to the cache.Behaviour details worth reviewing
onDidChangeTextDocumentalways callsscheduleValidation, so a discarded pass is always followed by one for the newer text. Open and save don't changedocument.version, so their passes are never discarded.validate_*tools now report a ref with no template as a fetch failure with the 404 hint, not as unknown inputs.gitlab.example.comexample URLs. A failed fetch for these now returnsnull, so validation falls through to the mock component, which is what the mock is for.Validation
Local checks
npm run compilenpm test(877 passing)npm run lint(clean)npm run test:extension-host(25 passing)Manual test notes
Unable to fetch componentwarning and no unknown-input warnings. Then correct the ref and check that the warning clears without a cache refresh.Tests
tests/unit/componentFetcherUrl.test.ts: when the project exists but the ref has no template,fetchComponentMetadatareturns a placeholder withfetchFailure: { kind: 'not-found', statusCode: 404 }and no inputs.vscode-bound providers. A regression test for the race would need to delay a fetch inside the extension host, and the bundled extension's services can't be stubbed from the test process, so they're covered by the manual notes above.Breaking Changes
Screenshots / Recordings (if UI behavior changed)
Unknown input '…'until another edit.Risk and Rollback
Release Notes Draft
Checklist