Skip to content

Add installed and available versions to self-service#47526

Open
spalmesano0 wants to merge 2 commits into
mainfrom
self-service-software-versions
Open

Add installed and available versions to self-service#47526
spalmesano0 wants to merge 2 commits into
mainfrom
self-service-software-versions

Conversation

@spalmesano0

@spalmesano0 spalmesano0 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #45729

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Summary by CodeRabbit

  • New Features
    • Self-service software table on My device page now shows both installed and available version columns for each app, making it easier to see current and updateable versions at a glance.
  • Tests
    • Added/updated tests covering installed and available version display scenarios, including cases with missing installed versions and when both versions are present to ensure correct UI rendering.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.19%. Comparing base (21e1ffd) to head (f89d038).
⚠️ Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #47526      +/-   ##
==========================================
- Coverage   67.20%   67.19%   -0.01%     
==========================================
  Files        3393     3521     +128     
  Lines      228245   228549     +304     
  Branches    11898    11766     -132     
==========================================
+ Hits       153385   153576     +191     
- Misses      61033    61147     +114     
+ Partials    13827    13826       -1     
Flag Coverage Δ
frontend 57.99% <100.00%> (+0.04%) ⬆️

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.

@spalmesano0 spalmesano0 marked this pull request as ready for review June 12, 2026 16:16
@spalmesano0 spalmesano0 requested a review from a team as a code owner June 12, 2026 16:16
Copilot AI review requested due to automatic review settings June 12, 2026 16:16
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds two columns to the Self-service software table: "Installed version" (from installed_versions) and "Available version" (from software_package or app_store_app). SelfServiceTableConfig imports VersionCell, defines CellProps for the new cells, and extends generateSoftwareTableHeaders with accessors and cell renderers that pass version arrays to VersionCell. Tests in SelfService.tests.tsx were added to verify behavior when installed_versions is null and when both installed_versions and software_package.version are present.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding installed and available version columns to the self-service software table.
Linked Issues check ✅ Passed The code changes meet the requirements of issue #45729 by adding installed and available version columns to the self-service software table for end users to see app versions before installation.
Out of Scope Changes check ✅ Passed All changes are scoped to adding version columns to the self-service table, with no unrelated modifications introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description includes the required checklist sections with completed items: changes file added, automated tests added/updated, and manual QA performed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch self-service-software-versions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds version visibility to the host “Self-service” software table so end users can see both what’s installed on the host and what version will be installed from self-service.

Changes:

  • Added Installed version column rendering installed_versions via existing VersionCell.
  • Added Available version column rendering installer/app-store version via VersionCell.
  • Added a user-visible change entry under changes/.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
frontend/pages/hosts/details/cards/Software/SelfService/components/SelfServiceTable/SelfServiceTableConfig.tsx Adds two new version-related columns to the self-service table config.
changes/45729-self-service-show-version Release note entry for the UI change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@frontend/pages/hosts/details/cards/Software/SelfService/SelfService.tests.tsx`:
- Around line 309-331: Update the test "shows installed version and available
version when both are present" to assert exact counts instead of permissive
checks: replace the two expect(...) calls that use
screen.getAllByText("1.0.0").length.toBeGreaterThan(0) and
screen.getAllByText("1.1.0").length.toBeGreaterThan(0) with exact-length
assertions (expect(screen.getAllByText("1.0.0")).toHaveLength(2) and
expect(screen.getAllByText("1.1.0")).toHaveLength(2)) so they match
TooltipTruncatedTextCell's dual rendering; locate these in SelfService.tests.tsx
within the test for SelfService and update accordingly.
- Around line 284-307: Update the test in SelfService.tests.tsx to assert exact
duplicate counts for the installed/version cells instead of using
.toBeGreaterThan(0): when creating the mock software with installed_versions:
null and package version "1.1.0", expect screen.getAllByText("---").length to
equal 2 and expect screen.getAllByText("1.1.0").length to equal 2 (because
TooltipTruncatedTextCell renders each value twice); also update the nearby
comment to correctly state that "---" is the placeholder for the installed
version column when installed_versions is null (not the install status).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5506f4a1-e46a-42e4-a79e-77f9c34ca4fe

📥 Commits

Reviewing files that changed from the base of the PR and between 1a84cdd and 5781d5b.

📒 Files selected for processing (1)
  • frontend/pages/hosts/details/cards/Software/SelfService/SelfService.tests.tsx

@spalmesano0 spalmesano0 force-pushed the self-service-software-versions branch from 5781d5b to f89d038 Compare June 12, 2026 17:21
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.

Fleet Desktop > Self-service: Show version for apps

2 participants