Skip to content

[FEATURE] Export dashboard graph as PNG #4

@RGJorge

Description

@RGJorge

Problem you're trying to solve

The interactive graph showing containers + connections is a useful artifact for documentation, incident post-mortems, and architecture reviews. Right now there's no way to export it — users would have to take screenshots and crop/clean manually.

Proposed solution

Add an "Export as PNG" action that captures the current state of the canvas:

  • Button in the header (or in a "..." menu) → triggers download
  • Output: PNG with the full graph (not just visible viewport)
  • Filename suggestion: containerflow-<hostname>-<timestamp>.png
  • Resolution: 2x for retina-quality

Open questions

  • Viewport vs full graph: full graph is more useful for documentation. Viewport-only could be a secondary option later.
  • Include background dots / colors: keep current dark theme by default. Optional light variant later if requested.
  • Include UI overlays (filter sidebar, header bar): no — only the canvas itself.

Why existing features don't cover this

Screenshots include browser chrome, scrollbars, and the surrounding UI. Manual cropping is error-prone. A native export gives a clean, repeatable artifact.

Implementation notes (technical)

React Flow has the helpers needed: getNodesBounds + getViewportForBounds. Combine with html-to-image (toPng):

import { getNodesBounds, getViewportForBounds } from "@xyflow/react";
import { toPng } from "html-to-image";

const bounds = getNodesBounds(nodes);
const transform = getViewportForBounds(bounds, width, height, 0.5, 2);
// Apply transform to a hidden ReactFlow viewport, then toPng on the wrapper.

Should be ~30-50 lines in App.tsx and a new button in HeaderBar.tsx. Adds html-to-image as a dependency (~20 KB, OSS).

Alternatives considered

  • SVG export: more flexible for editing but loses the visual styling fidelity. Could be a v2 of this feature.
  • Copy to clipboard instead of download: nice for sharing in chat, but download is more reliable across browsers.
  • Print-friendly mode (CSS @media print): separate concern, not a substitute.

Priority / urgency for you

  • Critical — blocking my workflow
  • High — would significantly improve my workflow
  • Medium — nice to have
  • Low — just an idea

Target release: v0.2.0 or v0.3.0 depending on scope.

Are you willing to wait?

  • Yes, I'll wait — I just want to flag this
  • I'd contribute a PR if/when PRs open
  • I need this fast — happy to discuss sponsorship/commercial support

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions