@in-the-loop-labs/pair-review 5.3.4 → 5.3.6

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.
Files changed (59) hide show
  1. package/README.md +13 -1
  2. package/bin/git-diff-lines +2 -1
  3. package/package.json +1 -1
  4. package/plugin/.claude-plugin/plugin.json +1 -1
  5. package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
  6. package/plugin-code-critic/skills/analyze/scripts/git-diff-lines +104 -25
  7. package/plugin-pair-loop/.claude-plugin/plugin.json +1 -1
  8. package/public/css/pr.css +162 -46
  9. package/public/css/styles.css +0 -12
  10. package/public/js/components/AIPanel.js +3 -2
  11. package/public/js/components/AnalysisConfigModal.js +4 -1
  12. package/public/js/components/ChatPanel.js +39 -8
  13. package/public/js/components/PanelGroup.js +115 -21
  14. package/public/js/components/SuggestionNavigator.js +16 -3
  15. package/public/js/local.js +7 -12
  16. package/public/js/modules/diff-renderer.js +13 -0
  17. package/public/js/modules/file-comment-manager.js +19 -10
  18. package/public/js/modules/hunk-parser.js +39 -2
  19. package/public/js/modules/panel-resizer.js +41 -3
  20. package/public/js/modules/pierre-bridge.js +11 -2
  21. package/public/js/modules/suggestion-manager.js +128 -33
  22. package/public/js/pr.js +132 -29
  23. package/public/js/repo-settings.js +35 -19
  24. package/public/js/utils/git-paths.js +140 -0
  25. package/public/js/utils/smart-truncate.js +88 -0
  26. package/public/local.html +6 -0
  27. package/public/pr.html +6 -0
  28. package/src/ai/analyzer.js +15 -13
  29. package/src/ai/antigravity-provider.js +44 -24
  30. package/src/ai/cursor-agent-provider.js +4 -4
  31. package/src/ai/muse-provider.js +68 -3
  32. package/src/ai/summary-generator.js +8 -5
  33. package/src/chat/acp-bridge.js +26 -1
  34. package/src/chat/claude-code-bridge.js +10 -0
  35. package/src/chat/codex-bridge.js +10 -0
  36. package/src/chat/pi-bridge.js +10 -0
  37. package/src/chat/session-manager.js +333 -19
  38. package/src/config.js +40 -26
  39. package/src/git/diff-flags.js +26 -12
  40. package/src/git/worktree.js +21 -43
  41. package/src/github/client.js +0 -88
  42. package/src/github/impl/graphql/pending-review-comments.js +5 -1
  43. package/src/github/impl/host/pending-review-comments.js +75 -11
  44. package/src/github/submit-pr-context.js +56 -0
  45. package/src/local-review.js +34 -17
  46. package/src/main.js +80 -106
  47. package/src/routes/chat.js +44 -1
  48. package/src/routes/executable-analysis.js +14 -15
  49. package/src/routes/local.js +3 -5
  50. package/src/routes/pr.js +18 -105
  51. package/src/server.js +5 -3
  52. package/src/settings/registry.js +10 -0
  53. package/src/setup/pr-setup.js +1 -1
  54. package/src/setup/stack-setup.js +1 -1
  55. package/src/utils/diff-annotator.js +175 -25
  56. package/src/utils/diff-file-content.js +4 -26
  57. package/src/utils/diff-file-list.js +178 -42
  58. package/src/utils/git-paths.js +77 -0
  59. package/src/utils/paths.js +1 -25
package/README.md CHANGED
@@ -648,10 +648,14 @@ Most providers (Claude, Antigravity, Codex, Copilot, Muse) come with built-in mo
648
648
 
649
649
  ##### Muse models and the contributor tradeoff
650
650
 
651
- Muse exposes its built-in models as reasoning-effort variants over two underlying CLI models:
651
+ Muse exposes its built-in models as reasoning-effort variants over four underlying CLI models:
652
652
 
653
653
  | Model ID | Tier | CLI model |
654
654
  |----------|------|-----------|
655
+ | `muse-wonder-1.0-high` | thorough | `muse-wonder-1.0` |
656
+ | `muse-wonder-1.0-max` | thorough | `muse-wonder-1.0` |
657
+ | `muse-wonder-full-1.0-high` | thorough | `muse-wonder-full-1.0` |
658
+ | `muse-wonder-full-1.0-max` | thorough | `muse-wonder-full-1.0` |
655
659
  | `muse-spark-1.3-max` | thorough | `muse-spark-1.3` |
656
660
  | `muse-spark-1.3-contributor-max` | thorough | `muse-spark-1.3-contributor` |
