Skip to content

Conversation

@mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Nov 10, 2025

Overview

While we were attempting to type the IconName prop for Icon as a key of icon-data, icon-data itself types the keys as string, so we weren't properly catching lint errors, meaning typing an Icon name prop as "does-not-exist" would pass lint. We were half-working around this by logging an error if the icon name was invalid, but the problem is that this still passes on CI when we could be catching it.

To fix, we update the typing to narrow on actual key values in our icon-data. See icon-data.ts.

Test Plan and Hands on Testing

Does CI pass?

Risk assessment

very low, just linting updates

@mjhuff mjhuff requested review from jerader and koji November 10, 2025 22:36
@mjhuff mjhuff requested a review from a team as a code owner November 10, 2025 22:36
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.08%. Comparing base (3806e22) to head (1009bb3).
⚠️ Report is 3 commits behind head on edge.

Files with missing lines Patch % Lines
...ferAdvancedSettings/ResetAdvancedSettingsModal.tsx 0.00% 1 Missing ⚠️
...s/ODD/RobotSettingsDashboard/RobotSettingsList.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #20112      +/-   ##
==========================================
- Coverage   25.09%   25.08%   -0.01%     
==========================================
  Files        3559     3559              
  Lines      297660   297757      +97     
  Branches    42126    42135       +9     
==========================================
+ Hits        74686    74688       +2     
- Misses     222951   223046      +95     
  Partials       23       23              
Flag Coverage Δ
protocol-designer 19.18% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/src/molecules/ODDInfoScreen/OddInfoScreen.tsx 0.00% <ø> (ø)
components/src/icons/icon-data.ts 100.00% <100.00%> (ø)
components/src/molecules/RobotInfoLabel/index.tsx 100.00% <ø> (ø)
...ferAdvancedSettings/ResetAdvancedSettingsModal.tsx 0.00% <0.00%> (ø)
...s/ODD/RobotSettingsDashboard/RobotSettingsList.tsx 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice, thank you for doing this!

@mjhuff mjhuff merged commit 667d351 into edge Nov 10, 2025
71 checks passed
@mjhuff mjhuff deleted the icon-data-typing branch November 10, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants