enhancement(search): bulk actions on RepositoryCase search results#400
Merged
Conversation
Adds per-row selection on RepositoryCase hits in UnifiedSearch and a viewport- pinned bulk-action toolbar that surfaces two existing actions against the selection: Bulk Edit (reuses the BulkEditModal from the repository view) and Create Test Run (seeds sessionStorage["createTestRun_selectedCases"] and navigates to /projects/runs/<projectId>?openAddRun=true, the same handoff the repository view uses). Selection is gated to the same project: when the selection spans projects both action buttons are disabled with a tooltip explaining why, so a cross-project selection never resolves to an ambiguous target. Selection clears automatically when the query, filters, or current-project-only scope change. Toolbar is fixed bottom-right with sm:max-w-3xl to match the GlobalSearchSheet column on sm+ screens; spans full width on xs, same as the Sheet does at that breakpoint. Search results get bottom padding while the toolbar is visible so the last row isn't covered. Checkbox is only rendered on REPOSITORY_CASE hits; other entity types (TestRuns, Sessions, etc.) render unchanged, so multi-entity bulk actions can be added later without rewiring this code. i18n: 5 existing strings reused (repository.cases.bulkEdit, .createTestRun, common.actions.clear, repository.duplicates.selectRow, .selected). Two new keys added under search.bulk for the cross-project guard and synced to the 13 non-English locales via crowdin. Tests: 6 new co-located cases in UnifiedSearch.test.tsx covering checkbox visibility per entity type, toolbar appearance + count rendering, cross- project disable + tooltip, BulkEditModal mount with the right (ids, projectId) shape, the Create-Test-Run sessionStorage + navigation handoff, and the clear-selection control. Existing 26 tests still pass; mocked next-intl now substitutes the `count` value so plural-key assertions work, and the i18n-aware navigation wrapper is mocked.
Contributor
Author
|
🎉 This PR is included in version 0.34.9 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds per-row selection on RepositoryCase hits in the global search (
UnifiedSearch) plus a viewport-pinned bulk-action toolbar that surfaces two existing affordances against the current selection:BulkEditModalfrom the repository view with the selected case ids + project id; on save the selection clears.sessionStorage["createTestRun_selectedCases"]and navigates to/projects/runs/<projectId>?openAddRun=true, the same handoff the repository view uses for its in-tab "Create Test Run from selection" flow.Same-project gate
Selection is gated to a single project. When a selection spans projects, both action buttons are disabled with a tooltip explaining why, so cross-project selections never resolve to an ambiguous target. The selection auto-clears when the query, filters, or current-project-only scope change.
UX
The toolbar is pinned to the bottom of the viewport and matches the
GlobalSearchSheetcolumn on sm+ screens (fixed bottom-0 right-0 w-full sm:max-w-3xl); spans full-width on xs to match the Sheet behavior at that breakpoint. The search results area gets bottom padding while the toolbar is visible so the last row isn't covered.The checkbox is only rendered on
REPOSITORY_CASEhits — other entity types render unchanged. This leaves room for TestRun/Session bulk actions later without rewiring the underlying selection state.Related Issue
N/A — internal backlog item (Brad's own pain point, surfaced 2026-06-04).
Type of Change
Testing
components/UnifiedSearch.test.tsxcovering:BulkEditModalmounted with the correct(selectedCaseIds, projectId)shapenext-intlmock now substitutes thecountvalue so plural-key assertions work, and the i18n-aware~/lib/navigationwrapper is mocked.pnpm type-checkclean.pnpm precommit(lint + format:check) clean.i18n
repository.cases.bulkEdit,repository.cases.createTestRun,common.actions.clear,repository.duplicates.selectRow,repository.duplicates.selected.search.bulk.*for the cross-project guard wording.pnpm crowdin:syncpropagated translations into all 13 non-English locales.Checklist