UI: Update Controls > Scripts to use a side nav and new Batch progress section, add new progress bar component#31750
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis update introduces a major refactor and feature expansion for script management in the frontend. It adds new components for script batch progress, updates type safety, introduces paginated API support for script batches, and modularizes navigation for scripts and OS settings. Several new utility functions, styles, and Storybook/test files are included. Existing types and API calls are updated or versioned to support these changes. Changes
Sequence Diagram(s)Script batch progress tab interaction and data flowsequenceDiagram
participant User
participant ScriptBatchProgress
participant Router
participant API
participant Modal
User->>ScriptBatchProgress: Selects tab (status)
ScriptBatchProgress->>Router: Updates URL query param "status"
ScriptBatchProgress->>API: Fetch batch summaries (status, teamId, page)
API-->>ScriptBatchProgress: Returns batch summaries data
ScriptBatchProgress->>User: Renders batch list and progress bars
User->>ScriptBatchProgress: Clicks batch row
ScriptBatchProgress->>Modal: Opens batch summary modal
Script library pagination and modal flowsequenceDiagram
participant User
participant ScriptLibrary
participant API
participant Modal
User->>ScriptLibrary: Navigates to page N
ScriptLibrary->>API: Fetch scripts (page N, teamId)
API-->>ScriptLibrary: Returns scripts data
ScriptLibrary->>User: Renders script list
User->>ScriptLibrary: Clicks script row
ScriptLibrary->>Modal: Opens edit/delete modal
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes This review involves several new features, significant refactoring, type and API changes, and new test and Storybook files. The complexity comes from the introduction of new UI patterns, API versioning, and modular navigation, requiring careful attention to type correctness and integration points. ✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 28390-frontend-feature #31750 +/- ##
=========================================================
Coverage ? 63.72%
=========================================================
Files ? 1964
Lines ? 191321
Branches ? 6229
=========================================================
Hits ? 121924
Misses ? 59850
Partials ? 9547
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }); | ||
|
|
||
| // it("Renders each tab with appropriate scripts list", async () => { | ||
| // mockServer.use(teamBatchSummariesHandler); |
There was a problem hiding this comment.
@sgress454 this test is almost working, but MSW is for some reason not successfully intercepting the GET here. Once that's worked out the remaining 2 tab cases shouldn't be much trouble
# Details This PR merges the feature branch for the scheduled scripts UI into main. This includes the following previously-approved PRs: * #31750 * #31604 * #31797 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests - [X] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [X] QA'd all new/changed functionality manually --------- Co-authored-by: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
# Details This PR merges the feature branch for the scheduled scripts UI into main. This includes the following previously-approved PRs: * #31750 * #31604 * #31797 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests - [X] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [X] QA'd all new/changed functionality manually --------- Co-authored-by: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
#31224 and #31225
Summary
New Features
Improvements
Bug Fixes
Controls > Scripts > Batch progress
Progress bar component:
changes/