prreviewbuddy 0.82.1 → 0.83.3

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/static/shell.css CHANGED
@@ -154,7 +154,8 @@
154
154
  --lh-body: 1.55;
155
155
  --lh-tight: 1.3;
156
156
 
157
- --rail-width: 268px;
157
+ --rail-full-width: 268px;
158
+ --rail-width: var(--rail-full-width);
158
159
  /* A proportion, not a number: the assistant is part of the workspace rather than a widget
159
160
  docked to its edge, so it should take a share of whatever room there is. The floor keeps it
160
161
  wide enough for a code block; the ceiling keeps the review itself the larger pane. A width
@@ -416,15 +417,6 @@ body > * { flex: 0 0 auto; }
416
417
  color: var(--text-tertiary, var(--text-secondary));
417
418
  opacity: 0.75;
418
419
  }
419
- .prb-feedback {
420
- color: inherit;
421
- text-decoration: underline;
422
- text-underline-offset: 2px;
423
- }
424
- .prb-feedback:hover { color: var(--text-primary); opacity: 1; }
425
- /* The words, and only the words, above phone width. The icon is the phone-width form, where the
426
- strip has no room for a text link; see the 600px block. */
427
- .prb-feedback-icon { display: none; }
428
420
 
429
421
  /* ── The global strip ──
430
422
  *
@@ -459,17 +451,9 @@ body > * { flex: 0 0 auto; }
459
451
  /* Quieter than the wordmark on a marketing page and quieter than the branch below it: at this size
460
452
  it is a mark saying which product this is, not a title. */
461
453
  .prb-strip .prb-wordmark { font-size: var(--t-body); }
462
- /* The push comes from the wordmark, so everything after it packs to the far end whether or not the
463
- narrow-window places are in flow. A `margin-left: auto` on the bell instead would put the bell
464
- beside the wordmark at every width the places are hidden, which is most of them. */
454
+ /* The push comes from the wordmark, so everything after it packs to the far end. */
465
455
  .prb-strip .prb-wordmark { margin-right: auto; }
466
456
  .prb-strip .prb-build { margin: 0; }
467
- /* The workspace places in the strip exist for the width at which the rail is hidden, and only then.
468
- Declared here, above the 860px block that reveals it: the two rules have the same specificity, so
469
- whichever comes last wins, and while this one sat at the foot of the file the media query could
470
- never take effect — the places were hidden at every width, including the only one that needed
471
- them. */
472
- .prb-header-nav { display: none; align-items: center; gap: 16px; font-size: var(--t-meta); }
473
457
 
474
458
  /* The workspace pages that are not a review: the same rail and the same one-viewport shell as a
475
459
  review page, with the content scrolling in its own pane beside it.
@@ -552,6 +536,17 @@ body > * { flex: 0 0 auto; }
552
536
  background: var(--border-strong);
553
537
  }
554
538
 
539
+ /* New review in the strip is the rail's labelled button standing in while the rail is hidden, so it
540
+ is drawn only then: below 860px and in a review's focus mode, both revealed further down. Declared
541
+ here, above the 860px block, so that block can win at equal specificity. Filled, as the rail's is:
542
+ wherever it is, it is the primary action. */
543
+ .prb-strip .prb-strip-new-review { display: none; background: var(--brand); color: var(--on-brand); }
544
+ .prb-strip .prb-strip-new-review:hover { background: var(--brand-hover); color: var(--on-brand); }
545
+ .prb-strip .prb-strip-new-review:focus-visible { outline-color: var(--brand-ink); }
546
+ /* Show sidebar: the way back from Hidden, and drawn only while the reader has hidden it. */
547
+ .prb-strip .prb-sidebar-restore { display: none; }
548
+ :root[data-sidebar-hidden] .prb-strip .prb-sidebar-restore { display: flex; }
549
+
555
550
  /* Why a control cannot be pressed, beside the control rather than inside a `title` nobody hovers
556
551
  and no keyboard reaches. Quiet as the strip is quiet: it is an explanation, not a warning. */