657
661
  | `muse-spark-1.3-xhigh` | thorough | `muse-spark-1.3` |
@@ -661,6 +665,8 @@ Muse exposes its built-in models as reasoning-effort variants over two underlyin
661
665
  | `muse-spark-1.3-low` | fast | `muse-spark-1.3` |
662
666
  | `muse-spark-1.3-contributor-low` | fast | `muse-spark-1.3-contributor` |
663
667
 
668
+ Muse Wonder (released October 2026) is Meta's frontier model line. `muse-wonder-1.0` costs $4/M input and $20/M output, several times Muse Spark, so it sits in the thorough tier and is not the default. `muse-wonder-full-1.0` is the larger variant. It is available only with a Muse Code Power Usage or Maximum Usage subscription and is not served through the pay-as-you-go API; other accounts get a "does not exist or you lack access" error. Muse Code subscriptions turn contributor mode on by default, so every Wonder entry passes `--contributor-mode off` for the run. `muse-wonder-1.0`/`muse-wonder` and `muse-wonder-full-1.0`/`muse-wonder-full` are aliases for the matching `-high` entries.
669
+
664
670
  `muse-spark-1.3` and `muse-spark` are convenience aliases for `muse-spark-1.3-high`. `muse-spark-1.3-contributor` is likewise an alias for `muse-spark-1.3-contributor-high` — worth knowing because it is the bare CLI model name, so `--model muse-spark-1.3-contributor` selects the data-sharing tier described below rather than erroring out.
665
671
 
666
672
  Muse Spark 1.3 is priced identically to 1.2 and is strictly better, so every `muse-spark-1.2-*` id (including the bare `muse-spark-1.2` and `muse-spark-1.2-contributor`) is kept as an alias of its 1.3 twin at the same reasoning effort — saved councils and configs upgrade in place. The former `-ultra` ids resolve to the `-max` entries: `--reasoning-effort ultra` is behind a closed feature gate and silently runs at `xhigh`, whereas `max` actually runs.
@@ -860,6 +866,12 @@ Two `chat_providers.<id>` keys control this: `model` sets the default model for
860
866
 
861
867
  Available chat provider IDs: `pi`, `omp`, `claude`, `codex`, `copilot-acp`, `opencode-acp`, `cursor-acp`. Each supports `command`, `args` (replaces defaults; for `pi`, `omp` and `claude` there are no default args — supplied args are appended after the generated flags, so use a multi-word `command` like `"devx omp"` for wrappers rather than `args`), `extra_args` (appends), and `env` overrides, plus `model` and `models_from` (see **Choosing a model** above). Codex chat also supports `sandbox`: use `workspace-write` by default, or `read-only` for discussion-only sessions. (Antigravity and Muse are analysis-only providers — neither CLI has an ACP mode, so there are no Antigravity or Muse chat providers.)
862
868
 
869
+ **Idle chat agents:** A chat's agent process is shut down after `chat.idle_timeout_minutes` minutes without activity (default `10`; `0` disables), so closing the browser doesn't leave agents running. The conversation is kept and transparently resumed, with its history, on your next message. An agent is never shut down while it is starting or still working on a reply, and a conversation whose agent can't be resumed with its history (for example, an ACP agent without session-loading support) is kept running instead. A chat with no messages yet may be shut down either way — your first message then starts a fresh agent with the same context. Set it in the **Chat** section of the [global settings page](#global-settings-page) (applies on next start) or in config:
870
+
871
+ ```json
872
+ { "chat": { "idle_timeout_minutes": 30 } }
873
+ ```
874
+
863
875
  **Keyboard shortcut:** Press `p` then `c` to toggle the chat panel.
864
876
 
865
877
  ### Customization
@@ -17,6 +17,7 @@
17
17
 
18
18
  const { spawn } = require('child_process');
19
19
  const { annotateDiff } = require('../src/utils/diff-annotator');
20
+ const { GIT_PATH_CONFIG_ARRAY } = require('../src/git/diff-flags');
20
21
 
