Implement Core Dump for modeling app state (#2653)

This commit is contained in:
Dan Shaw
2024-06-20 16:36:28 -07:00
committed by GitHub
parent 2e7bdf02cf
commit a1bcad9dfb
11 changed files with 811 additions and 34 deletions

View File

@ -121,7 +121,24 @@ export const ModelingMachineProvider = ({
htmlRef,
token
)
useHotkeyWrapper(['meta + shift + .'], () => coreDump(coreDumpManager, true))
useHotkeyWrapper(['meta + shift + .'], () => {
console.warn('CoreDump: Initializing core dump')
toast.promise(
coreDump(coreDumpManager, true),
{
loading: 'Starting core dump...',
success: 'Core dump completed successfully',
error: 'Error while exporting core dump',
},
{
success: {
// Note: this extended duration is especially important for Playwright e2e testing
// default duration is 2000 - https://react-hot-toast.com/docs/toast#default-durations
duration: 6000,
},
}
)
})
// Settings machine setup
// const retrievedSettings = useRef(