Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e9cfaba
Initial plan
Copilot Apr 20, 2026
415b6eb
feat: migrate core UI components from MUI v4 to v5
Copilot Apr 20, 2026
e029c63
Update LavaMoat policies
metamaskbot Apr 20, 2026
9ef13df
Merge remote-tracking branch 'origin/main' into copilot/migrate-core-…
DDDDDanica May 1, 2026
ef2c0cb
chore: update snapshot and new v5 text-field props
DDDDDanica May 6, 2026
df9d5dc
Merge remote-tracking branch 'origin/main' into copilot/migrate-core-…
DDDDDanica May 6, 2026
e43c1b8
Merge remote-tracking branch 'origin/main' into copilot/migrate-core-…
DDDDDanica May 7, 2026
ac2ee62
chore: update snapshot
DDDDDanica May 7, 2026
54c748d
perf: fix Missing variant: 'standard' for material TextField themes
DDDDDanica May 7, 2026
c6847e4
per: Added the narrowed @emotion/react>@emotion/cache entry to lavamo…
DDDDDanica May 12, 2026
68f6efc
per: Added the narrowed @emotion/react>@emotion/cache entry
DDDDDanica May 12, 2026
21237a2
per: fix failed policy
DDDDDanica May 12, 2026
6a724e4
per: fix failed policy 2
DDDDDanica May 12, 2026
941ed5a
Merge branch 'main' into copilot/migrate-core-ui-components-mui-v4-v5
DDDDDanica May 12, 2026
4c65e14
Merge branch 'main' into copilot/migrate-core-ui-components-mui-v4-v5
DDDDDanica May 12, 2026
cd3277c
per: narrow @emotion/react>@emotion/cache document access to prevent …
DDDDDanica May 12, 2026
2a03af1
chore: resolve Slider sx overridden by rest-spread ordering and make …
DDDDDanica May 13, 2026
b2bbe71
chore: migrate Slider to v5
DDDDDanica May 13, 2026
60c4725
chore: fix the styles
DDDDDanica May 13, 2026
1f0a9c3
chore: fix the styles and policy
DDDDDanica May 13, 2026
8c507d0
chore: fix slider unit test and @mui/material policy.
DDDDDanica May 13, 2026
1a5cd3a
chore: fix PerpsOrderEntryPage unit test
DDDDDanica May 13, 2026
b5cfc93
chore: fix lint
DDDDDanica May 13, 2026
74bbe28
Merge remote-tracking branch 'origin/copilot/migrate-core-ui-componen…
DDDDDanica May 13, 2026
8bf27bc
chore: fix lint and perps e2e
DDDDDanica May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ ignores:
- 'react-compiler-runtime'
- '@fortawesome/fontawesome-free'
- 'punycode'
# peer deps of @mui/material v5, consumed internally by MUI (not imported directly)
# peer deps of @mui/material v5; no direct imports in app source (MUI resolves them)
- '@emotion/react'
- '@emotion/styled'
# v5 pre-installed ahead of migration from @material-ui/core (v4 path);
# imports switch to @mui/material in the migration branch
- '@mui/material'
# future use for Snaps date pickers; v7 supports React 17 + MUI v5
# present for upcoming date-picker migration; not imported yet — depcheck would flag unused
- '@mui/x-date-pickers'

#
Expand Down Expand Up @@ -116,8 +113,6 @@ ignores:
- '@metamask/institutional-wallet-snap'
- '@metamask/gator-permissions-snap'
- '@metamask/permissions-kernel-snap'
# perps poc
- '@metamask/perps-controller'

