From ab0d2d4286298eba97af3a60c3bf81c0393f5743 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Wed, 26 Nov 2025 23:23:33 +0900 Subject: [PATCH 1/4] MainWindow: Ignore components without a bugtracker URL --- src/MainWindow.vala | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 4d515656..4070927c 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -154,11 +154,20 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { components.foreach ((component) => { // FIXME: This should use kind != DESKTOP_APP but some metainfo is currently inaccurate if (component.kind != ADDON && !(component.id in app_entries)) { + var url = component.get_url (AppStream.UrlKind.BUGTRACKER); + if (url == null) { + // Ignore components without a bugtracker URL + // because rows that just show a component name + // and can't take users to report issues are + // useless + return; + } + var repo_row = new RepoRow ( component.name, icon_from_appstream_component (component), Category.SYSTEM, - component.get_url (AppStream.UrlKind.BUGTRACKER) + url ); listbox.append (repo_row); From 76b2fb0517d511e5d9739c7fa383f184acae8878 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Thu, 27 Nov 2025 22:29:31 +0900 Subject: [PATCH 2/4] Add warning log Allows us to know which components don't have a URL and needs fixing --- src/MainWindow.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 4070927c..20c7d3a7 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -160,6 +160,7 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { // because rows that just show a component name // and can't take users to report issues are // useless + warning ("BUGTRACKER URL is not set in the component '%s'", component.name); return; } From f311cc552e5517678fb0f06131b71829b8bd4907 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Thu, 27 Nov 2025 22:30:55 +0900 Subject: [PATCH 3/4] Use less lines for comments --- src/MainWindow.vala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 20c7d3a7..5f3ed545 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -156,10 +156,8 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { if (component.kind != ADDON && !(component.id in app_entries)) { var url = component.get_url (AppStream.UrlKind.BUGTRACKER); if (url == null) { - // Ignore components without a bugtracker URL - // because rows that just show a component name - // and can't take users to report issues are - // useless + // Ignore components without a bugtracker URL because rows that just show + // a component name and can't take users to report issues are useless warning ("BUGTRACKER URL is not set in the component '%s'", component.name); return; } From 031fa4174eacb2313b7df26eed79854ceada5ead Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Thu, 27 Nov 2025 22:33:57 +0900 Subject: [PATCH 4/4] Add same check for other components in case --- src/MainWindow.vala | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 5f3ed545..0189b091 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -134,6 +134,14 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { var component_table = new HashTable (str_hash, str_equal); appstream_pool.get_components_by_id (app).as_array ().foreach ((component) => { + var url = component.get_url (AppStream.UrlKind.BUGTRACKER); + if (url == null) { + // Ignore components without a bugtracker URL because rows that just show + // a component name and can't take users to report issues are useless + warning ("BUGTRACKER URL is not set in the component '%s'", component.name); + return; + } + if (component_table[component.id] == null) { component_table[component.id] = component; @@ -141,7 +149,7 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { component.name, icon_from_appstream_component (component), Category.DEFAULT_APPS, - component.get_url (AppStream.UrlKind.BUGTRACKER) + url ); listbox.append (repo_row); @@ -177,22 +185,38 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow { }); appstream_pool.get_components_by_extends ("io.elementary.settings").as_array ().foreach ((component) => { + var url = component.get_url (AppStream.UrlKind.BUGTRACKER); + if (url == null) { + // Ignore components without a bugtracker URL because rows that just show + // a component name and can't take users to report issues are useless + warning ("BUGTRACKER URL is not set in the component '%s'", component.name); + return; + } + var repo_row = new RepoRow ( component.name, icon_from_appstream_component (component), Category.SETTINGS, - component.get_url (AppStream.UrlKind.BUGTRACKER) + url ); listbox.append (repo_row); }); appstream_pool.get_components_by_extends ("io.elementary.wingpanel").as_array ().foreach ((component) => { + var url = component.get_url (AppStream.UrlKind.BUGTRACKER); + if (url == null) { + // Ignore components without a bugtracker URL because rows that just show + // a component name and can't take users to report issues are useless + warning ("BUGTRACKER URL is not set in the component '%s'", component.name); + return; + } + var repo_row = new RepoRow ( component.name, icon_from_appstream_component (component), Category.PANEL, - component.get_url (AppStream.UrlKind.BUGTRACKER) + url ); listbox.append (repo_row);