21
22
  /**
22
23
  * Print help text and exit
@@ -68,7 +69,7 @@ function executeGitDiff(args, cwd = null) {
68
69
  if (cwd) {
69
70
  spawnOptions.cwd = cwd;
70
71
  }
71
- const gitProcess = spawn('git', ['diff', '--no-ext-diff', ...args], spawnOptions);
72
+ const gitProcess = spawn('git', [...GIT_PATH_CONFIG_ARRAY, 'diff', '--no-ext-diff', ...args], spawnOptions);
72
73
 
73
74
  let stdout = '';
74
75
  let stderr = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in-the-loop-labs/pair-review",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
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": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pair-review",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
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": "code-critic",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
4
4
  "description": "AI-powered code review analysis — Run three-level AI analysis directly in your coding agent. Works standalone, no server required.",
5
5
  "author": {
6
6
  "name": "in-the-loop-labs",
@@ -84,7 +84,8 @@ GIT_CMD=(git)
84
84
  if [[ -n "$GIT_CWD" ]]; then
85
85
  GIT_CMD+=(-C "$GIT_CWD")
86
86
  fi
87
- GIT_CMD+=(diff --no-ext-diff)
87
+ # Print non-ASCII paths verbatim instead of octal-escaped and quoted
88
+ GIT_CMD+=(-c core.quotePath=false diff --no-ext-diff)
88
89
  # Guard: expanding an empty array with set -u fails in Bash < 4.4
89
90
  if [[ ${#GIT_ARGS[@]} -gt 0 ]]; then
90
91
  GIT_CMD+=("${GIT_ARGS[@]}")
@@ -106,8 +107,11 @@ if [[ -z "${RAW_DIFF}" ]]; then
106
107
  exit 0
107
108
  fi
108
109
 
109
- # Annotate the diff with awk
110
- echo "$RAW_DIFF" | awk '
110
+ # Annotate the diff with awk. LC_ALL=C gives byte semantics: a file name that
111
+ # is not valid UTF-8 reaches awk as raw bytes (core.quotePath=false), and BSD
112
+ # awk in a UTF-8 locale aborts on it ("towc: multibyte conversion failure").
113
+ # Every comparison below is against ASCII markers, so bytes are enough.
114
+ echo "$RAW_DIFF" | LC_ALL=C awk '
111
115
  # --- Helper functions ---
112
116
 
113
117
  # Return max of two integers
@@ -129,6 +133,84 @@ function fmt(num, width, s) {
129
133
  return sprintf("%" width "s", s)
130
134
  }
131
135
 
136
+ # Decode a C-quoted git path. With core.quotePath=false git still quotes a
137
+ # path containing a control character, `"` or `\` ("b/quo\"te.js"); only
138
+ # those ASCII bytes are escaped, so an octal escape is always below 0x80.
139
+ # An unquoted value is returned unchanged. Mirrors decodeGitPath in
140
+ # public/js/utils/git-paths.js (used by bin/git-diff-lines).
141
+ function unquote(s, out, i, c, n, d) {
142
+ if (length(s) < 2 || substr(s, 1, 1) != "\"" || substr(s, length(s), 1) != "\"") return s
143
+ s = substr(s, 2, length(s) - 2)
144
+ out = ""
145
+ for (i = 1; i <= length(s); i++) {
146
+ c = substr(s, i, 1)
147
+ if (c != "\\") { out = out c; continue }
148
+ i++
149
+ c = substr(s, i, 1)
150
+ if (c ~ /[0-7]/) {
151
+ n = 0
152
+ for (d = 0; d < 3 && substr(s, i, 1) ~ /[0-7]/; d++) {
153
+ n = n * 8 + substr(s, i, 1)
154
+ i++
155
+ }
156
+ i--
157
+ out = out sprintf("%c", n)
158
+ } else if (c == "a") out = out "\007"
159
+ else if (c == "b") out = out "\010"
160
+ else if (c == "t") out = out "\t"
161
+ else if (c == "n") out = out "\n"
162
+ else if (c == "v") out = out "\013"
163
+ else if (c == "f") out = out "\014"
164
+ else if (c == "r") out = out "\r"
165
+ else out = out c
166
+ }
167
+ return out
168
+ }
169
+
170
+ # Decode one path token and strip its "a/" or "b/" prefix
171
+ function strip_prefix(s, prefix) {
172
+ s = unquote(s)
173
+ if (substr(s, 1, length(prefix)) == prefix) s = substr(s, length(prefix) + 1)
174
+ return s
175
+ }
176
+
177
+ # Path from a "--- " / "+++ " line or a "rename from/to" line. Git ends a
178
+ # ---/+++ path containing a space with a tab; a tab inside a real name is
179
+ # always quoted, so one trailing raw tab is never part of the path.
180
+ # Returns "" for /dev/null.
181
+ function line_path(s, prefix) {
182
+ sub(/\t$/, "", s)
183
+ if (s == "/dev/null") return ""
184
+ return strip_prefix(s, prefix)
185
+ }
186
+
187
+ # Index of the space that separates the two paths of a "diff --git" header
188
+ # (text after "diff --git "), or 0 when there is none. Mirrors
189
+ # parseDiffGitPaths: either side may be quoted; an unquoted header for an
190
+ # unrenamed file ("a/X b/X") splits at its midpoint, so a name containing
191
+ # " b/" still parses; other unquoted headers split at the first " b/" and a
192
+ # rename is corrected by its "rename from/to" lines.
193
+ function header_split(rest, len, half, i, c) {
194
+ len = length(rest)
195
+ if (substr(rest, 1, 1) == "\"") {
196
+ for (i = 2; i <= len; i++) {
197
+ c = substr(rest, i, 1)
198
+ if (c == "\\") { i++; continue }
199
+ if (c == "\"") return (substr(rest, i + 1, 1) == " ") ? i + 1 : 0
200
+ }
201
+ return 0
202
+ }
203
+ i = index(rest, " \"b/")
204
+ if (i > 0 && substr(rest, len, 1) == "\"") return i
205
+ if ((len - 1) % 2 == 0) {
206
+ half = (len - 1) / 2
207
+ if (substr(rest, 1, 2) == "a/" && substr(rest, half + 1, 3) == " b/" && substr(rest, 3, half - 2) == substr(rest, half + 4)) {
208
+ return half + 1
209
+ }
210
+ }
211
+ return index(rest, " b/")
212
+ }
213
+
132
214
  BEGIN {
133
215
  old_line = 0
134
216
  new_line = 0
@@ -164,20 +246,12 @@ BEGIN {
164
246
  file_started = 1
165
247
  file_header_output = 0
166
248
 
167
- # Extract paths from "diff --git a/X b/Y"
168
- s = $0
169
- sub(/^diff --git a\//, "", s)
170
- # Split on " b/" - we need to find the right split point.
171
- # The b/ path is always at the end, and for identical names a/X b/X
172
- # we split at the midpoint. Use the last occurrence of " b/".
173
- n = split(s, parts, " b/")
174
- if (n >= 2) {
175
- old_path = parts[1]
176
- new_path = parts[n]
177
- # If there were multiple " b/" in the path, reconstruct
178
- for (i = 2; i < n; i++) {
179
- old_path = old_path " b/" parts[i]
180
- }
249
+ # Extract paths from "diff --git a/X b/Y" (either side may be quoted)
250
+ s = substr($0, length("diff --git ") + 1)
251
+ split_at = header_split(s)
252
+ if (split_at > 0) {
253
+ old_path = strip_prefix(substr(s, 1, split_at - 1), "a/")
254
+ new_path = strip_prefix(substr(s, split_at + 1), "b/")
181
255
  }
182
256
  next
183
257
  }
@@ -195,33 +269,38 @@ BEGIN {
195
269
  /^rename from / {
196
270
  s = $0
197
271
  sub(/^rename from /, "", s)
198
- renamed_from = s
272
+ renamed_from = line_path(s, "")
199
273
  next
200
274
  }
201
275
 
202
276
  /^rename to / {
203
277
  s = $0
204
278
  sub(/^rename to /, "", s)
205
- renamed_to = s
279
+ renamed_to = line_path(s, "")
206
280
  next
207
281
  }
208
282
 
209
283
  # --- and +++ headers ---
210
- /^--- / {
284
+ # Only outside a hunk body: inside one these prefixes are CONTENT (a deleted
285
+ # `-- x` line is emitted as `--- x`, an added `++ x` as `+++ x`) and must fall
286
+ # through to the deletion/addition rules below, or the path is overwritten and
287
+ # every later line number in the file shifts. `git diff` always opens a new
288
+ # file with `diff --git`, which resets in_hunk before the real headers arrive.
289
+ !in_hunk && /^--- / {
211
290
  s = $0
212
291
  sub(/^--- /, "", s)
213
- sub(/^a\//, "", s)
214
- if (s != "/dev/null") {
292
+ s = line_path(s, "a/")
293
+ if (s != "") {
215
294
  old_path = s
216
295
  }
217
296
  next
218
297
  }
219
298
 
220
- /^\+\+\+ / {
299
+ !in_hunk && /^\+\+\+ / {
221
300
  s = $0
222
301
  sub(/^\+\+\+ /, "", s)
223
- sub(/^b\//, "", s)
224
- if (s != "/dev/null") {
302
+ s = line_path(s, "b/")
303
+ if (s != "") {
225
304
  new_path = s
226
305
  }
227
306
  next
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pair-loop",
3
- "version": "5.3.4",
3
+ "version": "5.3.6",
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",
package/public/css/pr.css CHANGED
@@ -1447,12 +1447,33 @@
1447
1447
  z-index: 4;
1448
1448
  }
1449
1449
 
1450
+ /* Truncation also comes from .smart-truncate; kept here in case JS doesn't apply it */
1450
1451
  .d2h-file-name {
1451
1452
  flex: 1;
1452
1453
  min-width: 0;
1453
1454
  overflow: hidden;
1454
1455
  text-overflow: ellipsis;
1455
1456
  white-space: nowrap;
1457
+ line-height: 1.4;
1458
+ }
1459
+
1460
+ /* Smart truncation (js/utils/smart-truncate.js) */
1461
+ .smart-truncate {
1462
+ overflow: hidden;
1463
+ text-overflow: ellipsis;
1464
+ white-space: nowrap;
1465
+ min-width: 0;
1466
+ }
1467
+
1468
+ /* Front truncation: RTL box clips on the left; isolated LTR text keeps order */
1469
+ .smart-truncate--start {
1470
+ direction: rtl;
1471
+ text-align: left;
1472
+ }
1473
+
1474
+ .smart-truncate--start > .smart-truncate__text {
1475
+ direction: ltr;
1476
+ unicode-bidi: isolate;
1456
1477
  }
