Skip to content

Commit 2cb04b7

Browse files
authored
Merge pull request #8 from wavezync/feat/dashboard-v2-default
feat(dashboard): make v2 the default + add setup/assets mix aliases
2 parents d3b47ba + b0c8aa9 commit 2cb04b7

113 files changed

Lines changed: 1020 additions & 14681 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Crash dumps
55
erl_crash.dump
66

7+
# Test scratch space
8+
/tmp/
9+
710
# Workspace-level generated docs (per-project ignores live in each subdir)
811
/doc/
912
/_build/

durable/README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,36 @@ mix durable.cleanup --older-than 7d --status completed # only completed, older
525525
mix durable.cleanup --older-than 24h --dry-run # preview what would be deleted
526526
```
527527

528+
## Dashboard
529+
530+
`durable_dashboard` is a LiveView-first console for monitoring and managing
531+
running workflows. Mount it into your Phoenix router with one line:
532+
533+
```elixir
534+
defmodule MyAppWeb.Router do
535+
use MyAppWeb, :router
536+
537+
# ...your existing pipelines and scopes...
538+
539+
use DurableDashboard.Router, mount: "/dashboard", durable: MyApp.Durable
540+
end
541+
```
542+
543+
The macro adds the dashboard's pipelines, asset routes, and live routes
544+
in-place — no `forward`, no extra endpoint. You get:
545+
546+
- Overview with live status counts and recent executions
547+
- Workflow list with filters, search, and pagination
548+
- Workflow detail with summary, ReactFlow graph, topology, logs, I/O,
549+
and child execution history
550+
- Pending inputs queue
551+
- Schedules list with toggle / trigger actions
552+
- Settings view
553+
- ⌘K command palette
554+
555+
See [`durable_dashboard/README.md`](durable_dashboard/) for the full
556+
option list and design notes.
557+
528558
## Guides
529559

530560
- [Branching](guides/branching.md) - Conditional flow control
@@ -533,10 +563,6 @@ mix durable.cleanup --older-than 24h --dry-run # preview what would be
533563
- [Waiting](guides/waiting.md) - Sleep, events, human input
534564
- [Orchestration](guides/orchestration.md) - Parent/child workflow composition
535565

536-
## Coming Soon
537-
538-
- Phoenix LiveView dashboard
539-
540566
## License
541567

542568
MIT

durable_dashboard/DESIGN.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -498,23 +498,7 @@ The step→child mapping is sourced from the parent's context:
498498

499499
---
500500

501-
## 12. Dead code
502-
503-
The following exist in the tree but are not reachable from any live route:
504-
505-
- `assets/src/{main.tsx, App.tsx, views/, hooks/, components/{shared,ui,workflow}/}`
506-
— pre-LiveView React SPA. Only `assets/src/v2/main.ts` (+ what it
507-
imports from `lib/` and `v2/react/`) is loaded by `Layouts.root_v2/1`.
508-
- `lib/durable_dashboard/live/dashboard_live.ex` — earlier monolithic
509-
`DashboardLive`; the router mounts the per-page LVs
510-
(`OverviewLive`, `WorkflowsLive`, `WorkflowLive`, `InputsLive`,
511-
`SchedulesLive`, `SettingsLive`) instead.
512-
- `Layouts.root/1` — paired with the v1 SPA above; only `root_v2/1` is
513-
wired.
514-
515-
Audits should skip these files. Removing them cleanly is its own PR.
516-
517-
## 13. Updating this doc
501+
## 12. Updating this doc
518502

519503
When you ship a UI change that establishes new precedent (a new
520504
component, a new color use, a new animation), update this doc in the same

durable_dashboard/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# DurableDashboard
2+
3+
LiveView-first web console for the [Durable](https://hex.pm/packages/durable)
4+
workflow engine.
5+
6+
The dashboard renders server-side via Phoenix LiveView, with a single
7+
ReactFlow island for the workflow-graph view. No SPA, no separate API —
8+
just one router macro.
9+
10+
## Features
11+
12+
- **Overview** — live status counts and recent executions
13+
- **Workflows** — searchable, filterable list with pagination
14+
- **Workflow detail** — summary, flow graph, topology, logs, I/O, and
15+
child-execution history
16+
- **Pending inputs** — surface and resolve human-in-the-loop steps
17+
- **Schedules** — toggle, trigger, and inspect cron-driven workflows
18+
- **Settings** — inspect Durable's runtime configuration
19+
- **⌘K command palette** — keyboard-driven navigation
20+
21+
## Installation
22+
23+
Add `durable_dashboard` alongside `durable`:
24+
25+
```elixir
26+
def deps do
27+
[
28+
{:durable, "~> 0.0.0-alpha"},
29+
{:durable_dashboard, "~> 0.0.0-alpha"}
30+
]
31+
end
32+
```
33+
34+
## Usage
35+
36+
Mount the dashboard at any path in your host router:
37+
38+
```elixir
39+
defmodule MyAppWeb.Router do
40+
use MyAppWeb, :router
41+
42+
# ...your existing pipelines and scopes...
43+
44+
use DurableDashboard.Router, mount: "/dashboard", durable: MyApp.Durable
45+
end
46+
```
47+
48+
The macro emits the dashboard's pipelines, asset routes, and live routes
49+
inline in your router. It must live at the **top level** — not inside a
50+
`scope` or `pipe_through` block, since it defines its own pipelines.
51+
52+
### Options
53+
54+
- `:mount` — URL prefix the dashboard mounts at (required)
55+
- `:durable` — Durable instance name (default: `Durable`)
56+
- `:live_socket_path` — path your endpoint uses for `Phoenix.LiveView.Socket`
57+
(default: `"/live"`)
58+
- `:on_mount` — list of `on_mount` hooks the host wants to inject for
59+
auth or other concerns (default: `[]`)
60+
61+
### URL surface
62+
63+
The macro emits these routes under your `:mount` prefix:
64+
65+
- `GET /` — Overview
66+
- `GET /workflows` — list
67+
- `GET /workflows/:id[/:tab]` — detail
68+
- `GET /inputs`
69+
- `GET /schedules`
70+
- `GET /settings`
71+
- `GET /__assets__/*` — CSS/JS/font assets
72+
73+
## Authentication
74+
75+
Inject your host app's auth via `:on_mount` hooks — the dashboard does
76+
not ship its own auth layer:
77+
78+
```elixir
79+
use DurableDashboard.Router,
80+
mount: "/dashboard",
81+
durable: MyApp.Durable,
82+
on_mount: [{MyAppWeb.UserAuth, :ensure_authenticated}]
83+
```
84+
85+
## Design
86+
87+
`DESIGN.md` codifies the design language: tokens, typography, spacing,
88+
motion, status semantics, component primitives, and composition
89+
patterns. New visual decisions are made there first, then applied in
90+
code.
91+
92+
## License
93+
94+
MIT

durable_dashboard/assets/components.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

durable_dashboard/assets/package.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,13 @@
1212
},
1313
"dependencies": {
1414
"@dagrejs/dagre": "^1.1.4",
15-
"@fontsource-variable/geist": "^5.2.8",
16-
"@fontsource-variable/jetbrains-mono": "^5.2.8",
1715
"@xyflow/react": "^12.8.2",
18-
"class-variance-authority": "^0.7.1",
19-
"clsx": "^2.1.1",
20-
"cmdk": "^1.1.1",
2116
"lucide-react": "^0.577.0",
2217
"phoenix": "file:../deps/phoenix",
2318
"phoenix_html": "file:../deps/phoenix_html",
2419
"phoenix_live_view": "file:../deps/phoenix_live_view",
25-
"radix-ui": "^1.4.3",
2620
"react": "^19.1.0",
27-
"react-dom": "^19.1.0",
28-
"recharts": "3.8.0",
29-
"shadcn": "^4.0.5",
30-
"sonner": "^2.0.7",
31-
"tailwind-merge": "^3.5.0",
32-
"tw-animate-css": "^1.4.0"
21+
"react-dom": "^19.1.0"
3322
},
3423
"devDependencies": {
3524
"@biomejs/biome": "^2.0.6",

0 commit comments

Comments
 (0)