557
552
  .prb-strip-note {
@@ -1082,6 +1077,144 @@ a.prb-rail-item { text-decoration: none; }
1082
1077
  color: var(--text-primary);
1083
1078
  }
1084
1079
  .prb-rail-item:focus-visible { outline: 2px solid var(--brand-hover); outline-offset: -2px; }
1080
+
1081
+ /* New review, at the head of the workspace rows: the primary action, and the one filled thing in
1082
+ the sidebar, as the Buddy AI send button is in its pane. Everything else there stays neutral, so
1083
+ nothing competes with it. Inset so its icon lines up with the rows' icons. The focus ring is the
1084
+ brand's ink rather than its hover colour, which would vanish against the fill. */
1085
+ .prb-rail-new { padding: 0 12px 10px; }
1086
+ .prb-new-review {
1087
+ display: flex;
1088
+ align-items: center;
1089
+ gap: 12px;
1090
+ width: 100%;
1091
+ min-height: 36px;
1092
+ padding: 0 8px;
1093
+ border: 0;
1094
+ border-radius: 8px;
1095
+ background: var(--brand);
1096
+ color: var(--on-brand);
1097
+ font: inherit;
1098
+ font-weight: 600;
1099
+ text-align: left;
1100
+ cursor: pointer;
1101
+ }
1102
+ .prb-new-review svg { width: 16px; height: 16px; flex: none; }
1103
+ .prb-new-review-label { flex: 1; min-width: 0; }
1104
+ .prb-new-review-key { font: 500 var(--t-micro) / 1 ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace; color: var(--on-brand-quiet); }
1105
+ .prb-new-review:hover { background: var(--brand-hover); }
1106
+ .prb-new-review:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
1107
+
1108
+ /* The sidebar's own toggle, the last row of its foot. Both drawings are on the page and the state
1109
+ says which shows, so pressing it changes nothing here but an attribute and its words. */
1110
+ .prb-sidebar-collapse-icon,
1111
+ .prb-sidebar-expand-icon { display: flex; }
1112
+ .prb-sidebar-expand-icon,
1113
+ :root[data-sidebar-compact] .prb-sidebar-collapse-icon { display: none; }
1114
+ :root[data-sidebar-compact] .prb-sidebar-expand-icon { display: flex; }
1115
+
1116
+ /* ── The sidebar's three states ──
1117
+ Expanded is the default and needs nothing. Compact and Hidden are attributes on <html>, drawn by
1118
+ the server from `ui.json` so the first paint is already right (see `sidebarAttributes`).
1119
+
1120
+ Both change only `--rail-width`, which every grid with a rail column reads, so the review page's
1121
+ three columns and the other pages' two follow without a template of their own. Hidden keeps the
1122
+ rail in grid flow at no width rather than `display: none`: out of flow, the next pane would drop
1123
+ into the rail's column, which is the defect the 860px block below had to be rewritten for. */
1124
+ :root[data-sidebar-compact] { --rail-width: 56px; }
1125
+ :root[data-sidebar-hidden] { --rail-width: 0px; }
1126
+ :root[data-sidebar-hidden] .prb-rail { visibility: hidden; overflow: hidden; padding: 0; border: 0; }
1127
+
1128
+ /* Compact is drawn by every rule below that waits on `:not([data-sidebar-peek])`. While the reader
1129
+ rests the pointer on it, or tabs into it, `client/sidebar.ts` sets `data-sidebar-peek` and those
1130
+ rules stop applying: the sidebar is drawn exactly as Expanded, at its full width, over the page
1131
+ rather than beside it. Its own column stays narrow, so nothing under it moves. It slides because
1132
+ its width is transitioned from the column's to the full one; the labels are clipped as it grows. */
1133
+ :root[data-sidebar-compact] .prb-rail {
1134
+ position: relative;
1135
+ z-index: 5;
1136
+ width: var(--rail-width);
1137
+ transition: width 0.16s ease, box-shadow 0.16s ease;
1138
+ }
1139
+ :root[data-sidebar-compact][data-sidebar-peek] .prb-rail {
1140
+ width: var(--rail-full-width);
1141
+ box-shadow: 8px 0 24px var(--shadow-float);
1142
+ }
1143
+
1144
+ /* Compact: every row is its icon, named in a tooltip beside it on hover and keyboard focus. The
1145
+ tooltip is the row's own label, moved out to the right, so the name a screen reader hears is
1146
+ the one it always heard. What has no icon (headings, the numbered review path, the folds, the
1147
+ counts) waits for Expanded. The rail lets the tooltips out past its edge, and sits above the
1148
+ pane beside it so they draw over it. */
1149
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail { overflow: visible; }
1150
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-item {
1151
+ position: relative;
1152
+ justify-content: center;
1153
+ align-items: center;
1154
+ gap: 0;
1155
+ padding: 9px 0;
1156
+ border-left-width: 0;
1157
+ }
1158
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-item .prb-rail-label {
1159
+ position: absolute;
1160
+ top: 50%;
1161
+ left: calc(100% + 6px);
1162
+ transform: translateY(-50%);
1163
+ padding: 5px 8px;
1164
+ border-radius: 6px;
1165
+ background: var(--text-primary);
1166
+ color: var(--bg);
1167
+ font-size: var(--t-micro);
1168
+ font-weight: 500;
1169
+ line-height: 1.4;
1170
+ white-space: nowrap;
1171
+ opacity: 0;
1172
+ pointer-events: none;
1173
+ z-index: 1;
1174
+ }
1175
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-item .prb-rail-label * { color: inherit; font: inherit; }
1176
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-item:hover .prb-rail-label,
1177
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-item:focus-visible .prb-rail-label { opacity: 1; transition: opacity 0.1s 0.35s; }
1178
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-count,
1179
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-selected,
1180
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-twisty,
1181
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-heading,
1182
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-subhead,
1183
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-path { display: none; }
1184
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-body { margin: 0; border-left: 0; }
1185
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-body .prb-rail-item { padding-left: 0; }
1186
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-group + .prb-rail-group { margin-top: 12px; padding-top: 12px; }
1187
+ /* New review is the square + at the top, its name and shortcut in the strip's own tooltip. */
1188
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-rail-new { padding: 0 10px 10px; }
1189
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review { position: relative; justify-content: center; width: 36px; padding: 0; }
1190
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review-label,
1191
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review-key { display: none; }
1192
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review[data-tip]::after {
1193
+ content: attr(data-tip);
1194
+ position: absolute;
1195
+ top: 50%;
1196
+ left: calc(100% + 6px);
1197
+ transform: translateY(-50%);
1198
+ padding: 5px 8px;
1199
+ border-radius: 6px;
1200
+ background: var(--text-primary);
1201
+ color: var(--bg);
1202
+ font-size: var(--t-micro);
1203
+ font-weight: 500;
1204
+ line-height: 1.4;
1205
+ white-space: nowrap;
1206
+ opacity: 0;
1207
+ pointer-events: none;
1208
+ z-index: 1;
1209
+ }
1210
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review[data-tip]:hover::after,
1211
+ :root[data-sidebar-compact]:not([data-sidebar-peek]) .prb-new-review[data-tip]:focus-visible::after { opacity: 1; transition: opacity 0.1s 0.35s; }
1212
+
1213
+ /* Hidden: the strip's square New review stands in, as it does whenever the rail is not drawn. Send
1214
+ feedback belongs to the sidebar and goes with it; the strip has no copy of it at any width. */
1215
+ :root[data-sidebar-hidden] .prb-strip .prb-strip-new-review { display: flex; }
1216
+ /* The page title is set in the rail's column, so it keeps its own width while that column narrows. */
1217
+ :root:is([data-sidebar-compact], [data-sidebar-hidden]) .prb-context:has(.prb-index-controls) .prb-page-title { width: auto; }
1085
1218
  /* The pages under a review type (Issues, Questions, Files, PR context) and the links at the foot
1086
1219
  share the group rows' white, so the grey themes in the review path read as their own list.
1087
1220
  Weight still separates these from the group rows above them. Must come after `.prb-rail-item`:
@@ -2773,9 +2906,11 @@ a.prb-guide-pick { text-decoration: none; }
2773
2906
  .prb-body:not([data-ask='open']),
2774
2907
  .prb-body[data-ask='open'] { grid-template-columns: minmax(0, 1fr); }
2775
2908
  .prb-rail { display: none; }
2909
+ .prb-strip .prb-strip-new-review { display: flex; }
2910
+ /* No sidebar fits at this width, so Show sidebar would bring back nothing. */
2911
+ :root[data-sidebar-hidden] .prb-strip .prb-sidebar-restore { display: none; }
2776
2912
  .prb-guide-picker { display: flex; }
2777
2913
  .prb-shell { grid-template-columns: minmax(0, 1fr); }
2778
- .prb-header-nav { display: flex; }
2779
2914
  /* The assistant is an overlay at this width, not a column, so there is no boundary to drag. */
2780
2915
  .prb-ask-resize { display: none; }
2781
2916
  /* Anchored to the body it covers, not to a sum of the bars above it. That sum assumed the header
@@ -2801,24 +2936,10 @@ a.prb-guide-pick { text-decoration: none; }
2801
2936
  scrolled sideways. Placed after every base rule it overrides (the header, the strip, the change
2802
2937
  ref, the stats), because at equal specificity the later rule wins. */
2803
2938
  @media (max-width: 600px) {
2804
- /* The strip keeps every control and the build; it gives up spacing and the feedback link's words.
2805
- The accessible name stays "Send feedback", from the visually hidden label. */
2939
+ /* The strip keeps every control and the build; it gives up spacing. */
2806
2940
  .prb-strip { gap: 4px; padding: 0 16px; }
2807
2941
  .prb-strip .prb-wordmark { min-width: 0; overflow: hidden; }
2808
2942
  .prb-strip .prb-build { margin-left: 4px; }
2809
- .prb-feedback { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); opacity: 1; }
2810
- .prb-feedback:hover { background: var(--surface-2); }
2811
- .prb-feedback-icon { display: inline-flex; }
2812
- .prb-feedback-icon svg { width: 16px; height: 16px; }
2813
- .prb-feedback-label {
2814
- position: absolute;
2815
- width: 1px;
2816
- height: 1px;
2817
- margin: -1px;
2818
- overflow: hidden;
2819
- clip-path: inset(50%);
2820
- white-space: nowrap;
2821
- }
2822
2943
 
2823
2944
  /* The review bar becomes two rows: what the review is of, then its facts and controls. It grows
2824
2945
  with its content rather than clipping it; the panes below take what is left, and Buddy AI is
@@ -3144,6 +3265,8 @@ a.prb-guide-pick { text-decoration: none; }
3144
3265
  cursor: pointer;
3145
3266
  }
3146
3267
  .prb-index-select:hover { color: var(--text-primary); border-color: var(--border-strong); }
3268
+ /* New collection beside Select: both at the weight of the count, neither louder than the list. */
3269
+ .prb-index-summary-actions { display: flex; flex: none; gap: 8px; }
3147
3270
  .prb-index-select[aria-pressed="true"] {
3148
3271
  border-color: var(--brand);
3149
3272
  background: var(--brand);
@@ -3586,12 +3709,9 @@ a.prb-guide-pick { text-decoration: none; }
3586
3709
  .prb-collections[hidden] { display: none; }
3587
3710
  .prb-index-section:not([hidden]) ~ .prb-collections:not([hidden]),
3588
3711
  .prb-collections:not([hidden]) ~ .prb-index-section { margin-top: 24px; }
3589
- .prb-collections-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 2px 10px; }
3590
- .prb-collections-title { margin: 0; font-size: var(--t-meta); font-weight: 600; color: var(--text-muted); }
3591
- .prb-collections-hint { margin: 0; font-size: var(--t-meta); color: var(--text-muted); }
3592
3712
  .prb-collection { position: relative; }
