feat(dashboard): surface in-flight jobs as an active_jobs view (#505 gap 1)#506
Merged
Conversation
…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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Partially addresses #505 (Gap 1): the dashboard had no live in-flight view —
jobswas terminal-state counts only, so a running@agent askwas invisible. This adds anactive_jobssection togitmoot 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 inqueued/running, surfacingid · agent · repo · type · state.dashboardActiveJobstruct +active_jobsJSON field (initialized non-nil → emits[], nevernull); rendered section betweenruntime_sessionsand the jobs counts, reusing the existing section/format helpers.runtime:<rt>:<ref>resource lock, held for the whole job) is already shown inresource_locks; this complements it with the live job list.Scope / deferred (tracked on #505)
active_jobsrenders only in plain/--json(noted in code). The interactive Activity page already shows live delegation trees.runningagent_instances need a reaper) and Gap 3 (daemon shows "stopped" undersystemd --userbecausedaemon rundoesn't updatedaemon.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