Skip to content

Fix radial visuals payload handling#145

Merged
LennartvdM merged 1 commit into
mainfrom
codex/fix-radialurchin-wiring-and-visuals
Nov 14, 2025
Merged

Fix radial visuals payload handling#145
LennartvdM merged 1 commit into
mainfrom
codex/fix-radialurchin-wiring-and-visuals

Conversation

@LennartvdM
Copy link
Copy Markdown
Owner

Summary

  • normalize calendar payloads before updating the Visuals tab and keep the active schedule separate from history metadata
  • update Visuals wiring to feed only the resolved schedule to RadialUrchin while keeping legacy PNG support intact
  • add a defensive guard in RadialUrchin rendering to skip draws when the canvas center is unavailable

Testing

  • not run (UI-only change)

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 14, 2025

Deploy Preview for wyrrdmaek ready!

Name Link
🔨 Latest commit f7ba32e
🔍 Latest deploy log https://app.netlify.com/projects/wyrrdmaek/deploys/69177e68f11063000851d31e
😎 Deploy Preview https://deploy-preview-145--wyrrdmaek.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@LennartvdM LennartvdM merged commit c186bf4 into main Nov 14, 2025
5 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +666 to +679
if (
!this.center ||
typeof this.center.x !== 'number' ||
Number.isNaN(this.center.x) ||
typeof this.center.y !== 'number' ||
Number.isNaN(this.center.y)
) {
if (!this.didWarnInvalidCenter) {
console.warn('[RadialUrchin] invalid center point, skipping render', this.center);
this.didWarnInvalidCenter = true;
}
this.updateSelectionOverlay();
this.updateScrubOverlay();
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Guard still dereferences missing canvas center

The new guard in render() (lines 666‑679) is supposed to skip drawing when this.center hasn’t been computed yet, but the guard immediately calls updateSelectionOverlay() and updateScrubOverlay() which both assume a valid this.center. updateScrubOverlay() in particular unconditionally accesses this.center.x/y (lines 918‑925), so whenever the guard is hit—e.g., right after constructing RadialUrchin before the first ResizeObserver callback sets this.center in handleResize—it still throws Cannot read properties of undefined. This means the “skip render when center is unavailable” change never actually prevents the crash and the radial visual continues to fail to initialize if the mount hasn’t been measured. The guard needs to bail out without invoking code that uses this.center, or those helpers need their own null checks.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant