Skip to content

Corpus pages report a ResizeObserver loop error in nightly journeys since #5617 #5708

Closed

Description

@leaf-agent

Corpus pages report window error: ResizeObserver loop completed with undelivered notifications in nightly journeys since #5617 (84d918681, "A chart says the value under the pointer, focus or a held finger"). The errors first appear in scheduled run 42365682113 (391c24622). The previous scheduled run 42205827418 (62cb54fc8) shows none of these.

Onset, run locally with --run-nightly

  • tests/journeys/test_render_gate.py::test_page_fixture_renders[heat-loss] passed twice at ef6c01ed8 (A chart says the value under the pointer, focus or a held finger #5617's parent), failed at 84d918681 (render gate: ResizeObserver loop … (recurred on the confirming render attempt) in both schemes), and fails on main fcad5fa09.
  • tests/journeys/test_site.py::test_every_published_page_stands_as_a_live_page (worktree-diffs) and ::test_what_a_user_leaves_on_one_page_stays_on_it (alert-review) are intermittent from 84d918681 on. Each passed once and failed once there, and each fails on every later commit I ran, through main fcad5fa09. The published-pages case passed at ef6c01ed8. I didn't run the alert-review case at the parent.

#5617 rewrote the shared browser/runtime/preview.js, and changed packages/default/widgets/lf-chart.js and the swap watch's ResizeObserver wrapper in tests/swap_watch.js. heat-loss and alert-review hold charts; worktree-diffs doesn't. So the loop may come from the preview, not only from the chart.

The same error in this run, on main fcad5fa09 where checked

  • Linux: test_render_gate.py::test_page_fixture_opens_without_firefox_console_warnings[heat-loss], test_render_navigation.py::test_presses_and_fills_leave_no_element_naming_stale_keys[heat-loss] and test_site.py::test_a_published_decision_survives_reload (heat-loss). All three also fail locally on main.
  • macOS only: test_render_gate.py::test_page_fixture_renders[live-progress] and [thread-panel-gallery], test_site.py::test_session_activation_reaches_other_tabs (heat-loss), tests/browser/threads/test_layout.py::test_a_zoomed_floating_draft_and_sent_comment_fit_a_narrow_window and tests/browser/widgets/test_charts.py::test_a_reading_stays_while_the_pointer_crosses_onto_it_past_the_chart[tab panel-browser].

macOS-only chart failures from #5617's own tests, in the same run

  • tests/browser/widgets/test_charts.py::test_a_chart_picks_the_point_plot_s_own_pointer_picks[browser]: faceted: [(0.09, 0.71, {'at': [40, 91], 'lines': ['a0']}, None), … plus a teardown unchanged write: transform on g in svg#faceted-alone.plot-d6a7b5.

The push report #3985 carries push-run ResizeObserver errors (test_sample_host_view_changes_leave_its_scroll_and_keyboard_position, and the [combined-selection] wheel-return case #5486 owns). Treat those as related evidence, not as established to share this cause.

A loop error means a ResizeObserver callback changed layout that it or another observer then had to report again in the same frame. Look for a size write in the new preview or chart observers that runs inside a resize delivery.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 8, 2026
  2. leaf-agent commented on Nov 9, 2026

    @leaf-agent
    CollaboratorAuthor

    #5743 fixes the chart-page part of this. Since #5617, a chart with a legend finishes its first drawing inside its legend's ResizeObserver delivery. The pending task it hands the page settles there, so the page's first presentation (body's upgraded, applied and presented stamps, the margin, the details shelf) ran in that delivery's microtask checkpoint and resized boxes shallower than the delivered figure. The legend still refits in that delivery. Only the drawing's settling moves to Leaf's next rendering pass.

    With the change, the four Linux failures named here pass, and each fails on main 2f47830e4. The intermittent alert-review and worktree-diffs site journeys passed once each. Review and CI on #5743 are still pending.

    It leaves this issue open for the rest. thread-panel-gallery and worktree-diffs hold no chart, so their macOS errors may have another cause (#5736 fixes one such path in the floating panel). The faceted pick mismatch in test_a_chart_picks_the_point_plot_s_own_pointer_picks is a different symptom. The next scheduled test-macos run after #5743 lands will show which remain.

  3. leaf-agent commented on Nov 9, 2026

    @leaf-agent
    CollaboratorAuthor

    The fix in #5743 stays in the chart, but the cause is shared by any package widget. startPage in browser/leaf.js resumes after upgradeWidgets, and that resumption lays out the page and stamps it in whatever microtask the last widget's pending-task completes in. A third-party widget that finishes its drawing in a sizeObserver callback, a common pattern, would hit the same loop error, and nothing tells its author to avoid that.

    The natural core fix is one hop in settle (browser/runtime/widget-loader.js) after await presented(), before the caller lays out. With the chart's hop removed, I tried two kinds of hop, and each conflicts with a contract in rendering.js:

    • nextRender: the four tests Settle a chart's drawing outside the ResizeObserver delivery that measured it #5743 lists pass. But the hop waits for an animation frame, and data-lf-presented must not wait on rendering, because a host may load the frame hidden or scrolled away.
    • setTimeout: the same four tests pass. But the readiness reading can't see work held in a timer. test_revision_patches.py::test_a_revision_releases_the_served_markup_it_removes[selection] failed with it and passed without it, one run each.

    A version that holds holdRendering() across a task hop would likely meet both contracts, but it changes how page readiness is counted, which is a design call. The chart-local hop in #5743 can be removed in the same change that adds it.

  4. leaf-agent commented on Nov 16, 2026

    @leaf-agent
    CollaboratorAuthor

    Closing this: none of the failures it names has recurred on either OS since the fixes landed. In every scheduled ci run from Nov 10 through Nov 15 (42802603869 to 43706054091), the heat-loss, alert-review, live-progress and worktree-diffs cases of test_render_gate, test_render_navigation and test_pressed_controls passed on Linux and macOS, along with the four test_site journeys and both chart tests named here. The chart pages were failing every run before #5743, so a week of clean runs settles that part.

    The chartless macOS cases cleared later and come with less evidence. test_a_zoomed_floating_draft_and_sent_comment_fit_a_narrow_window errored on Nov 11, 12 and 14, and test_page_fixture_renders[thread-panel-gallery] on Nov 11 and 12. Both have passed since #5898 (merged Nov 14) stopped the browser tests' own swap watch from raising loop errors. That is one clean macOS run for the zoomed case. If either comes back, the next scheduled run's CI report will bring it back to triage.

    Two things carry on elsewhere:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions