Registry
Bbackstage avatar

backstage/migrate-mui-autocomplete-to-combobox

MUI 4 to BUI: Replace Autocomplete with BUI Combobox or SearchAutocomplete

backstage3 executions

  • backstage
  • migration
  • mui
  • bui
  • autocomplete
  • combobox
Connect a repo
npx codemod @backstage/migrate-mui-autocomplete-to-combobox

@backstage/migrate-mui-autocomplete-to-combobox

Heuristically migrates MUI 4 Autocomplete to Backstage UI Combobox or SearchAutocomplete.

Covers

  • Form-like option pickers with string[] literal options โ†’ Combobox
  • Clear free-text search (onInputChange + word-boundary search/find/filter cue, no selection value) โ†’ SearchAutocomplete
  • Deep and barrel imports from @material-ui/lab
  • Best-effort option literal flattening for string arrays
  • Prunes unused TextField imports left behind by renderInput
  • Maps MUI size to BUI size (small preserved; medium/large/omitted โ†’ medium; falls back to static size on the renderInput TextField)

TODOs left for humans

  • Ambiguous Autocomplete usage (left as MUI with a TODO)
  • Object options / getOptionLabel shapes (not safe for BUI Combobox)
  • freeSolo, custom renderOption, and other complex cases
  • Non-trivial onChange / options shapes
  • Dynamic size on Autocomplete

Won't do

  • Perfect API parity for every Autocomplete prop

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.