Merge pull request #501 from maxwakelin8-a11y/perf/global-search-lazy-reset

perf: load Global Search reset code on click instead of at startup
This commit is contained in:
Aden Lindsay authored and GitHub committed 2026-11-04 12:40:01 +10:30
commit 057548f401
1 file changed
+3 -1
+3 -1
View File
@@ -7,7 +7,6 @@ import {
} from "../../core/settingsHelpers";
import { isSeqtaEngageExperience, isSeqtaLoginPage } from "@/seqta/utils/isSeqtaEngage";
import styles from "./src/core/styles.css?inline";
import { resetSearchIndexes, notifyOpenTabsResetSearchIndex } from "./src/indexing/resetIndexes";
import {
formatHotkeyForDisplay,
getDefaultSearchHotkey,
@@ -53,6 +52,9 @@ const settings = defineSettings({
if (!confirmed) return;
try {
// Loaded on click: a static import pulled the ~1 MB indexer chunk into every page load.
const { resetSearchIndexes, notifyOpenTabsResetSearchIndex } =
await import("./src/indexing/resetIndexes");
await notifyOpenTabsResetSearchIndex();
await resetSearchIndexes();
alert("Search index and storage were reset.\n\nReload this tab to regenerate the index.");