Fix: thumbnail.png would not be created in a few scenarios, the commandType wasn't populated in some workflows. (#6744)

* fix: moving screenshot logic to after KCL runtime. More robust

* fix: removing toast debugging

* fix: cleaning up the old logic
This commit is contained in:
Kevin Nadro
2025-05-07 12:47:35 -05:00
committed by GitHub
parent 2b3dfaf023
commit 998dbdc6ff
3 changed files with 35 additions and 31 deletions

View File

@ -36,6 +36,7 @@ import {
engineViewIsometricWithoutGeometryPresent,
} from '@src/lib/utils'
import { DEFAULT_DEFAULT_LENGTH_UNIT } from '@src/lib/constants'
import { createThumbnailPNGOnDesktop } from '@src/lib/screenshot'
export const EngineStream = (props: {
pool: string | null
@ -49,7 +50,7 @@ export const EngineStream = (props: {
const engineStreamState = useSelector(engineStreamActor, (state) => state)
const { file } = useRouteLoaderData(PATHS.FILE) as IndexLoaderData
const { file, project } = useRouteLoaderData(PATHS.FILE) as IndexLoaderData
const last = useRef<number>(Date.now())
const videoWrapperRef = useRef<HTMLDivElement>(null)
@ -122,6 +123,12 @@ export const EngineStream = (props: {
})
}
}
if (project && project.path) {
createThumbnailPNGOnDesktop({
projectDirectoryWithoutEndingSlash: project.path,
})
}
})
.catch(trap)
}