Skip to content

fix: caselist freeze - #874

Open
mbritense wants to merge 2 commits into
next-minorfrom
bugfix/833-caselist-freeze
Open

fix: caselist freeze#874
mbritense wants to merge 2 commits into
next-minorfrom
bugfix/833-caselist-freeze

Conversation

@mbritense

Copy link
Copy Markdown
Contributor

Presumably closes generiekzaakafhandelcomponent/gzac-issues#833

See docu in this pr for more info.

The valtimoCdsModal directive re-applied the min-height style to
.cds--modal-content on every mutation, while its MutationObserver also
observes attribute changes in that same subtree. In recent Chromium
versions (reported on Edge 148, reproducible in current Chrome)
re-setting the style queues a new mutation record, so the observer
callback re-triggered itself in an endless microtask loop that froze
the tab as soon as the page rendered. This froze the case list and the
task list, whose start-case/task modals pass [minContentHeight], even
with the modal closed.

The style is now applied at most once per content element, so the
observer callback no longer generates mutations of its own. Newly
rendered content elements (e.g. re-opened modals) are still styled.
@mbritense
mbritense requested review from a team as code owners July 31, 2026 15:06
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Fixed browser freezes that could occur when viewing case lists and task lists.
    • Improved dialog behavior to prevent repeated styling updates from impacting performance.
  • Documentation

    • Added details about the browser freeze fix to the 13.40.0 release notes.

Walkthrough

The modal directive now tracks content elements that have received the minimum-height style. It skips tracked elements to prevent repeated style mutations from retriggering the observer. The 13.40.0 release notes document the related Chromium browser freeze and the one-time style application fix.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR prevents repeated modal style mutations that caused the Edge freeze and adds the required release note for issue #833.
Out of Scope Changes check ✅ Passed All changes directly support issue #833 by fixing the modal mutation loop and documenting the 13.40.0 bug fix.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/833-caselist-freeze

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.

@sofiaIvarsRitense sofiaIvarsRitense added the test env Create a remote test environment for this PR in the Ritense product development cluster label Jul 31, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
frontend/projects/valtimo/components/src/lib/directives/valtimo-cds-modal/valtimo-cds-modal.directive.ts (1)

179-183: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression tests for the mutation-loop fix.

Test that one content element receives one style write despite later attribute mutations. Also test that a newly rendered .cds--modal-content element receives the style once.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 19ae5876-58d6-49fc-8fb7-13afd88fed42

📥 Commits

Reviewing files that changed from the base of the PR and between f7e21ce and fb84b59.

📒 Files selected for processing (2)
  • documentation/release-notes/13.x.x/13.40.0/README.md
  • frontend/projects/valtimo/components/src/lib/directives/valtimo-cds-modal/valtimo-cds-modal.directive.ts

@valtimo-platform

valtimo-platform Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Will create a test environment. This comment will be updated once it is available. This usually takes a few minutes.
Closing or merging this PR will automatically delete the test environment. Pushing commits to this PR will update the test environment.
Progress:

  • Created test environment
  • Images tagged testEnv.pr874_commit.fb84b59424_contents.99a06f96cc_build.1765 (frontend) / testEnv.pr874_commit.f7e21ce321_contents.b9c4f0f5cf_build.621 (backend) available
  • Started test environment
  • Test environment is running at https://pr874.product-development.test.k8s.ritense.com

Test environment metadata:

  • URL: https://pr874.product-development.test.k8s.ritense.com
  • Commit: f7e21ce
  • Frontend contents: 99a06f96cc
  • Backend contents: b9c4f0f5cf
  • Frontend image: ghcr.io/valtimo-platform/valtimo/gzac-frontend:testEnv.pr874_commit.fb84b59424_contents.99a06f96cc_build.1765
  • Backend image: ghcr.io/valtimo-platform/valtimo/gzac-backend:testEnv.pr874_commit.f7e21ce321_contents.b9c4f0f5cf_build.621

Observability:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test env Create a remote test environment for this PR in the Ritense product development cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend crashed in de Edge die bij gemeente Rotterdam actief is.

2 participants