Advance query to show Future tasks withing specific range

The code below used to work previously but it no longer works. I want to see upcomming tasks between 8th day to 14th day.

{:title [:h1 "📅️ FUTURE"]
    :query [:find (pull ?b [*])
            :in $ ?start ?next
            :where
            [?b :block/marker ?marker]
            [(contains? #{"LATER" "TODO"} ?marker)]
            (or-join [?start ?next ?b]
                     ;; Scenario 1: Task has a scheduled date today or in the future but less than 'next'
                     (and
                      [?b :block/scheduled ?scheduled]
                      [(>= ?scheduled ?start)]  ; Scheduled today or in future
                      [(< ?scheduled ?next)])   ; But less than 'next'

                     ;; Scenario 2: Task has a deadline today or in the future but less than 'next'
                     ;; exclude scheduled task as they might be before ?start
                     (and
                      [?b :block/deadline ?deadline]
                      (not [?b :block/scheduled _])
                      [(>= ?deadline ?start)]  ; Deadline today or in future
                      [(< ?deadline ?next)])  ; But less than 'next'
                     )]
    :inputs [:+8d :+14d]
    :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/scheduled])) result)) ; sort the result by the scheduled date
    :collapsed? false}

sorry, i keep forgetting that i also have to make the block todo along with scheduling.

I am very happy that in the DB version that shouldn’t be necessary anymore as I understand. I think you can define your own markers there.