Skip to content

fix(DesignerV2): Persist search term in Redux to prevent reset (v5.961)#9204

Merged
rllyy97 merged 2 commits into
hotfix/v5.961from
rileyevans/cherry-pick/9188-to-hotfix-v5.961
May 21, 2026
Merged

fix(DesignerV2): Persist search term in Redux to prevent reset (v5.961)#9204
rllyy97 merged 2 commits into
hotfix/v5.961from
rileyevans/cherry-pick/9188-to-hotfix-v5.961

Conversation

@rllyy97
Copy link
Copy Markdown
Contributor

@rllyy97 rllyy97 commented May 21, 2026

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Fixes #9173 - The search text in the "Add a trigger/action" panel was being cleared whenever the panel was resized (enlarged/collapsed).

Root cause: Two issues combined:

  1. width was included in the commonPanelProps useMemo dependency array, causing child components to re-render on every resize pixel change.
  2. The search term was stored in local useState, which resets when the component re-mounts due to the parent re-render.

Fix: Moved the search term to Redux state so it persists across re-renders, and removed the unused width prop from commonPanelProps (it wasn't part of the CommonPanelProps type interface).

Impact of Change

  • Users: Search text now persists when resizing the discovery panel - no longer need to re-type searches after enlarging
  • Developers: New setDiscoverySearchTerm action and useDiscoveryPanelSearchTerm selector available in the panel state
  • System: Slight reduction in unnecessary re-renders when panel is resized

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: Standalone designer, verified search term persists across panel resize

Added tests in the related files: panelRoot.spec.tsx

Contributors

Screenshots/Videos

@rllyy97 rllyy97 added the risk:low Low risk change with minimal impact label May 21, 2026
@rllyy97 rllyy97 enabled auto-merge (squash) May 21, 2026 16:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: fix(DesignerV2): Persist search term in Redux to prevent reset (v5.961)
  • Issue: None — this is a clear, specific title that describes the change and area impacted.
  • Recommendation: No change needed.

Commit Type

  • Properly selected (fix).
  • Only one commit type is checked, which is correct.

Risk Level

  • The selected risk level (Low) matches the scope of the diff: a localized state-management fix with added unit tests and minimal user/system impact.

What & Why

  • Current: The body clearly explains the bug, root cause, and fix.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • The impact section is sufficiently filled out and accurately reflects users, developers, and system effects.
  • Recommendation:
    • Users: Good as written.
    • Developers: Good as written.
    • System: Good as written.

Test Plan

  • Unit tests were added/updated in the diff (panelRoot.spec.tsx and related recommendation panel test updates), so the test plan passes.
  • Manual testing is also documented, which is a nice extra.

⚠️ Contributors

  • Blank section.
  • Recommendation: If anyone else contributed ideas, reviews, or implementation, please add them here for credit. This is optional, so it does not block approval.

⚠️ Screenshots/Videos

  • Not provided.
  • Recommendation: This PR is primarily behavioral/state-related, so screenshots are not required.

Summary Table

Section Status Recommendation
Title No changes needed
Commit Type No changes needed
Risk Level No changes needed
What & Why No changes needed
Impact of Change No changes needed
Test Plan No changes needed
Contributors ⚠️ Optional: add contributor credits if applicable
Screenshots/Videos ⚠️ Not required for this non-visual change

This PR passes review for title/body compliance. The advised risk level remains low, matching the submitter’s estimate.


Last updated: Thu, 21 May 2026 19:59:04 GMT

@github-actions
Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: fix(DesignerV2): Persist search term in Redux to prevent reset (v5.961)
  • Issue: None — this is clear, specific, and matches the change.
  • Recommendation: No change needed.

Commit Type

  • Properly selected (fix).
  • Only one commit type is selected, which is correct.

Risk Level

  • The selected risk level (Low) matches the scope of the diff: a localized state persistence change plus tests.
  • No mismatch with the risk:low label.

What & Why

  • Current: The section clearly explains the bug, root cause, and fix.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • The impact section is filled out and aligns with the diff.
  • Recommendation:
    • Users: Correct as written.
    • Developers: Correct as written.
    • System: Correct as written.

Test Plan

  • The PR claims unit tests and manual testing, and the diff does include a new unit test file plus an updated spec.
  • Issue: This passes on coverage, but the manual testing entry Tested in: Standalone designer, verified search term persists across panel resize is not represented in a structured way; it is acceptable, but if you want to make it stronger, keep the explicit test context as-is.
  • Recommendation: No required change, but if you want to be extra clear, keep the manual test note close to the checkbox list and mention the resize scenario explicitly.

Contributors

  • Blank.
  • Recommendation: Optional only. Add contributors if PMs/designers/others helped shape the fix.

Screenshots/Videos

  • Blank.
  • Recommendation: Optional here because this is not primarily a visual/UI presentation change, though screenshots are not required.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type No change needed
Risk Level No change needed
What & Why No change needed
Impact of Change No change needed
Test Plan Keep the explicit resize test note
Contributors Optional
Screenshots/Videos Optional

Overall: this PR passes title/body compliance, and the advised risk remains low, matching the submitter's estimate.


Last updated: Thu, 21 May 2026 16:28:04 GMT

@github-actions
Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

⚠️ libs/designer-v2/src/lib/core/state/panel/panelSelectors.ts - 64% covered (needs improvement)
⚠️ libs/designer-v2/src/lib/core/state/panel/panelSlice.ts - 11% covered (needs improvement)

Please add tests for the uncovered files before merging.

@github-actions
Copy link
Copy Markdown
Contributor

❌ PR Validation Error

An error occurred while validating your PR. Please try again later or contact the maintainers.

Error: Unexpected token '`', "```json
{
"... is not valid JSON

@rllyy97 rllyy97 added risk:low Low risk change with minimal impact and removed risk:low Low risk change with minimal impact labels May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

❌ PR Validation Error

An error occurred while validating your PR. Please try again later or contact the maintainers.

Error: Unexpected token '`', "```json
{
"... is not valid JSON

@github-actions
Copy link
Copy Markdown
Contributor

❌ PR Validation Error

An error occurred while validating your PR. Please try again later or contact the maintainers.

Error: API request failed with status 500

@github-actions
Copy link
Copy Markdown
Contributor

❌ PR Validation Error

An error occurred while validating your PR. Please try again later or contact the maintainers.

Error: Unexpected token '}', ..."*\n---",""}" is not valid JSON

@rllyy97 rllyy97 merged commit ebceb6e into hotfix/v5.961 May 21, 2026
13 of 26 checks passed
@rllyy97 rllyy97 deleted the rileyevans/cherry-pick/9188-to-hotfix-v5.961 branch May 21, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants