HTML report: match runtime report names to artifact icons#1641
Merged
Conversation
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.
Owner
Author
|
@Johann-PLW @JamesHabben for your awareness when porting to rest of LEAPPs. |
Collaborator
|
|
Collaborator
|
this module could use a lot more overhaul, especially to context parameter. also found a bug where |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
(category, report filename)against icons registered under the metadata name —chrome.pywritesChrome - Web History/Edge - Cookies/ … while the icon is registered underWeb History/Cookies;sms.pywritesSMS & iMessage - Messages (Threaded)vsSMS. Lookup miss →alert-triangle.chrome.py's 17 per-browserlava_process_artifact(...)calls omitted theartifact_iconkwarg, 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 toalert-triangle.scripts/artifacts/chrome.py: passartifact_icon=__artifacts_v2__[module_name].get("artifact_icon")at all 17 per-browser LAVA call sites, matching what the@artifact_processorwrapper does.Verified
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, …) unchangedchromeWebHistoryresolves tohistoryat importpy_compileclean;pylint --disable=C,Ron both files: 10.00/10Known leftovers (intentional)
Ph10/Ph70custom report names (Ph10.1-Assets have embedded files-PhDaPsql) don't relate to their metadata names and keep the triangle — both files are removed by iOS26 Photos sqlite Support and Parser Description Updates #1499, so this resolves itself.