Phone-hit guard: no blind spots for aliased, namespace and non-tsx IconButton; scope-aware PhoneHit check #156
Loading…
Reference in a new issue
No description provided.
Delete branch "void/phone-hit-guard-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up
ratatoskr:follow_up:phone-hit-kit-residual, items (1) and (2); item (3) (UrlPreviewCard clipping) needs a render and is left.src/, not only.tsxundersrc/app; the checker is an exported pureuncoveredIconButtons(src, fileName)returning{ bare, unhandled }. Aliased and namespace-member IconButton tags are checked like plain ones; forms the guard cannot cover (as={IconButton}, rebinding, re-export, destructuring, value use) land inunhandledand fail the test loudly.import typeof it no longer count as real use.drawnPx/sizePropread parsed attributes instead of regexing tag text.Sidebarcolumn gap (the reading of 'SidebarContent gap unpinned' that matched code; if the finding meantcomponents/sidebar/SidebarContent.tsx, which has no IconButton and no gap, this is the wrong target).No production component changed; the guard finds nothing uncovered on dev. Untested: scope resolution is syntactic (no type checker); a
withrebinding or class-static-block binding would not be seen.🤖 Generated with Claude Code
The coverage guard now scans every script file under src, resolves aliased and namespace-member IconButton tags, and fails loudly on any other mention (as={IconButton}, rebinding, re-export, destructuring, element access). A PhoneHit that an inner scope rebinds, or that is imported as a type, no longer counts. drawnPx/sizeProp read the parsed tag, not its text. The emoji Sidebar column's 4 px gap is pinned. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>