prreviewbuddy 0.43.0 → 0.45.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/CHANGELOG.md +70 -0
- package/dist/{delete_review-DPRL5IPt.js → delete_review-BWMmO81Q.js} +257 -145
- package/dist/main.js +95 -14
- package/dist/server.js +221 -82
- package/package.json +1 -1
- package/static/shell.css +210 -1
- package/static/sidebar.css +58 -14
- package/static/workspace.js +35 -35
package/static/shell.css
CHANGED
|
@@ -3252,6 +3252,12 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
3252
3252
|
-webkit-box-orient: vertical;
|
|
3253
3253
|
overflow: hidden;
|
|
3254
3254
|
}
|
|
3255
|
+
.prb-card-summary code {
|
|
3256
|
+
padding: 0 4px;
|
|
3257
|
+
border-radius: 4px;
|
|
3258
|
+
background: var(--surface-2);
|
|
3259
|
+
font-size: var(--t-code);
|
|
3260
|
+
}
|
|
3255
3261
|
.prb-card-where,
|
|
3256
3262
|
.prb-card-meta {
|
|
3257
3263
|
display: flex;
|
|
@@ -3863,8 +3869,15 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
3863
3869
|
line-height: var(--lh-tight);
|
|
3864
3870
|
}
|
|
3865
3871
|
|
|
3866
|
-
.prb-guide-
|
|
3872
|
+
.prb-guide-head {
|
|
3873
|
+
display: flex;
|
|
3874
|
+
align-items: center;
|
|
3875
|
+
gap: 12px;
|
|
3867
3876
|
margin: 0 0 20px;
|
|
3877
|
+
}
|
|
3878
|
+
.prb-guide-head .prb-focus-toggle { margin-left: auto; }
|
|
3879
|
+
.prb-guide-progress {
|
|
3880
|
+
margin: 0;
|
|
3868
3881
|
color: var(--pane-ink-faint);
|
|
3869
3882
|
font-size: var(--t-meta);
|
|
3870
3883
|
}
|
|
@@ -4517,3 +4530,199 @@ a.prb-notification-open:focus-visible { outline: 2px solid var(--brand-hover); o
|
|
|
4517
4530
|
.prb-toast-close:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
|
|
4518
4531
|
.prb-toast-open:focus-visible,
|
|
4519
4532
|
.prb-toast-close:focus-visible { outline: 2px solid var(--brand-hover); outline-offset: 2px; }
|
|
4533
|
+
|
|
4534
|
+
/* ── Focus mode ──
|
|
4535
|
+
One surface as the whole workspace, beneath the same header, which is outside `.prb-body` and so
|
|
4536
|
+
never changes. The client sets `data-focus` and nothing else: every pane stays in the DOM,
|
|
4537
|
+
hidden rather than removed, which is why a conversation, an open code panel and a scroll position
|
|
4538
|
+
are all still there on the way back.
|
|
4539
|
+
|
|
4540
|
+
`body` in front of every selector, deliberately. The responsive blocks above set the grid with
|
|
4541
|
+
(0,2,0) selectors inside media queries that come later in the cascade than anything this could
|
|
4542
|
+
be placed beside. One element of extra specificity wins at every width without `!important`,
|
|
4543
|
+
and without depending on this block staying last. */
|
|
4544
|
+
body .prb-body[data-focus] { grid-template-columns: minmax(0, 1fr); }
|
|
4545
|
+
body .prb-body[data-focus] .prb-rail { display: none; }
|
|
4546
|
+
|
|
4547
|
+
/* A document surface: the review pane takes the width, and gets more room to use it. Issues and
|
|
4548
|
+
Questions stay a readable measure; a diff is the one thing here that genuinely wants the width. */
|
|
4549
|
+
body .prb-body:is([data-focus='issues'], [data-focus='questions'], [data-focus='files'], [data-focus='guide']) .prb-ask { display: none; }
|
|
4550
|
+
body .prb-body:is([data-focus='issues'], [data-focus='questions'], [data-focus='guide']) .pr-helper-sidebar.prb-pane { max-width: 1080px; }
|
|
4551
|
+
/* The rail is where the themes are listed, and it is hidden here, so the picker it stands in for
|
|
4552
|
+
below 860px stands in for it now. */
|
|
4553
|
+
body .prb-body[data-focus='guide'] .prb-guide-picker { display: flex; }
|
|
4554
|
+
body .prb-body[data-focus='files'] .pr-helper-sidebar.prb-pane { max-width: 1600px; }
|
|
4555
|
+
|
|
4556
|
+
/* The assistant: the review pane goes, and the assistant is a column in the grid again at every
|
|
4557
|
+
width. Below 860px it is otherwise a fixed overlay, and an overlay as the whole workspace would
|
|
4558
|
+
sit over the header this mode promises to keep. */
|
|
4559
|
+
body .prb-body[data-focus='buddy'] .prb-doc { display: none; }
|
|
4560
|
+
body .prb-body[data-focus='buddy'] .prb-ask {
|
|
4561
|
+
display: flex;
|
|
4562
|
+
position: relative;
|
|
4563
|
+
inset: auto;
|
|
4564
|
+
width: auto;
|
|
4565
|
+
border-left: 0;
|
|
4566
|
+
}
|
|
4567
|
+
body .prb-body[data-focus='buddy'] .prb-ask-resize { display: none; }
|
|
4568
|
+
|
|
4569
|
+
/* Prose at a reading measure, centred, with the column itself wider so a code block or a table in
|
|
4570
|
+
an answer can use the room the mode exists to give it. The padding does the centring rather than
|
|
4571
|
+
a max-width on the log, so the log's scrollbar stays at the window's edge. */
|
|
4572
|
+
body .prb-body[data-focus='buddy'] :is(.prb-ask-header, .prb-bank, .prb-ask-log, .prb-ask-form, .prb-ask-paused) {
|
|
4573
|
+
padding-inline: max(18px, calc((100% - 1040px) / 2));
|
|
4574
|
+
}
|
|
4575
|
+
body .prb-body[data-focus='buddy'] .prb-msg-assistant :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) { max-width: 78ch; }
|
|
4576
|
+
body .prb-body[data-focus='buddy'] .prb-msg-user { max-width: min(90%, 78ch); }
|
|
4577
|
+
|
|
4578
|
+
/* The expand control. Icon-only, like Copy on a card, so it does not compete with a title. Both
|
|
4579
|
+
icons are in the markup and `aria-pressed` picks one, which is the state the client sets. */
|
|
4580
|
+
.prb-focus-toggle {
|
|
4581
|
+
display: inline-flex;
|
|
4582
|
+
align-items: center;
|
|
4583
|
+
justify-content: center;
|
|
4584
|
+
flex-shrink: 0;
|
|
4585
|
+
width: 26px;
|
|
4586
|
+
height: 26px;
|
|
4587
|
+
padding: 0;
|
|
4588
|
+
border: 1px solid transparent;
|
|
4589
|
+
border-radius: 7px;
|
|
4590
|
+
background: transparent;
|
|
4591
|
+
color: var(--text-muted);
|
|
4592
|
+
cursor: pointer;
|
|
4593
|
+
}
|
|
4594
|
+
.prb-focus-toggle:hover { color: var(--text-primary); background: var(--surface-2); }
|
|
4595
|
+
.prb-focus-toggle:focus-visible { outline: 2px solid var(--brand-hover); outline-offset: -2px; }
|
|
4596
|
+
.prb-focus-toggle .prb-focus-collapse,
|
|
4597
|
+
.prb-focus-toggle[aria-pressed='true'] .prb-focus-expand { display: none; }
|
|
4598
|
+
.prb-focus-toggle[aria-pressed='true'] .prb-focus-collapse { display: block; }
|
|
4599
|
+
/* In the assistant's header it follows the scope label, which takes the free space with
|
|
4600
|
+
`margin-left: auto`, so the control stays at the right edge beside it. */
|
|
4601
|
+
.prb-ask-header .prb-focus-toggle { align-self: center; }
|
|
4602
|
+
|
|
4603
|
+
/* The same control in the light document pane, in the pane's palette. */
|
|
4604
|
+
.prb-doc .prb-focus-toggle { color: var(--pane-ink-faint); }
|
|
4605
|
+
.prb-doc .prb-focus-toggle:hover { color: var(--pane-ink); background: var(--pane-bg); border-color: var(--pane-line); }
|
|
4606
|
+
/* The title row is baseline-aligned for the disclosure's text; an icon has no baseline worth
|
|
4607
|
+
aligning, so it centres on the title instead. */
|
|
4608
|
+
.prb-doc .prb-doc-head .prb-focus-toggle { align-self: center; margin-left: auto; }
|
|
4609
|
+
|
|
4610
|
+
/* ── Your prompts, folded ──
|
|
4611
|
+
The heading is the toggle. Folded, it keeps a count, so a reviewer knows what is behind it
|
|
4612
|
+
without opening it, and Add stays beside it. */
|
|
4613
|
+
.prb-bank-toggle {
|
|
4614
|
+
display: inline-flex;
|
|
4615
|
+
align-items: center;
|
|
4616
|
+
gap: 6px;
|
|
4617
|
+
padding: 2px 4px 2px 0;
|
|
4618
|
+
border: 0;
|
|
4619
|
+
background: transparent;
|
|
4620
|
+
color: inherit;
|
|
4621
|
+
font: inherit;
|
|
4622
|
+
letter-spacing: inherit;
|
|
4623
|
+
text-transform: inherit;
|
|
4624
|
+
cursor: pointer;
|
|
4625
|
+
}
|
|
4626
|
+
.prb-bank-toggle:hover { color: var(--text-primary); }
|
|
4627
|
+
.prb-bank-toggle:focus-visible { outline: 2px solid var(--brand-hover); outline-offset: 2px; border-radius: 4px; }
|
|
4628
|
+
.prb-bank-chevron { transition: transform 120ms ease; transform: rotate(90deg); }
|
|
4629
|
+
.prb-bank-toggle[aria-expanded='false'] .prb-bank-chevron { transform: none; }
|
|
4630
|
+
.prb-bank-count {
|
|
4631
|
+
padding: 0 6px;
|
|
4632
|
+
border-radius: 999px;
|
|
4633
|
+
background: var(--surface-2);
|
|
4634
|
+
font-variant-numeric: tabular-nums;
|
|
4635
|
+
letter-spacing: normal;
|
|
4636
|
+
}
|
|
4637
|
+
.prb-bank-toggle[aria-expanded='true'] .prb-bank-count { display: none; }
|
|
4638
|
+
.prb-bank[data-collapsed] { padding-bottom: 8px; }
|
|
4639
|
+
.prb-bank[data-collapsed] .prb-bank-head { margin-bottom: 0; }
|
|
4640
|
+
|
|
4641
|
+
/* ── Ask Buddy on a finding card ──
|
|
4642
|
+
The page's `[data-menu]` menu, as the header's `...` is, dropped into a card's title row beside
|
|
4643
|
+
Copy. Positioned as the flex child it is, the way `.prb-header .prb-menu` is, so the panel hangs
|
|
4644
|
+
off the trigger rather than off a corner of the card. The panel is in the card's flow inside the
|
|
4645
|
+
scrolling pane, so near the bottom it extends the scroll rather than being cut off. */
|
|
4646
|
+
.prb-doc .pr-helper-issue-title-row .prb-menu {
|
|
4647
|
+
position: relative;
|
|
4648
|
+
top: auto;
|
|
4649
|
+
right: auto;
|
|
4650
|
+
display: inline-flex;
|
|
4651
|
+
flex-shrink: 0;
|
|
4652
|
+
/* Not the base rule's `z-index: 2`. That makes every card's wrapper a stacking context of its
|
|
4653
|
+
own at the same level, and the next card's sparkle, later in the document, then paints over
|
|
4654
|
+
this card's open panel. With no context here the panel's own z-index is measured against the
|
|
4655
|
+
whole pane. */
|
|
4656
|
+
z-index: auto;
|
|
4657
|
+
}
|
|
4658
|
+
.prb-doc .prb-ask-buddy-trigger {
|
|
4659
|
+
display: inline-flex;
|
|
4660
|
+
align-items: center;
|
|
4661
|
+
justify-content: center;
|
|
4662
|
+
width: 24px;
|
|
4663
|
+
height: 24px;
|
|
4664
|
+
margin-top: -3px;
|
|
4665
|
+
color: var(--pane-accent);
|
|
4666
|
+
}
|
|
4667
|
+
.prb-doc .prb-ask-buddy-trigger:hover,
|
|
4668
|
+
.prb-doc .prb-ask-buddy-trigger[aria-expanded='true'] { background: var(--pane-bg); color: var(--pane-accent-ink); }
|
|
4669
|
+
.prb-doc .prb-ask-buddy-trigger:focus-visible { outline: 2px solid var(--pane-accent); outline-offset: -2px; }
|
|
4670
|
+
|
|
4671
|
+
/* The tooltip Copy uses beside it, so the two icons explain themselves the same way. */
|
|
4672
|
+
.prb-doc .prb-ask-buddy-trigger::after {
|
|
4673
|
+
content: attr(data-tip);
|
|
4674
|
+
position: absolute;
|
|
4675
|
+
top: calc(100% + 6px);
|
|
4676
|
+
right: 0;
|
|
4677
|
+
z-index: 3;
|
|
4678
|
+
padding: 5px 8px;
|
|
4679
|
+
border-radius: 6px;
|
|
4680
|
+
background: #24292f;
|
|
4681
|
+
color: #ffffff;
|
|
4682
|
+
font-size: 11px;
|
|
4683
|
+
line-height: 1.4;
|
|
4684
|
+
white-space: nowrap;
|
|
4685
|
+
opacity: 0;
|
|
4686
|
+
pointer-events: none;
|
|
4687
|
+
transition: opacity 0.1s;
|
|
4688
|
+
}
|
|
4689
|
+
.prb-doc .prb-ask-buddy-trigger:hover::after,
|
|
4690
|
+
.prb-doc .prb-ask-buddy-trigger:focus-visible::after { opacity: 1; transition-delay: 0.35s; }
|
|
4691
|
+
.prb-doc .prb-ask-buddy-trigger[aria-expanded='true']::after { display: none; }
|
|
4692
|
+
|
|
4693
|
+
/* The panel in the pane's palette: the header's is dark on the dark shell, and a dark box in the
|
|
4694
|
+
middle of a light card is the mistake pane_palette.test.ts exists to catch. */
|
|
4695
|
+
.prb-doc .prb-ask-buddy-panel {
|
|
4696
|
+
top: 28px;
|
|
4697
|
+
width: 280px;
|
|
4698
|
+
max-width: min(280px, calc(100vw - 48px));
|
|
4699
|
+
border-color: var(--pane-line);
|
|
4700
|
+
background: var(--pane-surface);
|
|
4701
|
+
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
|
|
4702
|
+
color: var(--pane-ink);
|
|
4703
|
+
}
|
|
4704
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-item {
|
|
4705
|
+
display: block;
|
|
4706
|
+
width: 100%;
|
|
4707
|
+
padding: 7px 9px;
|
|
4708
|
+
border: 0;
|
|
4709
|
+
border-radius: 6px;
|
|
4710
|
+
background: transparent;
|
|
4711
|
+
color: var(--pane-ink);
|
|
4712
|
+
font: inherit;
|
|
4713
|
+
font-size: var(--t-meta);
|
|
4714
|
+
text-align: left;
|
|
4715
|
+
cursor: pointer;
|
|
4716
|
+
}
|
|
4717
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-item:hover,
|
|
4718
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-item:focus-visible { background: var(--pane-bg); outline: none; }
|
|
4719
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--pane-accent); }
|
|
4720
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-item:disabled { opacity: 0.5; cursor: default; }
|
|
4721
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--pane-line); }
|
|
4722
|
+
.prb-doc .prb-ask-buddy-panel .pr-helper-selection-menu-heading {
|
|
4723
|
+
padding: 4px 9px 2px;
|
|
4724
|
+
color: var(--pane-ink-faint);
|
|
4725
|
+
font-size: var(--t-micro);
|
|
4726
|
+
letter-spacing: 0.04em;
|
|
4727
|
+
text-transform: uppercase;
|
|
4728
|
+
}
|
package/static/sidebar.css
CHANGED
|
@@ -876,6 +876,64 @@
|
|
|
876
876
|
|
|
877
877
|
.pr-helper-issue-title { font-size: 14px; font-weight: 600; margin: 0; text-align: left; width: 100%; }
|
|
878
878
|
|
|
879
|
+
/* The title and the one control that acts on the whole finding, side by side. The title takes the
|
|
880
|
+
room and wraps; the copy icon keeps its size at the top-right, level with the title's first line
|
|
881
|
+
however many lines the title wraps to. */
|
|
882
|
+
.pr-helper-issue-title-row {
|
|
883
|
+
display: flex;
|
|
884
|
+
align-items: flex-start;
|
|
885
|
+
gap: 8px;
|
|
886
|
+
width: 100%;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.pr-helper-issue-title-row > .pr-helper-issue-title { flex: 1; min-width: 0; }
|
|
890
|
+
|
|
891
|
+
/* Full strength rather than a chat reply's 0.65: at 0.65 its grey falls under 3:1 on the white card.
|
|
892
|
+
Pulled up a pixel so the 14px glyph sits on the 14px title's first line rather than below it.
|
|
893
|
+
Positioned so its tooltip can anchor to it: unlike a pill's, which spans its whole row, this one
|
|
894
|
+
belongs to one small control at the card's edge. */
|
|
895
|
+
.pr-helper-finding-copy {
|
|
896
|
+
position: relative;
|
|
897
|
+
flex-shrink: 0;
|
|
898
|
+
margin-top: -1px;
|
|
899
|
+
opacity: 1;
|
|
900
|
+
font-size: 12px;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/* The tooltip grows leftward from the right edge, back over the card rather than out of the pane,
|
|
904
|
+
and stays on one line. The same look, delay and text reset as `.pr-helper-tip`, which it cannot
|
|
905
|
+
reuse: that one pins itself to its positioned row, and this control is its own anchor. */
|
|
906
|
+
.pr-helper-finding-copy::after {
|
|
907
|
+
content: attr(data-tip);
|
|
908
|
+
position: absolute;
|
|
909
|
+
top: calc(100% + 6px);
|
|
910
|
+
right: 0;
|
|
911
|
+
z-index: 3;
|
|
912
|
+
padding: 5px 8px;
|
|
913
|
+
border-radius: 6px;
|
|
914
|
+
background: #24292f;
|
|
915
|
+
color: #ffffff;
|
|
916
|
+
font-size: 11px;
|
|
917
|
+
font-weight: 400;
|
|
918
|
+
font-family: inherit;
|
|
919
|
+
line-height: 1.4;
|
|
920
|
+
white-space: nowrap;
|
|
921
|
+
opacity: 0;
|
|
922
|
+
pointer-events: none;
|
|
923
|
+
transition: opacity 0.1s;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.pr-helper-finding-copy:hover::after,
|
|
927
|
+
.pr-helper-finding-copy:focus-visible::after {
|
|
928
|
+
opacity: 1;
|
|
929
|
+
transition-delay: 0.35s;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/* The button is saying "Copied" or "Copy failed" in words right now; a tooltip offering to copy
|
|
933
|
+
would argue with it. */
|
|
934
|
+
.pr-helper-finding-copy.copied::after,
|
|
935
|
+
.pr-helper-finding-copy.failed::after { display: none; }
|
|
936
|
+
|
|
879
937
|
.pr-helper-issue-desc {
|
|
880
938
|
font-size: 13px;
|
|
881
939
|
line-height: 1.5;
|
|
@@ -4187,20 +4245,6 @@
|
|
|
4187
4245
|
margin-top: 12px;
|
|
4188
4246
|
}
|
|
4189
4247
|
|
|
4190
|
-
/* Copying the finding is a different kind of act from deciding about it, so it takes the far edge
|
|
4191
|
-
rather than joining Investigate and Dismiss. On a question card it sits in the group instead,
|
|
4192
|
-
because the far edge there already belongs to Jump to file. */
|
|
4193
|
-
.pr-helper-issue-actions > .pr-helper-msg-copy { margin-right: auto; }
|
|
4194
|
-
|
|
4195
|
-
/* Full strength on a card. Under a chat reply the control is a quiet afterthought to the text, and
|
|
4196
|
-
its 0.65 is right there; here it is a worded button among worded buttons, and at 0.65 its grey
|
|
4197
|
-
falls under 3:1 on the white card. The size is its neighbours'. */
|
|
4198
|
-
.pr-helper-issue-actions .pr-helper-msg-copy,
|
|
4199
|
-
.pr-helper-question-actions .pr-helper-msg-copy {
|
|
4200
|
-
opacity: 1;
|
|
4201
|
-
font-size: 12px;
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
4248
|
/* margin-left:auto rather than relying on the row's space-between: the jump link beside it is
|
|
4205
4249
|
conditional (a question without a file has none), and space-between alone would swing this
|
|
4206
4250
|
group to the left edge whenever it is the row's only child. Wraps because three controls do
|