Commit c8ab214
fix(webapp): narrow synthetic-span machinePreset against the canonical enum
\`SyntheticRun.machinePreset\` is a plain string sourced from the
mollifier snapshot, but \`SpanRun.machinePreset\` is the typed
\`MachinePresetName\` enum (micro / small-1x / small-2x / medium-1x /
medium-2x / large-1x / large-2x). The direct assignment failed
\`tsc --noEmit\` and CI typecheck. Validate via \`MachinePresetName.safeParse\`
and collapse unknown values to \`undefined\` so a stale preset
returned by the buffer doesn't bleed into the UI as a typed-but-unknown
value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f36c576 commit c8ab214
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| |||
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
150 | | - | |
| 161 | + | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
| |||
0 commit comments