Skip to content

Make visuals init safe without data#130

Merged
LennartvdM merged 1 commit into
mainfrom
codex/make-visuals-init-safe-and-non-blocking
Nov 13, 2025
Merged

Make visuals init safe without data#130
LennartvdM merged 1 commit into
mainfrom
codex/make-visuals-init-safe-and-non-blocking

Conversation

@LennartvdM
Copy link
Copy Markdown
Owner

Summary

  • guard the RadialUrchin visual against missing or invalid event data and return early when no payload is available
  • defer visual creation until valid data exists while ensuring DOM hydration happens after the rest of the UI initializes
  • wrap panel hydration in idempotent helpers so visuals failures do not block tabs or config setup

Testing

  • No tests were run (not requested).

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 13, 2025

Deploy Preview for wyrrdmaek ready!

Name Link
🔨 Latest commit 03033c7
🔍 Latest deploy log https://app.netlify.com/projects/wyrrdmaek/deploys/6916061c1d9f1a00083d4710
😎 Deploy Preview https://deploy-preview-130--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 17886ae into main Nov 13, 2025
4 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 thread web/app.js
Comment on lines +187 to +191
function maybeCreateUrchinInstance(payload) {
if (visualsState.useLegacy || visualsState.urchin || !visualsState.mount || !hasVisualEvents(payload)) {
return;
}
const instance = createRadialUrchin(visualsState.mount, {
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 Allow RadialUrchin to initialize for empty schedules

The new guard in maybeCreateUrchinInstance (and the identical check inside createRadialUrchin) now refuses to construct the visual unless the payload contains at least one event. However, web_v1_calendar payloads are valid even when events is an empty array (e.g., freshly generated schedules or weeks that only carry metadata), and the RadialUrchin.update() implementation already handles that case by clearing its layout and rendering the "No activities available" legend. Because of this guard the component never hydrates for empty schedules, so the visuals panel stays blank forever and the user cannot interact with the controls or flip back from the legacy preview even though data was loaded. Please instantiate the urchin whenever a payload object exists and let RadialUrchin deal with empty event lists so that the empty‑state UI can render.

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