To my younger me: Please use 2 different resource URI for #htmx and non-htmx requests. It makes development much easier later even tough you could destinquish by htmx headers, you definitely have more "control" and less surprises as things grow.
e.g. /todos/<id> and /hx/todos/<id>