3593
3713
  .prb-collection[hidden] { display: none; }
3594
- .prb-collection:not([hidden]) ~ .prb-collection { margin-top: 16px; }
3714
+ .prb-collection:not([hidden]) ~ .prb-collection { margin-top: 24px; }
3595
3715
  /* Room at the end of the heading for the collection's menu, which is laid over it. */
3596
3716
  .prb-collection > .prb-index-section > .prb-index-section-head { margin-right: 34px; }
3597
3717
  .prb-collection > .prb-collection-menu { top: -5px; right: 0; }
@@ -3606,11 +3726,11 @@ a.prb-guide-pick { text-decoration: none; }
3606
3726
  cursor: pointer;
3607
3727
  }
3608
3728
  .prb-collection-completed-head:hover { color: var(--text-primary); }
3609
- .prb-collection-new { margin-top: 14px; }
3610
- .prb-collection-new-button { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
3611
- .prb-collection-new-button[hidden] { display: none; }
3612
- .prb-collection-new-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
3613
- .prb-collection-new-form[hidden] { display: none; }
3729
+ /* New collection: a dialog the width of the name it asks for, not of the list. */
3730
+ .prb-collection-new-dialog { width: min(400px, calc(100vw - 32px)); }
3731
+ .prb-collection-new-dialog .prb-collection-error { margin-top: -4px; }
3732
+ /* Create waits for a name, and looks it. Scoped: Settings' Save is disabled while it saves and keeps its look. */
3733
+ .prb-collection-new-dialog .prb-dialog-primary:disabled { opacity: 0.5; cursor: default; }
3614
3734
  .prb-collection-name {
3615
3735
  flex: 1 1 220px;
3616
3736
  min-width: 0;
@@ -5724,6 +5844,10 @@ a.prb-notification-open:focus-visible { outline: 2px solid var(--brand-hover); o
5724
5844
  and without depending on this block staying last. */
5725
5845
  body .prb-body[data-focus] { grid-template-columns: minmax(0, 1fr); }
5726
5846
  body .prb-body[data-focus] .prb-rail { display: none; }
5847
+ /* The rail's New review goes with it, so the strip's square one stands in, as below 860px. */
5848
+ body:has(.prb-body[data-focus]) .prb-strip .prb-strip-new-review { display: flex; }
5849
+ /* Focus is left from the pane it expanded, so Show sidebar would bring back nothing here. */
5850
+ body:has(.prb-body[data-focus]) .prb-strip .prb-sidebar-restore { display: none; }
5727
5851
 
5728
5852
  /* A document surface, which is every view but the assistant: the review pane takes the width, and
5729
5853
  gets more room to use it. Prose stays a readable measure; a diff and a drawing are the things here
@@ -6229,6 +6353,10 @@ body .prb-body[data-focus]:not([data-focus='buddy']) .prb-ask-tab { top: 64px; }
6229
6353
  font-size: var(--t-micro);
6230
6354
  }
6231
6355
  .prb-palette-prompt[data-enter-target] { background: var(--surface-2); }
6356
+ /* The collection list (⌘K L C): number, name, its heading's count, and its state at the end, as the
6357
+ section rows above it show theirs. */
6358
+ .prb-palette-collection { flex-direction: row; align-items: baseline; gap: 10px; }
6359
+ .prb-palette-collection-count { min-width: 0; color: var(--text-muted); font-size: var(--t-micro); }
6232
6360
 
6233
6361
  /* Add review (⌘P P, ⌘P B): a palette mode with more to show than a search, so the palette is wider
6234
6362
  while it holds one. Rows say what each pasted link will do; the options stay folded unless there