From bc4cb61331616e933db7383bbd5f452bbe3dfc93 Mon Sep 17 00:00:00 2001 From: jelveh Date: Sat, 16 Aug 2025 13:43:25 -0700 Subject: [PATCH] add transaction for opening apps --- src/gui/src/UI/UIDesktop.js | 2 +- src/gui/src/helpers/launch_app.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index 59fc8f80a..fa64e9253 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -47,7 +47,7 @@ async function UIDesktop(options) { // start a transaction if we're not in embedded or fullpage mode let transaction; if (!window.is_embedded && !window.is_fullpage_mode) { - transaction = new window.Transaction('desktop-load'); + transaction = new window.Transaction('desktop-is-ready'); transaction.start(); } diff --git a/src/gui/src/helpers/launch_app.js b/src/gui/src/helpers/launch_app.js index f82300723..bf82c8fce 100644 --- a/src/gui/src/helpers/launch_app.js +++ b/src/gui/src/helpers/launch_app.js @@ -27,6 +27,10 @@ import UIWindow from "../UI/UIWindow.js"; * @param {*} options.name - The name of the app to launch. */ const launch_app = async (options)=>{ + // start a transaction + const transaction = new window.Transaction('app-is-ready'); + transaction.start(); + const uuid = options.uuid ?? window.uuidv4(); let icon, title, file_signature; const window_options = options.window_options ?? {}; @@ -428,6 +432,9 @@ const launch_app = async (options)=>{ svc_process.unregister(process.uuid); }); + // end the transaction + transaction.end(); + return process; }