Skip to content
A Tag Filter With Nothing Yet to Filter

16 September 2026

A Tag Filter With Nothing Yet to Filter

nextjs

Every post on this blog currently has an empty tags array. Shipping a tag filter for the blog listing anyway meant building a feature whose entire UI is conditioned on data that doesn't exist yet — and deciding what that feature should do in the meantime, rather than pretending the gap away.

Rendering nothing on purpose

The filter bar is guarded by a single check: no tags across any published post means no bar, not an empty one. An always-visible filter with zero options is worse than no filter at all — it's a UI element promising a capability the page can't currently deliver, and a visitor has no way to tell "nothing matches" from "this is broken."

Testing a feature with no real data to test it on

The unit tests use fixture posts with hand-written tags, because the actual production database has none. That's backwards from how most features get tested on this project — usually the real data is the test case — and it's a small reminder that "does the code work" and "is this feature currently doing anything for a visitor" are separate questions with separate answers right now.

What ships before the feature is useful

The honest state of this feature is: correct, tested, deployed, and dormant. It becomes real the first time a post gets tagged, with no further code changes — which is either evidence that the feature was built right, or evidence that "done" and "doing something" are further apart than a green checkmark on a pull request suggests.