@in-the-loop-labs/pair-review 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -13
- package/package.json +6 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
- package/plugin-pair-loop/.claude-plugin/plugin.json +1 -1
- package/plugin-pair-loop/skills/loop/SKILL.md +17 -8
- package/public/css/ai-summary-modal.css +1 -1
- package/public/css/analysis-config.css +33 -49
- package/public/css/council-card.css +118 -0
- package/public/css/council-dropdown.css +164 -0
- package/public/css/pr.css +666 -394
- package/public/css/repo-settings.css +15 -305
- package/public/css/settings.css +1141 -0
- package/public/css/snippet-manager.css +233 -0
- package/public/index.html +40 -59
- package/public/js/components/AIPanel.js +82 -16
- package/public/js/components/ChatPanel.js +401 -5
- package/public/js/components/CouncilCard.js +202 -0
- package/public/js/components/CouncilDropdown.js +292 -0
- package/public/js/components/DiffOptionsDropdown.js +177 -4
- package/public/js/components/SnippetManager.js +463 -0
- package/public/js/index.js +7 -30
- package/public/js/local.js +20 -2
- package/public/js/modules/comment-manager.js +8 -1
- package/public/js/modules/comment-minimizer.js +249 -190
- package/public/js/modules/external-comment-manager.js +414 -48
- package/public/js/modules/file-comment-manager.js +28 -21
- package/public/js/modules/hunk-summary-renderer.js +155 -29
- package/public/js/modules/pierre-bridge.js +2513 -0
- package/public/js/modules/pierre-context.js +345 -0
- package/public/js/modules/suggestion-manager.js +176 -20
- package/public/js/modules/tour-renderer.js +400 -184
- package/public/js/pr.js +1434 -150
- package/public/js/repo-settings.js +60 -284
- package/public/js/settings.js +1086 -0
- package/public/js/theme-bootstrap.js +40 -0
- package/public/js/theme.js +247 -0
- package/public/js/utils/provider-model.js +3 -3
- package/public/js/utils/suggestion-ui.js +157 -8
- package/public/local.html +20 -31
- package/public/pr.html +14 -23
- package/public/repo-settings.html +24 -14
- package/public/settings.html +138 -0
- package/public/setup.html +8 -13
- package/src/ai/codex-provider.js +59 -11
- package/src/chat/api-reference.js +9 -5
- package/src/chat/prompt-builder.js +8 -1
- package/src/config.js +15 -6
- package/src/database.js +307 -14
- package/src/external/github-adapter.js +39 -5
- package/src/headless/delegate.js +682 -0
- package/src/local-review.js +10 -10
- package/src/local-scope.js +9 -0
- package/src/main.js +276 -157
- package/src/mcp-stdio.js +24 -1
- package/src/review-config.js +93 -25
- package/src/routes/chat.js +2 -2
- package/src/routes/config.js +12 -10
- package/src/routes/external-comments.js +5 -1
- package/src/routes/local.js +2 -4
- package/src/routes/mcp.js +18 -13
- package/src/routes/reviews.js +223 -4
- package/src/routes/settings.js +252 -0
- package/src/routes/setup.js +80 -1
- package/src/routes/shared.js +31 -29
- package/src/routes/snippets.js +154 -0
- package/src/routes/stack-analysis.js +17 -14
- package/src/server.js +86 -18
- package/src/settings/global-settings-service.js +472 -0
- package/src/settings/registry.js +624 -0
- package/src/utils/db-identity.js +44 -0
package/README.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
- [Local review scope](#local-review-scope)
|
|
24
24
|
- [Headless analysis mode](#headless-analysis-mode)
|
|
25
25
|
- [Configuration](#configuration)
|
|
26
|
+
- [Global Settings Page](#global-settings-page)
|
|
26
27
|
- [Environment Variables](#environment-variables)
|
|
27
28
|
- [GitHub Token](#github-token)
|
|
28
29
|
- [AI Provider Configuration](#ai-provider-configuration)
|
|
@@ -144,7 +145,7 @@ pair-review <PR-number-or-URL>
|
|
|
144
145
|
Either way, pair-review will:
|
|
145
146
|
1. Check out the PR branch locally (using git worktrees)
|
|
146
147
|
2. Open the web UI in your browser
|
|
147
|
-
3. Show you a familiar diff view
|
|
148
|
+
3. Show you a familiar diff view (unified or split/side-by-side, switchable from the diff options menu)
|
|
148
149
|
|
|
149
150
|
> **Note:** The examples below use the shorter `pair-review` command. If you're using npx without a global install, substitute `npx @in-the-loop-labs/pair-review` instead.
|
|
150
151
|
|
|
@@ -195,8 +196,10 @@ pair-review --local [path]
|
|
|
195
196
|
| `<PR-URL>` | Full GitHub PR URL (e.g., `https://github.com/owner/repo/pull/123`) |
|
|
196
197
|
| `--ai` | Automatically run AI analysis when the review loads |
|
|
197
198
|
| `--ai-draft` | Run AI analysis and save suggestions as a draft review on GitHub |
|
|
198
|
-
| `--headless` | Run AI analysis, store it in the local database, report the results, then exit. No
|
|
199
|
+
| `--headless` | Run AI analysis, store it in the local database, report the results, then exit. No browser, no GitHub post. Implies analysis (does not require `--ai`). Works with a `<PR-number-or-URL>` or with `--local`. If a compatible pair-review server is already running, the analysis is delegated to it so the web UI shows live progress (the CLI still waits and prints the same result). See [Headless analysis mode](#headless-analysis-mode). |
|
|
199
200
|
| `--json` | With `--headless`, emit the completed run plus its consolidated suggestions as a single JSON document on a clean stdout. For any outcome of the headless run (success, zero findings, or an error raised while running it), stdout carries a JSON document with an `ok` field; failures emit an `{ "ok": false, "error": … }` envelope on stdout with a non-zero exit. (Pre-flight config/startup failures are the exception: they exit non-zero with a stderr message and no JSON envelope — branch on the exit code first.) stderr is quiet by default (only warnings/errors) — add `--debug` for verbose progress logs. Only valid together with `--headless`. |
|
|
201
|
+
| `--no-server` | (Headless mode) Always run the analysis in-process, even when a compatible pair-review server is running — skips the delegation probe. Use for a fully isolated run with no live UI. Mutually exclusive with `--require-server`. |
|
|
202
|
+
| `--require-server` | (Headless mode) Require delegation to a compatible running server (so the web UI shows live progress). If none is available, fail fast (exit `1`, `{ "ok": false }` under `--json`) instead of falling back to in-process. Mutually exclusive with `--no-server`. |
|
|
200
203
|
| `--instructions <text>` | Per-run custom instructions for this analysis. Applies to any mode that runs analysis — `--headless`, `--ai-draft`, `--ai-review` (consumed directly), and `--ai`/`--council` (carried into the browser-triggered analysis). Rejected with a clear error if no analysis mode is selected, so it is never silently dropped. Default: none. |
|
|
201
204
|
| `--instructions-file <path>` | Read per-run custom instructions from a file (5000-character cap). Mutually exclusive with `--instructions`. |
|
|
202
205
|
| `--council <handle>` | Run analysis with a saved multi-voice council. Implies analysis. The handle resolves by council name, name-slug, id (prefix), or a partial name fragment (resolving when it matches a single council, otherwise listing the candidates). When set, `--model` is ignored (council voices use their own per-voice models). Works in headless PR (`--ai-draft`/`--ai-review`/`--headless`), interactive PR (`--ai`), and local (`--local --ai`) modes. |
|
|
@@ -289,8 +292,8 @@ pair-review --local --scope branch..untracked --base develop
|
|
|
289
292
|
|
|
290
293
|
`--headless` runs an AI analysis (single provider or council), stores the results
|
|
291
294
|
in the local SQLite database exactly as the web UI does, reports them, and exits.
|
|
292
|
-
It never
|
|
293
|
-
|
|
295
|
+
It never opens a browser or posts to GitHub — it is the analysis core without the
|
|
296
|
+
interactive or submit steps.
|
|
294
297
|
|
|
295
298
|
```bash
|
|
296
299
|
# Analyze uncommitted local changes, print a human-readable summary
|
|
@@ -304,6 +307,46 @@ pair-review --local --headless --council security-review \
|
|
|
304
307
|
--instructions "Focus on auth and input validation."
|
|
305
308
|
```
|
|
306
309
|
|
|
310
|
+
**Live progress when a server is running (delegation).** If a compatible
|
|
311
|
+
pair-review server is already running on the configured port (same version, same
|
|
312
|
+
database), `--headless` hands the analysis *execution* to that server instead of
|
|
313
|
+
running it in-process. The server runs the exact same analysis, so its open web
|
|
314
|
+
UI shows the live council dialog updating in real time — while the CLI waits for
|
|
315
|
+
completion and then prints the identical result (same summary, byte-identical
|
|
316
|
+
`--json` document read from the shared database). This is what lets a `pair-loop`
|
|
317
|
+
run, or any `--headless` invocation, be watched live in the browser.
|
|
318
|
+
|
|
319
|
+
"Compatible" is strict: the server must report the same package version and
|
|
320
|
+
resolve the same SQLite database file as the CLI. Anything else — no server, a
|
|
321
|
+
version mismatch, or a different database — runs in-process as before. Two flags
|
|
322
|
+
tune the behavior:
|
|
323
|
+
|
|
324
|
+
- `--no-server` — always run in-process, even when a compatible server is
|
|
325
|
+
running (skip the delegation probe). Use for a fully isolated run with no live
|
|
326
|
+
UI.
|
|
327
|
+
- `--require-server` — require delegation to a compatible server. If none is
|
|
328
|
+
available, fail fast (exit `1`, with an `{ "ok": false, … }` envelope under
|
|
329
|
+
`--json`) instead of falling back to in-process.
|
|
330
|
+
|
|
331
|
+
The two flags are mutually exclusive and apply only to `--headless`. Delegation
|
|
332
|
+
is not available for MCP-stdio servers, which run on auto-selected ports with no
|
|
333
|
+
discovery — only the server on the configured `port` is delegable. During a
|
|
334
|
+
delegated run, `Ctrl-C` best-effort cancels the analysis on the server before the
|
|
335
|
+
CLI exits.
|
|
336
|
+
|
|
337
|
+
Delegation also skips (and the run stays in-process, with a stderr note) when
|
|
338
|
+
`--use-checkout` or `--yolo` is set: those flags act on the CLI's own process
|
|
339
|
+
(the current checkout, and this process's provider permissions), which a
|
|
340
|
+
separate server cannot honor.
|
|
341
|
+
|
|
342
|
+
One known limitation: configuration is loaded once at startup, so a delegated
|
|
343
|
+
run uses the *server's* startup config for global instructions, while an
|
|
344
|
+
in-process run reads the config fresh. Global instructions come from
|
|
345
|
+
`~/.pair-review/global-instructions.md` (loaded into `config.globalInstructions`
|
|
346
|
+
at startup), not a key in `config.json`. If you edit that file while a server is
|
|
347
|
+
running, restart the server (or pass `--no-server`) for the change to take
|
|
348
|
+
effect on delegated runs.
|
|
349
|
+
|
|
307
350
|
**Exit codes:** a successful analysis exits `0` regardless of how many findings it
|
|
308
351
|
surfaces (zero findings is still success, with an empty `suggestions` array).
|
|
309
352
|
Non-zero exit is reserved for operational errors — invalid flags, an unreadable
|
|
@@ -441,6 +484,8 @@ Configuration is stored in `~/.pair-review/config.json`:
|
|
|
441
484
|
}
|
|
442
485
|
```
|
|
443
486
|
|
|
487
|
+
The `theme` option accepts `"light"`, `"dark"`, or `"system"` (follow the OS light/dark setting). The header toggle button cycles through all three per session — the `"system"` choice keeps the UI in step with your OS appearance as it changes. Until you pick a theme with the toggle, the UI follows your OS light/dark setting by default.
|
|
488
|
+
|
|
444
489
|
On first run, pair-review creates `~/.pair-review/config.example.json` with comprehensive examples of all available options, including custom provider and model configurations. Use this as a reference when customizing your setup.
|
|
445
490
|
|
|
446
491
|
For advanced configuration with custom providers and models, see [AI Provider Configuration](#ai-provider-configuration) below.
|
|
@@ -470,6 +515,31 @@ Nested objects (like `chat`, `providers`, `chat_providers`, `monorepos`) are dee
|
|
|
470
515
|
|
|
471
516
|
**`config.local.json`** files are intended for personal overrides that should not be committed to version control. Add `config.local.json` to your `.gitignore`.
|
|
472
517
|
|
|
518
|
+
### Global Settings Page
|
|
519
|
+
|
|
520
|
+
Most global settings can also be viewed and edited in the app: open the gear icon on the landing page or navigate to `/settings`. Repo-specific settings remain on each repository's settings page, and the global settings page lists every configured repository with a link to its settings.
|
|
521
|
+
|
|
522
|
+
- **Effective value + source**: every setting shows its current effective value and where it came from — `in-app`, `env`, one of the config files, or `default`. A `default` badge means the setting was never explicitly set anywhere.
|
|
523
|
+
- **Persistence**: in-app edits are stored in pair-review's local database (`~/.pair-review/database.db`), never written back to your config files.
|
|
524
|
+
- **Precedence**: in-app settings > environment variables > `.pair-review/config.local.json` (project) > `.pair-review/config.json` (project) > `~/.pair-review/config.local.json` > `~/.pair-review/config.json` > built-in defaults. Repo-scoped settings and explicit per-run CLI flags still take precedence over global settings.
|
|
525
|
+
- **Reset**: a per-setting Reset button removes the in-app override, falling back to whatever the config files or defaults provide.
|
|
526
|
+
- **Immediate vs. restart**: most settings take effect immediately; a few (marked in the UI, e.g. retention windows and debug flags) apply on next start. Bootstrap values such as `port`, `db_name`, and tokens are shown read-only with their source.
|
|
527
|
+
- **Default for Analysis**: under **AI Defaults**, the **Default for Analysis** control is a single choice — either your Default Provider/Model pair (the rows below it) *or* a saved Review Council, picked from the same rich dropdown used on the repository settings page (it shows each council's name and Standard/Advanced type). When a council is selected, a composition preview beneath the dropdown shows its reviewers/models, levels, and consolidation — just like the repository settings page — while the base option shows a short hint that analysis uses the Provider/Model rows. A global default council is used wherever a repository has not chosen its own default council, and it outranks the global provider/model default. Precedence for analysis: explicit `--council`/`--provider`/`--model` per run › repo default council › **global default council** › repo default provider/model › global default provider/model. Note that single-model paths — hunk summaries, tours, and the MCP `start_analysis` tool — deliberately ignore councils, so a global default council does **not** change those (this matches how repo default councils behave).
|
|
528
|
+
|
|
529
|
+
Two config keys control the settings page itself:
|
|
530
|
+
|
|
531
|
+
- **Hiding settings** — `settings_ui.hidden`: an array of section ids (e.g. `"summaries"`, `"tours"`) and/or setting keys (e.g. `"tours.model"`) to hide from the page. Hiding is a display preference: it does not disable the feature (hiding the Summaries section does not turn summaries off). Because `settings_ui` merges like any other config key, a higher-precedence file can un-hide with `"settings_ui": { "hidden": [] }`.
|
|
532
|
+
|
|
533
|
+
```json
|
|
534
|
+
{ "settings_ui": { "hidden": ["summaries", "tours.model"] } }
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
- **Final settings** — `final`: an array of setting keys and/or section ids whose values are locked to what the config files declare. A final setting ignores in-app overrides *and* environment variables; the settings page shows it locked with a "final" badge. Unlike `hidden`, `final` declarations are unioned across all config files — a higher-precedence file cannot un-final a key; remove the declaration where it lives.
|
|
538
|
+
|
|
539
|
+
```json
|
|
540
|
+
{ "final": ["default_provider", "summaries.enabled"] }
|
|
541
|
+
```
|
|
542
|
+
|
|
473
543
|
### Alternate Git Hosts
|
|
474
544
|
|
|
475
545
|
pair-review can review pull requests on self-hosted Git platforms that expose a GitHub-compatible REST API, configured per-repository via `repos["owner/repo"].api_host` and related keys. By default an `api_host` repo is treated as living exclusively on the alt host; set `exclusive: false` on the repo entry to mark it as **dual-host**, where some PRs live on `github.com` and others on the alt host and pair-review resolves the host per PR. See [docs/alt-host.md](docs/alt-host.md) for the full configuration guide.
|
|
@@ -488,19 +558,16 @@ pair-review supports several environment variables for customizing behavior:
|
|
|
488
558
|
| `PAIR_REVIEW_OPENCODE_CMD` | Custom command to invoke OpenCode CLI | `opencode` |
|
|
489
559
|
| `PAIR_REVIEW_CURSOR_AGENT_CMD` | Custom command to invoke Cursor Agent CLI | `agent` |
|
|
490
560
|
| `PAIR_REVIEW_PI_CMD` | Custom command to invoke Pi CLI | `pi` |
|
|
491
|
-
| `PAIR_REVIEW_MODEL` | Override the AI model to use (same as `--model` flag) | Provider default |
|
|
492
|
-
| `PAIR_REVIEW_PROVIDER` | Override the AI provider to use (same as `--provider` flag) | `claude` |
|
|
493
561
|
|
|
494
562
|
**Note:** `GITHUB_TOKEN` is the standard environment variable used by many GitHub tools (gh CLI, GitHub Actions, etc.). When set, it takes precedence over the `github_token` field in the config file.
|
|
495
563
|
|
|
496
|
-
**Note:**
|
|
564
|
+
**Note:** Choose the AI provider and model with the `--provider` and `--model` CLI flags. There is no environment-variable equivalent (the provider/model env vars were removed in v5 — see the changeset for migration). The `--provider` flag selects which provider runs the analysis; `--model` selects the model within that provider, so set both when the model belongs to a non-default provider (e.g. `--provider codex --model gpt-5.5`). The flag override outranks saved repository settings (`CLI flag > repo settings`); if the repo's default is a Review Council, an active `--provider`/`--model` override forces the single-provider path instead. To set a persistent default without passing a flag every time, use the `default_provider` / `default_model` config keys or the repo/global [settings pages](#global-settings-page).
|
|
497
565
|
|
|
498
566
|
**Delegation caveat:** With single-port mode (the default `single_port: true`), a new invocation delegates to an already-running server. On that path the `--provider`/`--model` override is carried to the running server only alongside browser auto-analysis (`--ai`). Delegating without `--ai` (just opening the review) does not seed the override into the other process's manual analysis dialog — use `--ai`, or a headless mode, to pin the provider on the delegated path.
|
|
499
567
|
|
|
500
568
|
These variables are useful when:
|
|
501
569
|
- Your CLI tools are installed in a non-standard location
|
|
502
570
|
- You need to use a wrapper script or custom binary
|
|
503
|
-
- You want to force a specific model for all reviews
|
|
504
571
|
|
|
505
572
|
**Examples:**
|
|
506
573
|
|
|
@@ -517,14 +584,14 @@ PAIR_REVIEW_CLAUDE_CMD="devx claude" pair-review 123
|
|
|
517
584
|
# Use a custom path for the Antigravity CLI
|
|
518
585
|
PAIR_REVIEW_ANTIGRAVITY_CMD="/usr/local/bin/agy" pair-review --local
|
|
519
586
|
|
|
520
|
-
# Force a specific model for this review
|
|
521
|
-
|
|
587
|
+
# Force a specific model for this review (use the --model flag)
|
|
588
|
+
pair-review 123 --model opus
|
|
522
589
|
|
|
523
590
|
# Force a specific provider + model for a headless review
|
|
524
|
-
|
|
591
|
+
pair-review 123 --ai-draft --provider codex --model gpt-5.5
|
|
525
592
|
|
|
526
|
-
# Combine
|
|
527
|
-
PAIR_REVIEW_CLAUDE_CMD="/opt/claude/bin/claude"
|
|
593
|
+
# Combine a custom CLI path with a model flag
|
|
594
|
+
PAIR_REVIEW_CLAUDE_CMD="/opt/claude/bin/claude" pair-review 123 --model haiku
|
|
528
595
|
```
|
|
529
596
|
|
|
530
597
|
**Note:** Multi-word commands (containing spaces) are supported. The application automatically handles these by using shell mode for execution.
|
|
@@ -713,6 +780,7 @@ Chat with a full coding agent while you review — it can read the codebase, ans
|
|
|
713
780
|
- Create and edit review comments through chat
|
|
714
781
|
- Trigger new analysis runs with custom instructions
|
|
715
782
|
- Start conversations from context — an analysis run, an AI suggestion, a comment, any line or file
|
|
783
|
+
- Save reusable **prompt snippets** and insert them from a button in the chat input (Cmd/Ctrl+click to insert and send); Alt-click one of your sent messages to save it as a snippet; manage them from the chat popup or the [global settings page](#global-settings-page)
|
|
716
784
|
|
|
717
785
|
**Setup:**
|
|
718
786
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@in-the-loop-labs/pair-review",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Your AI-powered code review partner - Close the feedback loop with AI coding agents",
|
|
5
5
|
"main": "src/server.js",
|
|
6
6
|
"bin": {
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
"test:e2e": "playwright test",
|
|
33
33
|
"test:e2e:headed": "playwright test --headed",
|
|
34
34
|
"test:e2e:debug": "playwright test --debug",
|
|
35
|
+
"build:diffs": "node scripts/build-pierre-diffs.mjs",
|
|
36
|
+
"prepare": "node scripts/build-pierre-diffs.mjs",
|
|
35
37
|
"generate:skill-prompts": "node scripts/generate-skill-prompts.js",
|
|
36
38
|
"changeset": "changeset",
|
|
37
|
-
"version": "changeset version && pnpm install --lockfile-only && bash scripts/generate-package-lock.sh && node scripts/sync-plugin-versions.js && git add package.json pnpm-lock.yaml package-lock.json CHANGELOG.md .changeset .claude-plugin/marketplace.json plugin/.claude-plugin/plugin.json plugin-code-critic/.claude-plugin/plugin.json && git commit -m \"RELEASING: v$(node -p \"require('./package.json').version\")\"",
|
|
39
|
+
"version": "changeset version && pnpm install --lockfile-only && bash scripts/generate-package-lock.sh && node scripts/sync-plugin-versions.js && git add package.json pnpm-lock.yaml package-lock.json CHANGELOG.md .changeset .claude-plugin/marketplace.json plugin/.claude-plugin/plugin.json plugin-code-critic/.claude-plugin/plugin.json plugin-pair-loop/.claude-plugin/plugin.json && git commit -m \"RELEASING: v$(node -p \"require('./package.json').version\")\"",
|
|
38
40
|
"release": "npm whoami > /dev/null || { echo 'Error: Not logged in to npm. Run: npm login'; exit 1; } && pnpm run version && changeset tag && npm publish && git push && git push --tags"
|
|
39
41
|
},
|
|
40
42
|
"keywords": [
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"@agentclientprotocol/sdk": "^0.14.1",
|
|
66
68
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
67
69
|
"@octokit/rest": "^19.0.11",
|
|
70
|
+
"@pierre/diffs": "^1.1.3",
|
|
68
71
|
"better-sqlite3": "^12.11.1",
|
|
69
72
|
"express": "^4.18.2",
|
|
70
73
|
"glob": "^13.0.6",
|
|
@@ -81,6 +84,7 @@
|
|
|
81
84
|
"@changesets/cli": "^2.29.8",
|
|
82
85
|
"@playwright/test": "^1.57.0",
|
|
83
86
|
"@vitest/coverage-v8": "^4.0.16",
|
|
87
|
+
"esbuild": "^0.27.4",
|
|
84
88
|
"highlight.js": "^11.11.1",
|
|
85
89
|
"jsdom": "^29.0.1",
|
|
86
90
|
"supertest": "^7.1.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-review",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "pair-review app integration — Open PRs and local changes in the pair-review web UI, run server-side AI analysis, and address review feedback. Requires the pair-review MCP server.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pair-loop",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Agent-orchestrated review loop — implement, review with pair-review multi-model councils via the headless CLI, triage, fix, and repeat until a final review returns no blockers. MCP-independent.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "in-the-loop-labs",
|
|
@@ -162,18 +162,27 @@ curl -s -X POST http://localhost:<port>/api/reviews/<run.review_id>/suggestions/
|
|
|
162
162
|
|
|
163
163
|
- Only `"dismissed"` and `"active"` are accepted; `"adopted"` is reserved
|
|
164
164
|
for the human's adopt flow — never send it.
|
|
165
|
-
-
|
|
166
|
-
`
|
|
167
|
-
|
|
168
|
-
`
|
|
169
|
-
your round log
|
|
165
|
+
- Current servers accept a `reason` field on this endpoint — include it:
|
|
166
|
+
`"Fixed in loop round <n>: ..."` or `"Dismissed: <why>"`. Older servers
|
|
167
|
+
(still in the wild) ignore it; if you need to confirm support, check that
|
|
168
|
+
`http://localhost:<port>/api.md?reviewId=<reviewId>` documents `reason`.
|
|
169
|
+
When unsupported, the fixed-vs-rejected distinction lives in your round log
|
|
170
|
+
and final report.
|
|
170
171
|
- The human may be triaging in the same UI: before fixing, you may re-check
|
|
171
172
|
`GET /api/reviews/<reviewId>/suggestions` and skip findings whose status
|
|
172
173
|
is no longer `active` — the human got there first. Do not resurrect
|
|
173
174
|
anything the human dismissed.
|
|
174
|
-
- The review URL for your report:
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
- The review URL for your report is mode-dependent: local runs live at
|
|
176
|
+
`http://localhost:<port>/local/<reviewId>`; PR runs live at
|
|
177
|
+
`http://localhost:<port>/pr/<owner>/<repo>/<number>` (the PR you passed).
|
|
178
|
+
Use the one matching the current run — do not hard-code the `/local/` form
|
|
179
|
+
for a PR loop.
|
|
180
|
+
When a compatible pair-review server is already running (same version, same
|
|
181
|
+
database) on `<port>`, a `--headless` round delegates execution to it, so
|
|
182
|
+
that open UI shows the council dialog updating **live** as the round runs —
|
|
183
|
+
point the human there. The liveness gap remains only with no server, with
|
|
184
|
+
`--no-server`, or with an incompatible (version/database-mismatched) server;
|
|
185
|
+
in those cases results appear on refresh once the round finishes.
|
|
177
186
|
|
|
178
187
|
No server → skip this entirely; triage lives in the round log and final
|
|
179
188
|
report, and the persisted run history is visible whenever the user next
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
justify-content: space-between;
|
|
57
57
|
padding: 24px 24px 16px 24px;
|
|
58
58
|
border-bottom: 1px solid var(--ai-border, rgba(217, 119, 6, 0.3));
|
|
59
|
-
background:
|
|
59
|
+
background: var(--ai-subtle, rgba(217, 119, 6, 0.08));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.modal-header h3 {
|
|
@@ -316,9 +316,7 @@
|
|
|
316
316
|
align-items: center;
|
|
317
317
|
justify-content: space-between;
|
|
318
318
|
padding: 16px 20px;
|
|
319
|
-
background:
|
|
320
|
-
var(--color-bg-secondary) 0%,
|
|
321
|
-
var(--color-bg-tertiary) 100%);
|
|
319
|
+
background: var(--color-bg-secondary);
|
|
322
320
|
border-bottom: 1px solid var(--color-border-primary);
|
|
323
321
|
}
|
|
324
322
|
|
|
@@ -335,14 +333,8 @@
|
|
|
335
333
|
width: 40px;
|
|
336
334
|
height: 40px;
|
|
337
335
|
border-radius: 10px;
|
|
338
|
-
background:
|
|
336
|
+
background: var(--ai-accent-flat, #d97706);
|
|
339
337
|
color: white;
|
|
340
|
-
box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
[data-theme="dark"] .header-icon {
|
|
344
|
-
background: linear-gradient(135deg, var(--color-accent-ai) 0%, var(--color-accent-ai-dark) 100%);
|
|
345
|
-
box-shadow: 0 2px 12px rgba(251, 191, 36, 0.25);
|
|
346
338
|
}
|
|
347
339
|
|
|
348
340
|
.analysis-config-header h3 {
|
|
@@ -442,7 +434,11 @@
|
|
|
442
434
|
font-weight: 500;
|
|
443
435
|
border-radius: 10px;
|
|
444
436
|
cursor: pointer;
|
|
445
|
-
transition:
|
|
437
|
+
transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
438
|
+
background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
439
|
+
color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
440
|
+
transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
441
|
+
box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
446
442
|
white-space: nowrap;
|
|
447
443
|
}
|
|
448
444
|
|
|
@@ -458,18 +454,14 @@
|
|
|
458
454
|
border-color: var(--color-accent-ai-dark);
|
|
459
455
|
background: rgba(245, 158, 11, 0.08);
|
|
460
456
|
color: var(--color-text-primary);
|
|
461
|
-
box-shadow:
|
|
462
|
-
0 0 0 3px rgba(245, 158, 11, 0.15),
|
|
463
|
-
0 4px 12px rgba(245, 158, 11, 0.1);
|
|
457
|
+
box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
|
|
464
458
|
}
|
|
465
459
|
|
|
466
460
|
[data-theme="dark"] .provider-btn.selected {
|
|
467
461
|
background: rgba(251, 191, 36, 0.1);
|
|
468
462
|
border-color: var(--color-accent-ai);
|
|
469
463
|
color: #fbbf24;
|
|
470
|
-
box-shadow:
|
|
471
|
-
0 0 0 3px rgba(251, 191, 36, 0.15),
|
|
472
|
-
0 4px 12px rgba(251, 191, 36, 0.08);
|
|
464
|
+
box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
|
|
473
465
|
}
|
|
474
466
|
|
|
475
467
|
/* No providers available message */
|
|
@@ -494,7 +486,7 @@
|
|
|
494
486
|
color: var(--color-text-tertiary);
|
|
495
487
|
border-radius: 4px;
|
|
496
488
|
cursor: pointer;
|
|
497
|
-
transition:
|
|
489
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
498
490
|
}
|
|
499
491
|
|
|
500
492
|
.provider-refresh-btn:hover {
|
|
@@ -538,7 +530,10 @@
|
|
|
538
530
|
border: 2px solid var(--color-border-primary);
|
|
539
531
|
border-radius: 10px;
|
|
540
532
|
cursor: pointer;
|
|
541
|
-
transition:
|
|
533
|
+
transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
534
|
+
background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
535
|
+
transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
|
|
536
|
+
box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
|
542
537
|
text-align: center;
|
|
543
538
|
aspect-ratio: 1.618 / 1;
|
|
544
539
|
overflow: hidden;
|
|
@@ -555,17 +550,13 @@
|
|
|
555
550
|
.model-card.selected {
|
|
556
551
|
border-color: var(--color-accent-ai-dark);
|
|
557
552
|
background: rgba(245, 158, 11, 0.08);
|
|
558
|
-
box-shadow:
|
|
559
|
-
0 0 0 3px rgba(245, 158, 11, 0.15),
|
|
560
|
-
0 4px 12px rgba(245, 158, 11, 0.1);
|
|
553
|
+
box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
|
|
561
554
|
}
|
|
562
555
|
|
|
563
556
|
[data-theme="dark"] .model-card.selected {
|
|
564
557
|
background: rgba(251, 191, 36, 0.1);
|
|
565
558
|
border-color: var(--color-accent-ai);
|
|
566
|
-
box-shadow:
|
|
567
|
-
0 0 0 3px rgba(251, 191, 36, 0.15),
|
|
568
|
-
0 4px 12px rgba(251, 191, 36, 0.08);
|
|
559
|
+
box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
|
|
569
560
|
}
|
|
570
561
|
|
|
571
562
|
.model-badge {
|
|
@@ -582,27 +573,27 @@
|
|
|
582
573
|
}
|
|
583
574
|
|
|
584
575
|
.badge-speed {
|
|
585
|
-
background:
|
|
576
|
+
background: #0891b2;
|
|
586
577
|
color: white;
|
|
587
578
|
}
|
|
588
579
|
|
|
589
580
|
.badge-recommended {
|
|
590
|
-
background:
|
|
581
|
+
background: var(--color-accent-ai-dark);
|
|
591
582
|
color: white;
|
|
592
583
|
}
|
|
593
584
|
|
|
594
585
|
.badge-power {
|
|
595
|
-
background:
|
|
586
|
+
background: #7c3aed;
|
|
596
587
|
color: white;
|
|
597
588
|
}
|
|
598
589
|
|
|
599
590
|
.badge-premium {
|
|
600
|
-
background:
|
|
591
|
+
background: #db2777;
|
|
601
592
|
color: white;
|
|
602
593
|
}
|
|
603
594
|
|
|
604
595
|
.badge-balanced {
|
|
605
|
-
background:
|
|
596
|
+
background: var(--color-accent-ai-dark);
|
|
606
597
|
color: white;
|
|
607
598
|
}
|
|
608
599
|
|
|
@@ -650,7 +641,7 @@
|
|
|
650
641
|
color: white;
|
|
651
642
|
opacity: 0;
|
|
652
643
|
transform: scale(0.5);
|
|
653
|
-
transition:
|
|
644
|
+
transition: opacity 0.2s ease-out, transform 0.2s ease-out;
|
|
654
645
|
}
|
|
655
646
|
|
|
656
647
|
[data-theme="dark"] .model-selected-indicator {
|
|
@@ -698,7 +689,7 @@
|
|
|
698
689
|
height: 16px;
|
|
699
690
|
background: white;
|
|
700
691
|
border-radius: 50%;
|
|
701
|
-
transition: transform 0.2s
|
|
692
|
+
transition: transform 0.2s ease-out;
|
|
702
693
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
703
694
|
}
|
|
704
695
|
|
|
@@ -756,7 +747,7 @@
|
|
|
756
747
|
font-size: 13px;
|
|
757
748
|
color: var(--color-text-secondary);
|
|
758
749
|
cursor: pointer;
|
|
759
|
-
transition:
|
|
750
|
+
transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
|
|
760
751
|
user-select: none;
|
|
761
752
|
}
|
|
762
753
|
|
|
@@ -836,7 +827,7 @@
|
|
|
836
827
|
font-weight: 500;
|
|
837
828
|
color: var(--color-text-secondary);
|
|
838
829
|
cursor: pointer;
|
|
839
|
-
transition:
|
|
830
|
+
transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
|
|
840
831
|
}
|
|
841
832
|
|
|
842
833
|
.banner-toggle:hover {
|
|
@@ -877,7 +868,7 @@
|
|
|
877
868
|
border-radius: 4px;
|
|
878
869
|
color: var(--color-text-tertiary);
|
|
879
870
|
cursor: pointer;
|
|
880
|
-
transition:
|
|
871
|
+
transition: background-color var(--transition-fast), color var(--transition-fast);
|
|
881
872
|
}
|
|
882
873
|
|
|
883
874
|
.collapse-btn:hover {
|
|
@@ -973,14 +964,14 @@
|
|
|
973
964
|
|
|
974
965
|
/* Disabled submit button state */
|
|
975
966
|
.btn-analyze:disabled {
|
|
976
|
-
background:
|
|
967
|
+
background: #6b7280;
|
|
977
968
|
cursor: not-allowed;
|
|
978
969
|
box-shadow: none;
|
|
979
970
|
opacity: 0.7;
|
|
980
971
|
}
|
|
981
972
|
|
|
982
973
|
.btn-analyze:disabled:hover {
|
|
983
|
-
background:
|
|
974
|
+
background: #6b7280;
|
|
984
975
|
transform: none;
|
|
985
976
|
}
|
|
986
977
|
|
|
@@ -1041,21 +1032,19 @@
|
|
|
1041
1032
|
align-items: center;
|
|
1042
1033
|
gap: 8px;
|
|
1043
1034
|
padding: 10px 20px;
|
|
1044
|
-
background:
|
|
1035
|
+
background: var(--color-accent-ai-dark);
|
|
1045
1036
|
border: none;
|
|
1046
1037
|
border-radius: 8px;
|
|
1047
1038
|
font-size: 14px;
|
|
1048
1039
|
font-weight: 600;
|
|
1049
1040
|
color: white;
|
|
1050
1041
|
cursor: pointer;
|
|
1051
|
-
transition:
|
|
1052
|
-
box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
|
|
1042
|
+
transition: background-color 0.2s ease, transform 0.2s ease;
|
|
1053
1043
|
}
|
|
1054
1044
|
|
|
1055
1045
|
.btn-analyze:hover {
|
|
1056
|
-
background:
|
|
1046
|
+
background: var(--color-accent-ai);
|
|
1057
1047
|
transform: translateY(-1px);
|
|
1058
|
-
box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
|
|
1059
1048
|
}
|
|
1060
1049
|
|
|
1061
1050
|
.btn-analyze:active {
|
|
@@ -1063,13 +1052,8 @@
|
|
|
1063
1052
|
}
|
|
1064
1053
|
|
|
1065
1054
|
[data-theme="dark"] .btn-analyze {
|
|
1066
|
-
background:
|
|
1055
|
+
background: var(--color-accent-ai);
|
|
1067
1056
|
color: #1a1a1a;
|
|
1068
|
-
box-shadow: 0 2px 12px rgba(251, 191, 36, 0.25);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
[data-theme="dark"] .btn-analyze:hover {
|
|
1072
|
-
box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
|
|
1073
1057
|
}
|
|
1074
1058
|
|
|
1075
1059
|
/* Responsive */
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* Copyright 2026 Tim Perkins (tjwp) | SPDX-License-Identifier: Apache-2.0 */
|
|
2
|
+
/*
|
|
3
|
+
* Shared styles for the CouncilCard component (public/js/components/CouncilCard.js).
|
|
4
|
+
* The composition preview for a selected council: its reviewers/models, levels,
|
|
5
|
+
* and consolidation. Loaded by both the repo settings page and the global
|
|
6
|
+
* settings page. Extracted verbatim from repo-settings.css. The repo settings
|
|
7
|
+
* page adds a page-specific speech-bubble arrow (.council-card::before) on top
|
|
8
|
+
* of these base styles.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.council-card {
|
|
12
|
+
position: relative;
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
width: 190px;
|
|
15
|
+
padding: 14px 12px 12px;
|
|
16
|
+
background: var(--color-bg-primary);
|
|
17
|
+
border: 1px solid var(--color-border-primary);
|
|
18
|
+
border-radius: 10px;
|
|
19
|
+
box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-theme="dark"] .council-card {
|
|
23
|
+
box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.council-card-name {
|
|
27
|
+
font-size: 13px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
color: var(--color-text-primary);
|
|
30
|
+
margin-bottom: 2px;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.council-card-summary {
|
|
37
|
+
font-size: 11px;
|
|
38
|
+
color: var(--color-text-muted);
|
|
39
|
+
margin-bottom: 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.council-card-reviewers {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: 4px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.council-card-reviewer {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 5px;
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
color: var(--color-text-secondary);
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.council-card-reviewer-name {
|
|
60
|
+
flex: 1;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.council-card-tier {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
font-size: 10px;
|
|
69
|
+
color: var(--color-text-muted);
|
|
70
|
+
text-transform: capitalize;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.council-card-divider {
|
|
74
|
+
border: none;
|
|
75
|
+
border-top: 1px solid var(--color-border-primary);
|
|
76
|
+
margin: 8px 0 6px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.council-card-consolidation {
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
color: var(--color-text-secondary);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.council-card-consolidation-label {
|
|
85
|
+
font-size: 10px;
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
letter-spacing: 0.04em;
|
|
88
|
+
color: var(--color-text-muted);
|
|
89
|
+
margin-bottom: 3px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.council-card-level-header {
|
|
93
|
+
font-size: 10px;
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
letter-spacing: 0.04em;
|
|
96
|
+
color: var(--color-text-muted);
|
|
97
|
+
margin-top: 8px;
|
|
98
|
+
margin-bottom: 3px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.council-card-level-header:first-child {
|
|
102
|
+
margin-top: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.council-card-badge-advanced {
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
padding: 1px 6px;
|
|
108
|
+
font-size: 9px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
border-radius: 8px;
|
|
111
|
+
background: rgba(139, 92, 246, 0.12);
|
|
112
|
+
color: #7c3aed;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-theme="dark"] .council-card-badge-advanced {
|
|
116
|
+
background: rgba(139, 92, 246, 0.15);
|
|
117
|
+
color: #a78bfa;
|
|
118
|
+
}
|