Skip to content

Cherry-pick #48783: Count FMAs by slug#48814

Merged
cdcme merged 2 commits into
rc-minor-fleet-v4.89.0from
cdcme/count-fmas-by-slug-cp
Jul 7, 2026
Merged

Cherry-pick #48783: Count FMAs by slug#48814
cdcme merged 2 commits into
rc-minor-fleet-v4.89.0from
cdcme/count-fmas-by-slug-cp

Conversation

@cdcme

@cdcme cdcme commented Jul 6, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #48783 and #48818 into the RC branch.

**Related issue:** Resolves #48528

This keys the count, pagination, and the frontend row-combining on the
app's slug token (the prefix before `/`, shared across an app's platform
entries but distinct across apps). The count now equals the rows shown
in every view (macOS, Windows, All), and name-colliding apps stay as
separate rows.

  # Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.

  ## Testing

  - [x] Added/updated automated tests
  - [x] QA'd all new/changed functionality manually

  For unreleased bug fixes in a release candidate, one of:

- [x] Confirmed that the fix is not expected to adversely impact load
test results

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **New Features**
* Software listings now group platform-specific installers into a single
app row based on the app identifier, improving how macOS and Windows
entries appear together.

* **Bug Fixes**
* Apps with the same display name but different identifiers now stay
separate instead of being merged incorrectly.
* List counts and pagination now match the combined app view more
accurately across the software pages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@cdcme cdcme requested review from a team as code owners July 6, 2026 21:16

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (rc-minor-fleet-v4.89.0@603ced0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
server/datastore/mysql/maintained_apps.go 80.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##             rc-minor-fleet-v4.89.0   #48814   +/-   ##
=========================================================
  Coverage                          ?   67.47%           
=========================================================
  Files                             ?     3681           
  Lines                             ?   233810           
  Branches                          ?    12438           
=========================================================
  Hits                              ?   157769           
  Misses                            ?    61890           
  Partials                          ?    14151           
Flag Coverage Δ
backend 69.05% <80.00%> (?)
frontend 58.84% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

**Related issue:** Resolves #48528

Follow-up to #48783, which changed the Fleet-maintained apps "items"
count from per-platform entries to per-app, dropping it from 1,263 to
1,023. This restores the count to `COUNT(DISTINCT fma.id)`: macOS and
Windows entries are separately installable (each its own Add button), so
each counts (1,263 / 960 macOS / 303 Windows). The token-based
row-combining and pagination from #48783 are kept.

  # Checklist for submitter

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements), JS
inline code is prevented especially for url redirects, and untrusted
data interpolated into shell scripts/commands is validated against shell
metacharacters.

  ## Testing

  - [x] Added/updated automated tests
  - [x] QA'd all new/changed functionality manually

  For unreleased bug fixes in a release candidate, one of:

- [x] Confirmed that the fix is not expected to adversely impact load
test results

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Corrected available-app counts in listings so pagination totals now
match what users can actually add.
* Improved pagination consistency for apps with multiple platform
variants, reducing confusion where totals did not align with visible
entries.
* Updated team-based filtering so already-added apps are excluded more
accurately from available results.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@cdcme cdcme merged commit 35759cf into rc-minor-fleet-v4.89.0 Jul 7, 2026
37 of 39 checks passed
@cdcme cdcme deleted the cdcme/count-fmas-by-slug-cp branch July 7, 2026 15:29
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.

3 participants