Skip to content

Fleet UI: Handle long fleet names across the Fleets UI#49216

Draft
RachelElysia wants to merge 4 commits into
mainfrom
47290-long-fleet-name-ui
Draft

Fleet UI: Handle long fleet names across the Fleets UI#49216
RachelElysia wants to merge 4 commits into
mainfrom
47290-long-fleet-name-ui

Conversation

@RachelElysia

@RachelElysia RachelElysia commented Jul 13, 2026

Copy link
Copy Markdown
Member

Issue

Closes #47290

Also implements the "Cap free-text maxLength to the backend column length" pattern established in #49041 (patterns.md thread).

Description

Fleet name inputs had no maxLength cap and no service-layer length check, so a name >255 chars failed with a raw MySQL Data too long error, and several UI surfaces didn't handle long names gracefully. This PR fixes all four manifestations called out in the bug, plus a related label-overflow case on the host details page, and hardens adjacent name inputs across the app.

Frontend fixes for #47290:

  • Create/Rename fleet name inputs now cap at 255 characters (matches teams.name varchar(255)).
  • Fleets table Name column uses LinkCell with tooltipTruncate + className="w400" so long names truncate with an ellipsis and full-name tooltip instead of overflowing across the Hosts/Users columns.
  • Fleet-detail page header (.team-details__team-header): h1 gets overflow: hidden; text-overflow: ellipsis; white-space: nowrap;, __team-details gets min-width: 0; flex: 1, and .action-buttons gets flex-shrink: 0 + white-space: nowrap on buttons so Manage enroll secrets / Rename / Delete no longer wrap to a second line when the fleet name is long.
  • Manage enroll secrets modal body — __description gets overflow-wrap: anywhere; min-width: 0 so a long <b>{fleet name}</b> wraps within the modal instead of spilling out the right edge.
  • TeamsDropdown (used as the fleet-detail header selector for multi-team users, and in other headers): wrapper is shrinkable; the react-select control, single-value, and option styles get ellipsis-truncation; menu is capped at maxWidth: 500px so long team names in the option list don't blow out the menu.

Backend fixes for #47290:

  • New fleet.MaxTeamNameLength = 255 constant.
  • NewTeam, ModifyTeam, and ApplyTeamSpecs now return fleet.NewInvalidArgumentError("name", "may not exceed 255 characters") instead of surfacing a raw Data too long MySQL error. Covers UI, API, and GitOps entry points.

