Skip to content

feat(dashboard): surface in-flight jobs as an active_jobs view (#505 gap 1)#506

Merged
jerryfane merged 1 commit into
mainfrom
feat/505-dashboard-live-activity
Jun 27, 2026
Merged

feat(dashboard): surface in-flight jobs as an active_jobs view (#505 gap 1)#506
jerryfane merged 1 commit into
mainfrom
feat/505-dashboard-live-activity

Conversation

@jerryfane

Copy link
Copy Markdown
Owner

What

Partially addresses #505 (Gap 1): the dashboard had no live in-flight view — jobs was terminal-state counts only, so a running @agent ask was invisible. This adds an active_jobs section to gitmoot dashboard (plain text) and --json.

How

  • buildDashboardActiveJobs(jobs []db.Job) (internal/cli/dashboard.go) projects the already-loaded jobs slice (no extra DB round-trip) to those in queued/running, surfacing id · agent · repo · type · state.
  • New dashboardActiveJob struct + active_jobs JSON field (initialized non-nil → emits [], never null); rendered section between runtime_sessions and the jobs counts, reusing the existing section/format helpers.
  • The persistent "session busy" signal (the runtime:<rt>:<ref> resource lock, held for the whole job) is already shown in resource_locks; this complements it with the live job list.

Scope / deferred (tracked on #505)

  • TUI: not changed — an earlier review caught dead wiring; active_jobs renders only in plain/--json (noted in code). The interactive Activity page already shows live delegation trees.
  • Gap 2 (stale running agent_instances need a reaper) and Gap 3 (daemon shows "stopped" under systemd --user because daemon run doesn't update daemon.json) — separate follow-up PRs.

Tests

internal/cli/dashboard_test.go: includes queued+running / excludes all four terminal states / non-nil on nil input / bad payload → empty repo / end-to-end render of the section. go build/vet/test ./internal/cli/... green; touched files gofmt-clean.

Refs #505.

🤖 Generated with Claude Code

…gap 1)

Adds an active_jobs section to `gitmoot dashboard` (plain text + --json):
queued/running jobs projected from the already-loaded jobs slice (no extra DB
round-trip), so in-flight work is visible instead of only terminal-state counts.

TUI rendering is intentionally deferred (the interactive Activity page already
covers live delegation trees); gap 2 (reset stale `running` agent_instances) and
gap 3 (daemon-under-systemd "stopped" display) remain as follow-ups on #505.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jerryfane jerryfane merged commit bc59020 into main Jun 27, 2026
1 check passed
@jerryfane jerryfane deleted the feat/505-dashboard-live-activity branch June 27, 2026 11:51
jerryfane added a commit that referenced this pull request Jun 27, 2026
…age (#505) (#513)

Completes the #505 gap-1 TUI piece (#506 shipped plain/--json). The Activity
page now shows a live "active jobs" section for in-flight queued/running jobs
(e.g. a running @agent ask), deduped against the delegation-tree orchestras so a
job that's part of a tree isn't rendered twice. Empty/contradiction cases
handled (the "No active jobs" line only shows when nothing is running).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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