Conversation
There was a problem hiding this comment.
💡 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
| const raw = React.Children.toArray(codeChild.props.children) | ||
| .map((child) => (typeof child === 'string' ? child : '')) | ||
| .join(''); | ||
| return <PlantUMLDiagram code={raw} />; | ||
| return <PlantUMLDiagram code={raw} mode={settings.plantumlRendererMode} />; |
There was a problem hiding this comment.
PlantUML preview ignores renderer-mode changes
The Markdown renderer memoizes its components with dependencies [highlighter, viewTheme], but the pre handler inside that memo closes over settings.plantumlRendererMode to decide between remote and offline rendering. Because settings is not in the dependency array, switching the PlantUML mode in settings does not recreate the memoized components and existing previews continue using the previous renderer until the app is reloaded or the theme changes. Include settings.plantumlRendererMode in the dependencies so the preview updates immediately after toggling the option.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e1281abd98833290caa38a6570ca64