Skip to content

Fleet UI: Update label target copies#43763

Merged
RachelElysia merged 1 commit intomainfrom
39916-copy-changes
Apr 20, 2026
Merged

Fleet UI: Update label target copies#43763
RachelElysia merged 1 commit intomainfrom
39916-copy-changes

Conversation

@RachelElysia
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia commented Apr 20, 2026

Issue

Closes #39916

Description

  • Copy changes

Note: Will need to be cherry-picked into 4.84.0

Screenshot of change

Screenshot 2026-04-20 at 10 42 28 AM

Testing

  • QA'd all new/changed functionality manually

Summary by CodeRabbit

  • Improvements
    • Fixed dropdown menu overflow in target label selector by constraining menu height to prevent unwanted scrolling.
    • Enhanced help text for custom target options with clearer phrasing about software availability and visual emphasis on key matching conditions.

Copilot AI review requested due to automatic review settings April 20, 2026 14:43
@RachelElysia RachelElysia requested a review from a team as a code owner April 20, 2026 14:43
Copy link
Copy Markdown

@claude claude Bot left a comment

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
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.91%. Comparing base (b6bacca) to head (ca15e2e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #43763    +/-   ##
========================================
  Coverage   66.91%   66.91%            
========================================
  Files        2600     2600            
  Lines      208978   208978            
  Branches     9342     9228   -114     
========================================
  Hits       139840   139840            
  Misses      56396    56396            
  Partials    12742    12742            
Flag Coverage Δ
frontend 54.76% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Walkthrough

This change updates the software deployment targeting UI with styling and help text improvements. The dropdown menu for custom target label selection now has constrained height limits to prevent excessive scrolling. Additionally, help text for the label matching conditions—"labels include any," "labels include all," and "labels exclude any"—has been reformatted as JSX with consistent phrasing and emphasized key terms, making the scope behavior clearer to users when configuring software deployments.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating label target copy text in the Fleet UI, which matches the file summaries (SCSS styling and helpText updates for label targeting options).
Description check ✅ Passed The description references the linked issue (#39916), provides a clear note about cherry-picking, includes a screenshot of the changes, and confirms manual QA testing was completed.
Linked Issues check ✅ Passed The changes directly implement the UI copy updates specified in issue #39916. The helpText modifications for labelsIncludeAny, labelsIncludeAll, and labelsExcludeAny align with the Figma design and product requirements, and the SCSS changes support the dropdown layout.
Out of Scope Changes check ✅ Passed All changes are scoped to UI copy and styling for label target options. The SCSS max-height constraints and helpText JSX updates directly support the label targeting feature without introducing unrelated functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 39916-copy-changes

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
frontend/pages/SoftwarePage/helpers.tsx (1)

191-218: Inconsistent emphasis tag (<strong> vs <b>) within the same feature.

The new helpText entries use <strong>, while generateHelpText just above (lines 144–184) renders the same phrasing with <b>. Functionally equivalent here, but it's worth aligning on one tag across the label-target copy for consistency (and <strong> is generally preferred semantically).

♻️ Optional alignment
-      <b>have any</b> of these
+      <strong>have any</strong> of these

(apply similarly to the have all / don't have any variants in generateHelpText)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/pages/SoftwarePage/helpers.tsx` around lines 191 - 218, The helpText
JSX entries in the options array use <strong> while the generateHelpText
function renders the same phrases with <b>, causing inconsistent emphasis tags;
update either the array entries (values "labelsIncludeAny", "labelsIncludeAll",
"labelsExcludeAny") to use <b> or change generateHelpText to use <strong> so
both sources use the same tag (preferably <strong> per review), and ensure the
variants for "have any", "have all", and "don't have any" are updated
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/pages/SoftwarePage/helpers.tsx`:
- Around line 191-218: The helpText JSX entries in the options array use
<strong> while the generateHelpText function renders the same phrases with <b>,
causing inconsistent emphasis tags; update either the array entries (values
"labelsIncludeAny", "labelsIncludeAll", "labelsExcludeAny") to use <b> or change
generateHelpText to use <strong> so both sources use the same tag (preferably
<strong> per review), and ensure the variants for "have any", "have all", and
"don't have any" are updated consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2fc6e8b7-851d-4cda-9c06-ebc1bfc4ac74

📥 Commits

Reviewing files that changed from the base of the PR and between c3cbea5 and ca15e2e.

📒 Files selected for processing (2)
  • frontend/components/TargetLabelSelector/_styles.scss
  • frontend/pages/SoftwarePage/helpers.tsx

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Fleet UI copy and dropdown styling for label-based custom targeting (Include any / Include all / Exclude any), aligning the targeting descriptions shown in the Software flows.

Changes:

  • Expanded custom target option help text into full sentences with emphasized key phrases.
  • Adjusted TargetLabelSelector dropdown menu max-heights to avoid scrolling with the longer option descriptions.

Reviewed changes

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

File Description
frontend/pages/SoftwarePage/helpers.tsx Updates CUSTOM_TARGET_OPTIONS help text copy for Software label targeting.
frontend/components/TargetLabelSelector/_styles.scss Increases react-select menu max-heights within TargetLabelSelector to better fit the longer option help text.

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

Comment on lines +191 to +196
helpText: (
<>
Software will only be available for install on hosts that{" "}
<strong>have any</strong> of these labels.
</>
),
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The new option helpText is very software-install specific ("available for install"), but CUSTOM_TARGET_OPTIONS is reused in other flows (e.g. auto-updates targeting) where the same targeting may not be primarily about installs/self-service. Consider making this copy context-neutral (e.g. "Targeted hosts are those that…") or moving this wording to a caller-provided dropdownHelpText so each flow can supply accurate language.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +11
// Hardcoded to fit all 3 custom target options (Exclude any, Include all,
// Include any) without scrolling
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

This comment says the dropdown is hardcoded to fit options in the order "Exclude any, Include all, Include any", but the actual options (and the visible dropdown order) are different. Please update the comment to match the current option labels/order to avoid confusion when someone revisits this later.

Suggested change
// Hardcoded to fit all 3 custom target options (Exclude any, Include all,
// Include any) without scrolling
// Hardcoded to fit all 3 custom target options without scrolling

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +18
.Select-menu-outer {
max-height: 260px;
}

.Select-menu {
max-height: 244px;
}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Hardcoding max-height values here is brittle (option height can change with copy tweaks, font-size changes, or localization), and it may reintroduce scrolling/clipping later. Consider removing the fixed heights (e.g. setting max-height to none/unset) or basing the limit on viewport height (so it remains usable if option content grows).

Copilot uses AI. Check for mistakes.
@RachelElysia RachelElysia merged commit 101858e into main Apr 20, 2026
23 of 25 checks passed
@RachelElysia RachelElysia deleted the 39916-copy-changes branch April 20, 2026 15:09
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.

Custom scope for software: "Labels include all"

3 participants