Skip to content

Use EmptyState for configuration profiles empty state #49461 - #49772

Merged
RachelElysia merged 6 commits into
fleetdm:mainfrom
Siddhu545:fix/49461
Aug 6, 2026
Merged

Use EmptyState for configuration profiles empty state #49461#49772
RachelElysia merged 6 commits into
fleetdm:mainfrom
Siddhu545:fix/49461

Conversation

@Siddhu545

@Siddhu545 Siddhu545 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Related issue: Resolves #49461

Aligns the configuration profiles empty state with the newer Assets tab
pattern. Replaces the bespoke AddProfileCard with the shared EmptyState
component so admin/maintainer users see a consistent empty state across the
Profiles and Assets tabs. Removes the now-unused AddProfileCard and its barrel.

Checklist

  • Changes file added in changes/

Testing

  • No automated test added (presentational change); verified rendering via a Storybook EmptyState story matching the Assets tab.
  • QA'd all new/changed functionality manually

Summary by CodeRabbit

  • Style

    • Updated the Configuration Profiles empty state to match the styling used in the Assets tab for a more consistent experience.
  • Bug Fixes

    • Added clearer guidance and a prominent “Add profile” action.
    • The action now respects GitOps mode, disabling profile creation when unavailable and opening the add-profile modal when permitted.

@Siddhu545
Siddhu545 requested a review from a team as a code owner July 22, 2026 18:59
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cdb15368-83d4-4f09-bcce-17b6f23404fc

📥 Commits

Reviewing files that changed from the base of the PR and between 7dbf2d4 and d767b58.

📒 Files selected for processing (5)
  • changes/49461-config-profiles-empty-state
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/ConfigurationProfiles.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/AddProfileCard.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/_styles.scss
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/index.ts
💤 Files with no reviewable changes (3)
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/AddProfileCard.tsx
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/_styles.scss
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/components/ProfileUploader/components/AddProfileCard/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/pages/ManageControlsPage/OSSettings/cards/ConfigurationProfiles/ConfigurationProfiles.tsx
  • changes/49461-config-profiles-empty-state

Walkthrough

The configuration profiles page now uses EmptyState with descriptive text and an “Add profile” button when no profiles exist. GitOpsModeTooltipWrapper controls the button’s disabled state while preserving the add-profile modal action. The previous AddProfileCard component and its styles were removed.

Possibly related PRs

  • fleetdm/fleet#49333: Modifies ConfigurationProfiles.tsx for a separate configuration-profile UI flow.
  • fleetdm/fleet#49473: Modifies the configuration profiles empty-state UI and button behavior.
  • fleetdm/fleet#50102: Replaces the old empty-state add-profile UI in ConfigurationProfiles.tsx.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: replacing the configuration profiles empty state with the shared EmptyState component.
Description check ✅ Passed The description identifies the issue, summarizes the implementation, records the changes file, and documents testing and manual QA.
Linked Issues check ✅ Passed The changes satisfy issue #49461 by using EmptyState for non-Technician users while preserving the Technician-specific behavior.
Out of Scope Changes check ✅ Passed The changed files directly support issue #49461 by replacing and removing the obsolete AddProfileCard implementation and styles.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@RachelElysia

Copy link
Copy Markdown
Member

Will review tomorrow AM

@RachelElysia

Copy link
Copy Markdown
Member

Removed orphaned AddProfileCard styles and directory, ready for final approval!

Screenshot 2026-08-06 at 7 14 45 AM

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.33%. Comparing base (7dbf2d4) to head (d767b58).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ds/ConfigurationProfiles/ConfigurationProfiles.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #49772    +/-   ##
========================================
  Coverage   68.33%   68.33%            
========================================
  Files        3953     3952     -1     
  Lines      253133   253130     -3     
  Branches    13335    13493   +158     
========================================
- Hits       172990   172988     -2     
+ Misses      64675    64673     -2     
- Partials    15468    15469     +1     
Flag Coverage Δ
frontend 61.66% <0.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.

@RachelElysia RachelElysia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clean, well-scoped refactor. Mirrors the AssetsTab pattern verbatim — same variant, same GitOpsModeTooltipWrapper shape, same button behavior. Copy parallels the Assets tab tone.

Verified:

  • No stale references to AddProfileCard or add-profile-card anywhere in the tree
  • ProfileGraphic still used by AddProfileModal.tsx
  • Dropped tipOffset={8} is a no-op — GitOpsModeTooltipWrapper defaults to 8 in the non-single-field-row branch
  • Technician branch still shows the plain Card — correct, only the admin/maintainer empty state changed

@RachelElysia
RachelElysia merged commit 7eb8838 into fleetdm:main Aug 6, 2026
21 checks passed
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.

Configuration profiles: permission-based empty state styling inconsistency

3 participants