Querying pages with hierarchy

Hi everyone,

I have created the following query, in order to have the list of all sub pages of the current page, with the objective (not implemented yet) to be able sort them by created date & by property (the current “Hierarchy” block is not suited to my workflow as it is at the bottom of the page, and does not display enough information)
However, while the query works well with pages without hierarchy, I have a “blue screen” (and everything in the logseq interface disappear) whenever I click on the link of a subpage.

Is this a bug, or am I doing something wrong?

#+BEGIN_QUERY
{:query [:find (pull ?p [*])
:in $ ?parent
:where 
  [?p :block/name ?name]
  [(clojure.string/starts-with? ?name ?parent)]
  [(clojure.string/includes? ?name "/")]
]
:inputs [:current-page]
:view
 (fn [results]
 [:div.flex.flex-col
(for [{:block/keys [name original-name]} results]
    [:a {:href (str "#/page/" name)}
        original-name]
   )])}
#+END_QUERY

Thanks for your help !