Skip to content

LabelForm: replace 'teams' with 'fleets' - #44770

Merged
nulmete merged 6 commits into
mainfrom
nulmete/label-form-use-fleets-and-reports
May 11, 2026
Merged

LabelForm: replace 'teams' with 'fleets'#44770
nulmete merged 6 commits into
mainfrom
nulmete/label-form-use-fleets-and-reports

Conversation

@nulmete

@nulmete nulmete commented May 5, 2026

Copy link
Copy Markdown
Member

Ad-hoc issue detected when reviewing #44410

Resolves: #45141

Checklist for submitter

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

Testing

  • Added/updated automated tests

  • QA'd all new/changed functionality manually

Before

Screenshot 2026-05-05 at 9 35 13 PM

After

Screenshot 2026-05-05 at 9 50 26 PM

Summary by CodeRabbit

  • UI Updates
    • Updated label form terminology to refer to "fleets" instead of "teams" throughout the label management interface
    • Modified field names, labels, and help text to use consistent fleet-related language
    • Updated copy on the Edit Label page to mention fleets when applicable
    • Streamlined form field layout for improved presentation

Review Change Stack

Copilot AI review requested due to automatic review settings May 5, 2026 19:55
@nulmete
nulmete requested a review from a team as a code owner May 5, 2026 19:55

@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.

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ff113c5a-cc0f-45cc-b890-903d9e1e6986

📥 Commits

Reviewing files that changed from the base of the PR and between 7fc7786 and 627fa21.

📒 Files selected for processing (1)
  • changes/45141-edit-label-form-mention-fleets
✅ Files skipped from review due to trivial changes (1)
  • changes/45141-edit-label-form-mention-fleets

Walkthrough

This pull request renames terminology in the label form from "teams" to "fleets" to align with Fleet's actual product naming. The immutableFields prop in DynamicLabelForm and ManualLabelForm now includes "fleets" instead of "teams" when a team/fleet is present. TeamNameField updates its FormField label and name attributes to use "Fleet" and "fleet_name" respectively. Test cases for LabelForm verify the updated help text copy reflects the new immutable field terminology. A changelog entry documents the change.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change in the PR: replacing 'teams' with 'fleets' terminology in the LabelForm component.
Description check ✅ Passed The PR description includes the related issue (#45141), documents the changes file addition, confirms automated tests were added/updated, indicates manual QA was performed, and provides before/after screenshots demonstrating the terminology change.
Linked Issues check ✅ Passed The code changes comprehensively address issue #45141 by replacing 'teams' terminology with 'fleets' across all relevant form components, including updated immutability help text.
Out of Scope Changes check ✅ Passed All changes are narrowly focused on replacing 'teams' terminology with 'fleets' in label form components; no unrelated modifications are present.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nulmete/label-form-use-fleets-and-reports

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.

@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.

🧹 Nitpick comments (2)
frontend/pages/labels/components/LabelForm/LabelForm.tests.tsx (1)

106-125: 💤 Low value

Remove the vacuous immutableFields.length assertion.

Line 124 asserts the length of a locally declared constant (const immutableFields = ["reports", "platforms"]), which always passes and tests the test fixture rather than the component under test. It provides no signal about LabelForm's behaviour.

🧹 Proposed cleanup
     expect(
       screen.getByText(
         "Label reports and platforms are immutable. To make changes, delete this label and create a new one."
       )
     ).toBeInTheDocument();
-
-    expect(immutableFields.length).toBe(2);
   });
🤖 Prompt for 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.

In `@frontend/pages/labels/components/LabelForm/LabelForm.tests.tsx` around lines
106 - 125, The test "should render correct immutable help text for two fields
(DynamicLabelForm without fleet)" declares immutableFields and then asserts
immutableFields.length, which is vacuous; remove the line
expect(immutableFields.length).toBe(2) from LabelForm.tests.tsx so the test only
asserts the rendered output from the LabelForm component (keep the render call
and the screen.getByText assertion that checks the immutable help text).
frontend/pages/labels/components/TeamNameField/TeamNameField.tsx (1)

9-15: 💤 Low value

Consider renaming TeamNameField to FleetNameField for consistency.

The component file name and export TeamNameField render a "Fleet" label, creating a semantic mismatch. Since this is a display-only component, there's no runtime impact, but the naming inconsistency will confuse maintainers. The rename is straightforward—only one file imports this component (LabelForm.tsx), making it genuinely low-effort.

🤖 Prompt for 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.

