@civilization/dsh-git-workbench 0.4.2 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civilization/dsh-git-workbench",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "IntelliJ IDEA-grade Git Workbench, DAG topology graph, branch switcher, tag manager and agent tools for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -1228,14 +1228,21 @@
1228
1228
  justify-content: space-between;
1229
1229
  height: 26px;
1230
1230
  padding: 0 10px;
1231
- border-top: 0.5px solid var(--dsw-alias-border-l2);
1232
- background: var(--dsw-alias-bg-layer-2, #f5f5f5);
1231
+ border-top: 0.5px solid var(--dsw-alias-border-l2, #e2e8f0);
1232
+ background: #ffffff !important;
1233
1233
  font-size: 11px;
1234
- color: var(--dsw-alias-label-tertiary);
1234
+ color: var(--dsw-alias-label-tertiary, #94a3b8);
1235
1235
  flex-shrink: 0;
1236
1236
  user-select: none;
1237
1237
  }
1238
1238
 
1239
+ :global([data-ds-dark-theme]) .treeStatusFooter,
1240
+ :global(.dark) .treeStatusFooter,
1241
+ :global([data-theme="dark"]) .treeStatusFooter {
1242
+ background: #18181b !important;
1243
+ border-top-color: #27272a !important;
1244
+ }
1245
+
1239
1246
  .footerSyncStatus {
1240
1247
  display: flex;
1241
1248
  align-items: center;
@@ -1,4 +1,4 @@
1
- /* Status bar Git branch pill and popover branch switcher (unified DSH design) */
1
+ /* Status bar Git branch pill and popover branch switcher (Clean & Elegant UI) */
2
2
 
3
3
  .anchor {
4
4
  position: relative;
@@ -8,43 +8,66 @@
8
8
  line-height: calc(20px + var(--dsh-content-font-delta-secondary, 0px));
9
9
  }
10
10
 
11
+ /* Bottom status bar Git branch pill (100% solid, opaque background) */
11
12
  .pill {
12
13
  display: inline-flex;
13
14
  align-items: center;
14
15
  gap: 6px;
15
16
  box-sizing: border-box;
16
17
  max-width: 100%;
17
- padding: 1px 8px;
18
- border: 0.5px solid var(--dsw-alias-border-l2);
19
- border-radius: var(--dsw-radius-sm);
20
- background: var(--dsw-alias-bg-layer-1, #ffffff);
21
- color: var(--dsw-alias-label-secondary);
18
+ padding: 3px 10px;
19
+ border: 1px solid #cbd5e1 !important;
20
+ border-radius: 6px;
21
+ background: #ffffff !important;
22
+ color: #0f172a !important;
22
23
  font: inherit;
23
- font-weight: 500;
24
+ font-weight: 600;
25
+ font-size: 12px;
24
26
  font-variant-numeric: tabular-nums;
25
27
  line-height: inherit;
26
28
  white-space: nowrap;
27
29
  cursor: pointer;
30
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
28
31
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
29
32
  }
30
33
 
34
+ :global([data-ds-dark-theme]) .pill,
35
+ :global(.dark) .pill,
36
+ :global([data-theme="dark"]) .pill {
37
+ background: #18181b !important;
38
+ border-color: #3f3f46 !important;
39
+ color: #f4f4f5 !important;
40
+ }
41
+
31
42
  .pill:hover,
32
43
  .pill[aria-expanded='true'] {
33
- background: var(--dsw-alias-interactive-bg-hover);
34
- border-color: var(--dsw-alias-border-l1);
35
- color: var(--dsw-alias-label-primary);
44
+ background: #f1f5f9 !important;
45
+ border-color: #94a3b8 !important;
46
+ color: #0f172a !important;
47
+ }
48
+
49
+ :global([data-ds-dark-theme]) .pill:hover,
50
+ :global([data-ds-dark-theme]) .pill[aria-expanded='true'],
51
+ :global(.dark) .pill:hover,
52
+ :global(.dark) .pill[aria-expanded='true'],
53
+ :global([data-theme="dark"]) .pill:hover,
54
+ :global([data-theme="dark"]) .pill[aria-expanded='true'] {
55
+ background: #27272a !important;
56
+ border-color: #52525b !important;
57
+ color: #ffffff !important;
36
58
  }
37
59
 
38
60
  .icon {
39
61
  width: 14px;
40
62
  height: 14px;
41
63
  flex: none;
42
- color: var(--dsw-alias-label-tertiary);
64
+ color: #2563eb;
43
65
  }
44
66
 
45
- .pill:hover .icon,
46
- .pill[aria-expanded='true'] .icon {
47
- color: var(--dsw-alias-state-business-primary);
67
+ :global([data-ds-dark-theme]) .icon,
68
+ :global(.dark) .icon,
69
+ :global([data-theme="dark"]) .icon {
70
+ color: #3b82f6;
48
71
  }
49
72
 
50
73
  .branchName {
@@ -58,48 +81,60 @@
58
81
  display: inline-flex;
59
82
  align-items: center;
60
83
  padding: 0 4px;
61
- border-radius: var(--dsw-radius-xs, 3px);
84
+ border-radius: 3px;
62
85
  font-size: 11px;
63
86
  line-height: 14px;
64
87
  font-weight: 500;
65
- background: var(--dsw-alias-interactive-bg-hover);
66
- color: var(--dsw-alias-label-secondary);
88
+ background: #f1f5f9;
89
+ color: #475569;
67
90
  }
68
91
 
69
92
  .badgeAhead {
70
- color: var(--dsw-alias-state-business-primary);
93
+ color: #2563eb;
71
94
  }
72
95
 
73
96
  .badgeBehind {
74
- color: var(--dsw-alias-state-warn-primary);
97
+ color: #d97706;
75
98
  }
76
99
 
77
- /* Branch switch popover panel (wrapped in MenuSurface) */
100
+ /* Branch switch popover panel: 100% Solid Opaque Pure White */
78
101
  .popover {
79
102
  position: fixed;
80
- z-index: 1100;
81
- width: 310px;
82
- max-height: 440px;
103
+ z-index: 9999;
104
+ width: 320px;
105
+ max-height: 480px;
83
106
  display: flex;
84
107
  flex-direction: column;
85
108
  box-sizing: border-box;
86
- background: var(--dsw-alias-bg-overlay, var(--dsw-alias-bg-layer-1, #ffffff));
87
- border: 0.5px solid var(--dsw-alias-border-l1);
88
- border-radius: var(--dsw-radius-lg);
89
- --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);
90
- box-shadow: var(--dsw-elevation-prominent);
91
- color: var(--dsw-alias-label-primary);
92
- font-size: 12px;
109
+ background: #ffffff !important;
110
+ opacity: 1 !important;
111
+ backdrop-filter: none !important;
112
+ -webkit-backdrop-filter: none !important;
113
+ border: 1px solid #e2e8f0 !important;
114
+ border-radius: 12px;
115
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
116
+ color: #0f172a !important;
117
+ font-size: 13px;
93
118
  line-height: 18px;
119
+ padding: 10px;
94
120
  overflow: hidden;
95
121
  cursor: default;
96
122
  animation: popoverFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
97
123
  }
98
124
 
125
+ :global([data-ds-dark-theme]) .popover,
126
+ :global(.dark) .popover,
127
+ :global([data-theme="dark"]) .popover {
128
+ background: #18181b !important;
129
+ border-color: #27272a !important;
130
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
131
+ color: #f4f4f5 !important;
132
+ }
133
+
99
134
  @keyframes popoverFadeIn {
100
135
  from {
101
136
  opacity: 0;
102
- transform: translateY(4px) scale(0.98);
137
+ transform: translateY(6px) scale(0.98);
103
138
  }
104
139
  to {
105
140
  opacity: 1;
@@ -108,48 +143,61 @@
108
143
  }
109
144
 
110
145
  .header {
111
- padding: 8px 10px 6px;
112
- border-bottom: 0.5px solid var(--dsw-alias-border-l2);
113
146
  display: flex;
114
147
  flex-direction: column;
115
- gap: 6px;
148
+ gap: 8px;
149
+ padding-bottom: 8px;
150
+ border-bottom: 1px solid #f1f5f9;
151
+ }
152
+
153
+ :global([data-ds-dark-theme]) .header,
154
+ :global(.dark) .header,
155
+ :global([data-theme="dark"]) .header {
156
+ border-bottom-color: #27272a;
116
157
  }
117
158
 
118
159
  .searchRow {
119
160
  display: flex;
120
161
  align-items: center;
121
162
  gap: 6px;
122
- padding: 4px 8px;
123
- border-radius: var(--dsw-radius-sm);
124
- background: var(--dsw-alias-interactive-bg-hover);
125
- border: 0.5px solid var(--dsw-alias-border-l2);
163
+ padding: 6px 10px;
164
+ border-radius: 8px;
165
+ background: #f8fafc;
166
+ border: 1px solid #e2e8f0;
126
167
  }
127
168
 
128
- .searchIcon {
129
- width: 13px;
130
- height: 13px;
131
- color: var(--dsw-alias-label-tertiary);
132
- flex: none;
169
+ :global([data-ds-dark-theme]) .searchRow,
170
+ :global(.dark) .searchRow,
171
+ :global([data-theme="dark"]) .searchRow {
172
+ background: #27272a;
173
+ border-color: #3f3f46;
133
174
  }
134
175
 
135
176
  .searchInput {
136
177
  flex: 1;
137
178
  border: none;
138
179
  background: transparent;
139
- color: var(--dsw-alias-label-primary);
140
- font-size: 12px;
180
+ color: #0f172a;
181
+ font-size: 13px;
182
+ line-height: 18px;
141
183
  outline: none;
142
184
  }
143
185
 
186
+ :global([data-ds-dark-theme]) .searchInput,
187
+ :global(.dark) .searchInput,
188
+ :global([data-theme="dark"]) .searchInput {
189
+ color: #f4f4f5;
190
+ }
191
+
144
192
  .searchInput::placeholder {
145
- color: var(--dsw-alias-label-tertiary);
193
+ color: #94a3b8;
146
194
  }
147
195
 
148
196
  .actionBar {
149
197
  display: flex;
150
198
  align-items: center;
151
199
  justify-content: space-between;
152
- gap: 4px;
200
+ gap: 6px;
153
201
  }
154
202
 
155
203
  .toolBtnGroup {
@@ -161,22 +209,72 @@
161
209
  .toolBtn {
162
210
  display: inline-flex;
163
211
  align-items: center;
212
+ justify-content: center;
164
213
  gap: 4px;
165
- padding: 3px 8px;
166
- border: 0.5px solid var(--dsw-alias-border-l2);
167
- border-radius: var(--dsw-radius-sm);
168
- background: var(--dsw-alias-interactive-bg-hover);
169
- color: var(--dsw-alias-label-secondary);
170
- font-size: 11px;
214
+ padding: 4px 10px;
215
+ border: none;
216
+ border-radius: 6px;
217
+ background: #f1f5f9;
218
+ color: #475569;
219
+ font-size: 12px;
171
220
  font-family: inherit;
172
221
  font-weight: 500;
173
222
  cursor: pointer;
174
223
  transition: background 0.15s ease, color 0.15s ease;
175
224
  }
176
225
 
226
+ :global([data-ds-dark-theme]) .toolBtn,
227
+ :global(.dark) .toolBtn,
228
+ :global([data-theme="dark"]) .toolBtn {
229
+ background: #27272a;
230
+ color: #a1a1aa;
231
+ }
232
+
177
233
  .toolBtn:hover {
178
- background: var(--dsw-alias-interactive-bg-active);
179
- color: var(--dsw-alias-label-primary);
234
+ background: #e2e8f0;
235
+ color: #0f172a;
236
+ }
237
+
238
+ :global([data-ds-dark-theme]) .toolBtn:hover,
239
+ :global(.dark) .toolBtn:hover,
240
+ :global([data-theme="dark"]) .toolBtn:hover {
241
+ background: #3f3f46;
242
+ color: #ffffff;
243
+ }
244
+
245
+ .toolBtnPrimary {
246
+ display: inline-flex;
247
+ align-items: center;
248
+ gap: 4px;
249
+ padding: 4px 10px;
250
+ border: none;
251
+ border-radius: 6px;
252
+ background: #f1f5f9;
253
+ color: #334155;
254
+ font-size: 12px;
255
+ font-family: inherit;
256
+ font-weight: 500;
257
+ cursor: pointer;
258
+ transition: background 0.15s ease, color 0.15s ease;
259
+ }
260
+
261
+ :global([data-ds-dark-theme]) .toolBtnPrimary,
262
+ :global(.dark) .toolBtnPrimary,
263
+ :global([data-theme="dark"]) .toolBtnPrimary {
264
+ background: #27272a;
265
+ color: #e4e4e7;
266
+ }
267
+
268
+ .toolBtnPrimary:hover {
269
+ background: #e2e8f0;
270
+ color: #0f172a;
271
+ }
272
+
273
+ :global([data-ds-dark-theme]) .toolBtnPrimary:hover,
274
+ :global(.dark) .toolBtnPrimary:hover,
275
+ :global([data-theme="dark"]) .toolBtnPrimary:hover {
276
+ background: #3f3f46;
277
+ color: #ffffff;
180
278
  }
181
279
 
182
280
  .btnIcon {
@@ -193,33 +291,50 @@
193
291
 
194
292
  .newBranchInput {
195
293
  flex: 1;
196
- padding: 4px 8px;
197
- border-radius: var(--dsw-radius-sm);
198
- border: 0.5px solid var(--dsw-alias-state-business-primary);
199
- background: var(--dsw-alias-interactive-bg-hover);
200
- color: var(--dsw-alias-label-primary);
294
+ padding: 5px 10px;
295
+ border-radius: 6px;
296
+ border: 1px solid #2563eb;
297
+ background: #f8fafc;
298
+ color: #0f172a;
201
299
  font-size: 12px;
202
300
  outline: none;
203
301
  }
204
302
 
303
+ :global([data-ds-dark-theme]) .newBranchInput,
304
+ :global(.dark) .newBranchInput,
305
+ :global([data-theme="dark"]) .newBranchInput {
306
+ background: #27272a;
307
+ color: #f4f4f5;
308
+ border-color: #3b82f6;
309
+ }
310
+
205
311
  .newBranchInput::placeholder {
206
- color: var(--dsw-alias-label-tertiary);
312
+ color: #94a3b8;
207
313
  }
208
314
 
209
315
  .branchList {
210
316
  flex: 1;
211
317
  overflow-y: auto;
212
- padding: 4px;
318
+ display: flex;
319
+ flex-direction: column;
320
+ gap: 2px;
321
+ padding: 4px 0 0 0;
213
322
  }
214
323
 
215
324
  .groupLabel {
216
325
  display: flex;
217
326
  align-items: center;
218
327
  gap: 6px;
219
- padding: 6px 8px 3px;
220
- font-size: 11px;
221
- font-weight: 500;
222
- color: var(--dsw-alias-label-tertiary);
328
+ padding: 8px 8px 4px 8px;
329
+ font-size: 12px;
330
+ font-weight: 400;
331
+ color: #94a3b8;
332
+ }
333
+
334
+ :global([data-ds-dark-theme]) .groupLabel,
335
+ :global(.dark) .groupLabel,
336
+ :global([data-theme="dark"]) .groupLabel {
337
+ color: #71717a;
223
338
  }
224
339
 
225
340
  .branchItem {
@@ -227,50 +342,84 @@
227
342
  align-items: center;
228
343
  justify-content: space-between;
229
344
  width: 100%;
230
- padding: 5px 8px;
231
- border-radius: var(--dsw-radius-sm);
345
+ box-sizing: border-box;
346
+ padding: 7px 10px;
347
+ border-radius: 8px;
232
348
  border: none;
233
349
  background: transparent;
234
- color: var(--dsw-alias-label-secondary);
350
+ color: #334155;
235
351
  font: inherit;
236
- font-size: 12px;
352
+ font-size: 13px;
353
+ font-weight: 400;
237
354
  text-align: left;
238
355
  cursor: pointer;
239
356
  transition: background 0.12s ease, color 0.12s ease;
240
357
  }
241
358
 
242
- .branchItem:hover {
243
- background: var(--dsw-alias-interactive-bg-hover);
244
- color: var(--dsw-alias-label-primary);
359
+ :global([data-ds-dark-theme]) .branchItem,
360
+ :global(.dark) .branchItem,
361
+ :global([data-theme="dark"]) .branchItem {
362
+ color: #d4d4d8;
363
+ }
364
+
365
+ .branchItem:hover:not(.currentBranch) {
366
+ background: #f8fafc;
367
+ color: #0f172a;
368
+ }
369
+
370
+ :global([data-ds-dark-theme]) .branchItem:hover:not(.currentBranch),
371
+ :global(.dark) .branchItem:hover:not(.currentBranch),
372
+ :global([data-theme="dark"]) .branchItem:hover:not(.currentBranch) {
373
+ background: #27272a;
374
+ color: #ffffff;
245
375
  }
246
376
 
247
377
  .currentBranch {
248
- background: var(--dsw-alias-interactive-bg-active);
249
- color: var(--dsw-alias-state-business-primary);
250
- font-weight: 500;
378
+ background: #eff6ff !important;
379
+ color: #2563eb !important;
380
+ font-weight: 600 !important;
381
+ }
382
+
383
+ :global([data-ds-dark-theme]) .currentBranch,
384
+ :global(.dark) .currentBranch,
385
+ :global([data-theme="dark"]) .currentBranch {
386
+ background: rgba(37, 99, 235, 0.18) !important;
387
+ color: #60a5fa !important;
251
388
  }
252
389
 
253
390
  .currentBranch:hover {
254
- background: var(--dsw-alias-interactive-bg-active);
391
+ background: #eff6ff !important;
392
+ }
393
+
394
+ :global([data-ds-dark-theme]) .currentBranch:hover,
395
+ :global(.dark) .currentBranch:hover,
396
+ :global([data-theme="dark"]) .currentBranch:hover {
397
+ background: rgba(37, 99, 235, 0.24) !important;
255
398
  }
256
399
 
257
400
  .branchItemLeft {
258
401
  display: flex;
259
402
  align-items: center;
260
- gap: 6px;
403
+ gap: 8px;
261
404
  min-width: 0;
262
405
  flex: 1;
263
406
  }
264
407
 
265
408
  .itemIcon {
266
- width: 13px;
267
- height: 13px;
409
+ width: 14px;
410
+ height: 14px;
268
411
  flex: none;
269
- color: var(--dsw-alias-label-tertiary);
412
+ color: #94a3b8;
270
413
  }
271
414
 
272
415
  .currentBranch .itemIcon {
273
- color: var(--dsw-alias-state-business-primary);
416
+ color: #2563eb !important;
417
+ }
418
+
419
+ :global([data-ds-dark-theme]) .currentBranch .itemIcon,
420
+ :global(.dark) .currentBranch .itemIcon,
421
+ :global([data-theme="dark"]) .currentBranch .itemIcon {
422
+ color: #60a5fa !important;
274
423
  }
275
424
 
276
425
  .itemText {
@@ -280,15 +429,21 @@
280
429
  }
281
430
 
282
431
  .checkMark {
283
- width: 14px;
284
- height: 14px;
285
- color: var(--dsw-alias-state-business-primary);
432
+ width: 15px;
433
+ height: 15px;
434
+ color: #2563eb !important;
286
435
  flex: none;
287
436
  }
288
437
 
438
+ :global([data-ds-dark-theme]) .checkMark,
439
+ :global(.dark) .checkMark,
440
+ :global([data-theme="dark"]) .checkMark {
441
+ color: #60a5fa !important;
442
+ }
443
+
289
444
  .emptyTip {
290
- padding: 16px 8px;
445
+ padding: 20px 8px;
291
446
  text-align: center;
292
- color: var(--dsw-alias-label-tertiary);
447
+ color: #94a3b8;
293
448
  font-size: 12px;
294
449
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Status bar Git branch pill and popover branch switcher (IDEA / VS Code style).
2
+ * Status bar Git branch pill and popover branch switcher (Clean & Elegant UI).
3
3
  * Injected into the 'conversation.composer.dock' slot at order: -1.
4
4
  */
5
5
 
@@ -28,40 +28,21 @@ function IconBranchOutlineRegular({ className }: { className?: string }): React.
28
28
 
29
29
  function IconCheckOutlineRegular({ className }: { className?: string }): React.ReactElement {
30
30
  return (
31
- <svg className={className} width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
31
+ <svg className={className} width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round">
32
32
  <polyline points="3 8 7 12 13 4" />
33
33
  </svg>
34
34
  )
35
35
  }
36
36
 
37
- function IconPlusOutlineRegular({ className }: { className?: string }): React.ReactElement {
38
- return (
39
- <svg className={className} width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round">
40
- <line x1="8" y1="3" x2="8" y2="13" />
41
- <line x1="3" y1="8" x2="13" y2="8" />
42
- </svg>
43
- )
44
- }
45
-
46
37
  function IconRefreshOutlineRegular({ className }: { className?: string }): React.ReactElement {
47
38
  return (
48
- <svg className={className} width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
39
+ <svg className={className} width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
49
40
  <path d="M2.5 8a5.5 5.5 0 1 0 1.6-3.9L2 6" />
50
41
  <path d="M2 2v4h4" />
51
42
  </svg>
52
43
  )
53
44
  }
54
45
 
55
- function IconSearchOutlineRegular({ className }: { className?: string }): React.ReactElement {
56
- return (
57
- <svg className={className} width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round">
58
- <circle cx="7" cy="7" r="4.5" />
59
- <line x1="10.5" y1="10.5" x2="14" y2="14" />
60
- </svg>
61
- )
62
- }
63
-
64
-
65
46
  export interface GitBranchPillProps {
66
47
  getStatus?: ((sessionId?: string) => Promise<GitStatusSummary>) | undefined
67
48
  getBranches?: ((sessionId?: string) => Promise<GitBranchesSummary>) | undefined
@@ -123,8 +104,8 @@ export const GitBranchPill = memo(function GitBranchPill({
123
104
  if (!anchorRef.current) return
124
105
  const rect = anchorRef.current.getBoundingClientRect()
125
106
  setPopoverPos({
126
- bottom: window.innerHeight - rect.top + 6,
127
- left: Math.max(8, Math.min(rect.left, window.innerWidth - 330)),
107
+ bottom: window.innerHeight - rect.top + 8,
108
+ left: Math.max(12, Math.min(rect.left, window.innerWidth - 340)),
128
109
  })
129
110
  }, [])
130
111
 
@@ -220,7 +201,7 @@ export const GitBranchPill = memo(function GitBranchPill({
220
201
  return null
221
202
  }
222
203
 
223
- const currentBranchName = status?.branch || 'master'
204
+ const currentBranchName = status?.branch || 'main'
224
205
 
225
206
  return (
226
207
  <span ref={anchorRef} className={css.anchor} data-composer-stat="git-branch">
@@ -246,7 +227,6 @@ export const GitBranchPill = memo(function GitBranchPill({
246
227
  >
247
228
  <div className={css.header}>
248
229
  <div className={css.searchRow}>
249
- <IconSearchOutlineRegular className={css.searchIcon} />
250
230
  <input
251
231
  autoFocus
252
232
  className={css.searchInput}
@@ -259,18 +239,15 @@ export const GitBranchPill = memo(function GitBranchPill({
259
239
  <div className={css.actionBar}>
260
240
  <button
261
241
  type="button"
262
- className={css.toolBtn}
263
- title="新建分支"
242
+ className={css.toolBtnPrimary}
264
243
  onClick={() => { setCreatingBranch(prev => !prev) }}
265
244
  >
266
- <IconPlusOutlineRegular className={css.btnIcon} />
267
- <span>新建分支</span>
245
+ <span>+ 新建分支</span>
268
246
  </button>
269
247
  <div className={css.toolBtnGroup}>
270
248
  <button
271
249
  type="button"
272
250
  className={css.toolBtn}
273
- title="拉取 (Pull)"
274
251
  onClick={() => { void handlePull() }}
275
252
  >
276
253
  Pull
@@ -278,7 +255,6 @@ export const GitBranchPill = memo(function GitBranchPill({
278
255
  <button
279
256
  type="button"
280
257
  className={css.toolBtn}
281
- title="推送 (Push)"
282
258
  onClick={() => { void handlePush() }}
283
259
  >
284
260
  Push
@@ -325,32 +301,29 @@ export const GitBranchPill = memo(function GitBranchPill({
325
301
  <IconBranchOutlineRegular className={css.itemIcon} />
326
302
  <span className={css.itemText}>{b.name}</span>
327
303
  </div>
328
- {b.isCurrent ? (
329
- <IconCheckOutlineRegular className={css.checkMark} />
330
- ) : (
331
- b.ahead !== undefined && b.ahead > 0 && <span className={css.badge}>↑{b.ahead}</span>
332
- )}
304
+ {b.isCurrent && <IconCheckOutlineRegular className={css.checkMark} />}
333
305
  </button>
334
306
  ))}
335
307
 
336
308
  {/* Remote Branches */}
337
309
  {filteredRemote.length > 0 && (
338
310
  <>
339
- <div className={css.groupLabel} style={{ marginTop: '6px' }}>
340
- 远程分支 ({filteredRemote.length})
341
- </div>
311
+ <div className={css.groupLabel}>远程分支 ({filteredRemote.length})</div>
342
312
  {filteredRemote.map(b => (
343
313
  <button
344
314
  key={b.name}
345
315
  type="button"
346
- className={css.branchItem}
316
+ className={`${css.branchItem} ${b.isCurrent ? css.currentBranch : ''}`}
347
317
  disabled={switching}
348
- onClick={() => { void handleCheckout(b.name) }}
318
+ onClick={() => {
319
+ if (!b.isCurrent) void handleCheckout(b.name)
320
+ }}
349
321
  >
350
322
  <div className={css.branchItemLeft}>
351
323
  <IconBranchOutlineRegular className={css.itemIcon} />
352
324
  <span className={css.itemText}>{b.name}</span>
353
325
  </div>
326
+ {b.isCurrent && <IconCheckOutlineRegular className={css.checkMark} />}
354
327
  </button>
355
328
  ))}
356
329
  </>