Skip to content

HTML report: match runtime report names to artifact icons#1641

Merged
abrignoni merged 2 commits into
mainfrom
html-icon-report-name-fallback
Jul 2, 2026
Merged

HTML report: match runtime report names to artifact icons#1641
abrignoni merged 2 commits into
mainfrom
html-icon-report-name-fallback

Conversation

@abrignoni

@abrignoni abrignoni commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Problem

Chromium artifacts (and the threaded SMS report) show the alert-triangle icon in the HTML report sidebar, and the same Chromium entries fall back to the default icon in LAVA.

Two distinct causes, same root: these reports are written under runtime names with custom output calls, not the artifact metadata name:

  1. HTML: the sidebar resolves icons by joining (category, report filename) against icons registered under the metadata name — chrome.py writes Chrome - Web History / Edge - Cookies / … while the icon is registered under Web History / Cookies; sms.py writes SMS & iMessage - Messages (Threaded) vs SMS. Lookup miss → alert-triangle.
  2. LAVA: chrome.py's 17 per-browser lava_process_artifact(...) calls omitted the artifact_icon kwarg, so no icon was ever stored in the LAVA database and the viewer used its neutral default.

Fix

  • scripts/report.py: on an exact-match miss, fall back to the longest registered artifact name the report filename starts or ends with. Exact-name lookups unchanged; unknown names still fall through to alert-triangle.
  • scripts/artifacts/chrome.py: pass artifact_icon=__artifacts_v2__[module_name].get("artifact_icon") at all 17 per-browser LAVA call sites, matching what the @artifact_processor wrapper does.

Verified

  • Simulated against the real loader-registered icons: all per-browser Chromium names resolve (Chrome - Web History → history, Opera - Cookies → cookie, Browser - Login Data → key, Edge - Network Action Predictor → trending-up, …); SMS & iMessage - Messages (Threaded) → message; exact matches (Web History, Biome - Notifications, Calendar Events, …) unchanged
  • All 17 chrome.py sites confirmed passing the icon; chromeWebHistory resolves to history at import
  • py_compile clean; pylint --disable=C,R on both files: 10.00/10

Known leftovers (intentional)

abrignoni added 2 commits July 2, 2026 12:49
Some modules write HTML reports under runtime names that differ from
the artifact metadata name the icon is registered under: chrome.py
writes per-browser reports ("Chrome - Web History") while the icon is
registered under "Web History", and sms.py writes "SMS & iMessage -
Messages (Threaded)" vs "SMS". The sidebar icon lookup missed those
names and fell back to alert-triangle, while the same artifacts looked
fine in LAVA (which reads the icon from artifact metadata directly).

On an exact-match miss, fall back to the longest registered artifact
name that the report name starts or ends with. Per-browser Chromium
reports and the threaded SMS report now show their artifact's icon;
exact-name lookups are unchanged.
The per-browser lava_process_artifact() calls omitted artifact_icon,
so Chromium entries in the LAVA database had no icon and the viewer
fell back to its default. Pass the module's metadata icon at all 17
call sites.
@abrignoni abrignoni merged commit dc2cdac into main Jul 2, 2026
1 check failed
@abrignoni abrignoni deleted the html-icon-report-name-fallback branch July 2, 2026 17:00
@abrignoni

Copy link
Copy Markdown
Owner Author

@Johann-PLW @JamesHabben for your awareness when porting to rest of LEAPPs.

@JamesHabben

Copy link
Copy Markdown
Collaborator

context.get_artifact_info() would get you the exact artifact info. @abrignoni
image

@JamesHabben

Copy link
Copy Markdown
Collaborator

this module could use a lot more overhaul, especially to context parameter.

also found a bug where chromeOfflinePages is claiming "chromeTopSites" as its module name, so it will overwrite the actual top sites artifact. moving this dynamic naming over to using the context parameter and its getters will resolve copy/paste bugs like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants