From eb08fd19571a4897d85166a867ef1357a6c6ecfe Mon Sep 17 00:00:00 2001 From: coopermor Date: Fri, 21 Aug 2026 12:48:13 -0700 Subject: [PATCH 1/2] viewer: show dbtable column gameval names --- viewer/src/runner/Runner.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/viewer/src/runner/Runner.ts b/viewer/src/runner/Runner.ts index 65bc839..63ae7db 100644 --- a/viewer/src/runner/Runner.ts +++ b/viewer/src/runner/Runner.ts @@ -381,6 +381,7 @@ new ServiceServer(self as DedicatedWorkerGlobalScope, { contentFilter = new RegExp(("" + filter).trim(), "iu"); } let tabs = await Promise.all(v.map(async (tab) => { + let gameVal = await c2.GameVal.load(ctx.cache, c2.DBTable.gameval as c2.GameValID, tab.id); let rows = await c2.DBTable.loadRows(ctx.cache, tab.id); if (!rows) { return [tab.id, `Broken table ${tab.id}`] as const; @@ -405,7 +406,8 @@ new ServiceServer(self as DedicatedWorkerGlobalScope, { if (types === undefined) { continue; } - header[0].push([i, types.length]); + let columnName = gameVal?.files?.get(i); + header[0].push([columnName === undefined ? i : `${columnName} (${i})`, types.length]); for (let ti = 0; ti < types.length; ti++) { let type = types[ti]; header[1].push([c2.Typed(type), 1]); From 5b0b4168712d028d43e07360a0ff4ee4134e9c9c Mon Sep 17 00:00:00 2001 From: coopermor Date: Fri, 21 Aug 2026 12:50:38 -0700 Subject: [PATCH 2/2] use tabs instead of spaces --- viewer/src/runner/Runner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viewer/src/runner/Runner.ts b/viewer/src/runner/Runner.ts index 63ae7db..4b4cf4b 100644 --- a/viewer/src/runner/Runner.ts +++ b/viewer/src/runner/Runner.ts @@ -381,7 +381,7 @@ new ServiceServer(self as DedicatedWorkerGlobalScope, { contentFilter = new RegExp(("" + filter).trim(), "iu"); } let tabs = await Promise.all(v.map(async (tab) => { - let gameVal = await c2.GameVal.load(ctx.cache, c2.DBTable.gameval as c2.GameValID, tab.id); + let gameVal = await c2.GameVal.load(ctx.cache, c2.DBTable.gameval as c2.GameValID, tab.id); let rows = await c2.DBTable.loadRows(ctx.cache, tab.id); if (!rows) { return [tab.id, `Broken table ${tab.id}`] as const; @@ -406,7 +406,7 @@ new ServiceServer(self as DedicatedWorkerGlobalScope, { if (types === undefined) { continue; } - let columnName = gameVal?.files?.get(i); + let columnName = gameVal?.files?.get(i); header[0].push([columnName === undefined ? i : `${columnName} (${i})`, types.length]); for (let ti = 0; ti < types.length; ti++) { let type = types[ti];