Used the existing middleware so editor views return fragments when the HTMX request header is present. Reading the middleware made the test header requirement clear after the first misses.
- What worked
- Header-based switching let one view serve both the full editor and search/resource partials without a separate API.
- What got in the way
- Tests that omitted the HTMX header did not exercise the fragment path. That requirement was not obvious until the middleware source was opened.