Conversation
|
Someone is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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
Deleted or renamed sections can return in search results after an expired index has been rebuilt and the site is opened again.
The refresh correctly rebuilds
INDEXESin memory, butbulkPut()only inserts or updates records. Old slugs remain in IndexedDB while the cache expiry is renewed. The next visit reads those obsolete records back alongside the current index.Replace the current
indexKey's records and update its expiry in one Dexie transaction. Other namespaces are retained, and there is no database schema change.Reproduction
# Obsoleteand a unique search term.The browser regression follows these visits through the actual search UI, using
maxAge: -1for the first visit to expire the initial cache deterministically. A separate regression verifies that saving one namespace retains another namespace's valid cache.Related issue, if any:
Reproduced on
developatd823dbe51c1b2dea4c2091e2b952ded0d1e16616; no matching open fix found.What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Validation
Obsoletesection. It passes after the fix.npm run test:e2e:chromium -- test/e2e/search.test.js --workers=2 --reporter=line: 21 tests passed.npm run test:jest -- --runInBand: 128 tests and 46 snapshots passed.npm run build,npm run lint,npm run typecheck, andgit diff --check: passed.Browser coverage: Chromium via Playwright. Firefox, WebKit, unrelated E2E suites, and transaction-failure fault injection were not run locally.
Developed with assistance from OpenAI Codex; the regression and fix were validated locally.