In `@frontend/pages/labels/components/TeamNameField/TeamNameField.tsx` around
lines 9 - 15, Rename the TeamNameField component and its props interface to
FleetNameField (e.g., change TeamNameField -> FleetNameField and
ITeamNameFieldProps -> IFleetNameFieldProps) and update its export, the
component declaration, and the single import site in LabelForm.tsx so the
displayed label and file name match; ensure any prop usages (the name prop)
remain unchanged and update the filename to TeamNameField.tsx ->
FleetNameField.tsx to keep module identity consistent.
🤖 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.

Nitpick comments:
In `@frontend/pages/labels/components/LabelForm/LabelForm.tests.tsx`:
- Around line 106-125: The test "should render correct immutable help text for
two fields (DynamicLabelForm without fleet)" declares immutableFields and then
asserts immutableFields.length, which is vacuous; remove the line
expect(immutableFields.length).toBe(2) from LabelForm.tests.tsx so the test only
asserts the rendered output from the LabelForm component (keep the render call
and the screen.getByText assertion that checks the immutable help text).

In `@frontend/pages/labels/components/TeamNameField/TeamNameField.tsx`:
- Around line 9-15: Rename the TeamNameField component and its props interface
to FleetNameField (e.g., change TeamNameField -> FleetNameField and
ITeamNameFieldProps -> IFleetNameFieldProps) and update its export, the
component declaration, and the single import site in LabelForm.tsx so the
displayed label and file name match; ensure any prop usages (the name prop)
remain unchanged and update the filename to TeamNameField.tsx ->
FleetNameField.tsx to keep module identity consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9dc62fd9-9e40-4e83-a4ad-09e7c25ff23f

📥 Commits

Reviewing files that changed from the base of the PR and between e102904 and 858c2b6.

📒 Files selected for processing (5)
  • changes/labelform-use-fleets-and-reports
  • frontend/pages/labels/components/DynamicLabelForm/DynamicLabelForm.tsx
  • frontend/pages/labels/components/LabelForm/LabelForm.tests.tsx
  • frontend/pages/labels/components/ManualLabelForm/ManualLabelForm.tsx
  • frontend/pages/labels/components/TeamNameField/TeamNameField.tsx

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

Updates the label edit/create UI copy to use newer product terminology in the shared label form, mainly replacing user-facing references to teams with fleets and queries with reports.

Changes:

  • Renamed the label form’s team field label from “Team” to “Fleet”.
  • Updated immutable-help-text inputs so manual labels refer to “fleets” and dynamic labels refer to “reports”.
  • Updated label form tests and added a changelog entry for the terminology change.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/pages/labels/components/TeamNameField/TeamNameField.tsx Renames the displayed field label from Team to Fleet.
frontend/pages/labels/components/ManualLabelForm/ManualLabelForm.tsx Changes manual-label immutable copy token from teams to fleets.
frontend/pages/labels/components/LabelForm/LabelForm.tests.tsx Updates expectations for the new immutable-help-text wording.
frontend/pages/labels/components/DynamicLabelForm/DynamicLabelForm.tsx Changes dynamic-label immutable copy tokens from queries to reports, and teams to fleets.
changes/labelform-use-fleets-and-reports Records the user-visible copy change in the changelog.

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

Comment thread frontend/pages/labels/components/DynamicLabelForm/DynamicLabelForm.tsx Outdated
@nulmete nulmete changed the title LabelForm: replace 'teams' with 'fleets' and 'queries' with 'reports' LabelForm: replace 'teams' with 'fleets' May 5, 2026
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.68%. Comparing base (e102904) to head (627fa21).
⚠️ Report is 168 commits behind head on main.

Files with missing lines Patch % Lines
...s/components/DynamicLabelForm/DynamicLabelForm.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #44770      +/-   ##
==========================================
+ Coverage   66.67%   66.68%   +0.01%     
==========================================
  Files        2664     2715      +51     
  Lines      214655   216964    +2309     
  Branches     9878    10627     +749     
==========================================
+ Hits       143125   144688    +1563     
- Misses      58500    59241     +741     
- Partials    13030    13035       +5     
Flag Coverage Δ
frontend 55.31% <50.00%> (+1.05%) ⬆️

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.

@juan-fdz-hawa

Copy link
Copy Markdown
Contributor

Could you please create an issue for this and make the proper updates to the changes file? Thanks

@nulmete

nulmete commented May 11, 2026

Copy link
Copy Markdown
Member Author

Could you please create an issue for this and make the proper updates to the changes file? Thanks

@juan-fdz-hawa updated 👍

@nulmete
nulmete merged commit 146f0c8 into main May 11, 2026
24 checks passed
@nulmete
nulmete deleted the nulmete/label-form-use-fleets-and-reports branch May 11, 2026 14:50
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.

Label form mentions "teams" instead of "fleets"

4 participants