Skip to content

Conversation

@TaylorWatson
Copy link
Member

Summary

  • upgrade the component and test projects to target .NET 9 with modern dependencies
  • harden the chart component initialization so it can defer JavaScript setup until interactivity is available in Blazor auto render mode

Testing

  • dotnet test (fails: dotnet is not installed in the execution environment)

https://chatgpt.com/codex/tasks/task_e_68e704c7ee9083328c45b92f2201192e

Copy link

@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

Comment on lines +114 to +118
await InvokeAsync(() =>
{
_renderQueued = false;
StateHasChanged();
});

Choose a reason for hiding this comment

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

P1 Badge Stop re-render loop when JS interop unavailable

When JsRuntime.SetupChart throws during prerendering or a disconnected circuit, TryInitializeChartAsync enqueues another render via QueueRenderAsync. The lambda clears _renderQueued before calling StateHasChanged, so every failed attempt immediately schedules the next render with no delay, and OnAfterRenderAsync hits the same failure again. In Blazor auto render this results in an unbounded render loop while JavaScript interop is unavailable, keeping the prerendered request alive and consuming CPU until the page becomes interactive (or indefinitely if it never does). The component should avoid calling StateHasChanged in this situation or throttle retries, because the framework will automatically re-render once interactivity is ready.

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