[release-4.22] OCPBUGS-100317: Fix pod terminal not rendering until resize - #16892
Conversation
The terminal container starts with 0x0 dimensions and uses setTimeout(0) to call fitAddon.fit() after setting new dimensions via React state. This races with React 18's batched state updates — fit() can fire before the DOM has the correct dimensions, leaving xterm unable to render content until a manual resize event. Replace setTimeout(0) with a ResizeObserver (via PatternFly's getResizeObserver) that fires precisely when the container's actual DOM dimensions change, guaranteeing fit() always sees the correct size. Backport of openshift#16498 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@Leo6Leo: This pull request references Jira Issue OCPBUGS-100317, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@Leo6Leo: This pull request references Jira Issue OCPBUGS-100317, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Leo6Leo, logonoff The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label backport-risk-assessed Pls self verify |
|
/verified by @Leo6Leo |
|
@Leo6Leo: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@Leo6Leo: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
3890974
into
openshift:release-4.22
|
@Leo6Leo: Jira Issue Verification Checks: Jira Issue OCPBUGS-100317 Jira Issue OCPBUGS-100317 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/cherry-pick release-4.21 |
|
@Leo6Leo: new pull request created: #16893 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Leo6Leo: new pull request created: #16894 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Fix included in release 4.22.0-0.nightly-2026-07-31-081336 |
Summary
Backport of #16498 to release-4.22.
setTimeout(0)+fitAddon.fit()with aResizeObserver(via PatternFly'sgetResizeObserver) to fix the race condition between xterm fitting and React 18's batched state updates0x0dimensions;fit()was firing before the DOM had correct dimensions, leaving xterm unable to render until a manual window resizeTest plan
🤖 Generated with Claude Code