Skip to content

feat(envs): add bulk stop action#2741

Open
rmnbrd wants to merge 3 commits into
stagingfrom
feat/envs/bulk-stop
Open

feat(envs): add bulk stop action#2741
rmnbrd wants to merge 3 commits into
stagingfrom
feat/envs/bulk-stop

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue: QOV-1958

This PR adds a bulk action to Stop a bunch of selected environments.

Screenshots / Recordings

SCR-20260608-nnlj SCR-20260608-nnnd

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.40678% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.47%. Comparing base (4f20e6e) to head (a289f2a).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
.../src/lib/environments-table/environments-table.tsx 38.09% 12 Missing and 1 partial ⚠️
...-table/environment-section/environment-section.tsx 66.66% 3 Missing and 4 partials ⚠️
...vironments-table/environments-table-action-bar.tsx 94.11% 0 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unittests 41.47% <64.40%> (-4.51%) ⬇️

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.

@rmnbrd rmnbrd marked this pull request as ready for review June 8, 2026 11:22
Copilot AI review requested due to automatic review settings June 8, 2026 11:22

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.

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, but EnvironmentsTable now imports several CSS className constants from that module. Because the mock doesn't export them, those imports become undefined during 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
@rmnbrd rmnbrd force-pushed the feat/envs/bulk-stop branch from 1f6e602 to 4624908 Compare June 8, 2026 12:44
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.

2 participants