feat: add org CI status, test outline, oxlint, auto-merge, procfile supervision, and React UI - #59
feat: add org CI status, test outline, oxlint, auto-merge, procfile supervision, and React UI#59moshloop wants to merge 71 commits into
Conversation
…factor status rendering Introduce `gavel pr list --ci` to report default-branch CI status across an org's repos, newest-pushed first. Repos pushed before --since are dropped; archived and empty repos are skipped. Private repos are included when token has access. Refactor status command rendering to use clicky's task manager as the live renderer, which owns the terminal, ClearLines accounting, and logger serializer. This allows AI agent log lines to interleave cleanly instead of corrupting in-place redraws. Remove the old renderStatusOutput and formatStatusResult functions in favor of the new statusRenderer. Extract GraphQL execution boilerplate into postGraphQL and graphQLErrors helpers, shared by PR search and org branch status paths. Extract check rollup summarization into summarizeRollup, used by both paths. Add visual improvements: repo names in PR lists are now bold; dividers appear between PR entries; workflow run and PR title formatting is adjusted for consistency. Remove unused replace directives from go.mod.
Add 'gavel test outline' to enumerate tests without running them, annotating each with location, body size, cyclomatic complexity, jscpd duplication, joined run history, and a static (optionally AI) description of what it verifies. Export ContainsRunSpecs and DetectPackageManager so the outline package can reuse the existing ginkgo-bootstrap and node package-manager detection. claude: test outline implementations for go, ginkgo and vitest
A vitest package whose tests can't be listed (e.g. deps not installed) now renders as a red error row anchored on its package.json instead of aborting the whole outline, so go/ginkgo and the other vitest packages still render. The row summarizes the cause (module-resolution line, ANSI-stripped). Error rows are excluded from leaf counts, history, duplication, and AI annotations. claude: test it on this repo
Integrate oxlint as a new linter for JavaScript and TypeScript projects. Adds oxlint to the linter registry with support for configuration file detection, JSON output parsing, and auto-fix capabilities. Includes comprehensive test coverage for violation parsing and rule name extraction.
Enable GitHub auto-merge on a newly opened PR via commit -p --auto-merge, with --merge-type (rebase|squash|merge, default rebase) selecting the merge method. Auto-merge requires the GraphQL enablePullRequestAutoMerge mutation (REST create-PR cannot set it), so capture the PR node_id and run the mutation through the existing postGraphQL helper. Scope is limited to PRs the run opens; pushing to an existing PR warns and skips. Invalid merge types and GitHub rejections fail loudly (non-zero).
The push flow stages and commits only selected files, then rebases onto the base branch. A dirty working tree (files not in the commit) caused git rebase to abort with "cannot rebase: You have unstaged changes". Add --autostash so the working tree is stashed and restored around the rebase, covering the initial attempt and the -Xours/-Xtheirs retries.
…ponents Replace Preact with React 19 and adopt @flanksource/clicky-ui for consistent component styling and behavior. Integrate Tailwind CSS v4 with clicky-ui's preset for design tokens. Add project/Procfile management: new AddProjectDialog and ProjectsBar components enable users to configure local workspace directories with optional repo bindings and control supervised processes via /api/proc endpoints. Implement ProcControl component for per-repo process status display and control (start/stop/restart/logs). Add localStorage persistence for search config and filters via new storage.ts module. Replace custom SplitPane with clicky-ui's SplitPane. Migrate FilterBar to use clicky-ui's FilterBar with multi-select facets. Update RepoSelector to use clicky-ui's Combobox. Convert all class attributes to className for React compatibility. Update imports from preact/hooks to react. Add index.css for Tailwind and clicky-ui stylesheet imports. Update vite.config.ts to use @vitejs/plugin-react and @tailwindcss/vite. Add tailwind.config.js with clicky-ui preset. Update tsconfig.json to remove jsxImportSource. Refs #123
Implement a complete process supervision system for managing Heroku/foreman-style Procfiles. This includes: - CLI commands (proc run/start/stop/restart/status/list/logs) for process management - Supervisor daemon that runs processes with configurable restart policies - Control socket for live process operations (start/stop/restart) - Per-process logging and state persistence to .gavel/proc/ - Environment variable injection from .env and .gavel.yaml config - Login-shell environment capture for proper PATH resolution - Web UI endpoints for process status and control - Comprehensive test coverage with Ginkgo/Gomega The supervisor handles graceful shutdown with SIGTERM/SIGKILL escalation, process restart backoff, and multiplexed colored output in foreground mode. State is persisted to JSON and queried via control socket for live operations or state file for CLI commands.
…guration Generate and document the complete JSON Schema for Gavel's configuration file (.gavel.yaml). This enables editor integration with YAML language servers for inline validation, completion, and hover documentation. Changes: - Add gavel.schema.json as the canonical schema artifact, generated from GavelConfig struct - Add SCHEMA.md with comprehensive field reference and merge behavior documentation - Add config_schema.go with schema generation logic and validation helpers - Add config_schema_test.go with tests ensuring schema covers all config fields and matches committed artifact - Add gen_schema.go build tool to regenerate schema from config types - Extend GavelConfig with ProcfileConfig for `gavel proc` process management - Add MergeProcfileConfig and mergeStringMap helpers for proper config layering - Update gavel.yaml.example with procfile section and schema reference - Update .gitignore to preserve gavel.schema.json despite *.json exclusion The schema is the single source of truth; SCHEMA.md and gavel.schema.json are generated from GavelConfig to prevent drift. Tests fail if the committed artifact becomes stale or if any config field lacks documentation.
…/restart Add TCP port detection for supervised processes using lsof, enabling the UI and CLI to display which ports a process is listening on. Implement a port-watching goroutine that polls for listening ports after process start and records them in the process state. Enhance start/restart UX by: - Showing per-process readiness progress with live task updates (starting → running → listening on :PORT) - Gating processes that previously bound a port as "starting" until the port is re-detected on restart - Displaying listening ports as clickable localhost links in the UI - Polling process status faster (1s vs 3s) while transitions are in flight Extract common utilities (ProcessAlive, TailFile) to a new utils package for reuse across service and procfile modules. Refs: port detection, process lifecycle visibility
Add profile-based process selection and resource monitoring: - Procfile now supports YAML format with per-process configuration (command, default, autoRestart, cpu, mem, profiles, env, maxRestarts) - Processes can declare profiles to auto-start only when active; default:false makes them start on-demand - Supervisor tracks CPU%, memory RSS, and open file descriptors per process - Start/Restart commands accept --profile flag; daemon reuses profile on restart - Control socket allows starting named processes on already-running daemon - Removed terminateGroup function; clicky's SupervisedProcess handles process lifecycle - Refactored supervisor to delegate per-process supervision to clicky instead of custom runLoop - State includes active profile and available profiles from Procfile BREAKING CHANGE: Procfile format changed from simple 'name: command' lines to YAML; Run/Start/Restart functions now require profile parameter
…ment with profiles and resource limits Move author/bot filtering from server-side search config to client-side facet filters, allowing the UI to control bot visibility via @Bots chip. The daemon now fetches all authors and learns bot accounts from results, excluding them at the source on subsequent fetches unless @Bots is active. Add profile support to Procfile supervision: entries with 'profiles' auto-start only when the active profile matches. Replace per-process config overrides in .gavel.yaml with per-process settings in the Procfile itself (command, default, autoRestart, cpu, mem, profiles, env, maxRestarts). Add resource limits (CPU %, memory cap) to both global defaults and per-process config. Refactor tri-state facet filters (include/exclude/neutral) from Set-based to record-based representation, enabling exclude semantics in the UI. Add ProcessManager dropdown showing all supervised workspaces with live metrics (CPU, memory, open files), process trees, log previews, and profile selection. Add theme toggle and search bar to app header. Update config schema and examples to reflect new Procfile structure. Remove SearchControls and RepoSelector components; integrate their functionality into FilterBar and AppShell. BREAKING CHANGE: SearchConfig no longer carries author/any/bots fields; author filtering is now purely client-side. ProcfileConfig.restartPolicy and .processes are removed; use .autoRestart and per-process Procfile entries instead.
Replace npm with pnpm as the package manager across all UI projects (testrunner/ui, pr/ui) and CI workflows. Enable corepack for consistent pnpm version management instead of manual installation. Add pnpm-workspace.yaml files to support linking local @flanksource/clicky-ui sibling checkouts while resolving from npm registry in CI. Update all npm commands to pnpm equivalents and remove npm cache configuration from setup-node actions. Add packageManager field to package.json files and dedupe preact in testrunner/ui vite config to handle workspace resolution correctly. Update Makefile and Taskfile to use corepack pnpm instead of npm. Delete package-lock.json files as they are no longer needed. BREAKING CHANGE: npm is no longer used; pnpm@10.33.0 is now required via corepack
Exclude the compiled PR UI bundle from version control to keep the repository clean and prevent build artifacts from being tracked.
Add /api/proc/favicon endpoint to fetch favicons from localhost services with project+port validation. Consolidate StatusIndicator and SettingsButton into a unified dropdown menu that displays health status, GitHub rate limits, sync controls, and version information. Add process uptime tracking and visualize CPU/memory metrics with charts. Extract ProcessPortLink component to display favicons alongside port links. Changes: - Backend: New handleProcFavicon handler with port discovery validation - Frontend: Merge Summary and SettingsButton functionality into StatusIndicator - Add @tanstack/react-query dependency for future data fetching - Add uptime calculation and CPU/memory visualization components - Improve process table with additional metrics and visual indicators
Replace the runtime iconify-icon custom element with a new GavelIcon component that uses pre-built SVG icons from clicky-ui. This eliminates the external CDN dependency and improves performance. Add support for menubar and processes pages with dedicated views. Implement menubar external link handling via webkit bridge for macOS integration. Refactor process metrics display to show workspace-level CPU and memory aggregates in headers. Add process favicon display and reorganize process table columns. Update pnpm workspace configuration to use catalog mode and add react-grab for development debugging. Refs: Removal of external iconify-icon script dependency, addition of offline icon rendering capability
…nd macOS menubar via Wails Enhance AI fix output with token usage tracking and context window percentage display. Replace caseymrm/menuet with Wails v3 for native macOS menubar integration with better lifecycle management. Key changes: - NewStderrRenderer now accepts model and contextWindow parameters to display `[model X%]` prefix tracking token consumption - Add isTokenLimitError detection to automatically chunk commits by directory when AI analysis exceeds context limits - Migrate menubar from menuet to Wails v3 with proper window management, pointer events, and hide controller - Add gavel test ansi command for capturing and analyzing PTY output with width-aware ANSI settling - Extend ANSI settle logic to support terminal width wrapping and detect wrap-induced redraw bugs - Update go-git and related dependencies Refs: token limit handling, menubar UX improvements
Refactor process startup/restart/stop to track readiness outcomes and stream logs live. Key changes: - Extract procTracker state machine to classify process readiness (ready/warn/failed) across status samples, enabling callers to exit non-zero on startup failures - Add Stream() to tail process logs with per-process prefixes until context cancellation, used by restart/stop operations - Add streamUntilReady() and stopAndStream() to multiplex log streaming with readiness polling - renderProcReadiness() now returns error on startup failures instead of silently succeeding - Add -f/--follow flag to proc restart/stop to keep streaming after processes settle - Add procMetricsLoop() to sample CPU/memory timeseries for process dashboard gauges - Update ProcessTable.tsx to poll recorded metrics from backend instead of one-shot values - Supervisor.Wait() now persists terminal state.json on self-exit (daemon crash) vs clearing on explicit stop - Add comprehensive tests for procTracker, Stream, and metrics endpoint Breaking change: renderProcReadiness signature changed to return error; callers must handle startup failures.
Introduce a Provider interface to abstract TODO storage, enabling support for multiple backends (file-based and Grite issue tracker). Implement FileProvider for local .todos directory and GriteProvider for Grite integration with full CRUD operations, state management, and event history tracking. Key changes: - Add Provider interface with List, Get, UpdateState, UpdateLatestFailure, SaveAttempt methods - Implement FileProvider wrapping existing file-based TODO discovery and persistence - Implement GriteProvider with Grite CLI integration for issue management - Add --provider flag to select between 'grite' (default) and 'todos' backends - Update TODOExecutor to accept and use Provider for state persistence - Add ProviderEvent type to track issue history from external providers - Extend TODO type with ID, ShortID, Provider, ProviderState, Labels, ProviderEvents fields - Extract common TODO filtering logic into filterTODOsByArgs helper - Update fixture parser to support parsing markdown content from non-file sources BREAKING CHANGE: TODOExecutor constructor now accepts optional Provider parameter; executeGroups and executeSingleTODOs functions now require Provider argument
Implement a new todos tab in the dashboard with workspace-scoped todo listing, creation, and management. Add RESTful project CRUD endpoints (/api/projects/{name}) with proper HTTP semantics (201 for create, 409 for conflict, 204 for delete). Introduce todo backend resolution (auto-detect .todos files or Grite), git change counting for workspaces, and OpenAPI/Clicky integration for the projects entity. Refactor projects handler to separate concerns: entity logic in projects_entity.go, Clicky/OpenAPI support in projects_clicky.go, and shared CRUD functions in projects.go. Update frontend routing to support /todos and /activity as top-level SPA tabs with proper history management.
…ject management CLI Implement a multi-faceted enhancement to the todos and projects subsystems: **Grite Caching**: Add GriteCacheStore interface and CachedGriteProvider to persist grite issue projections in the gavel DB with TTL-guarded incremental syncs. Writes pass through to grite (source of truth) and force a sync so reads reflect changes immediately. **Grouping by Repository**: Extend GroupTODOs to support GroupByRepo strategy that uses git root detection to group TODOs by their repository, with fallback to workDir. **CMux Execution Mode**: Add --mode flag (inline|cmux) to todos run command. CMux mode generates dispatch plans for multi-agent execution with --effort directive (low|medium|high) to control reasoning depth. Dry-run displays cmux commands and prompts. **Model Override**: Add --model flag to override LLM model for TODO execution, taking precedence over frontmatter config. **Projects Management**: New projects CLI command with CRUD subcommands (list, get, add, update, delete) to manage workspace projects stored in ~/.config/gavel/projects.json. **Provider Enhancements**: Add Create and Delete methods to Provider interface. Implement for both FileProvider and GriteProvider with proper state management. Breaking change: Provider interface now requires Create and Delete method implementations.
Remove todo documentation files for PR #81 that tracked CI job failures: - lint-go-mod-tidy-check.md: go mod tidy issues resolved - lint-golangci-lint.md: errcheck linting issues resolved - test-test-ubuntu-latest-go-1-25.md: test build failures resolved These tracking files are no longer needed as the underlying issues have been fixed.
Add cmux-based TODO execution alongside Claude, enabling multi-agent dispatch through cmux workspaces. Implement client library for cmux CLI interaction with workspace management and session polling. Add priority field support to todo updates across all providers (Grite, file-based). Extend PATCH API to accept optional priority changes independently of status. Implement client-side filtering UI for todo statuses with persistent localStorage preferences. Hide completed todos by default while preserving full counts in headers. Refactor executor selection into pluggable factory pattern supporting both Claude and cmux backends. Extract effort directives and agent resolution into shared cmux package utilities. Breaks: cmux mode no longer returns "not implemented" error; it now executes via cmux workspaces when available.
…ecutor Implement todo transfer capability allowing users to move todos between project workspaces via API and CLI. Refactor cmux executor to use workspace/surface-based interaction instead of session polling, enabling more reliable agent communication with retry logic and screen stabilization detection. Key changes: - Add Transfer() function to move todos between providers (file/Grite) - Implement /api/todos/transfer endpoint with validation - Add `gavel todos transfer` CLI command - Refactor CmuxExecutor to use EnsureWorkspace, NewSurface, SendSurface, ReadScreen - Add screen polling with backoff and stability detection - Add send retry logic with configurable attempts - Update dashboard TodoView to support deep-linking and todo selection in URL - Remove deprecated SessionStore-based waiting mechanism - Add AgentCommand and AgentWorkspaceName helpers - Extend cmux Client with workspace/surface management methods Breaking change: CmuxExecutor no longer uses SessionStore; callers must remove Store field from CmuxExecutorConfig.
… run support Introduce two new TODO statuses (draft and verified) throughout the system: - Draft status for TODOs being prepared but not ready to run - Verified status for completed TODOs awaiting closure Add comprehensive TODO creation support: - New CLI command `todos create` with title, body, priority, and status flags - New API endpoint `/api/todos/new` supporting JSON, form, and multipart payloads - Automatic attachment handling and summary generation - AutoSave mode that defaults to pending status instead of draft Implement batch TODO execution: - Support running multiple TODOs in a single agent session via `/api/todos/run` - Multi-select UI in workspace groups with checkbox controls - Advanced run options dialog for model, effort, timeout, and cost limits - Dry-run validation before actual execution Enhance TODO listing: - Hide completed TODOs by default; add `--all` flag to show them - Status filter overrides the default hide behavior - Add `todo` alias for `todos` command Improve Grite provider: - Support short ID prefix resolution for todo references - Detect ambiguous prefixes and report errors - Capture label details in provider events - Add draft and verified status label mappings Refactor UI components: - Extract event rendering into dedicated TodoTimeline component - Add run controls to both detail pane and list view - Update status and count displays for new statuses Update documentation and validation to reflect all seven statuses.
…r proc status Implement memory management improvements across the dashboard: - Add menubar blank controller to navigate hidden webview to about:blank after 5min idle, reclaiming unbounded DOM/JS heap growth that caused 26GB bloat - Replace proc status polling with SSE stream (handleProcStatusStream) that adapts cadence based on process transitions and omits resource churn (cpu/mem/tree) to enable efficient change detection - Gate all background work (SSE streams, pollers, re-render ticks) on document visibility so hidden windows pause fetching and re-rendering - Remove client-side peak tracking for CPU/memory gauges; let TimeseriesCoreBars self-size from live metric series instead - Fetch process tree on-demand in expanded rows rather than streaming it, reducing SSE payload churn - Add useDocumentVisible hook to pause activity feed and proc status streams when tab/window is hidden - Fix react-grab dev overlay gate to use import.meta.env.DEV instead of !CI, preventing production bundle bloat - Add session log tailing for Claude cmux executor to track progress via structured events instead of screen-idle detection These changes eliminate the menubar's constant re-render loop and unbounded memory growth while improving responsiveness through adaptive streaming.
Implement comprehensive session management for TODO agent execution: - Track Claude session IDs via session:<id> labels on issues, enabling runs to be resumed with prior conversation context - Add Plan and Resume options to cmux executor for plan-only mode and session continuation - Implement SessionStatsCache to track live in-progress sessions and compute token usage/cost from session logs - Add session stream and stats endpoints for dashboard to follow agent activity live - Refactor TodoView into composable AppShell-integrated components (TodoBodyHeader, TodoBodyActions, TodoFilterToolbar, TodoWorkspaceList, TodoDetailPane) - Add TodoBucketGroup and grouping/density picker UI for organizing todos by severity/age - Persist session IDs immediately before agent launch so interrupted runs remain resumable - Collapse adjacent label changes in provider events for cleaner timeline display - Omit transcripts from issue comments; instead reference session logs via recorded session IDs The session id is resolved up-front and returned to clients so the dashboard can follow the log live. Resume runs reuse prior session context; fresh runs reference prior sessions in their prompt for history. Token usage and cost are computed from session logs and cached by mtime.
…todo session tracking Replace app-level tick state with a shared useNow() hook that allows leaf components to subscribe to a global clock, reducing unnecessary parent re-renders. Timestamps now refresh themselves via RelativeTime component instead of polling the entire tree. Add comprehensive todo session support: track agent runs with live session logs via SSE, display elapsed time and token usage, support resuming prior sessions, and add session-specific UI in the detail pane. Introduce todo list view preferences (density: comfortable/compact, grouping: workspace/severity/age) persisted to localStorage. Add TodoNewPage for creating todos via deep links with pre-filled fields. Enhance TodoTimeline with sorting and improved event rendering. Add new icon mappings (circle-outline, history, list-flat, rows) and refactor job duration rendering in WorkflowView to use the shared clock pattern. Breaking change: timeAgo() and timeAgoShort() moved from utils to be used internally by RelativeTime component; callers should use <RelativeTime/> instead.
Implement hot-module-reload support for the PR UI via `--dev` flag that spawns and reverse-proxies to a Vite dev server. Add todo session tracking with resume capability, allowing agents to continue prior conversations. Introduce `gavel serve` command as a dedicated dashboard entry point. Add session stats and streaming endpoints for monitoring agent execution. Refactor relative timestamp rendering to use a shared clock subscription instead of full-app ticks, reducing main-thread cost in the menubar. Key changes: - New pr_dev.go: Vite dev server lifecycle management (spawn, health check, port detection) - New devproxy.go: Reverse proxy handler for dev mode with export route bypass - New todos_commit.go: Post-execution commit pipeline for agent changes - New serve_dashboard.go: Dedicated `gavel serve` command - Updated todos flags: --resume, --commit, --dev, --dev-dir - Updated vite.config.ts: Dev server config (port 5273, HMR port 24778), conditional NODE_ENV - Updated App.tsx: Refactored todo views, new TodoNewPage, useNow() clock subscription - Updated types.ts: SessionStats, TodoSessionEvent, TodoDensity, TodoGroupBy - New useNow.ts: Shared 1s clock for relative timestamps with visibility gating
…management Implement responsive mobile detection using media queries to fall back to compact menubar layout on narrow screens (<768px). Extract copy feedback state machine into reusable useCopyFeedback hook to reduce duplication across components. Add useTimeoutFlash hook for transient state with automatic cleanup. Introduce mobile-aware route reconciliation logic that respects menubar layout for both native webview and mobile viewports. New features: - useIsMobile hook for viewport-width tracking - useCopyFeedback hook consolidating copy state management - useTimeoutFlash hook for auto-reverting transient values - ReactGrabHelp component for React Grab integration - TodoEditForm and TodoCommentBox components for todo editing - Mobile layout fallback to menubar UI on narrow screens - Session state badge showing agent progress (thinking/working/ask/completed) - Auto-commit toggle in advanced todo run options Refactoring: - Extract copy feedback logic from App.tsx into dedicated hook - Consolidate session timer display into InProgressBadge component - Improve TodoSession styling with terminal-like appearance - Format ProcessTable with consistent quote style Fixes: - Clear pending timers on component unmount to prevent memory leaks - Proper scroll-following behavior in session transcript - Session state persistence across todo switches
…iler Introduce `gavel commit --since=<ref>` to review history in <since>..HEAD and merge commits sharing a Gavel-Issue-Id trailer into single commits with AI-simplified messages. This enables deduplication of related commits across a branch. Also add --max-commits and --group-by-scope flags for AI grouping (-G): - --max-commits caps the number of commits produced, with consolidation feedback when exceeded - --group-by-scope makes scope the primary grouping boundary instead of logical change Refactor AI grouping to use markdown status tables instead of scope-prefixed text, improving clarity and enabling scope-aware sorting. Extract git log format to a constant for reuse across multiple commands. Add new report/compact.go package for rendering test/lint summaries in PR comments and agent feedback. Refs #CW-2
Implement a post-completion check loop that runs configured gavel tests and linters after an agent reports done, feeding failures back to the agent for iterative fixes. Key additions: - New checkloop.go with runCheckLoop orchestrating test/lint runs and feedback rounds - FeedbackExecutor interface for executors supporting agent re-runs with check results - AgentChecksConfig type for test/lint configuration (project-level and per-TODO) - checks/runner.go package coordinating test and lint execution - SendFeedback implementations in claude and cmux executors - Session start retry logic in cmux to handle dropped Enter keystrokes - Model ID normalization for pricing registry lookups - Context window tracking in session stats The loop is opt-in, enabled via .gavel.yaml, TODO frontmatter, or --check flag. It runs up to MaxIterations feedback rounds (default 3) before reporting failures.
Move test failure and lint violation syncing into a new `todosync` package to break the import cycle between testrunner/linters and todos packages. Rename `TodoSync` to `TestFailureRecorder` and `lint_sync.go` to `lint_violations.go` for clarity. Update `RunOptions.TodoSync` callback to accept the new interface, allowing testrunner to invoke todo recording without direct package imports. BREAKING CHANGE: `TodoSync` type renamed to `TestFailureRecorder`; `NewTodoSync` renamed to `NewTestFailureRecorder`; `SyncFailure` now accepts `parsers.Test` instead of `TestFailure`.
… check loop Introduce `gavel commit -G` for LLM-assisted logical commit grouping with a separate chore commit for lock/generated files, backed by a new `commit.groupModel` config field (defaults to sonnet-class). Add `gavel todos run --check` to run tests/lint after agent completion and feed failures back for iterative fixing, with configurable `checks:` block in .gavel.yaml and TODO frontmatter. Update UI server defaults to bind `0.0.0.0` (all interfaces) instead of `localhost` for better LAN accessibility. Extend CLI with `--max-commits`, `--group-by-scope`, `--group-model`, `--addr`, and `--port` flags across relevant commands.
Replace the legacy agent+mode pair with a unified driver selection system that supports multiple execution mechanisms: cmux (interactive TUI), headless (stream-json CLI), sdk (Claude Agent SDK bridge), and api (direct Anthropic API). The new drivers package centralizes driver selection logic, eliminating duplicated switch statements across CLI and dashboard. Each driver kind combines an agent (claude/codex) with a mechanism (cmux/headless/sdk/api), providing a cleaner UX than separate agent and mode dropdowns. Add git trailer utilities to link commits back to todos via Gavel-Issue-Id, enabling the dashboard to display related commits. Implement tool approval workflow for drivers that need human permission before executing certain tools. Update CLI flags to prefer --driver over the legacy --mode, maintaining backward compatibility. Refactor executor construction to use the new drivers factory. BREAKING CHANGE: The internal executor API now returns (Executor, sessionID, error) instead of (Executor, sessionID). Gavel-Issue-Id: 78f9070ff1ee361ef4d2bb462f9ed64a Claude-Session-Id: 206ff2e6-357a-45b9-9aae-9c0bea06bc27
Add `--stage=<session-id>` mode to gavel commit that stages exactly the files a Claude agent's Edit/Write tools touched during a session, filtered by .gitignore and .gavel.yaml commit.gitignore rules. This scopes commits to agent changes rather than the whole working tree and backs both CLI usage and the todo runner's auto-commit. Implement stageSessionFiles() to resolve session logs via captain's history API, extract modified file paths, validate they're within the work directory, and filter ignored paths. Update after_agent.go to use session ID when available, falling back to staging all changes with a log message. Add CommitDiff() to git package to fetch and render ANSI-colored `git show` output capped at 256 KB, with truncation detection. Add IsValidCommitHash() to reject untrusted input before shelling out to git. Update dashboard to expand commit rows to show diffs via new /api/todos/commits/diff endpoint. Migrate session streaming from custom event parsing to raw captain SessionEntry records consumed by clicky-ui's SessionViewer, simplifying the frontend and enabling richer rendering. Add tool-approval flow with pending request display and Allow/Deny buttons. Extract RepoIcon component for reuse across PR and Todo lists. Bump clicky-ui to 0.3.6. Gavel-Issue-Id: 863d567a955a277286c36a3b3de0d0ea Claude-Session-Id: 8e9ba472-f783-46dc-9c91-2edf51786eb6
… list Introduces aggregated git diff statistics (commits, files, adds/dels) per todo via the Gavel-Issue-Id trailer, displayed in the UI alongside creation and last-activity timestamps. Adds client-side activity time-range filtering with clicky-ui TimeRange picker, persisted to localStorage. Implements server-side caching of commit stats with TTL to avoid repeated git log passes. Sorts todos by priority then age to surface important, long-outstanding work. Extends Claude prompts to include issue comments for richer context. Adds iframe injection for React Grab plugin to support grabbable content in framed pages. Gavel-Issue-Id: 55736bed99f884f64854c1d9dad956a0 Claude-Session-Id: bfe6e45a-bb19-4982-b7f9-c4ff182851ab
Add actorName() function to surface only human-readable actor names in the todo timeline. Opaque UUID identifiers (both 32-char and dashed forms) are now filtered out and return undefined, preventing meaningless IDs from being displayed to users while preserving actual actor names. Gavel-Issue-Id: e90ab720de5f7e885c9fc83a849e96fd Claude-Session-Id: 7d7c5558-32ba-4f0d-9658-fff61433ecfe
…lience Add CommitFiles API to parse git diffs and enrich files with repomap scope/language classification, enabling per-file hover cards in the dashboard. Extend CommitDiff to support file-scoped diffs. Refactor cmux submission and session monitoring: extract sendSurfaceText and session-start confirmation into reusable submitAndConfirm; add stall watchdog that detects hung turns via dual signals (log growth + surface changes) and nudges with re-pressed Enter; implement REPL-readiness detection for claude startup; add tool-permission approval handling for human-in-the-loop workflows. Update UI to split driver selection into provider (claude/codex) and mechanism (cmux/headless/sdk/api) axes with dynamic catalog-driven pickers, improving UX and maintainability. Gavel-Issue-Id: 48bfd19df0829a07c909a4c9e46c0970 Claude-Session-Id: 17a8538f-ec24-4100-bb68-8f65640d8c82
Refactor TodoCommits to display per-file change summaries instead of a single full-commit diff. Each file now shows its status (added/deleted/renamed/modified), language, scopes, and line counts, with individual diffs revealed on hover. New CommitFiles component provides a repomap-based breakdown of commit changes, improving scannability and allowing users to focus on specific files. FileDiffCard lazily loads diffs for individual files, reducing initial payload. Also upgrade @flanksource/clicky-ui from 0.2.21 to 0.3.6 and remove obsolete gitleaks comment from dagre-d3-es integrity hash. Gavel-Issue-Id: fb88778c155e76f4f59d8f3252a3aae9 Claude-Session-Id: 1596fad8-2474-4fd0-bbaa-807af0303502
…d verification Implement structured acceptance criteria for TODOs with full CRUD operations: - Add CLI commands (list/add/remove/edit/generate) for criteria management - Parse and render criteria from markdown "## Acceptance Criteria" sections - Support static checks from verify catalog and custom criteria - AI-powered criteria generation using LLM with structured output - React UI component with inline editing, toggling, and verification - Verification results display with per-criterion verdicts and evidence - Flexible JSON parsing tolerates model output variations (objects vs strings) Criteria round-trip through markdown with check IDs preserved for static checks. Editing custom criteria clears associated check IDs. Verification integrates with existing verify.AllChecks catalog.
…coring Implement issue verification that scores commits against acceptance criteria and issue specifications. This enables: - CLI command `gavel todos verify` to verify TODOs against their acceptance criteria - Issue-aware verification context with custom criteria and static checks - Persistent verification results stored in TODO files - Dashboard UI endpoints for criteria management and verification - Schema and prompt generation tailored to issue context - Overall implementation verdict based on score threshold and acceptance criteria The verification run now accepts an IssueContext containing the issue title, description, comments, selected checks, and custom criteria. Results include an `implemented` boolean and per-criterion verdicts. Acceptance criteria count toward the overall score computation alongside checks.
…activity status Add SessionStats.Executing() to determine if a session is actively working, considering both live tailers and cold sessions with recent log updates within executingRecency (60s). This allows resumed sessions and continued REPL interactions to surface as in-progress rather than stale. Add SessionAccumulator.SetState() to override live agent state, enabling the stall watchdog to mark tool-permission dialogs as "ask" status since Claude renders approval prompts only on the terminal without session-log events. Update stallWatchdog to call markAwaitingHuman() when paused on user input, ensuring the dashboard and CLI show "awaiting input" instead of stale "working" status.
…neration Implement post-commit issue verification that scores completed work against acceptance criteria, and AI-powered acceptance criteria generation during TODO creation. Key changes: - Add `--verify` flag to `todos run` to enable issue verification after commits - Generate acceptance criteria from TODO title/body using LLM during creation - Return commit hashes from RunAfterAgent for verification consumption - Add ErrSessionNoFiles error when session edits no stageable files - Extend Provider interface with SaveVerification method - Add session status reconciliation in dashboard to surface live work - Support criteria editing and verification result persistence in UI
…ate dependencies Replace all native <button> elements with the Button component from clicky-ui throughout the PR UI to ensure consistent styling and behavior. Update package.json dependencies including React 19.2.7, TypeScript 5.9.3, and add iconify packages. Add oxlint configuration and update catalog versions. Fix ANSI regex patterns with eslint directives and remove unused functions. Replace native <select> elements with Select component. Update .gitignore to anchor gavel binary pattern.
Introduce a new Tests tab in the PR UI that displays a history of test and lint runs across registered workspaces. Implement per-run snapshot persistence (run-*.json files) with metadata tracking (start/end times, kind). Add TestRunSyncer to scan workspaces on an interval and cache run summaries in the database for efficient querying. Include database schema for TestRunCache and TestRunCursor to support incremental syncing via watermarks. Add ListRuns() to enumerate and classify runs (test/lint/test+lint) from snapshot files. Implement HTTP endpoints for fetching run lists and individual run details with path traversal protection.
… sink support Refactor prompt handling to support scoped prompts via dashboard UI and improve compatibility checking with interactive sink detection. Key changes: - Add context parameter to promptSelectFunc and promptSelectIndex to support prompt.Scope routing - Use clicky.PromptSelectCtx instead of clicky.PromptSelect to inherit scope from context - Add prompt.HasInteractiveSink() checks in gitignore, file-size, linked-deps, and compatibility checks to gracefully handle non-TTY environments with installed interactive sinks - Consolidate AI imports from clicky/ai to gavel/ai across all test files - Replace captain history imports with gavel/internal/sessionhistory - Update dependencies: captain v0.0.8, clicky v1.21.33 - Add new test TestPromptSelectIndexRoutesToInstalledManager to verify scope propagation through the commit prompt chain
|
Important Review skippedToo many files! This PR contains 445 files, which is 295 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (12)
📒 Files selected for processing (445)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| <div className="text-xs"> | ||
| <div className="flex items-center gap-2 mb-1.5"> |
| } | ||
|
|
||
| scratch := filepath.Join(opts.WorkDir, ".tmp", "gavel-fixup") | ||
| if err := os.MkdirAll(scratch, 0o755); err != nil { |
| merged[g.IssueID] = msg | ||
|
|
||
| path := filepath.Join(scratch, fmt.Sprintf("msg-%d.txt", i)) | ||
| if err := os.WriteFile(path, []byte(msg+"\n"), 0o644); err != nil { |
| } | ||
|
|
||
| todoPath := filepath.Join(scratch, "todo") | ||
| if err := os.WriteFile(todoPath, []byte(buildRebaseTodo(ordered, dups, msgFiles)), 0o644); err != nil { |
| } else { | ||
| args = append(args, "--stat", "--patch", hash) | ||
| } | ||
| cmd := exec.Command("git", args...) |
| func handleReactGrabInstall(w http.ResponseWriter, r *http.Request) { | ||
| w.Header().Set("Content-Type", "text/html; charset=utf-8") | ||
| w.Header().Set("Cache-Control", "no-cache") | ||
| fmt.Fprint(w, strings.ReplaceAll(reactGrabInstallHTML, "__GAVEL_ORIGIN__", requestOrigin(r))) |
| // token usage, model, and first/last timestamps. Used for cold (non-in-progress) | ||
| // sessions the live tailers never observed. | ||
| func computeSessionStats(path string) (SessionStats, error) { | ||
| f, err := os.Open(path) |
| } | ||
|
|
||
| func (c *SessionStatsCache) coldStats(sessionID, path string) (SessionStats, error) { | ||
| info, err := os.Stat(path) |
| if !filepath.IsAbs(todoPath) && !strings.Contains(todoPath, string(filepath.Separator)) { | ||
| todoPath = filepath.Join(p.Dir, todoPath) | ||
| } | ||
| if _, err := os.Stat(todoPath); os.IsNotExist(err) { |
| slug = "todo" | ||
| } | ||
| name := slug + ".md" | ||
| if _, err := os.Stat(filepath.Join(dir, name)); err != nil { |
| } | ||
| for i := 2; ; i++ { | ||
| name = fmt.Sprintf("%s-%d.md", slug, i) | ||
| if _, err := os.Stat(filepath.Join(dir, name)); err != nil { |
What
gavel pr list --cito report default-branch CI status across org reposgavel test outlineto enumerate tests with complexity, duplication, and AI descriptions (go, ginkgo, vitest)commit -p --auto-merge --merge-typeWhy
Notes