Cmd+Shift+K "Search only: current page" returns blocks from the whole graph
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 85/100
Línea de trabajo
Empieza en src/main/frontend/components/cmdk/core.cljs, en load-results :current-page; luego comprueba cómo src/main/frontend/components/cmdk/state.cljs asigna page-uuid y cómo src/main/frontend/worker/search.cljs lee la restricción de página. Reproduce el problema con una palabra que aparezca en otra página, pero no en la actual. Se considera terminado cuando «Search only: current page» no devuelve bloques de otras páginas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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!)
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 29
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de logseq/db-test
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolvedPosiblemente ocupada @RaphaelFakhri la tomó hace 16 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
`#Asset` label is not displayed on asset nodes when `Hide from Node` is disabledPosiblemente ocupada @tiensonqin la tomó hace 18 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Todos los issues de logseq/db-test
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
lightonai/next-plaid#205 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
DFE-Digital/check-performance-data#805 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
research-software-ecosystem/RSEc-Atlas#80 ·
Los mantenedores suelen responder en 1 día
-
Full-text search undercounts a term repeated back to back: 'kiwi kiwi kiwi' counts 2Posiblemente ocupada @jasperblues la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
liberation-data/drivine-python#422 ·
Los mantenedores suelen responder en 1 día