fix(webviews): type the find pill's icon map in editor-find-narrow (base type-check red from #22872)
Merged
TE
17d ago+9+9+0123456789-5-5-0123456789
webviews/test/editor-find-narrow.test.tsx (from #22872) indexes an inline object literal by role, which widens each icon name to string, so vp check in webviews fails on base 3b0a6b37 with TS2322 ("Type 'string' is not assignable to type 'IconName'") at line 42. This names the map with as const satisfies Record<FindPillIconRole, IconName>, the way find/FindBar.tsx does. The map is inside the requireBrowserLane callback, which check:browser-lanes requires.
Changelog
none
Observed / Not run
- Observed:
scripts/web-lint.shfails on base with the TS2322 above, and passes on this branch.prepush-gate.pyreports no new violations. - Not run: the browser test itself (Playwright Chromium lane); CI runs it. Its behavior is unchanged: it draws the same four icons.
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the webviews type-check failure by typing the find pill's icon map in editor-find-narrow.test.tsx.
- Indexing an inline object literal by role widened each icon name to
string, causing TS2322 on base (stringis not assignable toIconName). - Declares the map with
as const satisfies Record<FindPillIconRole, IconName>, matching howfind/FindBar.tsxdoes it. - Test behavior is unchanged; it renders the same four icons.