Launch offer: the first 1,000 users get Settl free for a year* Claim your spot
settlbuilding in public

Debug-from-the-input checklist: stop fixing the wrong layer

The short version

A tappable row would not open. Five separate fixes went in, and four of them were meaningless, because the row was never wired to receive a tap at all. Everything downstream of the tap was working fine and was never the problem.

The habit that prevents it: debug from the input inward. Confirm the event is actually being received before you touch anything about where it is supposed to go.

Copy these prompts

Paste them into Claude Code (or any AI that can see your project), in this order. Each one answers a different question, and the first is usually the one that matters.

1. Is it even receiving the tap

Something in my app is not responding when tapped. Before suggesting any fix, show me the quickest way to confirm whether the element is receiving the event at all. Do not propose a solution until we know that.

2. Is anything running when it does

Now show me how to confirm whether a handler is attached and actually running when the tap lands. Tell me exactly what I should see if it is working and what I would see if it is not.

3. Only then, is it going to the right place

Only if the first two pass, check where the action navigates to and whether it receives the right information. Tell me which of the three steps failed, so I know which layer the bug actually lives in.

Comment rows in my activity feed wouldn't open. I fixed the routing, forwarded missing IDs from the backend, added cache fallbacks, forced snapshot refreshes (five commits), and four of them fixed nothing. All that code was unreachable, because a boolean gate (hasTarget = isExpense || isSettlement) meant comment rows never got a tap handler AT ALL. The fifth fix was one line. My notes say it verbatim: "check the tap binding gate first, not the routing logic."

Why smart people fix the wrong layer

You debug where you expect the bug (the complicated part: routing, data, caching) instead of where the signal actually dies. Every fix downstream of the break is dead code that "should have helped," which convinces you the bug is even deeper. It isn't. It's earlier.

The checklist: work from the input inward

  1. Confirm the event fires at all. Before touching any logic: one log/breakpoint at the entry point (the tap handler, the HTTP route, the message consumer). If it doesn't print, stop. Nothing downstream matters.
  2. Find the gate. Search for the conditions between the input and your code: if guards, feature flags, early returns, enabled: props, null handlers. My bug was a gate that excluded a whole row type from getting an InkWell.
  3. Binary-search the pipeline, don't read it. Put a probe at the midpoint of input → outcome. Signal present? Bug is later. Absent? Earlier. Three probes beat thirty minutes of code-reading.
  4. Make each fix falsifiable before writing it. State: "this fails because X; after my fix, probe Y will print." If you can't name probe Y, you're guessing. That's how I shipped four decorative fixes.
  5. Reproduce the fix failing. If you "fixed" it and behavior didn't change, you don't have a partial fix. You have proof you're in the wrong layer. Revert and move the probe earlier. (I ignored this signal four times.)
  6. Suspect wiring before logic. Handler not attached, listener not subscribed, route not registered, callback ?.call() on null. In UI code these outnumber logic bugs. Check the binding, then the behavior.
  7. Cap your attempts. Two failed fixes on one bug = mandatory stop, write down the actual evidence, restart from step 1. The five-commit spiral happens when you never force the reset.

Steal this for your app

Run this on your codebase

Paste this into Claude Code in your repo:

Audit this repo for input-layer gates that could make downstream fixes unreachable.
Pick the top user flows and trace each from its entry point (tap handler, HTTP route, message consumer) inward.
Find every gate between input and logic: if guards, feature flags, early returns, enabled props, and null handlers.
Flag UI elements that conditionally skip attaching a handler for some item types or states.
Flag speculative fallback code that handles states which cannot occur, as candidates for reverting.
For each suspect flow, propose a probe point that would confirm where the signal dies.
Report findings as a checklist before changing anything.

Get the next one in your inbox