latest magicgui includes support for pydantic, might be able to simplify alot of the custom pydantic object traversal happening here.