# A document’s journey

*Sequence diagrams · From an edit to the screen*

A good reader gives each stage a clear job. The source changes, the parser produces a model, and the native view receives prepared content.

```mermaid
sequenceDiagram
    participant W as Writer
    participant P as Parser
    participant L as Layout
    participant V as View
    W->>P: Append Markdown
    P->>L: Prepare changed blocks
    L->>V: Present content
    W->>L: Resize window
    L->>V: Reuse prepared content
```

## Different questions, different diagrams

A sequence shows **when** messages pass between participants. A flowchart shows **which path** a decision takes.

```mermaid
flowchart LR
    A[New content] --> B{Prepared?}
    B -->|Yes| C[Reuse]
    B -->|No| D[Prepare]
    C --> E[Layout]
    D --> E
    E --> F[Native view]
```

Both diagrams come from ordinary Mermaid fences. Their labels and connections remain in the document’s source.
