Skip to content

feat(cockpit): Phase 1 read-only dashboard over issues/PRs/routing/worktrees - #53

Merged
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-51-cockpit-dashboard
Jul 6, 2026
Merged

feat(cockpit): Phase 1 read-only dashboard over issues/PRs/routing/worktrees#53
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-51-cockpit-dashboard

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Summary

Adds .claude/scripts/cockpit.sh, a bash+node static-HTML dashboard generator (issue #51, Phase 1):

  • Open issues, grouped by module:* label, with a parsed blocking graph ("Blocked by #N", "Blocks #N", task-list - [ ] #N references), cross-linked between issues in the same snapshot.
  • Open PRs, with review-decision badge (approved / changes requested / pending) and CI check rollup status (passing / failing / pending / no checks).
  • Model/skill routing: reads model: from each .claude/agents/*.md frontmatter, plus review.lenses/review.skills and budget from the adapter. Adapter path honors GATES_FILE exactly like gate.sh (so GATES_FILE=.claude/self/gates.json works for self-hosting).
  • Active worktrees: lists .claude/worktrees/*, or renders "none active" — never crashes on an empty/missing dir.

No new runtime dependency (bash + node only). Self-contained HTML output (inline CSS, no external CDN/JS). All issue/PR titles are HTML-escaped. Degrades gracefully if a bot-gh.sh call fails (no network / no gh auth): the affected section renders an "unavailable (gh/network)" placeholder and the script still exits 0.

Output defaults to .claude/state/cockpit.html (gitignored — the generated artifact is never committed); an optional second arg overrides the output path.

How to run

bash .claude/scripts/cockpit.sh                 # writes .claude/state/cockpit.html
GATES_FILE=.claude/self/gates.json bash .claude/scripts/cockpit.sh   # self-host adapter

Then open the printed path in a browser.

Tests

.claude/scripts/cockpit.test.sh is a fully offline smoke test (fixture JSON via --fixtures <dir>, no live gh/network):

  • Asserts the blocking-graph parser (cockpit.sh --parse-blocking) produces exact edges for known fixture bodies.
  • Asserts the produced HTML contains issues-by-module (with blocked-by/blocks/subtask links), PRs with review/CI badges, a routing table with a real model: value, and a worktrees section.
  • Asserts GATES_FILE override is honored.
  • Asserts the gh-unavailable degrade path (via a stubbed COCKPIT_GH_BIN) still exits 0 and renders the placeholder, without touching real gh/network.

Run: bash .claude/scripts/cockpit.test.sh

Also linked from docs/ARCHITECTURE.md per acceptance criteria.

Test plan

  • GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh build — pass
  • GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh lint — pass
  • GATES_FILE=.claude/self/gates.json bash .claude/scripts/gate.sh test — pass
  • bash .claude/scripts/cockpit.test.sh — 28/28 checks pass
  • Manual run against live repo data (real issues/PRs) — produced valid HTML

closes #51

Adds .claude/scripts/cockpit.sh, a bash+node static-HTML dashboard over open
issues (grouped by module label, with a parsed blocking graph), open PRs
(review + CI state), model/skill routing (agent frontmatter + adapter
config), and active worktrees. Degrades gracefully with no network/gh auth.
Companion cockpit.test.sh runs the generator against fixtures for a fully
offline smoke test. Links the cockpit from docs/ARCHITECTURE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdLbxgUQhEVr6XtFGzBpsY
@robercano-ghbot
robercano-ghbot merged commit de59375 into main Jul 6, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-51-cockpit-dashboard branch July 6, 2026 14:51
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.

Cockpit Phase 1: read-only dashboard over issues/PRs/routing/worktrees (no harness changes)

2 participants