Skip to content

CoderPush/coderchart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coderchart

Chrome extension that renders Mermaid diagrams inline wherever ChatGPT (or another whitelisted site) shows a Mermaid code fence. Built with Vite, React, and Manifest V3.

Features

  • Auto-detects Mermaid snippets on supported pages and renders them beneath the original code block.
  • Handles live chat updates via a MutationObserver and avoids duplicate work with lightweight bookkeeping.
  • Resilient error messaging when Mermaid parsing fails.
  • Options page to toggle auto-rendering and manage the site whitelist powered by chrome.storage.sync.
  • Download rendered diagrams as SVG or PNG straight from the inline toolbar.

Getting Started

pnpm install
pnpm dev

The dev server pipes hot reloads into the extension. Load the unpacked folder shown in the terminal (usually dist) via Chrome's Extensions page while Developer Mode is enabled.

Testing

Command Description
pnpm test Run the unit and component suite with Vitest.
pnpm test:watch Start Vitest in watch mode with the interactive UI.
pnpm test:coverage Generate coverage reports with V8 (HTML + LCOV in coverage/).
pnpm test:e2e Execute the Playwright end-to-end flow against a mocked ChatGPT page.

The Vitest environment uses happy-dom alongside Testing Library helpers and a mocked chrome namespace so background, content script, and UI logic can share fixtures. End-to-end tests require Chromium with extension support; Playwright automatically builds and packages the extension via pnpm zip before launching the browser.

Options & Settings

  • Open options.html during development (served at http://localhost:5173/options.html) to manage the whitelist or disable auto rendering.
  • Saved settings sync across Chrome instances via chrome.storage.sync.

Building

pnpm run build

The production bundle lands in build/. Package it manually or use pnpm run zip for a distributable archive located in package/.

Releases

Release Please manages versioning and release notes. Check the autogenerated root CHANGELOG.md or the GitHub Releases tab for the latest history.

Releases

Release Please manages versioning and release notes. Check the autogenerated root CHANGELOG.md or the GitHub Releases tab for the latest history.


Bootstrapped with create-chrome-ext

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages