perf: load Global Search reset code on click instead of at startup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maxwakelin8-a11yandClaude Opus 5.5 committed 2026-11-04 09:47:56 +10:30
1 parent c12793de06
commit b383a21d2b
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.");