Skip to content

Fleet UI: Fix self-service page > 0 toggle#46336

Merged
RachelElysia merged 1 commit into
mainfrom
45868-self-service-page-bug
May 28, 2026
Merged

Fleet UI: Fix self-service page > 0 toggle#46336
RachelElysia merged 1 commit into
mainfrom
45868-self-service-page-bug

Conversation

@RachelElysia
Copy link
Copy Markdown
Member

@RachelElysia RachelElysia commented May 28, 2026

Issue

Closes #45868

Description

  • The thing the prop was doing for us — "reset to page 0 when the toggle flips" — is already done explicitly by
    handleSelfServiceToggle setting page: 0 on line 152. Removing the duplicate path that raced with resetting the page.
  • Will need cherry-pick to 4.86.0

Screen recording of test (used pagination of 4 in my test)

Screen.Recording.2026-05-28.at.10.53.49.AM.mov

Testing

  • QA'd all new/changed functionality manually

Summary by CodeRabbit

  • Refactor
    • Simplified component prop handling by removing unnecessary parameter passing to improve code clarity.

Review Change Stack

@RachelElysia RachelElysia marked this pull request as ready for review May 28, 2026 14:55
Copilot AI review requested due to automatic review settings May 28, 2026 14:55
@RachelElysia RachelElysia requested a review from a team as a code owner May 28, 2026 14:55
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 May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.89%. Comparing base (7c33552) to head (39ec10d).

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #46336    +/-   ##
========================================
  Coverage   66.89%   66.89%            
========================================
  Files        2782     2782            
  Lines      221734   221734            
  Branches    11356    11221   -135     
========================================
  Hits       148334   148334            
- Misses      59999    60000     +1     
+ Partials    13401    13400     -1     
Flag Coverage Δ
frontend 56.28% <ø> (ø)

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.

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

This PR fixes erratic pagination behavior on the Software Library self-service toggle by removing a duplicate TableContainer query-change trigger; the toggle handler already resets pagination to page 0.

Changes:

  • Removed additionalQueries={String(selfServiceOnly)} from the Software Library table.
  • Keeps self-service toggle pagination reset centralized in handleSelfServiceToggle.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

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: ee92101a-6c09-4981-8c13-e74198f29a47

📥 Commits

Reviewing files that changed from the base of the PR and between 7c33552 and 39ec10d.

📒 Files selected for processing (1)
  • frontend/pages/SoftwarePage/SoftwareLibrary/SoftwareLibraryTable/SoftwareLibraryTable.tsx
💤 Files with no reviewable changes (1)
  • frontend/pages/SoftwarePage/SoftwareLibrary/SoftwareLibraryTable/SoftwareLibraryTable.tsx

Walkthrough

This PR removes the additionalQueries={String(selfServiceOnly)} prop from the TableContainer component in SoftwareLibraryTable. The prop was coupling the self-service toggle state directly to the table's internal query handling, which caused unexpected behavior when toggling the filter. By removing this prop, the toggle state and query logic are decoupled, allowing them to be managed independently and resolving the wild toggle behavior reported in the linked issue.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the specific bug being fixed: a self-service toggle issue on pages with pagination > 0.
Description check ✅ Passed The description is mostly complete, explaining the root cause and fix, but the template checklist items are not filled out.
Linked Issues check ✅ Passed The PR fully addresses issue #45868 by removing the duplicate prop that caused race conditions when toggling self-service on paginated pages.
Out of Scope Changes check ✅ Passed The single change (removing the additionalQueries prop) is directly scoped to fixing the reported toggle behavior issue.
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 45868-self-service-page-bug

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.

@RachelElysia RachelElysia merged commit 83ab1b5 into main May 28, 2026
26 checks passed
@RachelElysia RachelElysia deleted the 45868-self-service-page-bug branch May 28, 2026 15:31
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.

Software library wild toggle behavior

3 participants