# files depcheck should not parse
ignorePatterns:
Expand Down
192 changes: 174 additions & 18 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,79 @@
"luxon": true
}
},
"@emotion/react>@emotion/cache": {
"globals": {
"document": true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@naugtur webpack's policy build has narrowed the document usages here down to a reasonable subset, usual just one or two properties on document. With webpack aiming to be released in about 1-2 weeks, do you think we should still bother with locking this down in the browserify build today?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If there's a chance it's getting released from a browserify build still, it'd be prudent to do so.
It's a matter of dropping

 "@emotion/react>@emotion/cache": {
      "globals": {
        "document": false,
        "document.head": true,
        "document.querySelectorAll": true
      }
    }

into the policy-override.json in browserify folder.

I'd keep putting in the work to narrow it down for now in case something goes wrong and we urgently need to fall back to browserify build one last time. Nobody's gonna have the time to worry about the policy differences at that time, so let's keep it off their plates with 2 miuntes of investment if possible.

If we're sure we'll not release browserify builds ever again, it's fine to skip. (but if that was the case we'd have removed the browserify setup already I suppose)

},
"packages": {
"@emotion/react>@emotion/cache>@emotion/memoize": true,
"@emotion/react>@emotion/cache>@emotion/sheet": true,
"@emotion/react>@emotion/weak-memoize": true,
"@emotion/react>@emotion/cache>stylis": true
}
},
"@emotion/styled>@emotion/is-prop-valid": {
"packages": {
"@emotion/react>@emotion/cache>@emotion/memoize": true
}
},
"@emotion/react": {
"globals": {
"HTMLElement": true,
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/react>@emotion/cache": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true,
"@emotion/react>@emotion/utils": true,
"@emotion/react>@emotion/weak-memoize": true,
"react-redux>hoist-non-react-statics": true,
"react": true
}
},
"@emotion/react>@emotion/serialize": {
"packages": {
"@emotion/react>@emotion/serialize>@emotion/hash": true,
"@emotion/react>@emotion/cache>@emotion/memoize": true,
"@emotion/react>@emotion/serialize>@emotion/unitless": true
}
},
"@emotion/react>@emotion/cache>@emotion/sheet": {
"globals": {
"document.createElement": true,
"document.createTextNode": true,
"document.styleSheets": true
}
},
"@emotion/styled": {
"globals": {
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/styled>@emotion/is-prop-valid": true,
"@emotion/react": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true,
"@emotion/react>@emotion/utils": true,
"react": true
}
},
"@emotion/react>@emotion/use-insertion-effect-with-fallbacks": {
"globals": {
"document": true
},
"packages": {
"react": true
}
},
"@emotion/react>@emotion/utils": {
"globals": {
"document": true
}
},
"@ensdomains/content-hash": {
"globals": {
"console.warn": true
Expand Down Expand Up @@ -698,7 +771,6 @@
"@material-ui/core>@material-ui/system": true,
"@material-ui/core>@material-ui/utils": true,
"@material-ui/core>clsx": true,
"@material-ui/core>popper.js": true,
"prop-types": true,
"react": true,
"react-dom": true,
Expand Down Expand Up @@ -2723,6 +2795,102 @@
"semver": true
}
},
"@mui/material": {
"globals": {
"DocumentFragment": true,
"ResizeObserver": true,
"addEventListener": true,
"cancelAnimationFrame": true,
"clearInterval": true,
"console.error": true,
"console.warn": true,
"document.addEventListener": true,
"document.body": true,
"document.removeEventListener": true,
"getSelection": true,
"navigator": true,
"performance.now": true,
"removeEventListener": true,
"requestAnimationFrame": true,
"setInterval": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/system": true,
"@mui/material>@mui/utils": true,
"@popperjs/core": true,
"clsx": true,
"prop-types": true,
"react": true,
"react-dom": true,
"@mui/material>react-is": true,
"react-transition-group": true
}
},
"@mui/material>@mui/system>@mui/private-theming": {
"globals": {
"console.error": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/utils": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/system>@mui/styled-engine": {
"globals": {
"console.error": true,
"document": true
},
"packages": {
"@babel/runtime": true,
"@emotion/react>@emotion/cache": true,
"@emotion/react": true,
"@emotion/react>@emotion/serialize": true,
"@emotion/styled": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/system": {
"globals": {
"clearTimeout": true,
"console.error": true,
"console.warn": true,
"document": true,
"getComputedStyle": true,
"localStorage.getItem": true,
"localStorage.setItem": true,
"matchMedia": true,
"setTimeout": true
},
"packages": {
"@babel/runtime": true,
"@mui/material>@mui/system>@mui/private-theming": true,
"@mui/material>@mui/system>@mui/styled-engine": true,
"@mui/material>@mui/utils": true,
"clsx": true,
"prop-types": true,
"react": true
}
},
"@mui/material>@mui/utils": {
"globals": {
"clearTimeout": true,
"console.error": true,
"document": true,
"innerWidth": true,
"setTimeout": true
},
"packages": {
"@babel/runtime": true,
"clsx": true,
"prop-types": true,
"react": true,
"@mui/material>@mui/utils>react-is": true
}
},
"@ngraveio/bc-ur": {
"packages": {
"@ngraveio/bc-ur>@keystonehq/alias-sampling": true,
Expand Down Expand Up @@ -5451,23 +5619,6 @@
"@ngraveio/bc-ur>sha.js>to-buffer": true
}
},
"@material-ui/core>popper.js": {
"globals": {
"MSInputMethodContext": true,
"Node.DOCUMENT_POSITION_FOLLOWING": true,
"cancelAnimationFrame": true,
"console.warn": true,
"define": true,
"devicePixelRatio": true,
"document": true,
"getComputedStyle": true,
"innerHeight": true,
"innerWidth": true,
"navigator": true,
"requestAnimationFrame": true,
"setTimeout": true
}
},
"react-tippy>popper.js": {
"globals": {
"MSInputMethodContext": true,
Expand Down Expand Up @@ -6394,6 +6545,11 @@
"react-markdown>style-to-object>inline-style-parser": true
}
},
"@emotion/react>@emotion/cache>stylis": {
"globals": {
"define": true
}
},
"@metamask/snaps-controllers>tar-stream": {
"packages": {
"@metamask/snaps-controllers>tar-stream>b4a": true,
Expand Down
Loading
Loading