Skip to content

feat: Drone pane — Phase 1 node-graph canvas for automated agents#256

Open
Agent1-asaf wants to merge 4 commits intomainfrom
agent1/drone-pane
Open

feat: Drone pane — Phase 1 node-graph canvas for automated agents#256
Agent1-asaf wants to merge 4 commits intomainfrom
agent1/drone-pane

Conversation

@Agent1-asaf
Copy link
Copy Markdown
Contributor

Summary

Adds the Drone pane — a new view type (`drone`) for defining and monitoring automated agents triggered by cron schedules, events, or other drones completing.

Phase 1 is the full frontend scaffold: interactive node-graph canvas with pan/zoom, draggable nodes, an edit panel, and a run log drawer. No backend scheduler yet (Phase 2).

What's included

New files — `frontend/app/view/drone/`

  • `drone-types.ts` — DroneDefinition, DroneRun, DroneTrigger (cron/event/dependency/manual), CanvasTransform
  • `drone-utils.ts` — cron → human-readable preview, status icons/colors, relative time helpers
  • `drone-model.ts` — DroneViewModel with SolidJS signals for drones, run history, canvas transform, edit panel state
  • `drone-node.tsx` — node component: status dot, trigger badges, last run time, expandable details, drag handle
  • `drone-edit-panel.tsx` — right-side drawer for creating/editing drones (name, task, triggers, run policy)
  • `drone-run-log.tsx` — bottom drawer showing run history per selected drone
  • `drone-view.tsx` — canvas with pan/zoom, SVG dependency edges, empty state
  • `drone-view.css` — full styles using existing CSS vars
  • `drone.tsx` — barrel file wiring viewComponent onto model prototype (same pattern as forge/swarm)

Modified files

  • `frontend/app/block/block.tsx` — registers "drone" in BlockRegistry
  • `frontend/app/block/blockutil.tsx` — icon "robot", name "Drone" for fallback header
  • `agentmuxsrv-rs/src/config/widgets.json` — adds defwidget@drone (order 4, visible, cyan #06b6d4)
  • `docs/specs/drone-pane.md` — full spec (triggers, data model, backend architecture, phased plan)
  • `docs/analysis/cef-vs-tauri-value-prop.md` — analysis of CEF vs Tauri value prop post-PR feat: CEF host — Phases 1-3 + frontend bridge + AgentA testing fixes #253

What works in Phase 1

  • Open Drone pane from launcher widget bar
  • Canvas with dot-grid background, pan by dragging, zoom with scroll wheel
  • Draggable nodes with status color, trigger label, last-run time
  • Expand nodes to see runtime, retry count, run sparkline
  • Hover for Run now / Edit / Disable quick actions
  • Edit panel: name, task prompt, cron/event/dependency/manual triggers, run policy
  • Cron trigger live human-readable preview (e.g. "Weekdays at 7:00 AM")
  • Run log drawer: run history with state, trigger, duration
  • SVG dependency edges (bezier, color-coded by success/failure/any)
  • TypeScript clean (zero new errors)

What's next (Phase 2)

  • DroneScheduler in agentmuxsrv-rs — cron loop + event bus subscription
  • Persistence: WOS for definitions, SQLite for run records
  • Real triggerDrone IPC instead of mock setTimeout

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.5
Trigger PR opened
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis Clean
Review Time 108.7s
Timestamp 2026-03-30T20:39:41Z
Repository agentmuxai/agentmux
PR #256

Confirmed: updateTrigger at line 46 shallow-merges patch onto the existing trigger, so changing type from "cron" to "manual" would leave stale expr on the object.

Issues:

  • drone-model.ts:14 - viewIcon returns "drone" which is not a valid FontAwesome icon; should be "robot" to match widgets.json and blockutil.tsx (every other view model matches its widget icon)
  • drone-edit-panel.tsx:46 - Changing trigger type via dropdown shallow-merges onto the old trigger object, leaving stale type-specific fields (e.g. expr persists after switching from cron to manual); should reset to a clean trigger of the new type
  • package.json:9 - New feature (new view type + widget visible in launcher) version-bumped as patch (0.33.1 → 0.33.2); per semver policy new features should be a minor bump (0.34.0)

agent1-workflow[bot] and others added 2 commits March 30, 2026 20:43
- drone-model.ts: viewIcon "drone" → "robot" (valid FA icon, matches widgets.json)
- drone-edit-panel.tsx: reset trigger to clean object on type change instead of
  shallow-merging, preventing stale fields (e.g. `expr` persisting after cron → manual)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.5
Trigger Re-review (new commits)
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis Clean
Review Time 154.6s
Timestamp 2026-03-30T20:45:54Z
Repository agentmuxai/agentmux
PR #256

Issues:

  • docs/analysis/cef-vs-tauri-value-prop.md:1 - Unrelated to drone pane feature; 308-line CEF-vs-Tauri strategic analysis belongs in a separate PR or with PR #253 (CEF integration)
  • frontend/app/view/drone/drone-view.css:752 - @keyframes drone-pulse animation defined but never referenced in any drone component (dead code)

…of branch

- drone-view.css: remove @Keyframes drone-pulse (defined but never referenced)
- docs/analysis/cef-vs-tauri-value-prop.md: untrack from this branch (belongs with PR #253/CEF work)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@reagentx-workflow reagentx-workflow Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReAgent Diagnostics
Field Value
ReAgent Version 5.12.5
Trigger Re-review (new commits)
Project Context CLAUDE.md loaded
Model claude-opus-4-6
Effort high
Ref Repos Disabled
Merge Analysis Clean
Review Time 104.2s
Timestamp 2026-03-30T20:51:12Z
Repository agentmuxai/agentmux
PR #256

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant