diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 66872b6..d538244 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -3116,8 +3116,8 @@ function render(update) { if (typeof update.clients === "number") { document.getElementById("about-clients").textContent = update.clients; } - if (typeof update.active_rig_id === "string" && update.active_rig_id.length > 0) { - document.getElementById("about-active-rig").textContent = update.active_rig_id; + if (lastActiveRigId) { + document.getElementById("about-active-rig").textContent = lastActiveRigId; } if (Array.isArray(update.rig_ids)) { applyRigList(update.active_rig_id, update.rig_ids); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs index 1e408e4..71214b9 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs +++ b/src/trx-client/trx-frontend/trx-frontend-http/src/api.rs @@ -1633,13 +1633,8 @@ pub async fn select_rig( ))); } - // Always update the global active rig — the remote client uses it to - // route commands to the correct rig on the server. - if let Ok(mut active) = context.remote_active_rig_id.lock() { - *active = Some(rig_id.to_string()); - } - - // Update per-session rig selection if session_id is provided. + // Only update per-session rig selection — never mutate the global + // active rig so that other tabs/sessions are unaffected. if let Some(ref sid) = query.session_id { if let Ok(uuid) = Uuid::parse_str(sid) { session_rig_mgr.set_rig(uuid, rig_id.to_string());