Cmd+Shift+K "Search only: current page" returns blocks from the whole graph
まだ誰も着手していません。
評価
調査の方向性
src/main/frontend/components/cmdk/core.cljsのload-results :current-pageから始め、src/main/frontend/components/cmdk/state.cljsがpage-uuidをどのように対応付けるか、またsrc/main/frontend/worker/search.cljsがページ制限をどのように読み取るかを確認してください。別のページには存在するが現在のページには存在しない単語を使って再現してください。「Search only: current page」が他のページのブロックを返さなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Search first
- I searched and no similar issues were found
What Happened?
With the "Search only: current page" filter (Cmd+Shift+K), results include blocks from other pages. The filter label is shown, but the search is not restricted to the current page.
Reproduce the Bug
- Open any page, e.g. page A.
- Press Cmd+Shift+K. The dialog shows "Search only: current page".
- Type a word that appears on other pages but not on page A.
- Blocks from other pages are listed as current-page results.
Expected Behavior
Only blocks of the current page are listed (no result in step 3).
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
macOS, Logseq desktop 2.0.2, DB graph
Additional Context
Likely cause (same code in 2.0.2 and master):
In load-results :current-page (src/main/frontend/components/cmdk/core.cljs), the page uuid is added to the options as :page-uuid:
opts (assoc opts :page-uuid current-page-uuid)
but search-blocks in src/main/frontend/worker/search.cljs only reads :page. The restriction is dropped and the whole graph is searched, then every result is rendered with :current-page? true.
cmdk-block-search-options (src/main/frontend/components/cmdk/state.cljs) already maps page-uuid to :page, but it is called before the uuid is resolved, so without it. Possible fix: (assoc opts :page (str current-page-uuid)), or resolve the uuid first and pass it to cmdk-block-search-options.
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
- 主要言語
- 言語のデータがありません
- スター
- 29
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
logseq/db-test のほかの issue
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolved対応中かも @RaphaelFakhri が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabled対応中かも @tiensonqin が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialog対応中かも @tiensonqin が 41 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
peasant-labs/peasant#844 ·
メンテナーはふだん 1 日以内に返信
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
internetarchive/openlibrary#14284 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Software search not only by name, but also by keywords対応中かも @DonatelloDonini が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
italia/catalogo-software#42 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
10up/ElasticPress#4402 ·
メンテナーはふだん 2 日以内に返信