From 66f399d875022ca6446965877ec3eb45479cb97f Mon Sep 17 00:00:00 2001 From: Shawn-A-Crypto Date: Wed, 8 Jul 2026 16:28:10 +0900 Subject: [PATCH] Fix bookmark typeahead: unbound this and wrong edit path fetchBookmarkSuggestions was a plain class method passed by reference to BlockHeaderSuggestionControl, so calling it lost its `this` binding and threw on `this.env`, silently rejecting the suggestions promise with no error handling. That kept `fetched` false forever, so neither the list nor the empty state ever rendered. Also fixes the "Open bookmarks.json" button, which pointed at presets/bookmarks.json instead of the actual config path used to load bookmarks. Co-Authored-By: Claude Sonnet 5 --- frontend/app/view/webview/webview.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/app/view/webview/webview.tsx b/frontend/app/view/webview/webview.tsx index f6d98b8f22..60c6e92889 100644 --- a/frontend/app/view/webview/webview.tsx +++ b/frontend/app/view/webview/webview.tsx @@ -285,10 +285,10 @@ export class WebViewModel implements ViewModel { globalStore.set(this.typeaheadOpen, open); } - async fetchBookmarkSuggestions( + fetchBookmarkSuggestions = async ( query: string, reqContext: SuggestionRequestContext - ): Promise { + ): Promise => { const result = await this.env.rpc.FetchSuggestionsCommand(TabRpcClient, { suggestiontype: "bookmark", query, @@ -296,7 +296,7 @@ export class WebViewModel implements ViewModel { reqnum: reqContext.reqnum, }); return result; - } + }; handleUrlWrapperMouseOver(e: React.MouseEvent) { const urlInputFocused = globalStore.get(this.urlInputFocused); @@ -755,7 +755,7 @@ const BookmarkTypeahead = memo( const env = useWaveEnv(); const openBookmarksJson = () => { fireAndForget(async () => { - const path = `${env.electron.getConfigDir()}/presets/bookmarks.json`; + const path = `${env.electron.getConfigDir()}/bookmarks.json`; const blockDef: BlockDef = { meta: { view: "preview",