Skip to content

fix(core): reset _isRenderPending on dirty-check early return#1631

Merged
Karanjot786 merged 1 commit into
Karanjot786:mainfrom
ionfwsrijan:fix/1626-is-render-pending
Jun 21, 2026
Merged

fix(core): reset _isRenderPending on dirty-check early return#1631
Karanjot786 merged 1 commit into
Karanjot786:mainfrom
ionfwsrijan:fix/1626-is-render-pending

Conversation

@ionfwsrijan

@ionfwsrijan ionfwsrijan commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

In requestRender(), the deferred callback early-returns when the widget tree and layers are both clean (line 368-369) but bypasses the finally block that resets _isRenderPending to false. Once hit, _isRenderPending stays true forever, causing every subsequent requestRender() to bail out at the guard — the UI freezes permanently.

Fix

Added this._isRenderPending = false; before the early return on the clean-tree path, ensuring the guard flag is always released.

Test

Added requestRender schedules new callback after clean-tree early return — verifies that after a clean-tree render pass, a subsequent requestRender() with dirty widgets still triggers rendering.

Closes #1626

Summary by CodeRabbit

  • Bug Fixes

    • Fixed an issue where rendering updates could be permanently skipped in certain application states.
  • Tests

    • Added integration test verifying correct render request handling when the widget tree is in a clean state.

@ionfwsrijan ionfwsrijan requested a review from Karanjot786 as a code owner June 19, 2026 06:17
@github-actions github-actions Bot added type:bug +10 pts. Bug fix. area:core @termuijs/core type:testing +10 pts. Tests. and removed type:bug +10 pts. Bug fix. labels Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 349aedf2-b720-4282-aaae-f9b2f6470782

📥 Commits

Reviewing files that changed from the base of the PR and between 4b874c0 and 6d7e56e.

📒 Files selected for processing (2)
  • packages/core/src/app/App.test.ts
  • packages/core/src/app/App.ts
 __________________________________________________________________________
< Your code is like a magic trick: now you see it... now it's `undefined`. >
 --------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the type:bug +10 pts. Bug fix. label Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@ionfwsrijan

Copy link
Copy Markdown
Contributor Author

@Karanjot786 Please review this

@Karanjot786 Karanjot786 merged commit 3432c0c into Karanjot786:main Jun 21, 2026
9 checks passed
@Karanjot786 Karanjot786 added gssoc:approved Approved PR. Earns +50 base points. level:beginner +20 pts. Entry-level task. quality:clean x 1.2 multiplier. Clean implementation. labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core @termuijs/core gssoc:approved Approved PR. Earns +50 base points. level:beginner +20 pts. Entry-level task. quality:clean x 1.2 multiplier. Clean implementation. type:bug +10 pts. Bug fix. type:testing +10 pts. Tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] _isRenderPending never reset on dirty-check early return causes permanent UI freeze

2 participants