Repository navigation
Cache query only after validating source and results container - #66
Merged
liuliu-dev merged 1 commit intoOct 19, 2026
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves deduplication and includes regression coverage for both missing prerequisites.
No open issues 🎉
What changed in this PR
Fixes premature query caching in <remote-input> so unchanged queries can retry once missing prerequisites become available.
Changes:
- Cache queries only after validating the source and results container.
- Add regressions covering retries and subsequent request deduplication.
| File | Description |
|---|---|
| test/test.js | Tests recovery when the source or results container becomes available. |
| src/index.ts | Moves query caching after prerequisite checks. |
Review effort: Max
liuliu-dev
approved these changes
Oct 19, 2026
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.
Typing or focusing a
<remote-input>beforesrcis set or before thearia-ownsresults element exists in the document cachesinput.valueascurrentQuerywithout issuing a request. Oncesrcor the results container is added, focusing or changing the input with the same value skips the request becausecurrentQueryalready matches.Record
currentQueryonly after verifying thatsrcand the results container exist. The regressions cover a missingsrcattribute and a missingaria-ownscontainer, then verify that the request runs once the missing prerequisite becomes available and remains deduplicated on subsequent focus.Validation: both regressions timed out before the fix; all 11 Chromium tests now pass through Karma. Full ESLint and the UMD/ESM TypeScript builds pass on Node 24. The Windows
rm -rfclean script was skipped by removingdistdirectly before runningtsc; Firefox and WebKit were not run.