mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
user.type dispatches one event per character and re-renders the whole form on each one, so a test that only needs a field to hold a value pays for every keystroke. Where the value is all the test wants, fireEvent.change sets it in one go. Measured against a control on the same tree: the 100 converted files went from 654s to 619s of CPU, 5.4% cheaper, while the files nobody touched drifted 1.2% the other way. Modest, and honest about it. Rolled out one file at a time, running each before and after and keeping the conversion only where the file stayed green. That rejected 35 files, all cases where the keystrokes are the behaviour: Base UI comboboxes drive their filter from real keyboard input and ignore a raw change event, and the same goes for autocompletes, debounces and key handlers. Those keep user.type. |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| contexts | ||
| data | ||
| hooks | ||
| lib | ||
| utils | ||
| autorouter_presets.json | ||
| types.ts | ||