# joeyjeong07/zellaude architecture

> Architecture diagram of the GitHub repository joeyjeong07/zellaude, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joeyjeong07/zellaude
- Repository: https://github.com/joeyjeong07/zellaude

## Overview

Zellaude is a Zellij status-bar plugin that combines agent-session activity with tab, session, and mode information, then renders a clickable, theme-aware bar. Its main workflow is agent hooks and Zellij state feeding the plugin, which reconciles session activity and displays it; users can click tabs or invoke layout and pane actions. The README also documents custom states, generator-driven layouts, session templates, Split Three, notifications, and attach-time recovery. Relationships for several unsampled features are based on README statements and the SOURCE INDEX; their internal wiring is not fully visible in the excerpts.

Main entry points: [`src/main.rs`](https://github.com/joeyjeong07/zellaude/blob/main/src/main.rs) (Plugin coordinator), [`src/render.rs`](https://github.com/joeyjeong07/zellaude/blob/main/src/render.rs) (Status bar renderer), [`src/installer.rs`](https://github.com/joeyjeong07/zellaude/blob/main/src/installer.rs) (Hook installer), [`src/manifest.rs`](https://github.com/joeyjeong07/zellaude/blob/main/src/manifest.rs) (Session manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Plugin runtime"]
  node_main["Plugin coordinator<br/>[main.rs]"]
  node_state["Shared plugin state<br/>[state.rs]"]
  node_render["Status bar renderer<br/>[render.rs]"]
  node_theme["Theme palette<br/>[theme.rs]"]
  node_symbols["Activity symbols<br/>[tool_symbol.rs]"]
end

subgraph group_activity["Agent activity"]
  node_selection["Session selection"]
  node_events["Hook event handling<br/>[event_handler.rs]"]
  node_attach["Attach recovery<br/>[attach.rs]"]
  node_rainbow["Rainbow animation<br/>[rainbow.rs]"]
end

subgraph group_layouts["Layout workflows"]
  node_custom_states["Custom states<br/>[custom_layouts.rs]"]
  node_generators["Layout generators"]
  node_templates["Session templates"]
  node_split_three["Split Three<br/>[split_three.rs]"]
end

subgraph group_integration["Setup and sync"]
  node_installer["Hook installer<br/>[installer.rs]"]
  node_hook_script["Hook script<br/>[zellaude-hook.sh]"]
  node_manifest["Session manifest<br/>[manifest.rs]"]
end

node_zellij(("Zellij host"))
node_agent_hooks(("Agent hooks"))

node_zellij -->|"hosts plugin"| node_main
node_agent_hooks -->|"send activity"| node_events
node_main -->|"updates"| node_state
node_main -->|"handles events"| node_events
node_main -->|"recovers sessions"| node_attach
node_main -->|"renders bar"| node_render
node_render -->|"selects sessions"| node_selection
node_render -->|"uses palette"| node_theme
node_render -->|"formats activity"| node_symbols
node_render -->|"animates names"| node_rainbow
node_main -->|"installs hooks"| node_installer
node_installer -->|"embeds script"| node_hook_script
node_main -->|"writes manifest"| node_manifest
node_manifest -->|"reuses hook key"| node_installer
node_main -->|"resolves layouts"| node_custom_states
node_main -->|"expands prompts"| node_generators
node_generators -.->|"uses layouts"| node_custom_states
node_main -->|"handles templates"| node_templates
node_main -->|"dispatches splits"| node_split_three
node_zellij -.->|"provides pane state"| node_manifest

click node_main "https://github.com/joeyjeong07/zellaude/blob/main/src/main.rs"
click node_state "https://github.com/joeyjeong07/zellaude/blob/main/src/state.rs"
click node_render "https://github.com/joeyjeong07/zellaude/blob/main/src/render.rs"
click node_theme "https://github.com/joeyjeong07/zellaude/blob/main/src/theme.rs"
click node_symbols "https://github.com/joeyjeong07/zellaude/blob/main/src/tool_symbol.rs"
click node_selection "https://github.com/joeyjeong07/zellaude/blob/main/src/session_selection.rs"
click node_events "https://github.com/joeyjeong07/zellaude/blob/main/src/event_handler.rs"
click node_attach "https://github.com/joeyjeong07/zellaude/blob/main/src/attach.rs"
click node_rainbow "https://github.com/joeyjeong07/zellaude/blob/main/src/rainbow.rs"
click node_installer "https://github.com/joeyjeong07/zellaude/blob/main/src/installer.rs"
click node_hook_script "https://github.com/joeyjeong07/zellaude/blob/main/scripts/zellaude-hook.sh"
click node_manifest "https://github.com/joeyjeong07/zellaude/blob/main/src/manifest.rs"
click node_custom_states "https://github.com/joeyjeong07/zellaude/blob/main/src/custom_layouts.rs"
click node_generators "https://github.com/joeyjeong07/zellaude/blob/main/src/layout_generators.rs"
click node_templates "https://github.com/joeyjeong07/zellaude/blob/main/src/session_templates.rs"
click node_split_three "https://github.com/joeyjeong07/zellaude/blob/main/src/split_three.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_state,node_render,node_theme,node_symbols toneBlue
class node_selection,node_events,node_attach,node_rainbow toneAmber
class node_custom_states,node_generators,node_templates,node_split_three toneMint
class node_installer,node_hook_script,node_manifest toneRose
class node_zellij,node_agent_hooks toneIndigo
```

## Components

### Plugin runtime

- [Plugin coordinator](https://github.com/joeyjeong07/zellaude/blob/main/src/main.rs): `src/main.rs`
- [Shared plugin state](https://github.com/joeyjeong07/zellaude/blob/main/src/state.rs): `src/state.rs`
- [Status bar renderer](https://github.com/joeyjeong07/zellaude/blob/main/src/render.rs): `src/render.rs`
- [Theme palette](https://github.com/joeyjeong07/zellaude/blob/main/src/theme.rs): `src/theme.rs`
- [Activity symbols](https://github.com/joeyjeong07/zellaude/blob/main/src/tool_symbol.rs): `src/tool_symbol.rs`

### Agent activity

- [Session selection](https://github.com/joeyjeong07/zellaude/blob/main/src/session_selection.rs): `src/session_selection.rs`
- [Hook event handling](https://github.com/joeyjeong07/zellaude/blob/main/src/event_handler.rs): `src/event_handler.rs`
- [Attach recovery](https://github.com/joeyjeong07/zellaude/blob/main/src/attach.rs): `src/attach.rs`
- [Rainbow animation](https://github.com/joeyjeong07/zellaude/blob/main/src/rainbow.rs): `src/rainbow.rs`

### Layout workflows

- [Custom states](https://github.com/joeyjeong07/zellaude/blob/main/src/custom_layouts.rs): `src/custom_layouts.rs`
- [Layout generators](https://github.com/joeyjeong07/zellaude/blob/main/src/layout_generators.rs): `src/layout_generators.rs`
- [Session templates](https://github.com/joeyjeong07/zellaude/blob/main/src/session_templates.rs): `src/session_templates.rs`
- [Split Three](https://github.com/joeyjeong07/zellaude/blob/main/src/split_three.rs): `src/split_three.rs`

### Setup and sync

- [Hook installer](https://github.com/joeyjeong07/zellaude/blob/main/src/installer.rs): `src/installer.rs`
- [Hook script](https://github.com/joeyjeong07/zellaude/blob/main/scripts/zellaude-hook.sh): `scripts/zellaude-hook.sh`
- [Session manifest](https://github.com/joeyjeong07/zellaude/blob/main/src/manifest.rs): `src/manifest.rs`

### Other components

- **Zellij host**
- **Agent hooks**

## Connections

- Zellij host → Plugin coordinator: hosts plugin (evidence: `README.md`)
- Agent hooks → Hook event handling: send activity (evidence: `README.md`)
- Plugin coordinator → Shared plugin state: updates (evidence: `src/main.rs`)
- Plugin coordinator → Hook event handling: handles events (evidence: `src/main.rs`)
- Plugin coordinator → Attach recovery: recovers sessions (evidence: `src/main.rs`)
- Plugin coordinator → Status bar renderer: renders bar (evidence: `src/main.rs`)
- Status bar renderer → Session selection: selects sessions (evidence: `src/render.rs`)
- Status bar renderer → Theme palette: uses palette (evidence: `src/render.rs`)
- Status bar renderer → Activity symbols: formats activity (evidence: `src/render.rs`)
- Status bar renderer → Rainbow animation: animates names (evidence: `src/render.rs`)
- Plugin coordinator → Hook installer: installs hooks (evidence: `src/main.rs`)
- Hook installer → Hook script: embeds script (evidence: `src/installer.rs`)
- Plugin coordinator → Session manifest: writes manifest (evidence: `src/main.rs`)
- Session manifest → Hook installer: reuses hook key (evidence: `src/manifest.rs`)
- Plugin coordinator → Custom states: resolves layouts (evidence: `src/main.rs`)
- Plugin coordinator → Layout generators: expands prompts (evidence: `src/main.rs`)
- Layout generators → Custom states: uses layouts (evidence: `src/layout_generators.rs`)
- Plugin coordinator → Session templates: handles templates (evidence: `src/main.rs`)
- Plugin coordinator → Split Three: dispatches splits (evidence: `src/main.rs`)
- Zellij host → Session manifest: provides pane state
