Skip to content

fix(viewer): prevent ResizeObserver feedback loop - #56

Merged
richardsolomou merged 1 commit into
mainfrom
posthog/fix-viewer-resize-observer-loop
Aug 27, 2026
Merged

fix(viewer): prevent ResizeObserver feedback loop#56
richardsolomou merged 1 commit into
mainfrom
posthog/fix-viewer-resize-observer-loop

Conversation

@posthog

@posthog posthog Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Why

A benign browser warning was being reported as a fresh error issue after viewer deployments, creating recurring triage noise.

Problem

The 3D viewer observed its container and resized an in-flow canvas from inside the observer callback. Updating that canvas could change the observed layout and make the browser terminate the resize cycle with an undelivered-notifications warning.

Context: PostHog Inbox report

Changes

  • Remove the Three.js canvas from the observed container layout.
  • Skip renderer and camera updates when the measured dimensions have not changed.
  • Cover desktop-to-phone resizing and the warning with a browser regression test.
  • Add a patch changeset.

Risk

Low. The renderer still uses the measured container dimensions; rollback is the single viewer commit.

Verification

  • pnpm check
  • pnpm test:e2e (44 passed)

Checklist

  • Tests cover new or changed behavior where practical.
  • Geometry changes are checked against a real export, not just the preview. (Not applicable; geometry is unchanged.)
  • User-facing behavior is documented in the README. (Not applicable; this removes internal browser error noise.)

Created with PostHog Desktop from an inbox report

Generated-By: PostHog Desktop
Task-Id: b9264aea-99c2-4268-882d-f261b39fd5c9
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
basekit 8227229 Commit Preview URL

Branch Preview URL
Aug 27 2026, 09:33 AM

@richardsolomou
richardsolomou marked this pull request as ready for review August 27, 2026 21:28
@richardsolomou
richardsolomou merged commit 2906bf9 into main Aug 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant