Repository navigation
fix(webviews): type the find pill's icon map in editor-find-narrow (base type-check red from #22872) - #22927
Conversation
…ase type-check red from #22872) Indexing an object literal by role widened each icon to string, so vp check failed with TS2322 (string is not assignable to IconName) on every webviews push. Name the map with satisfies Record<FindPillIconRole, IconName>, as find/FindBar.tsx does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c08-3514-7430-9c71-6b7ba4fdac72&host=cosmic-gray
|
owner: 01a15c08-3514-7430-9c71-6b7ba4fdac72 |
1 similar comment
|
owner: 01a15c08-3514-7430-9c71-6b7ba4fdac72 |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: web / Web status; NEW: green on the base 3b0a6b3; do not merge until green; see lane-rules Tour of |
|
Shipped in:
|
|
Shipped in:
|
webviews/test/editor-find-narrow.test.tsx(from #22872) indexes an inline object literal by role, which widens each icon name tostring, sovp checkin webviews fails on base3b0a6b37with TS2322 ("Type 'string' is not assignable to type 'IconName'") at line 42. This names the map withas const satisfies Record<FindPillIconRole, IconName>, the wayfind/FindBar.tsxdoes. The map is inside therequireBrowserLanecallback, whichcheck:browser-lanesrequires.Changelog
none
Observed / Not run
scripts/web-lint.shfails on base with the TS2322 above, and passes on this branch.prepush-gate.pyreports no new violations.Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith 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.string, causing TS2322 on base (stringis not assignable toIconName).as const satisfies Record<FindPillIconRole, IconName>, matching howfind/FindBar.tsxdoes it.Written for commit a390758. Summary will update on new commits.