Broader consistency pass (per #49041 thread):

  • New shared MAX_ENTITY_NAME_LENGTH = 255 constant in frontend/utilities/constants.tsx.
  • Refactored 8 existing files that had ad-hoc NAME_MAX_LENGTH = 255 / MAX_LABEL_NAME_LENGTH = 255 locals to use it.
  • Slotted it into 16 additional InputField name/description inputs that were missing a cap (API user, custom variable, certificate, label name + description, pack name + description, and all 5 CA forms — CustomEST, CustomSCEP, Smallstep, Digicert, Hydrant).
  • Pruned dead FE length validators that can no longer fire now that the DOM cap enforces the limit (certificate modal, custom variable modal, both label helpers, both category modals). Unusual/shorter caps (e.g. varchar(64), custom business rules) still keep their inline validators — silent truncation is only appropriate for the common 255-char norm.

Bonus: fixed the long-label overflow on the host details Labels card by capping the pill button max-width at 300px.

Screenrecording

Screen.Recording.2026-07-13.at.8.34.11.AM.mov
Screen.Recording.2026-07-13.at.8.38.26.AM.mov
Screen.Recording.2026-07-13.at.9.51.41.AM.mov

Testing

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

Test coverage:

  • CreateFleetModal.tests.tsx, RenameFleetModal.tests.tsx — new case per file asserting the name input's maxLength === 255.
  • AddCertificateModal.tests.tsx, Variables.tests.tsx — the existing "shows too-long error when pasting 256 chars" tests are now unreachable via the DOM cap; converted to maxLength === 255 assertions.
  • ee/server/service/teams_test.goTestNewTeamNameValidation, TestModifyTeamNameValidation, and TestApplyTeamSpecsNameValidation each get two new cases (accepts at the limit, rejects one over with the expected error message).

Summary by CodeRabbit

  • New Features

    • Added 255-character limits to fleet, team, label, certificate, variable, pack, API user, policy, query, and certificate authority name or description fields.
    • Added clearer validation for oversized fleet and team names instead of exposing database errors.
  • Bug Fixes

    • Improved handling of long names across fleet tables, detail headers, team dropdowns, and enrollment dialogs.
    • Prevented long label names from overflowing host details layouts.
  • Style

    • Added truncation, wrapping, and responsive spacing for long text in dropdowns, tables, modals, and headers.

Cap fleet name input at 255 chars in the Create/Rename modals, add matching
service-layer validation on `NewTeam`, `ModifyTeam`, and `ApplyTeamSpecs` so
API/GitOps callers get a friendly `InvalidArgumentError` instead of a raw
"Data too long" MySQL error, and fix long-name overflow in the Fleets table,
the fleet-detail page header, the manage enroll secrets modal, the
TeamsDropdown trigger and menu options, and the host details Labels card.

Introduce a shared `MAX_ENTITY_NAME_LENGTH = 255` constant, use it across
10 existing name-input files, and cap 16 additional user-supplied name and
description inputs (API user, custom variable, certificate, label, pack,
certificate authority forms) that were missing a maxLength.
- teams_test.go: use `new(...)` instead of the deprecated `ptr.String(...)`
  for the length-cap test cases (staticcheck SA1019).
- AddCertificateModal.tests.tsx, Variables.tests.tsx: the existing tests
  pasted 256 chars and expected an inline "too long" validation message,
  but the new `maxLength: 255` cap blocks the 256th char at the DOM
  level so the error is now unreachable via user interaction. Swap for
  assertions that verify `input.maxLength === 255`.
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.99%. Comparing base (fb3932f) to head (d89f53d).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #49216      +/-   ##
==========================================
- Coverage   67.99%   67.99%   -0.01%     
==========================================
  Files        3779     3805      +26     
  Lines      239083   240636    +1553     
  Branches    12463    12838     +375     
==========================================
+ Hits       162564   163610    +1046     
- Misses      61756    62161     +405     
- Partials    14763    14865     +102     
Flag Coverage Δ
backend 69.58% <100.00%> (+0.01%) ⬆️
frontend 59.36% <100.00%> (+<0.01%) ⬆️

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.

…s the cap

With `inputOptions={{ maxLength: 255 }}` on the InputFields, the browser
blocks input past 255 chars, so the FE-side "notTooLong" / trimmedName-over-N
branches can't fire from user interaction and existing records can't hold
longer values either (the DB column is varchar(255) end-to-end).

Removed:
- `NAME_TOO_LONG_MSG` + `maxLength` validation in `AddCertificateModal/helpers.ts`.
- `notTooLong` name validator in `AddCustomVariableModal/helpers.ts`.
- `notTooLong` name + description validators in `NewLabelPage/helpers.ts` and `LabelForm/helpers.ts` (plus their now-unused local constants).
- `trimmedName.length > MAX_ENTITY_NAME_LENGTH` guard in `AddCategoryModal.tsx` and `EditCategoryModal.tsx`.

Unusual/shorter caps (e.g. varchar(64), custom business rules) still keep
their inline validators — silent truncation is only appropriate for the
common 255-char norm.
@RachelElysia

Copy link
Copy Markdown
Member Author

@claude review

…name constant

- Switch fleet-name length checks in ee/server/service/teams.go to
  utf8.RuneCountInString so multibyte names within the character cap are
  accepted (previously len() over-counted bytes and could reject valid names).
- Drop the no-op description validator from both Label form helpers.
- Rename MAX_ENTITY_NAME_LENGTH to MAX_ENTITY_CHAR_LENGTH and broaden the
  docstring to cover description fields too.
@RachelElysia

Copy link
Copy Markdown
Member Author

AI review:

Second-pass review: PR #49216

Follow-up commit d89f53d addresses all three items from the first pass. What remains:

Must fix

None.

Should fix

None — the byte/rune fix, dead validator prune, and constant rename are all landed locally. Just needs a push.

Nits (all optional)

  1. TeamsDropdown.tsx:154 — hard-coded maxWidth: "500px"
    Consider a named local constant so a future reader doesn't have to grep what 500 means.

  2. TeamDetailsWrapper/_styles.scss — bare h1 selector under &__team-details
    BEM-purist nit: truncation styles on &__team-title would be cleaner if the h1 got a class. Optional.

Also OK

  • All three server-side entry points that mutate teams.name are covered (NewTeam, ModifyTeam, ApplyTeamSpecs); no other NewTeam/SaveTeam callsite accepts an unvalidated
    user name.
  • Validation runs after strings.TrimSpace — correct order.
  • The new multibyte 日 test case in teams_test.go pins the rune-count behavior against future regression.
  • Frontend refactor sweep is complete: rg for = 255 / NAME_MAX_LENGTH under frontend/pages/ and frontend/components/ returns zero remaining ad-hoc constants.
  • No new datastore methods → no mock-crash risk.

Bottom line: ready to push. Only nit #1 is worth even a small callout; the other two are style preferences you can take or leave.

@RachelElysia RachelElysia marked this pull request as ready for review July 14, 2026 17:23
@RachelElysia RachelElysia requested review from a team as code owners July 14, 2026 17:23
Copilot AI review requested due to automatic review settings July 14, 2026 17:23

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.

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

This PR addresses long fleet (team) names causing UI overflow and backend “Data too long” errors by enforcing consistent 255-character caps in the frontend and adding service-layer validation in the backend so callers receive a clear InvalidArgumentError.

Changes:

  • Added a shared frontend MAX_ENTITY_CHAR_LENGTH = 255 constant and applied it broadly via InputField maxLength caps.
  • Hardened the Fleets UI for long names (table truncation, header flex/shrink behavior, modal wrapping, dropdown truncation) and fixed host label pill overflow.
  • Added backend validation for team name length (fleet.MaxTeamNameLength) in NewTeam, ModifyTeam, and ApplyTeamSpecs, with expanded tests.

Reviewed changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
server/fleet/teams.go Introduces MaxTeamNameLength = 255 to match DB column width.
ee/server/service/teams.go Validates team name length (rune-based) in create/modify/spec-apply flows.
ee/server/service/teams_test.go Adds test cases for max-length and multibyte names (currently contains a compile error; see comments).
frontend/utilities/constants.tsx Adds shared MAX_ENTITY_CHAR_LENGTH = 255 constant for free-text DB-backed fields.
frontend/pages/admin/ManageFleetsPage/components/CreateFleetModal/CreateFleetModal.tsx Caps fleet name input length via maxLength.
frontend/pages/admin/ManageFleetsPage/components/CreateFleetModal/CreateFleetModal.tests.tsx Asserts fleet name input maxLength is 255.
frontend/pages/admin/ManageFleetsPage/components/RenameFleetModal/RenameFleetModal.tsx Caps fleet name input length via maxLength.
frontend/pages/admin/ManageFleetsPage/components/RenameFleetModal/RenameFleetModal.tests.tsx Asserts fleet name input maxLength is 255.
frontend/pages/admin/ManageFleetsPage/FleetTableConfig.tsx Truncates long fleet names in the Fleets table with tooltip support.
frontend/pages/admin/ManageFleetsPage/TeamDetailsWrapper/_styles.scss Ensures long fleet names truncate without wrapping header action buttons.
frontend/components/EnrollSecrets/EnrollSecretModal/_styles.scss Ensures long fleet names wrap within the modal description area.
frontend/components/TeamsDropdown/TeamsDropdown.tsx Adds truncation/overflow handling for long team names in the dropdown control/menu.
frontend/components/TeamsDropdown/_styles.scss Makes the dropdown wrapper shrinkable in flex rows for truncation to work.
frontend/pages/hosts/details/cards/Labels/_styles.scss Caps label pill button width to prevent overflow in host details.
frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/AddCategoryModal/AddCategoryModal.tsx Replaces ad-hoc max length constant with shared MAX_ENTITY_CHAR_LENGTH.
frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/EditCategoryModal/EditCategoryModal.tsx Same shared maxLength usage for editing category names.
frontend/pages/queries/edit/components/EditQueryForm/EditQueryForm.tsx Uses shared MAX_ENTITY_CHAR_LENGTH for query name input.
frontend/pages/queries/edit/components/SaveNewQueryModal/SaveNewQueryModal.tsx Uses shared MAX_ENTITY_CHAR_LENGTH for “save as new query” name input.
frontend/pages/policies/edit/components/PolicyForm/PolicyForm.tsx Uses shared MAX_ENTITY_CHAR_LENGTH for policy name input.
frontend/pages/policies/edit/components/SaveNewPolicyModal/SaveNewPolicyModal.tsx Uses shared MAX_ENTITY_CHAR_LENGTH for new policy name input.
frontend/pages/labels/NewLabelPage/NewLabelPage.tsx Caps label name/description inputs via maxLength.
frontend/pages/labels/NewLabelPage/helpers.ts Removes now-unreachable “too long” validations after DOM cap.
frontend/pages/labels/components/LabelForm/LabelForm.tsx Caps label name/description inputs via maxLength.
frontend/pages/labels/components/LabelForm/helpers.ts Removes now-unreachable “too long” validations after DOM cap.
frontend/pages/ManageControlsPage/Variables/components/AddCustomVariableModal/AddCustomVariableModal.tsx Caps custom variable name input via maxLength.
frontend/pages/ManageControlsPage/Variables/components/AddCustomVariableModal/helpers.ts Removes now-unreachable “too long” validation after DOM cap.
frontend/pages/ManageControlsPage/Variables/Variables.tests.tsx Updates test to assert DOM maxLength instead of unreachable paste-based validation.
frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/AddCertificateModal.tsx Caps certificate name input via maxLength.
frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/helpers.ts Removes now-unreachable “too long” validation after DOM cap.
frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/AddCertificateModal.tests.tsx Updates test to assert DOM maxLength instead of unreachable paste-based validation.
frontend/pages/admin/ManageUsersPage/components/ApiUserForm/ApiUserForm.tsx Caps API user “name” input via maxLength.
frontend/components/forms/packs/NewPackForm/NewPackForm.tsx Caps pack name/description inputs via maxLength.
frontend/components/forms/packs/EditPackForm/EditPackForm.tsx Caps pack name/description inputs via maxLength.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomESTForm/CustomESTForm.tsx Caps CA variable/name-like field via maxLength.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx Caps CA variable/name-like field via maxLength.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/DigicertForm.tsx Caps CA variable/name-like field via maxLength.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/HydrantForm.tsx Caps CA variable/name-like field via maxLength.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsx Caps CA variable/name-like field via maxLength.
changes/47290-long-fleet-name-ui Excluded from diff by content policy (not reviewed).
Files excluded by content exclusion policy (1)
  • changes/47290-long-fleet-name-ui

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

},
{
name: "name at max length is accepted",
teamName: new(strings.Repeat("a", fleet.MaxTeamNameLength)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

},
{
name: "name over max length is rejected",
teamName: new(strings.Repeat("a", fleet.MaxTeamNameLength+1)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

// Guards against regressing to byte-based length checks, which
// would reject multibyte names that fit within the character cap.
name: "multibyte name at max character length is accepted",
teamName: new(strings.Repeat("日", fleet.MaxTeamNameLength)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

},
{
name: "name at max length is accepted",
teamName: new(strings.Repeat("a", fleet.MaxTeamNameLength)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

},
{
name: "name over max length is rejected",
teamName: new(strings.Repeat("a", fleet.MaxTeamNameLength+1)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

},
{
name: "multibyte name at max character length is accepted",
teamName: new(strings.Repeat("日", fleet.MaxTeamNameLength)),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

False positive, I think — Go 1.26 supports new(expression), and .claude/rules/fleet-go-backend.md explicitly steers us toward new("value") / new(true) / new(42) over ptr.String(...). Tests compile and pass locally (go test -run TestNewTeamNameValidation ./ee/server/service/...).

I'm not a strong Go reviewer myself — can someone confirm new(strings.Repeat(...)) (function-call expression, not a literal) is fine per current convention, or should I swap to ptr.String(...) for readability?

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The change adds a 255-character shared frontend limit for multiple user-supplied fields and validates team names by Unicode character count in create, rename, and GitOps flows. Fleet and team UI components now truncate or wrap long names, while label layouts constrain long values. Tests cover maximum-length inputs, over-limit team names, and multibyte names.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR covers the four reported fleet-name UI issues plus the backend length checks and friendly errors required by #47290.
Out of Scope Changes check ✅ Passed No clear out-of-scope changes; the extra caps and validator cleanup are described as part of the intended broader consistency pass.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly matches the main change: handling long fleet names across the Fleets UI.
Description check ✅ Passed The description covers the issue, scope, testing, and key implementation details, though it does not mirror the template's checkbox list.
✨ 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 47290-long-fleet-name-ui

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.

@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 (3)
frontend/pages/admin/ManageFleetsPage/TeamDetailsWrapper/_styles.scss (1)

22-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer a dedicated class instead of a bare h1 selector.

As noted in the PR comments summary, consider using a dedicated class (e.g., .team-details__title) instead of targeting the bare h1 element for the truncation styles. This improves CSS maintainability and component encapsulation.

🤖 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/admin/ManageFleetsPage/TeamDetailsWrapper/_styles.scss` around
lines 22 - 27, Replace the bare h1 selector in the team details styles with a
dedicated title class such as team-details__title, and apply that class to the
corresponding heading element. Preserve the existing truncation declarations
while scoping them to the component-specific class.
frontend/pages/labels/NewLabelPage/helpers.ts (1)

6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove obsolete description validation state.

With the removal of the description validation rules in this PR, the description validation state and its associated update logic are now unreachable. Removing these leftovers will clean up the components.

  • frontend/pages/labels/NewLabelPage/helpers.ts#L6-L6: Remove the description property from INewLabelFormValidation.
  • frontend/pages/labels/components/LabelForm/helpers.ts#L6-L6: Remove the description property from ILabelFormValidation.
  • frontend/pages/labels/NewLabelPage/NewLabelPage.tsx#L273-L277: Remove this dead fieldName === "description" error-clearing block in onInputChange.
  • frontend/pages/labels/components/LabelForm/LabelForm.tsx#L101-L105: Remove this dead fieldName === "description" error-clearing block in onFormChange.
🤖 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/NewLabelPage/helpers.ts` at line 6, Remove the obsolete
description property from INewLabelFormValidation in
frontend/pages/labels/NewLabelPage/helpers.ts:6-6 and ILabelFormValidation in
frontend/pages/labels/components/LabelForm/helpers.ts:6-6. Also remove the
fieldName === "description" error-clearing blocks from onInputChange in
frontend/pages/labels/NewLabelPage/NewLabelPage.tsx:273-277 and onFormChange in
frontend/pages/labels/components/LabelForm/LabelForm.tsx:101-105.
frontend/components/TeamsDropdown/TeamsDropdown.tsx (1)

243-243: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Name the TeamsDropdown menu width constant.

Move 500px into a named constant so this layout contract is easier to understand and tune consistently.

🤖 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/components/TeamsDropdown/TeamsDropdown.tsx` at line 243, In
TeamsDropdown, replace the inline "500px" value used for the menu maxWidth with
a clearly named module-level constant, then reference that constant in the style
configuration so the width contract can be tuned from one location.
🤖 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/components/TeamsDropdown/TeamsDropdown.tsx`:
- Line 243: In TeamsDropdown, replace the inline "500px" value used for the menu
maxWidth with a clearly named module-level constant, then reference that
constant in the style configuration so the width contract can be tuned from one
location.

In `@frontend/pages/admin/ManageFleetsPage/TeamDetailsWrapper/_styles.scss`:
- Around line 22-27: Replace the bare h1 selector in the team details styles
with a dedicated title class such as team-details__title, and apply that class
to the corresponding heading element. Preserve the existing truncation
declarations while scoping them to the component-specific class.

In `@frontend/pages/labels/NewLabelPage/helpers.ts`:
- Line 6: Remove the obsolete description property from INewLabelFormValidation
in frontend/pages/labels/NewLabelPage/helpers.ts:6-6 and ILabelFormValidation in
frontend/pages/labels/components/LabelForm/helpers.ts:6-6. Also remove the
fieldName === "description" error-clearing blocks from onInputChange in
frontend/pages/labels/NewLabelPage/NewLabelPage.tsx:273-277 and onFormChange in
frontend/pages/labels/components/LabelForm/LabelForm.tsx:101-105.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e81c150-5cbe-46c8-9387-d2392104f9a7

📥 Commits

Reviewing files that changed from the base of the PR and between 56782e2 and d89f53d.

📒 Files selected for processing (39)
  • changes/47290-long-fleet-name-ui
  • ee/server/service/teams.go
  • ee/server/service/teams_test.go
  • frontend/components/EnrollSecrets/EnrollSecretModal/_styles.scss
  • frontend/components/TeamsDropdown/TeamsDropdown.tsx
  • frontend/components/TeamsDropdown/_styles.scss
  • frontend/components/forms/packs/EditPackForm/EditPackForm.tsx
  • frontend/components/forms/packs/NewPackForm/NewPackForm.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/AddCertificateModal.tests.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/AddCertificateModal.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/helpers.ts
  • frontend/pages/ManageControlsPage/Variables/Variables.tests.tsx
  • frontend/pages/ManageControlsPage/Variables/components/AddCustomVariableModal/AddCustomVariableModal.tsx
  • frontend/pages/ManageControlsPage/Variables/components/AddCustomVariableModal/helpers.ts
  • frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/AddCategoryModal/AddCategoryModal.tsx
  • frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/EditCategoryModal/EditCategoryModal.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomESTForm/CustomESTForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/DigicertForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/HydrantForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsx
  • frontend/pages/admin/ManageFleetsPage/FleetTableConfig.tsx
  • frontend/pages/admin/ManageFleetsPage/TeamDetailsWrapper/_styles.scss
  • frontend/pages/admin/ManageFleetsPage/components/CreateFleetModal/CreateFleetModal.tests.tsx
  • frontend/pages/admin/ManageFleetsPage/components/CreateFleetModal/CreateFleetModal.tsx
  • frontend/pages/admin/ManageFleetsPage/components/RenameFleetModal/RenameFleetModal.tests.tsx
  • frontend/pages/admin/ManageFleetsPage/components/RenameFleetModal/RenameFleetModal.tsx
  • frontend/pages/admin/ManageUsersPage/components/ApiUserForm/ApiUserForm.tsx
  • frontend/pages/hosts/details/cards/Labels/_styles.scss
  • frontend/pages/labels/NewLabelPage/NewLabelPage.tsx
  • frontend/pages/labels/NewLabelPage/helpers.ts
  • frontend/pages/labels/components/LabelForm/LabelForm.tsx
  • frontend/pages/labels/components/LabelForm/helpers.ts
  • frontend/pages/policies/edit/components/PolicyForm/PolicyForm.tsx
  • frontend/pages/policies/edit/components/SaveNewPolicyModal/SaveNewPolicyModal.tsx
  • frontend/pages/queries/edit/components/EditQueryForm/EditQueryForm.tsx
  • frontend/pages/queries/edit/components/SaveNewQueryModal/SaveNewQueryModal.tsx
  • frontend/utilities/constants.tsx
  • server/fleet/teams.go
💤 Files with no reviewable changes (2)
  • frontend/pages/ManageControlsPage/Variables/components/AddCustomVariableModal/helpers.ts
  • frontend/pages/ManageControlsPage/OSSettings/cards/Certificates/components/AddCertificateModal/helpers.ts

@RachelElysia RachelElysia marked this pull request as draft July 14, 2026 17:48
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.

Long fleet name isn't handled across the Fleets UI: no char limit, table overflow, wrapped header actions, modal overflow

2 participants