1457
1478
 
1458
1479
  /* File header comment button and file header chat button */
@@ -1824,10 +1845,6 @@ body:not(.tour-active) #diff-container [data-annotation-slot] {
1824
1845
  display: flex !important;
1825
1846
  }
1826
1847
 
1827
- #pr-container {
1828
- padding: 16px;
1829
- }
1830
-
1831
1848
  .pr-header {
1832
1849
  flex-direction: column;
1833
1850
  align-items: stretch;
@@ -2090,6 +2107,8 @@ tr.newly-expanded .d2h-code-line-ctn {
2090
2107
  font-weight: 600;
2091
2108
  background: var(--ai-subtle, rgba(245, 158, 11, 0.1));
2092
2109
  color: var(--ai-primary, #f59e0b);
2110
+ white-space: nowrap;
2111
+ flex-shrink: 0;
2093
2112
  }
2094
2113
 
2095
2114
  .ai-suggestion.ai-type-praise .praise-badge svg {
@@ -2185,13 +2204,12 @@ tr.newly-expanded .d2h-code-line-ctn {
2185
2204
  border-left-color: var(--category-security);
2186
2205
  }
2187
2206
 
2207
+ /* Truncation comes from .smart-truncate. Titles (which show the full text on
2208
+ hover) shrink before the badges beside them. */
2188
2209
  .ai-title {
2189
2210
  font-weight: 600;
2190
2211
  color: var(--color-text-primary);
2191
- overflow: hidden;
2192
- text-overflow: ellipsis;
2193
- white-space: nowrap;
2194
- min-width: 0;
2212
+ flex-shrink: 1000;
2195
2213
  }
2196
2214
 
2197
2215
  /* Confidence display removed to match cleaner prototype design (issue pair_review-7g5) */
@@ -2649,13 +2667,10 @@ tr.newly-expanded .d2h-code-line-ctn {
2649
2667
  position: relative;
2650
2668
  }
2651
2669
 
2670
+ /* Truncation comes from .smart-truncate; shrinks first, like .ai-title */
2652
2671
  .collapsed-title {
2653
- flex: 0 1 auto;
2654
- overflow: hidden;
2655
- text-overflow: ellipsis;
2656
- white-space: nowrap;
2672
+ flex: 0 1000 auto;
2657
2673
  color: var(--color-text-secondary);
2658
- min-width: 0;
2659
2674
  font-size: 13px;
2660
2675
  }
2661
2676
 
@@ -6121,6 +6136,11 @@ div.external-comment-row {
6121
6136
  --ai-panel-width: 320px;
6122
6137
  --chat-panel-width: 0px;
6123
6138
 
6139
+ /* Set to 1 by the breakpoints below when a panel can only float as a drawer.
6140
+ Read by PRManager.setupSidebarToggle / PanelGroup, so breakpoints stay in CSS. */
6141
+ --sidebar-overlay-only: 0;
6142
+ --right-panel-group-overlay-only: 0;
6143
+
6124
6144
  /* Transitions */
6125
6145
  --transition-fast: 0.1s ease;
6126
6146
  --transition-default: 0.2s ease;
@@ -7261,13 +7281,8 @@ body.resizing * {
7261
7281
  display: flex;
7262
7282
  }
7263
7283
 
7264
- /* Ensure toggle buttons show when panels are collapsed via responsive rules */
7265
- @media (max-width: 900px) {
7266
- #ai-panel-toggle,
7267
- #chat-toggle-btn {
7268
- display: flex;
7269
- }
7270
- }
7284
+ /* While the panels float as an overlay drawer both toggles stay visible
7285
+ (see "Overlay Drawers" in the responsive section) */
7271
7286
 
7272
7287
  /* --------------------------------------------------------------------------
7273
7288
  Right Panel Group (Review + Chat)
@@ -7287,12 +7302,6 @@ body.resizing * {
7287
7302
  display: contents;
7288
7303
  }
7289
7304
 
7290
- /* When both panels are hidden */
7291
- .right-panel-group.group-collapsed {
7292
- width: 0;
7293
- overflow: hidden;
7294
- }
7295
-
7296
7305
  /* Horizontal layouts */
7297
7306
  .right-panel-group.layout-h-review-chat { flex-direction: row; }
7298
7307
  .right-panel-group.layout-h-review-chat .ai-panel { order: 1; }
@@ -7310,6 +7319,13 @@ body.resizing * {
7310
7319
  width: max(var(--ai-panel-width), var(--chat-panel-width));
7311
7320
  }
7312
7321
 
7322
+ /* When both panels are hidden. Must follow the vertical layout rules above:
7323
+ same specificity, so a later width there would win and leave an empty box. */
7324
+ .right-panel-group.group-collapsed {
7325
+ width: 0;
7326
+ overflow: hidden;
7327
+ }
7328
+
7313
7329
  .right-panel-group.layout-v-review-chat .ai-panel { order: 0; }
7314
7330
  .right-panel-group.layout-v-review-chat .panel-group-divider { order: 1; }
7315
7331
  .right-panel-group.layout-v-review-chat .chat-panel { order: 2; }
@@ -9698,8 +9714,8 @@ body.resizing * {
9698
9714
 
9699
9715
  Standard Breakpoints:
9700
9716
  - 1400px: Large desktop - reduce AI panel width
9701
- - 1200px: Desktop - hide sidebar, show collapsed toggle
9702
- - 900px: Small desktop/large tablet - hide AI panel and header center
9717
+ - 1200px: Desktop - file navigator only opens as a drawer (.sidebar--overlay-open)
9718
+ - 900px: Small desktop/large tablet - Review/Chat always float as a drawer; hide header center
9703
9719
  - 768px: Tablet - hide breadcrumb, simplify toolbar (hide separator/commit)
9704
9720
  - 480px: Mobile - (reserved for future mobile-specific styles)
9705
9721
 
@@ -9713,6 +9729,10 @@ body.resizing * {
9713
9729
  }
9714
9730
 
9715
9731
  @media (max-width: 1200px) {
9732
+ :root {
9733
+ --sidebar-overlay-only: 1;
9734
+ }
9735
+
9716
9736
  .main-layout .sidebar {
9717
9737
  display: none;
9718
9738
  }
@@ -9720,13 +9740,37 @@ body.resizing * {
9720
9740
  .diff-toolbar .sidebar-toggle-collapsed {
9721
9741
  display: flex;
9722
9742
  }
9743
+
9744
+ /* File navigator drawer (transient, see PRManager.setupSidebarToggle). Overrides
9745
+ the display:none above, the 768px .files-sidebar rule and .collapsed. */
9746
+ .main-layout .sidebar.sidebar--overlay-open {
9747
+ display: flex;
9748
+ position: absolute;
9749
+ top: var(--overlay-drawer-top);
9750
+ bottom: 0;
9751
+ left: 0;
9752
+ /* Above the Review/Chat drawer (25): it's transient, so it's the one in use */
9753
+ z-index: 26;
9754
+ width: min(300px, calc(100% - 48px));
9755
+ padding: 0;
9756
+ border-right: 1px solid var(--color-border-primary);
9757
+ box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
9758
+ overflow: hidden;
9759
+ }
9760
+
9761
+ /* Drawer width is fixed; drag-resizing only applies to the docked sidebar */
9762
+ .main-layout .sidebar.sidebar--overlay-open > .resize-handle {
9763
+ display: none;
9764
+ }
9765
+
9766
+ [data-theme="dark"] .main-layout .sidebar.sidebar--overlay-open {
9767
+ box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
9768
+ }
9723
9769
  }
9724
9770
 
9725
9771
  @media (max-width: 900px) {
9726
- .right-panel-group,
9727
- .ai-panel,
9728
- .chat-panel {
9729
- display: none;
9772
+ :root {
9773
+ --right-panel-group-overlay-only: 1;
9730
9774
  }
9731
9775
 
9732
9776
  .header-center {
@@ -9738,6 +9782,85 @@ body.resizing * {
9738
9782
  }
9739
9783
  }
9740
9784
 
9785
+ /* Overlay Drawers: panels that can't dock float over the diff, below the toolbar
9786
+ (.sidebar--overlay-open, .right-panel-group--overlay set by PanelGroup).
9787
+ z-index: drawers 25/26 < toolbar 27 (so its dropdowns paint on top) < tour bar 28. */
9788
+ :root {
9789
+ --overlay-drawer-top: var(--toolbar-height, 57px);
9790
+ }
9791
+
9792
+ body.tour-active {
9793
+ --overlay-drawer-top: calc(var(--toolbar-height, 57px) + var(--tour-bar-offset));
9794
+ }
9795
+
9796
+ /* Containing block for the drawers */
9797
+ .main-layout:has(> .sidebar--overlay-open),
9798
+ .main-layout:has(> .right-panel-group--overlay) {
9799
+ position: relative;
9800
+ }
9801
+
9802
+ /* Out-specify the base rules (.tour-bar is declared later at z-index 6) */
9803
+ .main-layout:has(> .sidebar--overlay-open) .diff-toolbar,
9804
+ .main-layout:has(> .right-panel-group--overlay) .diff-toolbar {
9805
+ z-index: 27;
9806
+ }
9807
+
9808
+ .main-layout:has(> .sidebar--overlay-open) .tour-bar,
9809
+ .main-layout:has(> .right-panel-group--overlay) .tour-bar {
9810
+ z-index: 28;
9811
+ }
9812
+
9813
+ /* Review/Chat drawer */
9814
+ .right-panel-group.right-panel-group--overlay {
9815
+ position: absolute;
9816
+ top: var(--overlay-drawer-top);
9817
+ right: 0;
9818
+ bottom: 0;
9819
+ height: auto;
9820
+ max-width: 100%;
9821
+ z-index: 25;
9822
+ background: var(--color-bg-primary);
9823
+ }
9824
+
9825
+ .right-panel-group--overlay:not(.group-collapsed) {
9826
+ box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
9827
+ }
9828
+
9829
+ [data-theme="dark"] .right-panel-group--overlay:not(.group-collapsed) {
9830
+ box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
9831
+ }
9832
+
9833
+ /* A forced stack is a temporary display state: resizing it would overwrite the
9834
+ saved side-by-side widths (the group handle sets both panels to one width) */
9835
+ .right-panel-group.right-panel-group--forced-stack .panel-group-resize-handle {
9836
+ display: none;
9837
+ }
9838
+
9839
+ /* Side-by-side panels shrink to share the drawer instead of overflowing */
9840
+ .right-panel-group--overlay .ai-panel,
9841
+ .right-panel-group--overlay .chat-panel {
9842
+ flex-shrink: 1;
9843
+ min-width: 0;
9844
+ }
9845
+
9846
+ /* Keep both toggles visible while floating so they can close the drawer too
9847
+ (disabled chat still hides #chat-toggle-btn via an !important rule) */
9848
+ .main-layout:has(> .right-panel-group--overlay) #ai-panel-toggle,
9849
+ .main-layout:has(> .right-panel-group--overlay) #chat-toggle-btn {
9850
+ display: flex;
9851
+ }
9852
+
9853
+ /* ...and give the Review toggle an active state like Chat's */
9854
+ .main-layout:has(> .right-panel-group--overlay .ai-panel:not(.collapsed)) #ai-panel-toggle {
9855
+ background: var(--ai-subtle, rgba(217, 119, 6, 0.08));
9856
+ border-color: var(--ai-primary, #d97706);
9857
+ }
9858
+
9859
+ [data-theme="dark"] .main-layout:has(> .right-panel-group--overlay .ai-panel:not(.collapsed)) #ai-panel-toggle {
9860
+ background: var(--ai-subtle, rgba(245, 158, 11, 0.1));
9861
+ border-color: var(--ai-primary, #f59e0b);
9862
+ }
9863
+
9741
9864
  @media (max-width: 768px) {
9742
9865
  .header-left .breadcrumb {
9743
9866
  display: none;
@@ -12276,13 +12399,6 @@ body.resizing * {
12276
12399
  border-color: rgba(248, 81, 73, 0.2);
12277
12400
  }
12278
12401
 
12279
- /* Responsive: narrower on small screens */
12280
- @media (max-width: 768px) {
12281
- .chat-panel {
12282
- width: 100% !important;
12283
- }
12284
- }
12285
-
12286
12402
  /* ==========================================================================
12287
12403
  Context Files
12288
12404
  Pinned non-diff file ranges shown below the diff for review context
@@ -12340,12 +12456,9 @@ body.resizing * {
12340
12456
  font-size: 14px;
12341
12457
  }
12342
12458
 
12343
- /* Don't grow (keeps badge next to text), shrink for long paths, clip from the left so the filename stays visible */
12459
+ /* Don't grow (keeps badge next to text), shrink for long paths */
12344
12460
  .context-file-header .d2h-file-name {
12345
12461
  flex: 0 1 auto;
12346
- direction: rtl;
12347
- unicode-bidi: plaintext;
12348
- text-overflow: ellipsis;
12349
12462
  }
12350
12463
 
12351
12464
  /* Push viewed checkbox (and everything after it) to the right */
@@ -13687,6 +13800,9 @@ body.tour-active .tour-annotation-row.active-stop .tour-annotation {
13687
13800
  vertical padding). The bar also sets `min-height: var(--tour-bar-height)`
13688
13801
  so its actual rendered height never drops below this value. */
13689
13802
  --tour-bar-height: 56px;
13803
+ /* Live bar height (it grows when contents wrap), published by
13804
+ PRManager._trackTourBarHeight. Kept out of min-height so the bar can shrink. */
13805
+ --tour-bar-offset: var(--tour-bar-rendered-height, var(--tour-bar-height));
13690
13806
  }
13691
13807
 
13692
13808
  /* While a tour is active, push the sticky `.diff-toolbar` and the
@@ -13694,13 +13810,13 @@ body.tour-active .tour-annotation-row.active-stop .tour-annotation {
13694
13810
  below it instead of overlapping. The bar itself is `position: sticky;
13695
13811
  top: 0` inside the same scroll container (.main-layout .diff-view),
13696
13812
  so all three pin in order: tour bar (top: 0), diff toolbar (top:
13697
- --tour-bar-height), file header (top: --toolbar-height + --tour-bar-height). */
13813
+ --tour-bar-offset), file header (top: --toolbar-height + --tour-bar-offset). */
13698
13814
  body.tour-active .diff-toolbar {
13699
- top: var(--tour-bar-height);
13815
+ top: var(--tour-bar-offset);
13700
13816
  }
13701
13817
 
13702
13818
  body.tour-active .d2h-file-header {
13703
- top: calc(var(--toolbar-height, 0px) + var(--tour-bar-height));
13819
+ top: calc(var(--toolbar-height, 0px) + var(--tour-bar-offset));
13704
13820
  }
13705
13821
 
13706
13822
  .tour-bar {
@@ -201,18 +201,6 @@ mark.d2h-code-line-ctn {
201
201
  align-items: center !important;
202
202
  }
203
203
 
204
- .d2h-file-name {
205
- display: inline-block !important;
206
- word-wrap: break-word !important;
207
- overflow-wrap: break-word !important;
208
- word-break: break-word !important;
209
- font-size: 14px !important;
210
- max-width: calc(100% - 50px) !important;
211
- width: auto !important;
212
- white-space: normal !important;
213
- line-height: 1.4 !important;
214
- }
215
-
216
204
  /* Ensure diff2html containers don't have unwanted borders */
217
205
  .d2h-file-wrapper {
218
206
  border: none;
@@ -2018,8 +2018,9 @@ class AIPanel {
2018
2018
  this.renderFindings();
2019
2019
  this.resetLevelFilter();
2020
2020
 
2021
- // Also clear suggestions from the diff view
2022
- document.querySelectorAll('.ai-suggestion-row').forEach(row => row.remove());
2021
+ // Also clear suggestions from the diff view: inline rows, Pierre
2022
+ // annotations, file-level cards and the navigator list
2023
+ window.prManager?.suggestionManager?.clearAISuggestions?.();
2023
2024
  }
2024
2025
 
2025
2026
  // ========================================
@@ -558,7 +558,10 @@ class AnalysisConfigModal {
558
558
  .flatMap(p => p.models)
559
559
  .find(m => m.id === this.selectedModel)?.tier;
560
560
 
561
- const matchingModel = this.models.find(m => m.tier === currentTier);
561
+ // Prefer the provider's default when it sits in that tier: the first
562
+ // entry of a tier can be plan-gated (e.g. Antigravity's Gemini 4 Argon).
563
+ const matchingModel = this.models.find(m => m.default && m.tier === currentTier)
564
+ || this.models.find(m => m.tier === currentTier);
562
565
  const defaultModel = this.models.find(m => m.default) || this.models[0];
563
566
  this.selectedModel = matchingModel?.id || defaultModel.id;
564
567
  }