Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

Backfill of merged PRs since the 0.1.0 release, grouped by theme.

### Automation

- #137 — Session analytics emitted via Claude Code's OpenTelemetry exporter (configure via `CLAUDE_CODE_ENABLE_TELEMETRY` and `OTEL_EXPORTER_OTLP_ENDPOINT`).
- #163 / #165 — Add `remoteControlEnabled` setting; new sessions launch with `--rc` so they can be driven from claude.ai or the mobile app. The `/crow-workspace` skill honors the setting.
- #182 — Auto-complete now requires positive evidence that the session was worked before flipping to Completed; prevents idle sessions being marked done by an unrelated PR merge.
- #189 — Manager terminal launches in `--permission-mode auto` by default so orchestration commands (`crow`, `gh`, `git`) skip per-call approval. Toggle at Settings → Automation → Manager Terminal.
- #209 — Per-workspace opt-in to auto-start review sessions when a PR becomes reviewable.
- #211 — Auto-create a workspace when an issue assigned to you carries the `crow:auto` label.
- #213 — Auto-suggest opening a PR when a session completes its work but no PR is linked yet.
- #214 — Optional auto-respond toggles: when enabled, Crow types an instruction into the session's Claude Code terminal in response to changes-requested reviews and failed CI checks. Off by default.
- #222 — PRs opened from a Crow session are auto-labeled `crow:auto`.
- #228 — Settings split into discrete tabs; every automation toggle lives under Settings → Automation. New `docs/automation.md` covers the full lifecycle.

### Review Board & Sessions

- #153 — Fix PR review status not reflecting the actual review state.
- #174 — Ticket card issue and PR chips are now clickable.
- #188 — "Move to Active" button on completed sessions returns them to active without deletion.
- #205 — PR link reconciliation for sessions that missed reactive detection — `gh pr list` is consulted on the next polling cycle.
- #206 — Rename terminals via the UI and via `crow rename-terminal`.
- #207 — `defaults.excludeReviewRepos` filters repos from the review board, badge counts, and notifications. Wildcards supported.
- #210 — Bulk delete for sessions in the sidebar.
- #212 — Multi-select + batch Start Review on the review board.
- #220 — Filtering for the tickets list.
- #226 — Per-section select all and icon-only cancel button in selection mode.
- #231 — Quick action buttons on the session detail header.

### Terminal Runtime

- #159 — Fix diagonal window resize and content-driven window growth.
- #161 — Fix batch "Work on" sending a malformed `/crow-batch-workspace` line.
- #218 — Recover from failed Ghostty surface creation by retrying.
- #229 — New tmux backend behind the `CROW_TMUX_BACKEND` feature flag (or Settings → Experimental). Off by default; opt in for a headless-PTY runtime that decouples terminal lifecycle from view rendering.

### GitLab

- #215 — Fix GitLab fetch failing when `GITLAB_HOST` did not match the workspace host; reconcile now silently skips GitLab candidates whose host can't be determined.
- #233 — Fix `glab` fetch failures from a non-repo cwd and slug truncation on nested groups (`big-bang/product/packages/elasticsearch-kibana` is no longer truncated to `big-bang/product`).

### Tooling & Misc

- #152 — Replace dock icon with the Corveil Brandmark.
- #155 — Docs refresh: README, `make build` promotion, GitHub project scope wording.
- #162 — Silence noisy console logs from Ghostty and IssueTracker.
- #172 — Log `gh` stderr on IssueTracker shell failures.
- #175 — Consolidate IssueTracker `gh` calls into a single GraphQL query.
- #176 — Open-source readiness: license, code of conduct, CI, doc cleanup.
- #178 — CI warms the Ghostty cache on `main` so PRs share it.
- #180 — Fix IssueTracker duplicate-key crash on PR status refresh.
- #185 — Replace the Corveil Brandmark PNG with an SVG for crisper rendering.
- #208 — Ignore subagent hook events fired after a turn's `Stop` so the sidebar dot doesn't get stuck "working".
- #234 — `crow hook-event` is a silent no-op when the Crow app is not running, so non-Crow `claude` sessions don't log noise.

## [0.1.0] - 2025-04-05

