Cmd+Shift+K "Search only: current page" returns blocks from the whole graph
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
Hướng nghiên cứu
Bắt đầu tại src/main/frontend/components/cmdk/core.cljs, ở load-results :current-page, sau đó kiểm tra cách src/main/frontend/components/cmdk/state.cljs ánh xạ page-uuid và cách src/main/frontend/worker/search.cljs đọc giới hạn trang. Tái hiện bằng một từ có trong trang khác nhưng không có trong trang hiện tại. Hoàn tất khi “Search only: current page” không trả về khối nào từ các trang khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!)
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 29
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của logseq/db-test
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedCó thể đã có người làm @RaphaelFakhri đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledCó thể đã có người làm @tiensonqin đã nhận 18 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogCó thể đã có người làm @tiensonqin đã nhận 42 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Tất cả issue của logseq/db-test
Issue tương tự
-
Log-odds calibration uses upper middle score instead of median for even candidate setsCó thể đã có người làm @flysheep-ai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
peasant-labs/peasant#844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
internetarchive/openlibrary#14284 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày