The call on not guessing which .map iteration you clicked is the right one for a static tool, but worth naming the alternative: the fiber tree carries the key and index at runtime, so a tool that hooks the renderer instead of just parsing the AST can disambiguate the iteration. The tradeoff is you're then tied to a running app and React internals that move between versions. Static gets you predictable, runtime gets you specific, hard to have both.
The AI-diff-layer point lands. The one I'd add: a change inside a map callback can also be reading from a scope it shouldn't, closing over a loop variable or reaching module state. That isn't a "which layer" question but it shows up the same way in a diff, looks per-item, behaves per-render.
The call on not guessing which .map iteration you clicked is the right one for a static tool, but worth naming the alternative: the fiber tree carries the key and index at runtime, so a tool that hooks the renderer instead of just parsing the AST can disambiguate the iteration. The tradeoff is you're then tied to a running app and React internals that move between versions. Static gets you predictable, runtime gets you specific, hard to have both.
The AI-diff-layer point lands. The one I'd add: a change inside a map callback can also be reading from a scope it shouldn't, closing over a loop variable or reaching module state. That isn't a "which layer" question but it shows up the same way in a diff, looks per-item, behaves per-render.