Initial open-source release of Crow.
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ On first launch, a setup wizard guides you through choosing your development roo
- [**CLI Reference**](docs/cli-reference.md) — Every `crow` subcommand and its flags
- [**Architecture**](docs/architecture.md) — Packages, key components, data flow
- [**Configuration**](docs/configuration.md) — File locations, workspace config, directory layout, session lifecycle
- [**Automation**](docs/automation.md) — Auto-create, auto-respond, auto-complete, and the Settings → Automation tab
- [**Troubleshooting**](docs/troubleshooting.md) — Build and runtime errors

## Usage

### The Sidebar

- **Tickets** — Assigned issues grouped by project board status (Backlog, Ready, In Progress, In Review, Done in last 24h). Click a status to filter.
- **Manager** — A persistent Claude Code terminal for orchestrating work. Use `/crow-workspace` here to create new sessions. Launches in `--permission-mode auto` by default so orchestration commands (`crow`, `gh`, `git`) run without per-call approval; opt out via Settings → General → Manager Terminal.
- **Manager** — A persistent Claude Code terminal for orchestrating work. Use `/crow-workspace` here to create new sessions. Launches in `--permission-mode auto` by default so orchestration commands (`crow`, `gh`, `git`) run without per-call approval; opt out via Settings → Automation → Manager Terminal.
- **Active Sessions** — One per work context. Shows repo, branch, issue/PR badges with pipeline and review status.
- **Completed Sessions** — Sessions whose PRs have been merged or issues closed.

Expand Down Expand Up @@ -113,6 +114,31 @@ This will:

- Sessions automatically move to "Completed" when their linked PR is merged or issue is closed
- Checked every 60 seconds during the issue polling cycle
- Requires positive evidence the session was worked, so an unrelated PR merge can't flip an idle session

### Automation Suite

Crow can drive a ticket from assignment to merged with minimal manual steps. Toggles live under **Settings → Automation**; full walkthrough in [docs/automation.md](docs/automation.md).

- **Auto-create workspace** when an issue assigned to you is labeled `crow:auto`
- **Auto-label PRs** opened from a Crow session with `crow:auto`
- **Auto-suggest opening a PR** if a session completes with no PR linked
- **Auto-start review sessions** for opted-in workspaces when a PR becomes reviewable
- **Auto-respond** to changes-requested reviews and failed CI checks (off by default)

### Review Board

- Multi-select with batch Start Review
- Bulk delete sessions
- Filter projects out via `excludeReviewRepos`
- Quick action buttons on the session detail header (open PR, mark in review, copy branch)
- Move completed sessions back to active

### Terminals

- Rename tabs from the UI or via `crow rename-terminal`
- Default Ghostty backend with GPU-accelerated rendering
- Opt-in tmux backend (experimental) behind `CROW_TMUX_BACKEND` or Settings → Experimental — see [docs/architecture.md#terminal-backends](docs/architecture.md#terminal-backends)

### Orphan Recovery

Expand Down
44 changes: 44 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ There are two `CrowCLI` directories:
| **IssueTracker** | `Sources/Crow/App/IssueTracker.swift` | Polls GitHub/GitLab every 60 seconds for assigned issues, PR status, project board status, auto-completes merged sessions |
| **Scaffolder** | `Sources/Crow/App/Scaffolder.swift` | First-run devRoot scaffold: `.claude/` + bundled skills + settings.json |
| **TerminalManager** | `Packages/CrowTerminal/.../TerminalManager.swift` | Manages Ghostty `ghostty_surface_t` lifecycle; emits state transitions consumed by `TerminalReadiness` |
| **TmuxBackend** | `Packages/CrowTerminal/.../TmuxBackend.swift` | Headless-PTY backend introduced in #229; opt-in via `CROW_TMUX_BACKEND` or Settings → Experimental |
| **TerminalRouter** | `Sources/Crow/App/TerminalRouter.swift` | Per-terminal dispatch — routes `send` / `destroy` / `trackReadiness` to either Ghostty or tmux based on `SessionTerminal.backend` |
| **AutoRespondCoordinator**| `Sources/Crow/App/AutoRespondCoordinator.swift` | Watches PR review / CI signals and types follow-up instructions into the linked Claude Code terminal (#214) |
| **TerminalReadiness** | `Packages/CrowCore/Sources/CrowCore/Models/Enums.swift:41` | Four-state enum (uninitialized → surfaceCreated → shellReady → claudeLaunched) driving the sidebar status dot |
| **SocketServer** | `Packages/CrowIPC/` | Unix socket server at `~/.local/share/crow/crow.sock` — receives JSON-RPC commands from the `crow` CLI |
| **CrowCommand** | `Packages/CrowCLI/.../CrowCommand.swift` | ArgumentParser root command registering every subcommand |
Expand Down Expand Up @@ -103,3 +106,44 @@ See `Sources/Crow/App/IssueTracker.swift:636-774` for the full `markInReview` im
## Why Ghostty?

Crow embeds [Ghostty](https://ghostty.org) as a terminal emulator via a compiled `libghostty` XCFramework. Ghostty gives each session tab a real GPU-accelerated terminal surface with the same behavior as the standalone Ghostty app, and its C API exposes the `ghostty_surface_t` lifecycle so Crow can track when the shell is ready and auto-launch `claude --continue`. The framework is built from the vendored submodule by `scripts/build-ghostty.sh` (invoked by `make ghostty`).

## Terminal Backends

PR #229 introduced a second backend behind the `CROW_TMUX_BACKEND` feature flag. Crow now supports two terminal runtimes side-by-side:

- **Ghostty (default)** — per-tab `ghostty_surface_t` driven by `TerminalManager`. Each session terminal owns a real `NSView` with GPU-accelerated rendering. This is the original path and remains the default for everyone who has not opted in.
- **tmux (opt-in)** — headless PTY plus a tmux server, driven by `TmuxBackend`. Each session terminal corresponds to a tmux window; rendering is decoupled from the surface so terminals can spin up before any view is materialized. Opt in via either:
- Environment variable `CROW_TMUX_BACKEND=1` (or `true`/`yes`/`on`).
- **Settings → Experimental → Use tmux for managed terminals** (persists in `AppConfig.experimentalTmuxBackend`).
- The two sources are OR-merged. Toggle is decided once at app launch by `FeatureFlags.tmuxBackend` and frozen for the process lifetime — flipping the toggle in Settings requires a relaunch.

Per-terminal dispatch happens in `Sources/Crow/App/TerminalRouter.swift`. Each `SessionTerminal` carries a `backend: .ghostty | .tmux` discriminator captured at create time, and `TerminalRouter.send` / `destroy` / `trackReadiness` switch on it. This keeps the rest of the app backend-agnostic.

The tmux backend requires `tmux ≥ 3.3` on `PATH` (typical Homebrew install). If the flag is on but tmux is missing or too old, Crow surfaces an alert at launch with a `brew install tmux` hint and silently falls back to Ghostty for the session.

The original motivation and full alternative analysis are in [terminal-runtime-research.md](terminal-runtime-research.md).

## Settings

PR #228 split Settings into discrete tabs. Each tab maps to a SwiftUI view in `Packages/CrowUI/Sources/CrowUI/`:

- **General** — devRoot, sidebar density, notifications, sounds.
- **Workspaces** — per-workspace provider, host, branch prefix, and per-workspace auto-review opt-in (#209).
- **Automation** — every automation toggle in one place. See [automation.md](automation.md) for a per-toggle walkthrough. Source: `AutomationSettingsView.swift`.
- **Experimental** — feature flags including the tmux backend toggle.

Tab state is persisted in `{devRoot}/.claude/config.json` via `CrowPersistence`.

## Review Board

The review board is the surface for triaging PRs that have been queued for AI review. Recent PRs added these capabilities:

- **Exclude list** (#207) — repos in `defaults.excludeReviewRepos` are filtered from the board, badge counts, and notifications. Wildcards supported.
- **Auto-start** (#209) — per-workspace toggle that auto-creates a review session when a PR becomes reviewable.
- **PR link reconciliation** (#205) — sessions whose hook events missed a PR open are reconciled against `gh pr list` on the next polling cycle so the session detail surface still shows the correct PR.
- **Bulk delete** (#210) — sidebar selection mode that lets you remove multiple sessions at once.
- **Multi-select + batch Start Review** (#212) — review-board selection mode for kicking off several reviews in one click.
- **Filtering** (#220) — inline filter on the tickets list, mirrored across the review board.
- **Per-section select all + icon-only cancel** (#226) — UX polish on selection mode.
- **Quick action buttons on session detail header** (#231) — surface the most-used session actions (open PR, mark in review, copy branch) directly on the detail view.
- **Move to Active** (#188) — return a completed session to active without deleting it.
Loading
Loading