feat(envs): add bulk stop action#2741
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2741 +/- ##
===========================================
- Coverage 45.97% 41.47% -4.51%
===========================================
Files 1150 244 -906
Lines 24806 7118 -17688
Branches 7384 2202 -5182
===========================================
- Hits 11404 2952 -8452
+ Misses 11405 3635 -7770
+ Partials 1997 531 -1466
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds multi-row selection to the Environments table and introduces a bottom action bar that enables a bulk Stop selected environments action (with confirmation) for the selected environments in a project.
Changes:
- Add per-row and per-section selection (checkboxes) to environment rows and sections.
- Introduce a fixed “selection action bar” with a bulk stop action and confirmation modal.
- Update/extend unit tests to account for the new components and selection interactions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/domains/environments/feature/src/lib/environments-table/environments-table.tsx | Tracks selected environment IDs and renders the new bulk-action bar. |
| libs/domains/environments/feature/src/lib/environments-table/environments-table.spec.tsx | Adds mocking for the new action bar (and should also mock the newly imported className constants). |
| libs/domains/environments/feature/src/lib/environments-table/environments-table-action-bar.tsx | New action bar component that performs bulk stop via confirmation + per-env mutation calls. |
| libs/domains/environments/feature/src/lib/environments-table/environments-table-action-bar.spec.tsx | Adds basic render/count tests for the action bar. |
| libs/domains/environments/feature/src/lib/environments-table/environment-section/environment-section.tsx | Adds header + row selection checkboxes and exports shared layout className constants. |
| libs/domains/environments/feature/src/lib/environments-table/environment-section/environment-section.spec.tsx | Adds tests for row/section selection behavior (checkbox clicks shouldn’t navigate). |
Comments suppressed due to low confidence (1)
libs/domains/environments/feature/src/lib/environments-table/environments-table.spec.tsx:37
- This test mocks
./environment-section/environment-section, butEnvironmentsTablenow imports several CSS className constants from that module. Because the mock doesn't export them, those imports becomeundefinedduring tests (leading to classNames like "undefined w-full ..." and potentially hiding regressions). Export stub values for the new constants in the mock.
jest.mock('./environment-section/environment-section', () => ({
__esModule: true,
EnvironmentSection: ({ type, items }: EnvironmentSectionMockProps) => (
<div data-testid="environment-section">{`section:${type}:${items.map(({ name }) => name).join(',')}`}</div>
),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update stop confirmation modal
1f6e602 to
4624908
Compare
Summary
Issue: QOV-1958
This PR adds a bulk action to Stop a bunch of selected environments.
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release