Skip to content

Add offline PlantUML renderer option#59

Merged
beNative merged 3 commits intomainfrom
codex/add-plantuml-rendering-configuration-option
Oct 4, 2025
Merged

Add offline PlantUML renderer option#59
beNative merged 3 commits intomainfrom
codex/add-plantuml-rendering-configuration-option

Conversation

@beNative
Copy link
Copy Markdown
Owner

@beNative beNative commented Oct 4, 2025

Summary

  • add a settings toggle for choosing remote vs offline PlantUML rendering and propagate the choice through the preview pipeline
  • integrate the node-plantuml renderer in the Electron main process with graceful error handling for local SVG generation
  • document the new PlantUML dependency and offline requirements in the manuals

Testing

  • npm run build

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

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

Comment on lines 200 to +356
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} />;
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 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 👍 / 👎.

@beNative beNative merged commit 2f1b5a3 into main Oct 4, 2025
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