perf(designer): reduce panel rerenders#9409
Open
ccastrotrejo wants to merge 2 commits into
Open
Conversation
Stabilize panel selector fallbacks and remove per-render selector construction. Fetch independent connection resources concurrently and add regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 78b1618e-11be-48d0-984e-6709297a646e
Undo unrelated localization extraction changes introduced by the commit hook. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 78b1618e-11be-48d0-984e-6709297a646e
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | ✅ | Medium is correct and matches label |
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | No change needed |
| Test Plan | ✅ | Unit tests present |
| Contributors | ✅ | Credited |
| Screenshots/Videos | N/A acceptable — non-visual change |
All required checks pass. This PR is compliant with the team template and cleared to merge.
Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Thu, 16 Jul 2026 18:23:24 GMT
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves performance in the Logic Apps Designer (both designer and designer-v2) by making panel selector hooks return referentially-stable values for optional state and by avoiding sequential (waterfall) network reads during managed-identity connection updates.
Changes:
- Replaced per-render
createSelectorusage in panel selector hooks with direct selectors, eliminating unnecessary selector recreation and avoiding identity churn. - Introduced stable module-level empty fallbacks (
{}/[]) for optional panel selection state to prevent spurious rerenders on unrelated dispatches. - Parallelized independent connector + connection reads via
Promise.allto reduce latency when updating managed-identity connection configuration.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/designer/src/lib/core/state/panel/panelSelectors.ts | Switches panel hooks to direct selectors and adds a stable {} fallback for alternateSelectedNode to prevent unnecessary rerenders. |
| libs/designer/src/lib/core/state/panel/test/panelSelectors.perf.spec.tsx | Adds a regression perf test verifying referential stability for the v1 selector fallback behavior. |
| libs/designer-v2/src/lib/core/state/panel/panelSelectors.ts | Applies the same selector changes for v2, adding stable {} and [] fallbacks used by operation panel selection hooks. |
| libs/designer-v2/src/lib/core/state/test/panelSelectors.perf.spec.tsx | Adds regression perf tests covering both stable [] and {} selector fallback behavior in v2. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/connections.ts | Fetches connector + connection concurrently during identity update to avoid serialized network latency. |
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.
Commit Type
Risk Level
What & Why
Panel selector hooks created memoized selectors during render and returned fresh empty arrays or objects for missing optional state. Unrelated panel actions therefore changed selector result identity and re-rendered consumers. This change uses direct selectors with stable fallbacks in both designer implementations and also overlaps two independent connection service requests instead of awaiting them serially.
Impact of Change
Test Plan
Contributors
@ccastrotrejo_microsoft
Screenshots/Videos
N/A - no visual changes.