refactor: replace SVG org chart with Mermaid diagram in exports

- Org chart now uses a Mermaid flowchart (graph TD) instead of a
  standalone SVG file — GitHub and the preview both render it natively
- Removed SVG generation code, layout algorithm, and image resolution
- Removed images/org-chart.svg from export output
- Simplified ExportPreviewPane (no more SVG/data-URI handling)
- Both server and client README generators produce Mermaid diagrams

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Dotta 2026-03-17 09:09:37 -05:00
parent 228277d361
commit 517e90c13a
3 changed files with 71 additions and 222 deletions

View file

@ -35,7 +35,7 @@ import {
import { notFound, unprocessable } from "../errors.js";
import { accessService } from "./access.js";
import { agentService } from "./agents.js";
import { generateOrgChartSvg, generateReadme } from "./company-export-readme.js";
import { generateReadme } from "./company-export-readme.js";
import { companySkillService } from "./company-skills.js";
import { companyService } from "./companies.js";
import { issueService } from "./issues.js";
@ -1939,15 +1939,10 @@ export function companyPortabilityService(db: Db) {
resolved.manifest.envInputs = dedupeEnvInputs(envInputs);
resolved.warnings.unshift(...warnings);
// Generate org chart SVG and README.md
const orgChartSvg = generateOrgChartSvg(resolved.manifest);
if (orgChartSvg) {
files["images/org-chart.svg"] = orgChartSvg;
}
// Generate README.md with Mermaid org chart
files["README.md"] = generateReadme(resolved.manifest, {
companyName: company.name,
companyDescription: company.description ?? null,
hasOrgChart: orgChartSvg !== null,
});
return {