From b68105e9f0d86974ddef0f8a9d4f0907496d54d1 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Thu, 10 Sep 2026 15:31:53 +0200 Subject: [PATCH] Update audit-changes.tsx --- AppImage/components/audit-changes.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/AppImage/components/audit-changes.tsx b/AppImage/components/audit-changes.tsx index 23b9f303..148cd304 100644 --- a/AppImage/components/audit-changes.tsx +++ b/AppImage/components/audit-changes.tsx @@ -393,13 +393,17 @@ export function AuditChanges() { const post = mk(), scripts = mk(), installs = mk() const pick = (b: string) => b === "installs" ? installs : b === "postInstall" ? post : scripts for (const c of changes) { - const target = pick(blockOf(c)) - const key = c.function || c.source || "—" - const label = groupLabel(c.function, c.source) - const g = target.get(key) || { key, label, version: c.function_version || "", last: 0, items: [] } + const b = blockOf(c) + const target = pick(b) + // Post-install groups by function under its menu name; the script and + // install sections group by the script that made the change, and show + // that script's name — not a per-function label. + const key = b === "postInstall" ? (c.function || c.source || "—") : (c.source || c.function || "—") + const label = b === "postInstall" ? groupLabel(c.function, c.source) : (c.source || c.function || "—") + const g = target.get(key) || { key, label, version: "", last: 0, items: [] } g.items.push(c) if (c.recorded_at > g.last) g.last = c.recorded_at - if (c.function_version) g.version = c.function_version + if (b === "postInstall" && c.function_version) g.version = c.function_version target.set(key, g) } const sort = (m: Map) => Array.from(m.values()).sort((a, b) => b.last - a.last)