From 9d7fa118713e51f9e0e37840a28780cc70ad50bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Wed, 9 Sep 2026 17:16:32 +0300 Subject: [PATCH] profiler: show symbolic file names next to paths in results - Capture the pySim file name (sel.name) during each check - Resolve custom-file aliases from pysimCustomFiles (frontend dict) - Render 'EF.ADN (MF/7F10/6F3A)' in the results report SW cache v39. --- frontend/index.html | 23 +++++++++++++++++++++-- frontend/sw.js | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index cd55d5a..b3ca784 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -7095,7 +7095,7 @@ async function profilerCheck(i) { } async function profilerRunRule(r) { - const res = { path: r.path, status: 'pass', checks: [] }; + const res = { path: r.path, name: null, status: 'pass', checks: [] }; let sel; try { sel = await pysimFetch('/api/select', { path: r.path }); @@ -7104,6 +7104,7 @@ async function profilerRunRule(r) { res.error = e.message; return res; } + if (sel && sel.name) res.name = sel.name; if (!sel || sel.exists !== true) { res.status = 'fail'; res.checks.push({ label: 'exists', expected: true, actual: false, ok: false }); @@ -7164,13 +7165,31 @@ async function profilerRunRule(r) { return res; } +function profilerCustomNameForPath(path) { + if (!path) return null; + const norm = path.toUpperCase(); + for (const c of pysimCustomFiles) { + const parts = c.path.split('/').filter(Boolean); + if (!parts.length) continue; + let segs; + if (parts[0].toUpperCase() === '3F00') segs = ['MF'].concat(parts.slice(1)); + else segs = parts; + if (segs.join('/').toUpperCase() === norm) return c.name; + } + return null; +} + function profilerRenderReport(results) { let html = ''; for (const r of results) { const color = r.status === 'pass' ? 'text-emerald-600' : (r.status === 'fail' ? 'text-red-600' : 'text-yellow-600'); const icon = r.status === 'pass' ? '✓' : (r.status === 'fail' ? '✗' : '⚠'); + const name = profilerCustomNameForPath(r.path) || r.name; + const title = name + ? '' + esc(name) + ' (' + esc(r.path) + ')' + : '' + esc(r.path) + ''; html += '
'; - html += '
' + icon + '' + esc(r.path) + '
'; + html += '
' + icon + '' + title + '
'; if (r.error) html += '
' + esc(r.error) + '
'; for (const c of r.checks) { if (c.ok) continue; diff --git a/frontend/sw.js b/frontend/sw.js index 5bdd93e..3e02fa9 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'otaman-v38'; +const CACHE = 'otaman-v39'; const URLS = [ 'index.html', 'help.html',