Skip to content

Add export appearance preference - #25

Merged
FernandoAbishai merged 1 commit into
mainfrom
feature/export-appearance
Oct 12, 2026
Merged

FernandoAbishai merged 1 commit into
mainfrom
feature/export-appearance

Conversation

@FernandoAbishai

Copy link
Copy Markdown
Member

Summary

  • add built-in Export appearance: Match editor / Light / Dark
  • resolve Match editor from the current editor theme, including current macOS/system dark preference at export time
  • reuse the existing createExportHtml theme input for TypeOpen HTML/PDF/PNG/print rendering

Safety boundary

  • renderer preference only; no new IPC, filesystem paths, grants or native host behavior
  • custom editor CSS is not injected into exports
  • no template loading, destination reuse or Pandoc argument changes

Validation

  • focused export preferences + preferences dialog + markdown: 17/17 PASS
  • npm run verify: 28 suites / 136 tests PASS
  • clean-room, Electron syntax, TypeScript, build and native smokes PASS
  • runtime audit unchanged: 0 critical/high/moderate, 3 low

Independent read-only review is running on exact head 13d598d.

Copilot AI balanced review requested due to automatic review settings October 12, 2026 02:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T02:15:41.811665Z 13d598d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@FernandoAbishai
FernandoAbishai merged commit d5fa0e8 into main Oct 12, 2026
2 checks passed
@FernandoAbishai
FernandoAbishai deleted the feature/export-appearance branch October 12, 2026 02:15

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

Copy link
Copy Markdown

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.

Reviewed commit: 13d598d66a

ℹ️ 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 src/App.tsx
title: filePath ? extensionless(filePath) : documentTitle(latest),
includeOutline: false,
theme: preferences.theme === 'dark' ? 'dark' : 'light',
theme: exportTheme,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Isolate the export theme from live Mermaid previews

When the export appearance differs from the editor—for example, Dark export with a Light editor—passing this theme to createExportHtml calls the global mermaid.initialize(...) even if the document contains no diagram. DiagramCodeBlockEditor.tsx uses that same Mermaid singleton for subsequent preview renders without reinitializing it, so editing or adding a diagram after exporting renders it with the export palette rather than the editor palette. Render exports without mutating the shared configuration, or restore/reapply the editor configuration afterward.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants