---
title: "v0.4.0"
slug: releases/0.4.0
---

import Metro from "@components/Metro.astro";

_2026-02-19_ · [GitHub release](https://github.com/pinin4fjords/nf-metro/releases/tag/0.4.0) · [Diff](https://github.com/pinin4fjords/nf-metro/compare/0.3.0...0.4.0)

## Nextflow DAG import

nf-metro can now import Mermaid files produced by Nextflow's `--with-dag` flag directly, without manual editing. The importer detects unsupported DAG constructs and reports them clearly.

```bash frame="terminal"
nextflow run mypipeline.nf --with-dag dag.mmd
nf-metro render dag.mmd -o pipeline.svg
```

Nextflow DAG files use a flat graph (no subgraphs), so the auto-layout engine places sections automatically.

<Metro
  src="tests/fixtures/nextflow/variant_calling.mmd"
  fromNextflow
  mmd={false}
/>

<Metro
  src="tests/fixtures/nextflow/with_subworkflows.mmd"
  fromNextflow
  mmd={false}
/>

## Bypass routing below intervening sections

Lines that skip over one or more sections now route _below_ those sections rather than diagonally through them, keeping bypasses visually separate from the section content they skip.

<Metro src="examples/topologies/around_section_below.mmd" mmd={false} />

## Span-based line ordering

`%%metro line_order: span` sorts lines in the legend by their total span across the graph.

## Hidden station prefix

Stations prefixed with `_` are hidden during rendering but still participate in layout. Useful for routing control points that shouldn't appear as stations on the final map.

## Other improvements

- Minimum inter-section gap enforced for smooth bypass corners
- Separate bypass routes sharing the same inter-column gap
- Uniform corner radius for bypass U-shape routes
- Bypass gap1 vertical shifted toward source for section clearance
- Terminus stations nudged away from passing lines
- Vertical centering of section content
- Empty subgraphs (containing only edges) handled correctly
- A `fix-issue` Claude Code skill added for maintainer workflow
