From 31f4119442d89dbb3aa541d547ab28ed515155bc Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 14 Dec 2025 14:41:05 +0100 Subject: [PATCH 001/144] scripting: calling setFocus() without if now unfocuses active element --- CHANGELOG.md | 1 + resources/docs/docs/widgets/scripting.md | 2 +- src/client/widgets/scripts/script-vm.mjs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b3b3962..2d48c2cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - user scripts are longer protected against infinite loop and the main window object may be reached (it's not supported to break out of scripting context, but resources are no longer wasted to prevent it) - `toolbar()` can now target menu actions by id instead of index - `getToolbar()` function added (returns the state of a menu entry toggle) + - calling `setFocus()` without argument now unfocuses current active element - midi - add `no_auto_note_off` option diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index ee65c8a8..45c94034 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -303,7 +303,7 @@ Reference: - `id` (optional): widget `id` as a string -Gives focus to a widget (ie input widget). +Gives focus to a widget (ie input widget). If `id` is omitted or falsy, currently focused element will be unfocused. *Built-in client only*: tells the operating system to give the focus to the client window diff --git a/src/client/widgets/scripts/script-vm.mjs b/src/client/widgets/scripts/script-vm.mjs index b4dc8b39..9f862b54 100644 --- a/src/client/widgets/scripts/script-vm.mjs +++ b/src/client/widgets/scripts/script-vm.mjs @@ -452,6 +452,8 @@ class ScriptVm extends Vm { if (widgets.length) { if (widgets[0].focus) widgets[0].focus() } + } else if (document.activeElement) { + document.activeElement.blur() } // built-in client only: electron will call window.focus() From e4eae76bdfc17de16cf9c0b393b8874e082d550a Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 15 Dec 2025 09:41:17 +0100 Subject: [PATCH 002/144] midi: implement backend restart feature --- CHANGELOG.md | 2 + .../docs/docs/custom-module/custom-module.md | 4 ++ .../docs/docs/user-interface/launcher.md | 4 +- src/launcher/toolbar.mjs | 30 ++++++++--- src/server/electron/index.mjs | 7 ++- src/server/node/midi.mjs | 54 ++++++++++++++++--- src/server/node/osc/index.mjs | 1 + 7 files changed, 84 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d48c2cb..e994ee36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ - midi - add `no_auto_note_off` option + - add `Restart backend` action to the launcher's menu + - add `restartMidiBackend()` function to custom module context - breaking change - dropped support for iOS 10.3 diff --git a/resources/docs/docs/custom-module/custom-module.md b/resources/docs/docs/custom-module/custom-module.md index 3615e4fc..8bb3081f 100644 --- a/resources/docs/docs/custom-module/custom-module.md +++ b/resources/docs/docs/custom-module/custom-module.md @@ -167,6 +167,10 @@ for (var ip in tcpServer.clients) { ``` +#### `restartMidiBackend()` + +This function can be used to restart the midi backend (if already running) without restarting the server + #### Other javascript globals - `console` diff --git a/resources/docs/docs/user-interface/launcher.md b/resources/docs/docs/user-interface/launcher.md index 304aa33b..87ba9d67 100644 --- a/resources/docs/docs/user-interface/launcher.md +++ b/resources/docs/docs/user-interface/launcher.md @@ -7,7 +7,9 @@ - New window: open a new client window (hidden when stopped) - Load: load server configuration from file - Save / Save as: save server configuration to file -- List MIDI devices: list available MIDI devices in the console +- MIDI + - List devices: list available MIDI devices in the console + - Restart backend: restart midi backend without restarting the server - Console: - Clear: clear console - Autoscroll: enable/disable console autoscroll diff --git a/src/launcher/toolbar.mjs b/src/launcher/toolbar.mjs index 8c80fc9d..a6677b4d 100644 --- a/src/launcher/toolbar.mjs +++ b/src/launcher/toolbar.mjs @@ -9,7 +9,7 @@ import {DOM, PXSCALE} from '../client/globals.mjs' var {Menu, MenuItem} = remote.require('electron'), menu = new Menu(), - {midilist, openDocs} = remote.getGlobal('launcherSharedGlobals'), + {midiList, midiRestart, openDocs} = remote.getGlobal('launcherSharedGlobals'), serverStarting = false, serverStart = ()=>{ if (serverStarting) return @@ -77,13 +77,25 @@ menu.append(new MenuItem({ menu.append(new MenuItem({ type: 'separator' })) -menu.append(new MenuItem({ - label: 'List MIDI Devices', - click: ()=>{ - midilist() - }, - accelerator: 'ctrl + m' -})) + +menu.append(new MenuItem({type: 'submenu' , label: 'MIDI', submenu: [ + new MenuItem({ + label: 'List devices', + click: ()=>{ + midiList() + }, + accelerator: 'ctrl + m' + }), + new MenuItem({ + label: 'Restart backend', + id: 'midiRestart', + click: ()=>{ + midiRestart() + }, + enabled: false + }), + +]})) menu.append(new MenuItem({type: 'submenu' , label: 'Console', submenu: [ new MenuItem({ label: 'Clear', @@ -211,6 +223,8 @@ class Toolbar { stop.visible = !!serverStarting qrcode.visible = !!serverStarting newWindow.visible = !!serverStarting + menu.getMenuItemById('midiRestart').enabled = !!serverStarting + menu.popup({window: remote.getCurrentWindow(), x: parseInt(PXSCALE), y: parseInt(40 * PXSCALE)}) }) diff --git a/src/server/electron/index.mjs b/src/server/electron/index.mjs index 567c34f8..f75f121d 100644 --- a/src/server/electron/index.mjs +++ b/src/server/electron/index.mjs @@ -169,7 +169,12 @@ function startLauncher() { global.launcherSharedGlobals = { settings: settings, openDocs: openDocs, - midilist: midi.list + midiList: midi.list, + midiRestart: ()=>{ + if (serverProcess) { + serverProcess.send('midiRestart') + } + } } var address = 'file://' + path.resolve(__dirname + '/../../launcher/' + 'index.html') diff --git a/src/server/node/midi.mjs b/src/server/node/midi.mjs index 6ff6048d..9cb7ee17 100644 --- a/src/server/node/midi.mjs +++ b/src/server/node/midi.mjs @@ -1,10 +1,11 @@ import {PythonShell} from 'python-shell' import fs from 'fs' import path from 'path' +import {EventEmitter} from 'events' import * as settings from './settings.mjs' -var scriptPath = __dirname.includes('server/node') ? +var scriptPath = __dirname.includes('server/node') ? path.resolve(__dirname, '../python') : // src folder structure path.resolve(__dirname, './python') // app folder structure with rollup chunking @@ -32,12 +33,33 @@ if (midiBinaries[process.arch] && midiBinaries[process.arch][process.platform]) } } -class MidiConverter { +class MidiConverter extends EventEmitter{ constructor() { + super() + if (expectMidiBinariesError) MidiConverter.midiBinariesError() + this.running = false + this.restarting = false + this.py = {} + + this.start() + + + process.on('message', (m) => { + if (m == 'midiRestart') { + this.restart() + } + }) + + } + + start() { + + if (this.running) return + this.py = new PythonShell('midi.py', Object.assign({ args: [ '--params', @@ -55,12 +77,32 @@ class MidiConverter { } }) - this.running = true this.py.childProcess.on('exit', (code)=>{ - if (code === null) console.error('(ERROR, MIDI) Midi bridge process crashed') + if (code === null && !this.restarting) console.error('(ERROR, MIDI) Midi bridge process crashed') this.running = false + this.emit('stopped') }) + this.running = true + + } + + stop() { + + if (this.running) this.py.childProcess.kill() + + } + + restart() { + + if (this.running) { + this.restarting = true + this.once('stopped', ()=>{ + this.start() + this.restarting = false + }) + this.stop() + } } send(data) { @@ -76,11 +118,7 @@ class MidiConverter { } - stop() { - this.py.childProcess.kill() - - } init(receiveOsc) { diff --git a/src/server/node/osc/index.mjs b/src/server/node/osc/index.mjs index a3f27274..89870658 100644 --- a/src/server/node/osc/index.mjs +++ b/src/server/node/osc/index.mjs @@ -19,6 +19,7 @@ export default class OscServer { this.customModuleEventEmitter = new EventEmitter() this.customModule = settings.read('custom-module') ? new CustomModule(settings.read('custom-module'), { app: this.customModuleEventEmitter, + restartMidiBackend: ()=>{if (this.midiServer) this.midiServer.restart()}, tcpServer: this.oscTCPServer, sendOsc: this.sendOsc.bind(this), receiveOsc: this.receiveOsc.bind(this), From ce48146bdb90c4fbf07a0f869cd99cf150d82a1c Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 15 Dec 2025 09:41:33 +0100 Subject: [PATCH 003/144] launcher: fix regression --- src/client/events/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/events/utils.mjs b/src/client/events/utils.mjs index d8a783a0..850191a7 100644 --- a/src/client/events/utils.mjs +++ b/src/client/events/utils.mjs @@ -13,7 +13,7 @@ const Touch = window.Touch || class Touch {} export function fix(e) { - var localZoom = zoom.editor.enabled ? zoom.localZoom : 1 + var localZoom = zoom.editor && zoom.editor.enabled ? zoom.localZoom : 1 return { From 55d5f440be1b169451d06e2c4b85b8ecee60a9cb Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 15 Dec 2025 13:00:36 +0100 Subject: [PATCH 004/144] ipc: dedupe 'connected' response to 'open' request (no functionnal effect) --- src/server/node/ipc/callbacks.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/node/ipc/callbacks.mjs b/src/server/node/ipc/callbacks.mjs index 2d5ce884..2376fee3 100644 --- a/src/server/node/ipc/callbacks.mjs +++ b/src/server/node/ipc/callbacks.mjs @@ -30,7 +30,7 @@ export default class Callbacks { open(data, clientId) { // client connected - this.ipcServer.send('connected') + this.ipcServer.send('connected', null, clientId) var recentSessions = settings.read('recentSessions') From 8af432933cd4f945f5272cc0975eb7e5f71b8fb2 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 10:30:12 +0100 Subject: [PATCH 005/144] ipc: fix an old regression preventing uuid from being reused --- src/client/ipc/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/ipc/index.mjs b/src/client/ipc/index.mjs index ae8d7c7b..9a3d4275 100644 --- a/src/client/ipc/index.mjs +++ b/src/client/ipc/index.mjs @@ -16,7 +16,7 @@ var loadDeps = (async()=>{ await import('../ui/ui-keyboard.mjs') })() -var uuid, localUuid = ENV.id || cache.get('osc.uuid', false) +var uuid, localUuid = ENV.id || cache.get('uuid', false) if (localUuid) { uuid = localUuid } else { From 3777b1fcbbddebb6b791daa989e6e3fac34e47f1 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 12:16:20 +0100 Subject: [PATCH 006/144] client: make app more resilient to storage access denial --- src/client/index.mjs | 5 +- src/client/managers/cache.mjs | 22 +++++-- src/client/ui/ui-code-editor.mjs | 5 +- src/client/widgets/scripts/script-vm.mjs | 75 ++++++++++-------------- src/client/widgets/vm.mjs | 14 +++-- 5 files changed, 67 insertions(+), 54 deletions(-) diff --git a/src/client/index.mjs b/src/client/index.mjs index ff95ffbc..e9599d3a 100644 --- a/src/client/index.mjs +++ b/src/client/index.mjs @@ -29,7 +29,10 @@ function init() { } if (document.requestStorageAccess) { - document.requestStorageAccess().then(init, init) + document.requestStorageAccess().then(init, ()=>{ + console.error('Could not obtain storage access, the app might not work correctly unless the browser\'s settings are updated') + init() + }) } else { init() } diff --git a/src/client/managers/cache.mjs b/src/client/managers/cache.mjs index 0d4a2b1e..b28ae0a7 100644 --- a/src/client/managers/cache.mjs +++ b/src/client/managers/cache.mjs @@ -4,17 +4,31 @@ class Cache { set(key, value, persistent = true) { - var storage = persistent ? localStorage : sessionStorage + try { + + var storage = persistent ? localStorage : sessionStorage + + storage.setItem(keyPrefix + key, JSON.stringify(value)) + + } catch(e){ + console.error(`Could not write to ${persistent ? 'localStorage' : 'sessionStorage'}`) + } - storage.setItem(keyPrefix + key, JSON.stringify(value)) } get(key, persistent = true) { - var storage = persistent ? localStorage : sessionStorage + try { - return JSON.parse(storage.getItem(keyPrefix + key)) + var storage = persistent ? localStorage : sessionStorage + + return JSON.parse(storage.getItem(keyPrefix + key)) + + } catch(e){ + console.error(`Could not read from ${persistent ? 'localStorage' : 'sessionStorage'}`) + return null + } } diff --git a/src/client/ui/ui-code-editor.mjs b/src/client/ui/ui-code-editor.mjs index ceac60c2..b0f91a5d 100644 --- a/src/client/ui/ui-code-editor.mjs +++ b/src/client/ui/ui-code-editor.mjs @@ -207,6 +207,9 @@ class CodeEditor { if (this.language === 'javascript') { let globals = {} + for (var k in scriptGlobals) { + globals[k] = true + } if (this.name === 'onKeyboard') { globals = {type: true, key: true, code: true, ctrl: true, shift: true, alt: true, meta: true} } else if (this.name === 'onCreate') { @@ -230,7 +233,7 @@ class CodeEditor { globals.this = false if (this.syntaxChecker !== false) editor.getSession().$worker.send('changeOptions', [{ - globals: {...scriptGlobals, ...globals} + globals: globals }]) } diff --git a/src/client/widgets/scripts/script-vm.mjs b/src/client/widgets/scripts/script-vm.mjs index 9f862b54..4170bedc 100644 --- a/src/client/widgets/scripts/script-vm.mjs +++ b/src/client/widgets/scripts/script-vm.mjs @@ -53,9 +53,7 @@ class ScriptVm extends Vm { registerGlobals() { - super.registerGlobals() - - this.sandbox.contentWindow.set = (id, value, extraOptions = {send: true, sync: true})=>{ + this.globals.set = (id, value, extraOptions = {send: true, sync: true})=>{ this.checkContext('set') @@ -102,7 +100,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setVar = (id, name, value)=>{ + this.globals.setVar = (id, name, value)=>{ this.checkContext('setVar') @@ -137,7 +135,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.send = (target, address, ...args)=>{ + this.globals.send = (target, address, ...args)=>{ this.checkContext('send') @@ -165,7 +163,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.get = (id)=>{ + this.globals.get = (id)=>{ this.checkContext('get') @@ -184,7 +182,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.getVar = (id, name)=>{ + this.globals.getVar = (id, name)=>{ this.checkContext('getVar') @@ -198,7 +196,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.getProp = (id, prop)=>{ + this.globals.getProp = (id, prop)=>{ this.checkContext('getProp') @@ -213,7 +211,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.updateProp = (id, prop)=>{ + this.globals.updateProp = (id, prop)=>{ this.checkContext('updateProp') @@ -228,7 +226,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.updateCanvas = (id)=>{ + this.globals.updateCanvas = (id)=>{ this.checkContext('updateCanvas') @@ -241,7 +239,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.getIndex = (id = 'this')=>{ + this.globals.getIndex = (id = 'this')=>{ this.checkContext('getIndex') @@ -250,7 +248,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.getScroll = (id)=>{ + this.globals.getScroll = (id)=>{ this.checkContext('getScroll') @@ -266,7 +264,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setScroll = (id, x, y)=>{ + this.globals.setScroll = (id, x, y)=>{ this.checkContext('setScroll') @@ -280,7 +278,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.httpGet = (url, callback)=>{ + this.globals.httpGet = (url, callback)=>{ this.checkContext('httpGet') @@ -301,7 +299,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.stateGet = (filter)=>{ + this.globals.stateGet = (filter)=>{ this.checkContext('stateGet') @@ -321,7 +319,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.stateSet = (state, extraOptions = {})=>{ + this.globals.stateSet = (state, extraOptions = {})=>{ this.checkContext('stateSet') @@ -331,7 +329,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.storage = { + this.globals.storage = { setItem: (k, v)=>{ this.checkContext('storage.setItem') @@ -352,7 +350,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setTimeout = (id, callback, timeout)=>{ + this.globals.setTimeout = (id, callback, timeout)=>{ this.checkContext('setTimeout') @@ -386,7 +384,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.clearTimeout = (id)=>{ + this.globals.clearTimeout = (id)=>{ this.checkContext('clearTimeout') @@ -397,7 +395,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setInterval = (id, callback, timeout)=>{ + this.globals.setInterval = (id, callback, timeout)=>{ this.checkContext('setInterval') @@ -430,7 +428,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.clearInterval = (id)=>{ + this.globals.clearInterval = (id)=>{ this.checkContext('clearInterval') @@ -442,7 +440,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setFocus = (id)=>{ + this.globals.setFocus = (id)=>{ this.checkContext('setFocus') @@ -461,7 +459,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.unfocus = ()=>{ + this.globals.unfocus = ()=>{ this.checkContext('unfocus') @@ -471,7 +469,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.setFocusable = (focusable)=>{ + this.globals.setFocusable = (focusable)=>{ this.checkContext('setFocusable') setFOCUSABLE(!!focusable) @@ -492,7 +490,7 @@ class ScriptVm extends Vm { } } - this.sandbox.contentWindow.toolbar = (...args)=>{ + this.globals.toolbar = (...args)=>{ this.checkContext('toolbar') @@ -524,7 +522,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.getToolbar = (id)=>{ + this.globals.getToolbar = (id)=>{ this.checkContext('toolbar') @@ -538,7 +536,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.openUrl = (url)=>{ + this.globals.openUrl = (url)=>{ this.checkContext('openUrl') @@ -548,7 +546,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.runAs = (id, callback)=>{ + this.globals.runAs = (id, callback)=>{ this.checkContext('runAs') @@ -569,7 +567,7 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.reload = (keepState = true)=>{ + this.globals.reload = (keepState = true)=>{ this.checkContext('reload') @@ -586,16 +584,16 @@ class ScriptVm extends Vm { } - this.sandbox.contentWindow.Image = Image + this.globals.Image = Image - this.sandbox.contentWindow.getNavigator = ()=>{ + this.globals.getNavigator = ()=>{ this.checkContext('getNavigator') return navigator } - this.sandbox.contentWindow.browseFile = (options, callback)=>{ + this.globals.browseFile = (options, callback)=>{ this.checkContext('browseFile') if (typeof options === 'function') { callback = options @@ -629,18 +627,7 @@ class ScriptVm extends Vm { } } - - this.globals = {} - - for (var imports of ['set', 'get', 'getProp', 'getIndex', 'updateProp', 'send', 'httpGet', 'stateGet', 'stateSet', 'storage', - 'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout', 'setFocus', 'unfocus' , 'setFocusable', 'setScroll', 'getScroll', 'toolbar', - 'getToolbar', 'openUrl', 'getVar', 'setVar', 'runAs', 'reload', 'Image', 'updateCanvas', 'getNavigator', 'browseFile']) { - this.globals[imports] = true - } - - for (var k in this.sandbox.contentWindow) { - if (window[k] === undefined) this.globals[k] = true - } + super.registerGlobals() } diff --git a/src/client/widgets/vm.mjs b/src/client/widgets/vm.mjs index 294b9e53..4a8b2cbd 100644 --- a/src/client/widgets/vm.mjs +++ b/src/client/widgets/vm.mjs @@ -52,6 +52,7 @@ class Vm { this.sandbox.contentWindow.document.close() // global context + this.globals = {} this.registerGlobals() // detach sandbox @@ -74,7 +75,7 @@ class Vm { registerGlobals() { - this.sandbox.contentWindow.console = { + this.globals.console = { ...console, log: (...msg)=>{ msg = msg.map(m => typeof m == 'object' ? JSON.stringify(m) : m) @@ -82,11 +83,16 @@ class Vm { } } - this.sandbox.contentWindow.setTimeout = - this.sandbox.contentWindow.setInterval = ()=>{ + this.globals.setTimeout = + this.globals.setInterval = ()=>{ throw 'setTimeout and setInterval can\'t be used in the JS sandbox' } - this.sandbox.contentWindow.globals = globals + + this.globals.globals = globals + + for (var k in this.globals) { + this.sandbox.contentWindow[k] = this.globals[k] + } } From b27d38132451fd2972af77343b336b00828566f2 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 12:21:52 +0100 Subject: [PATCH 007/144] client: better storage access error log --- src/client/managers/cache.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/managers/cache.mjs b/src/client/managers/cache.mjs index b28ae0a7..1d1cee77 100644 --- a/src/client/managers/cache.mjs +++ b/src/client/managers/cache.mjs @@ -11,7 +11,8 @@ class Cache { storage.setItem(keyPrefix + key, JSON.stringify(value)) } catch(e){ - console.error(`Could not write to ${persistent ? 'localStorage' : 'sessionStorage'}`) + console.error(`Could not write to ${persistent ? 'localStorage' : 'sessionStorage'}: ${e}`) + console.debug(e) } @@ -26,7 +27,8 @@ class Cache { return JSON.parse(storage.getItem(keyPrefix + key)) } catch(e){ - console.error(`Could not read from ${persistent ? 'localStorage' : 'sessionStorage'}`) + console.error(`Could not read from ${persistent ? 'localStorage' : 'sessionStorage'}: ${e}`) + console.debug(e) return null } From 37b305eaea97eabe79a1dd507e8ed9e37b42e555 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 12:24:32 +0100 Subject: [PATCH 008/144] client: delay access storage denial error log --- src/client/index.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/index.mjs b/src/client/index.mjs index e9599d3a..c1d5753c 100644 --- a/src/client/index.mjs +++ b/src/client/index.mjs @@ -30,8 +30,10 @@ function init() { if (document.requestStorageAccess) { document.requestStorageAccess().then(init, ()=>{ - console.error('Could not obtain storage access, the app might not work correctly unless the browser\'s settings are updated') init() + setTimeout(()=>{ + console.error('Could not obtain storage access, the app might not work correctly unless the browser\'s settings are updated') + }, 1000) }) } else { init() From 422c84d42e810c52ac5367a48b94ba619b3e53b9 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 12:34:09 +0100 Subject: [PATCH 009/144] package: beta 9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fbc63eb3..f01c25e6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "open-stage-control", "productName": "Open Stage Control", "description": "Libre and modular OSC / MIDI controller", - "version": "1.30.0-beta8", + "version": "1.30.0-beta9", "author": { "name": "Jean-Emmanuel Doucet", "email": "jean-emmanuel@ammd.net" From 6bd129395934222c19707b5b962a3177fb38c1d6 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 16 Dec 2025 12:36:23 +0100 Subject: [PATCH 010/144] log: update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e994ee36..7fd92d82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - prevent changing editor zoom level when it's disabled - fader: fix touchZone == knob for compact design - separator labels missing in inspector + - make the client app more robust to restrictive browser settings (cookie must still be enabled for the app to fully work) - widgets - the html property is no longer restricted / sanitized From dc85311b5431f2eecd9a03c7cca935084719e151 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 17 Dec 2025 10:03:34 +0100 Subject: [PATCH 011/144] deps: ditch osc.js fork --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f01c25e6..11645825 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "nodemon": "2.0.16", "nosleep.js": "0.12.0", "open": "8.4.0", - "osc": "github:jean-emmanuel/osc.js", + "osc": "2.4.5", "python-shell": "3.0.1", "qrcode": "1.5.1", "replacestream": "4.0.3", From 618fb3b01fe75e42e4ee47bbfb35a2f8199bc9da Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 17 Dec 2025 11:16:37 +0100 Subject: [PATCH 012/144] docs: framagit migration --- resources/docs/download.md | 72 ++++++---------------------------- resources/mkdocs.yml | 5 +++ src/docs/client-shim.mjs | 2 + src/docs/widgets-reference.mjs | 6 +-- 4 files changed, 23 insertions(+), 62 deletions(-) diff --git a/resources/docs/download.md b/resources/docs/download.md index 58b5fb88..5b6b50c7 100644 --- a/resources/docs/download.md +++ b/resources/docs/download.md @@ -3,66 +3,20 @@ !!! tip "" [*Click here*](/docs/getting-started/introduction/#installation) to read the installation guide. - Open Stage Control + + Open Stage Control v{{config.latest_release}} + -
Loading assets...
+
    +
  • GNU/Linux RPM (64-bit)
  • +
  • GNU/Linux Debian (64-bit)
  • +
  • GNU/Linux (64-bit)
  • +
  • Node.js
  • +
  • MacOS x64
  • +
  • MacOS arm64
  • +
  • Windows (64-bit)
  • - +