From b2d8834bf7f39d26d9339a25127cb79adf01f69f Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Thu, 1 Oct 2026 22:12:30 -0500 Subject: [PATCH 1/7] Update scratch-vm --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 234040b14eb..1975cc5852b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18774,7 +18774,7 @@ }, "node_modules/scratch-vm": { "version": "2.1.46", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#c4823421cb7c17d8d8a89878851ce1668c26a21f", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#01178fb80f1f7c40bb9515b4cfd8cb0aa520d1f4", "license": "MPL-2.0", "dependencies": { "@turbowarp/json": "^0.1.2", From 2d134bf8fd0c1fdb0cd77f73f1eaae1b946f7ee5 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sat, 3 Oct 2026 20:07:16 -0500 Subject: [PATCH 2/7] Update scratch-vm --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 1975cc5852b..3c703923d30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18774,7 +18774,7 @@ }, "node_modules/scratch-vm": { "version": "2.1.46", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#01178fb80f1f7c40bb9515b4cfd8cb0aa520d1f4", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#1fd83b48dd49cf0811f17408672cbe0ae21d6a7f", "license": "MPL-2.0", "dependencies": { "@turbowarp/json": "^0.1.2", From 1e08e6a581ddd2cd555a9ca42e0f4b6c6a4f551e Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 4 Oct 2026 19:32:15 -0500 Subject: [PATCH 3/7] Add windchimes for compile error, lost WebGL contexts --- package-lock.json | 2 +- src/containers/tw-windchime-submitter.jsx | 68 +++++++++++++++++------ 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c703923d30..51d92b06ed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18713,7 +18713,7 @@ }, "node_modules/scratch-render": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#a67f7c9c07d459582c227d4fd3fae8f59d8fc9ce", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#7d0df878e1e3d99cef8ed8fd8611a5cb0f192c9f", "license": "MPL-2.0", "dependencies": { "@turbowarp/ancient-hull.js": "^0.2.13", diff --git a/src/containers/tw-windchime-submitter.jsx b/src/containers/tw-windchime-submitter.jsx index 90d97f09ceb..1575eccaec7 100644 --- a/src/containers/tw-windchime-submitter.jsx +++ b/src/containers/tw-windchime-submitter.jsx @@ -1,6 +1,7 @@ import React from 'react'; import {connect} from 'react-redux'; import PropTypes from 'prop-types'; +import VM from 'scratch-vm'; import {getIsError} from '../reducers/project-state'; import {ProjectUnsharedError, ProjectFetchError} from '../lib/tw-load-project-error'; @@ -61,30 +62,61 @@ const submitChime = async (resource, event) => { } }; +const isEligible = projectId => projectId !== '0' && projectId !== null; + +const submitOnce = (submitted, projectId, event) => { + if (!isEligible(projectId) || submitted.has(projectId)) { + return; + } + submitted.add(projectId); + submitChime(`scratch/${projectId}`, event); +}; + class TWWindchimeSubmitter extends React.Component { + constructor (props) { + super(props); + this.handleContextLost = this.handleContextLost.bind(this); + this.handleCompileError = this.handleCompileError.bind(this); + } + + componentDidMount () { + const vm = this.props.vm; + vm.on('COMPILE_ERROR', this.handleCompileError); + if (vm.renderer) { + vm.renderer.on('ContextLost', this.handleContextLost); + } + } + componentDidUpdate (prevProps) { - if (this.props.projectId === '0' || this.props.projectId === null) { - // Only projects with a real ID are eligible for windchimes. - return; + if (this.props.isStarted && !prevProps.isStarted) { + submitOnce( + submittedViewsThisSession, + this.props.projectId, + this.props.isEmbedded ? 'view/embed' : 'view/index' + ); } - if ( - this.props.isStarted && !prevProps.isStarted && - !submittedViewsThisSession.has(this.props.projectId) - ) { - submittedViewsThisSession.add(this.props.projectId); - submitChime(`scratch/${this.props.projectId}`, this.props.isEmbedded ? 'view/embed' : 'view/index'); + if (this.props.isError && !prevProps.isError) { + submitOnce(submittedErrorsThisSession, this.props.projectId, getErrorEvent(this.props.error)); } + } - if ( - this.props.isError && !prevProps.isError && - !submittedErrorsThisSession.has(this.props.projectId) - ) { - submittedErrorsThisSession.add(this.props.projectId); - submitChime(`scratch/${this.props.projectId}`, getErrorEvent(this.props.error)); + componentWillUnmount () { + const vm = this.props.vm; + vm.off('COMPILE_ERROR', this.handleCompileError); + if (vm.renderer) { + vm.renderer.off('ContextLost', this.handleContextLost); } } + handleCompileError () { + submitOnce(submittedErrorsThisSession, this.props.projectId, 'error/compiler'); + } + + handleContextLost () { + submitOnce(submittedErrorsThisSession, this.props.projectId, 'error/webgl'); + } + render () { // No visible components. return null; @@ -96,7 +128,8 @@ TWWindchimeSubmitter.propTypes = { isEmbedded: PropTypes.bool.isRequired, isError: PropTypes.bool.isRequired, isStarted: PropTypes.bool.isRequired, - projectId: PropTypes.string + projectId: PropTypes.string, + vm: PropTypes.instanceOf(VM).isRequired }; const mapStateToProps = state => ({ @@ -104,7 +137,8 @@ const mapStateToProps = state => ({ isEmbedded: state.scratchGui.mode.isEmbedded, isStarted: state.scratchGui.vmStatus.running, isError: getIsError(state.scratchGui.projectState.loadingState), - projectId: state.scratchGui.projectState.projectId + projectId: state.scratchGui.projectState.projectId, + vm: state.scratchGui.vm }); const mapDispatchToProps = () => ({}); From be382abea6af88db188162ca9a3e4e06ec4ca3b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 19:32:03 -0500 Subject: [PATCH 4/7] build(deps): bump scratch-vm from `1fd83b4` to `042235b` (#1197) Bumps [scratch-vm](https://github.com/TurboWarp/scratch-vm) from `1fd83b4` to `042235b`. - [Commits](https://github.com/TurboWarp/scratch-vm/compare/1fd83b48dd49cf0811f17408672cbe0ae21d6a7f...042235b193547c21540d5d6db2798bb7913a1df2) --- updated-dependencies: - dependency-name: scratch-vm dependency-version: 042235b193547c21540d5d6db2798bb7913a1df2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 51d92b06ed7..636ff1cec19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18774,7 +18774,8 @@ }, "node_modules/scratch-vm": { "version": "2.1.46", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#1fd83b48dd49cf0811f17408672cbe0ae21d6a7f", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#042235b193547c21540d5d6db2798bb7913a1df2", + "integrity": "sha512-iVX/1bHeeqcnFRU1SYIEsCn2+wI/uw4eqF3sRSKNwvZUgTO6/jQo2vPsLdJJdZe1SRPO6ZamBVkG3OUbG/ZwXw==", "license": "MPL-2.0", "dependencies": { "@turbowarp/json": "^0.1.2", From 1b3dcb6dd25b69ef19375c9cb82e7e6ce4e92c3c Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 11 Oct 2026 19:38:49 -0500 Subject: [PATCH 5/7] Update scratch-vm and scratch-render --- package-lock.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 636ff1cec19..c74c01c7756 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18713,7 +18713,7 @@ }, "node_modules/scratch-render": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#7d0df878e1e3d99cef8ed8fd8611a5cb0f192c9f", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#592e39ad570992e7fab0570fea6e79cbb0728743", "license": "MPL-2.0", "dependencies": { "@turbowarp/ancient-hull.js": "^0.2.13", @@ -18774,8 +18774,7 @@ }, "node_modules/scratch-vm": { "version": "2.1.46", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#042235b193547c21540d5d6db2798bb7913a1df2", - "integrity": "sha512-iVX/1bHeeqcnFRU1SYIEsCn2+wI/uw4eqF3sRSKNwvZUgTO6/jQo2vPsLdJJdZe1SRPO6ZamBVkG3OUbG/ZwXw==", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-vm.git#55fd9b7c9509827c9cec31482aa63f2d57ec564d", "license": "MPL-2.0", "dependencies": { "@turbowarp/json": "^0.1.2", From e9d3bde6633f67f52e2144e57a44dfacc807444b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 19:49:05 -0500 Subject: [PATCH 6/7] build(deps): bump scratch-audio from `aba00cd` to `dc47bf3` (#1198) Bumps [scratch-audio](https://github.com/TurboWarp/scratch-audio) from `aba00cd` to `dc47bf3`. - [Commits](https://github.com/TurboWarp/scratch-audio/compare/aba00cd02e36d95407effafa03f3678e4c669b30...dc47bf3bc177289531ed8a4fb616fed895dc303a) --- updated-dependencies: - dependency-name: scratch-audio dependency-version: dc47bf3bc177289531ed8a4fb616fed895dc303a dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index c74c01c7756..89282b48615 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18611,7 +18611,8 @@ }, "node_modules/scratch-audio": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-audio.git#aba00cd02e36d95407effafa03f3678e4c669b30", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-audio.git#dc47bf3bc177289531ed8a4fb616fed895dc303a", + "integrity": "sha512-JWfcMClxHzQLHGjL/LCx6IP0D0eF3HNT+Zp5vwHUmh0Lg8OWH3hscnvCWJFj8EkRf+gQ07uOMIt9VT3MwD6CWQ==", "license": "BSD-3-Clause", "dependencies": { "@turbowarp/nanolog": "^0.2.0", From 06b2edf2e8aaafa06074ed6fb49033c7e56e132d Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Thu, 15 Oct 2026 21:42:47 -0500 Subject: [PATCH 7/7] Update scratch-render --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 89282b48615..e467fd8403b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18714,7 +18714,7 @@ }, "node_modules/scratch-render": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#592e39ad570992e7fab0570fea6e79cbb0728743", + "resolved": "git+ssh://git@github.com/TurboWarp/scratch-render.git#430b44fbff2040198ce526b05bae4f59f4e530ce", "license": "MPL-2.0", "dependencies": { "@turbowarp/ancient-hull.js": "^0.2.13",