Cmd+Shift+K "Search only: current page" returns blocks from the whole graph
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
Direzione di ricerca
Inizia in src/main/frontend/components/cmdk/core.cljs da load-results :current-page, poi controlla come src/main/frontend/components/cmdk/state.cljs associa page-uuid e come src/main/frontend/worker/search.cljs legge la restrizione della pagina. Riproduci il problema con una parola presente in un’altra pagina ma non in quella corrente. Il lavoro è concluso quando «Search only: current page» non restituisce blocchi di altre pagine.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!)
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 29
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di logseq/db-test
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedForse già presa @RaphaelFakhri l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledForse già presa @tiensonqin l’ha presa 17 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Potential Dataloss: Deleting an entry from the property page's node table has no confirmation dialogForse già presa @tiensonqin l’ha presa 41 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Tutte le issue di logseq/db-test
Issue simili
-
Log-odds calibration uses upper middle score instead of median for even candidate setsForse già presa @flysheep-ai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
peasant-labs/peasant#844 ·
I maintainer di solito rispondono entro 1 giorno
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
internetarchive/openlibrary#14284 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Software search not only by name, but also by keywordsForse già presa @DonatelloDonini l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
italia/catalogo-software#42 · 1 commento ·