Skip to content

Conversation

@bhoomiiee
Copy link
Contributor

What this PR does

Fixes folder-level coverage calculation in the FileExplorer by computing coverage
from aggregated tracked and missing lines instead of averaging child percentages.

Why

Previously, folder coverage was calculated as a simple average of child coverage
values, which produced incorrect results. This change aligns the folder coverage
with the values shown in the History section.

Formula used

coverage = ((tracked - missing) / tracked) * 100

@bhoomiiee bhoomiiee requested review from vinzscam and removed request for a team December 23, 2025 22:05
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Dec 23, 2025

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @backstage-community/plugin-feedback

See CONTRIBUTING.md for more information about how to add changesets.

Unexpected Changesets

The following changeset(s) reference packages that have not been changed in this PR:

  • /home/runner/work/community-plugins/community-plugins/.changeset/pretty-items-try.md: @backstage-community/plugins

Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-code-coverage workspaces/code-coverage/plugins/code-coverage patch v0.12.0
@backstage-community/plugin-feedback workspaces/feedback/plugins/feedback none v1.8.6

@backstage-goalie
Copy link
Contributor

Thanks for the contribution!
All commits need to be DCO signed before they are reviewed. Please refer to the the DCO section in CONTRIBUTING.md or the DCO status for more info.

@bhoomiiee bhoomiiee requested a review from alde as a code owner December 23, 2025 22:57
@bhoomiiee bhoomiiee force-pushed the fix/code-coverage-folder-percentage branch 2 times, most recently from 4bbaa99 to cc5c3e2 Compare December 23, 2025 23:23
Added notice about limited support for new frontend and hybrid migration setups in the Feedback plugin documentation.

Signed-off-by: bhoomiiee <[email protected]>
Signed-off-by: Bhoomi <[email protected]>
@bhoomiiee bhoomiiee force-pushed the fix/code-coverage-folder-percentage branch from cc5c3e2 to ff52c18 Compare December 24, 2025 00:02
@@ -0,0 +1,11 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the accidentally added .changeset/config.json file and pushed the fix. Please let me know if anything else is needed.

'@backstage-community/plugins': patch
---

docs(feedback): add new frontend / hybrid migration notice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run yarn changeset from the code-coverage workspace instead of the root

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I regenerated the changeset from the plugin-code-coverage workspace (not root) and pushed the update. Please let me know if anything else is needed.


### Plugin Setup

## New Frontend / Hybrid Migration Notice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes aren't expected right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes aren't expected right?

You are right that README change was not intended for this PR. I have reverted it and pushed the update. Thanks for pointing it out.

@bhoomiiee bhoomiiee force-pushed the fix/code-coverage-folder-percentage branch from b6e890b to 9294cd8 Compare December 27, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants