How it works
The pieces
Adding a folder with a report.tsx adds a report to the list. Nothing else
needs changing.
How a page is served
- The file is checked before it runs. Every block, prop, query and column it names must be one the kit and its queries know; the check names the file and line of an error.
- Every query runs once, over a wide window. Each query runs over
the last 24 months up to today:
$fromand$toin the SQL are bound to that window, not to the dates you pick. The result is cached for ten minutes. - The rows are sliced to your dates. Each query's
grainsays how: withweek, each row'sweekcolumn ("2026-W14") is kept when it falls in the range; withmonth, itsmonthcolumn ("2026-03"); withall(the default) nothing is sliced. Changing the dates re-slices the cached rows, so it is instant and runs no query. - The page draws the blocks. Each block reads one result by its name (its series) and the columns it names.
So a report that should follow the date filter returns a week or month
column and sets grain. One whose queries are all "all" shows the same
rows whatever the dates; filterBar: false hides the date filter for such a
report.
The checks
Claude runs these for you. What each part of a report accepts is in Components.