[fix](trx-frontend-http): make /status respect per-tab rig selection
pollFreshSnapshot() fetches GET /status on every SSE connect/reconnect, but /status always returned the global selected rig's state, overwriting the per-tab display with whichever rig was last switched to globally. Now pollFreshSnapshot passes rig_id as a query param and the /status endpoint uses the per-rig watch channel when provided, matching the /events behavior for true per-tab rig isolation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -3163,7 +3163,10 @@ function scheduleReconnect(delayMs = 1000) {
|
||||
|
||||
async function pollFreshSnapshot() {
|
||||
try {
|
||||
const resp = await fetch("/status", { cache: "no-store" });
|
||||
const statusUrl = lastActiveRigId
|
||||
? `/status?rig_id=${encodeURIComponent(lastActiveRigId)}`
|
||||
: "/status";
|
||||
const resp = await fetch(statusUrl, { cache: "no-store" });
|
||||
if (!resp.ok) return;
|
||||
const data = await resp.json();
|
||||
render(data);
|
||||
|
||||
Reference in New Issue
Block a user