Skip to content

Commit 1570672

Browse files
committed
Add uniqueBugCount method to calculate and display the number of unique bugs associated with exceptions.
1 parent 9611584 commit 1570672

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/app.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ export class App extends LitElement {
106106
}
107107
}
108108

109+
/**
110+
* Get the number of unique bugs that are associated with the exceptions list
111+
* @returns The number of unique bugs.
112+
*/
113+
get uniqueBugCount(): number {
114+
return new Set(this.records.flatMap((record) => record.bugIds || [])).size;
115+
}
116+
109117
/**
110118
* Renders the main content of the app which is dependent on the fetched records.
111119
* @returns The main content.
@@ -127,6 +135,10 @@ export class App extends LitElement {
127135
exceptions and ${this.records.filter((e) => e.category === "convenience").length}
128136
convenience exceptions.
129137
</p>
138+
<p>
139+
Overall the exceptions resolve ${this.uniqueBugCount} known bugs. Note that global
140+
exceptions resolve a lot of untracked site breakage, i.e. breakage we don't have a bug for.
141+
</p>
130142
131143
<h2>Global Exceptions</h2>
132144

0 commit comments

Comments
 (0)