prreviewbuddy 0.50.0 → 0.52.2
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 +97 -0
- package/dist/{delete_review-BIXqUnpx.js → delete_review-BiV1aBpx.js} +152 -42
- package/dist/main.js +7 -6
- package/dist/server.js +230 -104
- package/package.json +1 -1
- package/static/{chunk-BeL0x-wt.js → chunk-B5CvMZtt.js} +1 -1
- package/static/chunk-BeqgAIrQ.js +1 -1
- package/static/chunk-CofqJ-Qn.js +1 -0
- package/static/help.js +1 -1
- package/static/notifications.js +1 -1
- package/static/reviews.js +1 -1
- package/static/settings.js +1 -1
- package/static/shell.css +98 -56
- package/static/sidebar.css +250 -34
- package/static/workspace.js +59 -59
- package/static/chunk-vvGSmhmc.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prreviewbuddy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.2",
|
|
4
4
|
"description": "Review a branch or pull request in an isolated checkout, from your terminal, with the coding agent you already have installed.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://prreviewbuddy.com",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){e.addEventListener(`pageshow`,e=>{e.persisted&&t()})}function t(e){return`${e} more`}function n(e){return e===0?`Nothing unread`:`${e} unread`}function r(e){return e===`restarting`?`Workspace server restarting`:e===`unreachable`?`Workspace server not running`:`Workspace server running`}function i(e,t){let n=e.querySelector(`[data-server-status]`);if(!n)return;n.dataset.serverStatus=t;let i=n.querySelector(`[data-server-status-label]`);i&&(i.textContent=r(t))}function a(e,t){let n=e.querySelector(`[data-server-status]`);!n||n.dataset.serverStatus===`restarting`||i(e,t?`running`:`unreachable`)}var o=6e3,s=5e3;function c(e=document){let t=e.querySelector(`.prb-toasts`);if(t)return t;let n=e.createElement(`div`);return n.className=`prb-toasts`,n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),e.body.append(n),n}function l(e,t,n=window){return u(e,{kind:t.kind,text:t.text},n)}function u(e,t,n){let r=e.ownerDocument,i=r.createElement(`div`);i.className=`prb-toast`,i.dataset.kind=t.kind;let a=r.createElement(`span`);a.className=`prb-toast-text`,a.textContent=t.text;let s=r.createElement(`a`);s.className=`prb-toast-open`,t.href!==void 0&&t.link!==void 0&&(s.href=t.href,s.textContent=t.link);let c=r.createElement(`button`);for(c.type=`button`,c.className=`prb-toast-close`,c.setAttribute(`aria-label`,`Dismiss: ${t.text}`),c.textContent=`×`,i.append(a,...t.href===void 0?[]:[s],c),e.append(i);e.children.length>3;)e.firstElementChild?.remove();let l=n.setTimeout(()=>i.remove(),o),u=()=>n.clearTimeout(l),d=()=>{n.clearTimeout(l),l=n.setTimeout(()=>i.remove(),o)};return i.addEventListener(`mouseenter`,u),i.addEventListener(`mouseleave`,d),i.addEventListener(`focusin`,u),i.addEventListener(`focusout`,d),c.addEventListener(`click`,()=>{n.clearTimeout(l),i.remove()}),i}function d(e,t,n=window){return u(e,{kind:t.tone,text:t.headline,href:`/notifications/open?id=${encodeURIComponent(t.id)}`,link:`Open`},n)}function f(e,n,r=window){return u(e,{kind:`more`,text:t(n),href:`/notifications`,link:`View all`},r)}function p(e=document,t=window){let n=Number(e.body.dataset.notificationsSince);if(!Number.isFinite(n)||n<=0)return;let r=c(e),i=async()=>{try{let i=await t.fetch(`/notifications/recent?after=${n}`);if(a(e,!0),i.status===403)return;if(i.ok){let e=await i.json();typeof e.now==`number`&&(n=e.now);for(let n of[...e.notifications??[]].reverse())d(r,n,t);typeof e.more==`number`&&e.more>0&&f(r,e.more,t)}}catch{a(e,!1)}t.setTimeout(()=>void i(),s)};t.setTimeout(()=>void i(),s)}function m(e,t){if(typeof t==`number`)for(let r of e.querySelectorAll(`[data-unread-count]`))r.dataset.unreadStyle===`rail`&&(r.textContent=t===0?``:n(t)),r.hidden=t===0}function h(e,t){m(e,t.unread),typeof t.driving==`boolean`&&g(e,t.driving)}function g(e,t){let n=e.querySelector(`[data-restart]`),r=e.querySelector(`[data-restart-note]`);n&&(n.disabled=t),r&&(r.hidden=!t)}var _=`prb-server-restarted`;function v(e=document,t=window){let n=null;try{n=t.sessionStorage.getItem(_),t.sessionStorage.removeItem(_)}catch{}n!==null&&l(c(e),{kind:`ready`,text:`Server restarted. Workspace is back online.`},t)}function y(e){v();let t=document.querySelector(`[data-restart]`),n=document.querySelector(`[data-restart-note]`);t&&t.addEventListener(`click`,()=>{t.disabled=!0,b(e,t,n)})}async function b(e,t,n){let r;try{let i=await fetch(e,{method:`POST`});if(i.status===409){g(document,!0);return}if(!i.ok)return void w(t,n,await C(i));let a=await i.json();r=typeof a.startedAt==`number`?a.startedAt:null}catch{w(t,n,`The workspace server could not be reached.`);return}if(document.body.dataset.restarting=`true`,i(document,`restarting`),await x(r)){try{window.sessionStorage.setItem(_,`1`)}catch{}window.location.reload();return}if(delete document.body.dataset.restarting,await S()){i(document,`running`),w(t,n,`The server did not restart, and is still the one that was running.`);return}i(document,`unreachable`),w(t,n,`Server restart failed. Run prreviewbuddy open to start the workspace again.`)}async function x(e){let t=Date.now()+2e4;for(;Date.now()<t;){await new Promise(e=>setTimeout(e,300));try{let t=await fetch(`/health`,{cache:`no-store`});if(!t.ok)continue;let n=await t.json();if(typeof n.startedAt==`number`&&n.startedAt!==e)return!0}catch{}}return!1}async function S(){try{return(await fetch(`/health`,{cache:`no-store`})).ok}catch{return!1}}async function C(e){try{return(await e.json()).error??`The server could not be restarted.`}catch{return`The server could not be restarted.`}}function w(e,t,n){e.disabled=!1,t&&(t.textContent=n,t.hidden=!1)}export{a,
|
|
1
|
+
function e(e,t){e.addEventListener(`pageshow`,e=>{e.persisted&&t()})}function t(e){return`${e} more`}function n(e){return e===0?`Nothing unread`:`${e} unread`}function r(e){return e===`restarting`?`Workspace server restarting`:e===`unreachable`?`Workspace server not running`:`Workspace server running`}function i(e,t){let n=e.querySelector(`[data-server-status]`);if(!n)return;n.dataset.serverStatus=t;let i=n.querySelector(`[data-server-status-label]`);i&&(i.textContent=r(t))}function a(e,t){let n=e.querySelector(`[data-server-status]`);!n||n.dataset.serverStatus===`restarting`||i(e,t?`running`:`unreachable`)}var o=6e3,s=5e3;function c(e=document){let t=e.querySelector(`.prb-toasts`);if(t)return t;let n=e.createElement(`div`);return n.className=`prb-toasts`,n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),e.body.append(n),n}function l(e,t,n=window){return u(e,{kind:t.kind,text:t.text},n)}function u(e,t,n){let r=e.ownerDocument,i=r.createElement(`div`);i.className=`prb-toast`,i.dataset.kind=t.kind;let a=r.createElement(`span`);a.className=`prb-toast-text`,a.textContent=t.text;let s=r.createElement(`a`);s.className=`prb-toast-open`,t.href!==void 0&&t.link!==void 0&&(s.href=t.href,s.textContent=t.link);let c=r.createElement(`button`);for(c.type=`button`,c.className=`prb-toast-close`,c.setAttribute(`aria-label`,`Dismiss: ${t.text}`),c.textContent=`×`,i.append(a,...t.href===void 0?[]:[s],c),e.append(i);e.children.length>3;)e.firstElementChild?.remove();let l=n.setTimeout(()=>i.remove(),o),u=()=>n.clearTimeout(l),d=()=>{n.clearTimeout(l),l=n.setTimeout(()=>i.remove(),o)};return i.addEventListener(`mouseenter`,u),i.addEventListener(`mouseleave`,d),i.addEventListener(`focusin`,u),i.addEventListener(`focusout`,d),c.addEventListener(`click`,()=>{n.clearTimeout(l),i.remove()}),i}function d(e,t,n=window){return u(e,{kind:t.tone,text:t.headline,href:`/notifications/open?id=${encodeURIComponent(t.id)}`,link:`Open`},n)}function f(e,n,r=window){return u(e,{kind:`more`,text:t(n),href:`/notifications`,link:`View all`},r)}function p(e=document,t=window){let n=Number(e.body.dataset.notificationsSince);if(!Number.isFinite(n)||n<=0)return;let r=c(e),i=async()=>{try{let i=await t.fetch(`/notifications/recent?after=${n}`);if(a(e,!0),i.status===403)return;if(i.ok){let e=await i.json();typeof e.now==`number`&&(n=e.now);for(let n of[...e.notifications??[]].reverse())d(r,n,t);typeof e.more==`number`&&e.more>0&&f(r,e.more,t)}}catch{a(e,!1)}t.setTimeout(()=>void i(),s)};t.setTimeout(()=>void i(),s)}function m(e,t){if(typeof t==`number`)for(let r of e.querySelectorAll(`[data-unread-count]`))r.dataset.unreadStyle===`rail`&&(r.textContent=t===0?``:n(t)),r.hidden=t===0}function h(e,t){m(e,t.unread),typeof t.driving==`boolean`&&g(e,t.driving)}function g(e,t){let n=e.querySelector(`[data-restart]`),r=e.querySelector(`[data-restart-note]`);n&&(n.disabled=t),r&&(r.hidden=!t)}var _=`prb-server-restarted`;function v(e=document,t=window){let n=null;try{n=t.sessionStorage.getItem(_),t.sessionStorage.removeItem(_)}catch{}n!==null&&l(c(e),{kind:`ready`,text:`Server restarted. Workspace is back online.`},t)}function y(e){v();let t=document.querySelector(`[data-restart]`),n=document.querySelector(`[data-restart-note]`);t&&t.addEventListener(`click`,()=>{t.disabled=!0,b(e,t,n)})}async function b(e,t,n){let r;try{let i=await fetch(e,{method:`POST`});if(i.status===409){g(document,!0);return}if(!i.ok)return void w(t,n,await C(i));let a=await i.json();r=typeof a.startedAt==`number`?a.startedAt:null}catch{w(t,n,`The workspace server could not be reached.`);return}if(document.body.dataset.restarting=`true`,i(document,`restarting`),await x(r)){try{window.sessionStorage.setItem(_,`1`)}catch{}window.location.reload();return}if(delete document.body.dataset.restarting,await S()){i(document,`running`),w(t,n,`The server did not restart, and is still the one that was running.`);return}i(document,`unreachable`),w(t,n,`Server restart failed. Run prreviewbuddy open to start the workspace again.`)}async function x(e){let t=Date.now()+2e4;for(;Date.now()<t;){await new Promise(e=>setTimeout(e,300));try{let t=await fetch(`/health`,{cache:`no-store`});if(!t.ok)continue;let n=await t.json();if(typeof n.startedAt==`number`&&n.startedAt!==e)return!0}catch{}}return!1}async function S(){try{return(await fetch(`/health`,{cache:`no-store`})).ok}catch{return!1}}async function C(e){try{return(await e.json()).error??`The server could not be restarted.`}catch{return`The server could not be restarted.`}}function w(e,t,n){e.disabled=!1,t&&(t.textContent=n,t.hidden=!1)}export{p as a,i as c,l as i,n as l,h as n,c as o,m as r,a as s,y as t,e as u};
|
package/static/chunk-BeqgAIrQ.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunk-DdkvfxwB.js","chunk-DsF7k-Jl.js","chunk-BWjKdrB5.js","chunk-hePW80VL.js","chunk-CN9Gw02i.js","workspace.js","chunk-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunk-DdkvfxwB.js","chunk-DsF7k-Jl.js","chunk-BWjKdrB5.js","chunk-hePW80VL.js","chunk-CN9Gw02i.js","workspace.js","chunk-B5CvMZtt.js","chunk-CofqJ-Qn.js","chunk-DJ4Pz6CG.js","chunk-B2kMZj3m.js","chunk-DN473Oml.js","chunk-DwZ_OKDV.js","chunk-CFLfawWY.js","chunk-Wc3Sd0cy.js","chunk-Dy-Kn_BL.js","chunk-CUxm3YXF.js","chunk-tz4nb_gp.js","chunk-BsaS8BTP.js","chunk-fybaL0A-.js","chunk-BifhSqXX.js","chunk-DS17s2tU.js","chunk-BvO9qrHb.js","chunk-nU5620mN.js","chunk-Bh1X0--a.js","chunk-Br7K6EJO.js","chunk-CGd-uY3x.js","chunk-CmOPaNov.js","chunk-C3zyi6X6.js","chunk-DOebnhRz.js","chunk-yqeNYXbH.js","chunk-CG_wK_-W.js","chunk-i2ycf8WY.js","chunk-Dx2-dNbd.js","chunk-DDhk861e.js","chunk-Wi1hfKnY.js","chunk-BYPUwVJd.js","chunk-B0sWk9pb.js","chunk-xyBkudn9.js","chunk-CU_yc7c0.js","chunk-DHwB1DNv.js","chunk-C6X32c5Y.js","chunk-DxSMoRAg.js","chunk-COmCkMOw.js","chunk-D1rSZHoG.js","chunk-BFoDCU3G.js","chunk-C-OQMol4.js","chunk-BwpXVz85.js","chunk-BKQNYMf0.js","chunk-CQhDWCuO.js","chunk-CLNPO3K2.js","chunk-gyMXflOg.js","chunk-B6QMLbPb.js","chunk-CNECTSY3.js","chunk-BveIbUwm.js","chunk-Bz6J7zHc.js","chunk-DmCmlw77.js","chunk-BNE4vRAl.js","chunk-Dgyv2z85.js","chunk-BgAz67x8.js","chunk-DYSi9-67.js","chunk-PhC9V0kv.js","chunk-CNG5uajc.js","chunk-CWJTY3LS.js","chunk-BLYKMRgX.js","chunk-B-z83rju.js","chunk-DYi0PdOM.js","chunk-I02WWcy5.js","chunk-CVHEykQZ.js","chunk-Tk2BGjOK.js","chunk-745C7DWL.js","chunk-BhOdd-9U.js","chunk-2cPIwDyu.js","chunk-CVKo9lqM.js","chunk-IT8Wx1rP.js","chunk-BOGxj-MG.js","chunk-DecH1K7C.js","chunk-BFC1myXj.js","chunk-CqXMuRFL.js","chunk-Cuz7gAE5.js","chunk-DFxPlKZ4.js","chunk-Dlx_va8c.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{t as e}from"./workspace.js";import{n as t}from"./chunk-DsF7k-Jl.js";import{h as n,m as r,p as i}from"./chunk-BWjKdrB5.js";import{$ as a,C as o,E as s,I as c,L as l,N as u,P as d,Q as f,S as p,T as m,V as h,W as g,X as _,Z as v,_ as y,b,c as x,g as S,l as C,m as w,n as T,p as E,q as D,r as O,s as k,t as A,u as j,x as M}from"./chunk-CN9Gw02i.js";import{S as N,a as ee,d as P,f as F,g as I,h as L,i as R,o as te,v as ne,x as re,y as ie}from"./chunk-DJ4Pz6CG.js";import{r as ae}from"./chunk-DN473Oml.js";import{i as oe}from"./chunk-DwZ_OKDV.js";import"./chunk-CFLfawWY.js";import{a as se}from"./chunk-Wc3Sd0cy.js";import{i as ce,n as le,r as ue,t as de}from"./chunk-CUxm3YXF.js";import{a as fe,c as pe,i as z,l as B,n as me,r as he,s as ge,t as _e}from"./chunk-tz4nb_gp.js";import{t as ve}from"./chunk-DS17s2tU.js";import{n as ye,t as be}from"./chunk-nU5620mN.js";var xe=t(e=>{let{securityLevel:t}=M(),n=i(`body`);if(t===`sandbox`){let t=i(`#i${e}`).node()?.contentDocument??document;n=i(t.body)}return n.select(`#${e}`)},`selectSvgElement`);function Se(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Ce(e){if(e==null)return!0;if(re(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!N(e)&&!ne(e)&&!ie(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Se(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var we={common:k,getConfig:b,insertCluster:ye,insertEdge:z,insertEdgeLabel:fe,insertMarkers:ge,insertNode:ue,interpolateToCurve:P,labelHelper:se,log:r,positionEdgeLabel:pe},Te={},Ee=t(e=>{for(let t of e)Te[t.name]=t},`registerLayoutLoaders`);t(()=>{Ee([{name:`dagre`,loader:t(async()=>await e(()=>import(`./chunk-DdkvfxwB.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./chunk-Bh1X0--a.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,22])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./chunk-Br7K6EJO.js`),__vite__mapDeps([24,3,1,2,25])),`loader`)}])},`registerDefaultLayoutLoaders`)();var De=t(async(e,t)=>{if(!(e.layoutAlgorithm in Te))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=Te[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,we,{algorithm:n.algorithm})},`render`),Oe=t((e=``,{fallback:t=`dagre`}={})=>{if(e in Te)return e;if(t in Te)return r.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);function ke(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(ke,`createLayoutElementGroups`);async function Ae(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await se(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(Ae,`measureGroupLabel`);async function je(e,t,n){let r=await ue(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(je,`insertMeasuredNode`);async function Me(t,n){let r=new ve({multigraph:!0,compound:!0}),i=[...n.edges],a=M(),o=ke(t),{edgeLabels:s,nodes:c}=o,l=new Map,u=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)u&&await Ae(c,e),r.setNode(e.id,{...e});else{if(u){let t=await je(c,e,{config:a,dir:e.dir});l.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of i)u&&he(e)&&await fe(s,e),r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./chunk-CmOPaNov.js`);return{captureNodeSizes:e}},__vite__mapDeps([26,1]));r(t,n)}return{graph:r,groups:o,nodeElements:l}}t(Me,`createGraphWithElements`);var V=new Map,H=new Map,Ne=new Map,Pe=t(()=>{H.clear(),Ne.clear(),V.clear()},`clear`),Fe=t((e,t)=>{let n=H.get(t)||[];return r.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),Ie=t((e,t)=>{let n=H.get(t)||[];return r.info(`Descendants of `,t,` is `,n),r.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||Fe(e.v,t)||Fe(e.w,t)||n.includes(e.w):(r.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),Le=t((e,t,n,i)=>{r.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),r.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)Le(a,t,n,i);else{let o=t.node(a);r.info(`cp `,a,` to `,i,` with parent `,e),n.setNode(a,o),i!==t.parent(a)&&(r.debug(`Setting parent`,a,t.parent(a)),n.setParent(a,t.parent(a))),e!==i&&a!==e?(r.debug(`Setting parent`,a,e),n.setParent(a,e)):(r.info(`In copy `,e,`root`,i,`data`,t.node(e),i),r.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);r.debug(`Copying Edges`,s),s.forEach(a=>{r.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);r.info(`Edge data`,o,i);try{Ie(a,i)?(r.info(`Copying as `,a.v,a.w,o,a.name),n.setEdge(a.v,a.w,o,a.name),r.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):r.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){r.error(e)}})}r.debug(`Removing node`,a),t.removeNode(a)})},`copy`),Re=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)Ne.set(i,e),r=[...r,...Re(i,t)];return r},`extractDescendants`),ze=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),Be=t((e,t,n)=>{let i=t.children(e);if(r.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let r=Be(e,t,n),i=ze(t,n,r);if(r){if(i.length>0)a=r;else return r}}return a},`findNonClusterChild`),Ve=t(e=>!V.has(e)||!V.get(e).externalConnections?e:V.has(e)?V.get(e).id:e,`getAnchorId`),He=t((e,t)=>{if(!e||t>10){r.debug(`Opting out, no graph `);return}r.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(r.debug(`Cluster identified`,t,` Replacement id in edges: `,Be(t,e,t)),H.set(t,Re(t,e)),V.set(t,{id:Be(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),i=e.edges();n.length>0?(r.debug(`Cluster identified`,t,H),i.forEach(e=>{Fe(e.v,t)^Fe(e.w,t)&&(r.debug(`Edge: `,e,` leaves cluster `,t),r.debug(`Descendants of XXX `,t,`: `,H.get(t)),V.get(t).externalConnections=!0)})):r.debug(`Not a cluster `,t,H)});for(let t of V.keys()){let n=V.get(t).id,r=e.parent(n);r!==t&&V.has(r)&&!V.get(r).externalConnections&&(V.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&V.get(t)?.externalConnections&&i&&Ke(e,n,t)){let r=qe(e,t,e.parent(n));r&&(V.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);r.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),r.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(r.debug(`Fix XXX`,V,`ids:`,t.v,t.w,`Translating: `,V.get(t.v),` --- `,V.get(t.w)),V.get(t.v)||V.get(t.w)){if(r.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=Ve(t.v),a=Ve(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let r=e.parent(i);V.get(r).externalConnections=!0,n.fromCluster=t.v}if(a!==t.w){let r=e.parent(a);V.get(r).externalConnections=!0,n.toCluster=t.w}r.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,n,t.name)}}),Ue(e,0),r.trace(V)},`adjustClustersAndEdges`),Ue=t((e,t)=>{if(t>10){r.error(`Bailing out`);return}let n=e.nodes(),i=!1;for(let t of n){let n=e.children(t);i||=n.length>0}if(!i){r.debug(`Done, no node has children`,e.nodes());return}r.debug(`Nodes = `,n,t);for(let i of n)if(r.debug(`Extracting node`,i,V,V.has(i)&&!V.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!V.has(i))r.debug(`Not a cluster`,i,t);else if(!V.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){r.debug(`Cluster without external connections, without a parent and with children`,i,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;V.get(i)?.clusterData?.dir&&(n=V.get(i).clusterData.dir,r.debug(`Fixing dir`,V.get(i).clusterData.dir,n));let a=new ve({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Le(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:V.get(i).clusterData,label:V.get(i).label,graph:a})}else r.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!V.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),r.debug(V);n=e.nodes(),r.debug(`New list of nodes`,n);for(let i of n){let n=e.node(i);r.debug(` Now next level`,i,n),n?.clusterNode&&Ue(n.graph,t+1)}},`extractor`),We=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=We(e,e.children(t));n=[...n,...r]}),n},`sorter`),Ge=t(e=>We(e,e.children()),`sortNodesByHierarchy`),Ke=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=V.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),qe=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||Fe(i,n))continue;let r=Be(i,e,t);if(r&&!Ke(e,r,t))return r}return null},`findSafeAnchorNode`);function Je({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??Xe;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??ge)(u,t.markers,t.type,t.diagramId),Ye();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await Ze(t,m,o),await a?.(t,m,p)},`render`)}t(Je,`createCommonLayoutRenderer`);function Ye(){de(),_e(),be(),Pe()}t(Ye,`clearLayoutRenderState`);async function Xe(e,{element:t}){return await Me(t,e)}t(Xe,`defaultMeasureLayout`);async function Ze(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await Qe(i,r,t,n);let a=et(e.nodes);for(let r of e.edges)tt(r,n)||await nt(i,r,a,e,n,t)}t(Ze,`paintLayoutData`);async function Qe(e,t,n,r){t.clusterNode?ce(t):$e(t,n,r)?await ye(e.clusters,t):ce(t)}t(Qe,`paintLayoutNode`);function $e(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t($e,`shouldPaintAsCluster`);function et(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(et,`buildNodeLookup`);function tt(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(tt,`shouldSkipPaintEdge`);async function nt(e,t,n,r,i,a){let o=z(e.edgePaths,{...t},i.clusterDb??new Map,r.type,rt(t.start,t,n,a,i),rt(t.end,t,n,a,i),r.diagramId,it(t,i));he(t)&&(me.has(t.id)||await fe(e.edgeLabels,t),at(t,o))}t(nt,`paintLayoutEdge`);function rt(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(rt,`getRenderedNode`);function it(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(it,`shouldSkipIntersect`);function at(e,t){let n=t?.updatedPath??t?.originalPath,i=b(),{subGraphTitleTotalMargin:a}=le({flowchart:i.flowchart??{}});if(e.label){let i=me.get(e.id),o=e.x,s=e.y;if(n){let i=I.calcLabelPosition(n);r.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),t?.updatedPath&&(o=i.x,s=i.y)}i.attr(`transform`,`translate(${o}, ${s+a/2})`)}if(e?.startLabelLeft){let t=B.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=B.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=B.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=B.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=I.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}t(at,`positionRenderedEdgeLabel`);function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}t(ot,`getDefaultExportFromCjs`);var U={},st={},W={},ct;function G(){if(ct)return W;ct=1;function e(e){return e==null}t(e,`isNothing`);function n(e){return typeof e==`object`&&!!e}t(n,`isObject`);function r(t){return Array.isArray(t)?t:e(t)?[]:[t]}t(r,`toArray`);function i(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}t(i,`extend`);function a(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}t(a,`repeat`);function o(e){return e===0&&1/e==-1/0}return t(o,`isNegativeZero`),W.isNothing=e,W.isObject=n,W.toArray=r,W.repeat=a,W.isNegativeZero=o,W.extend=i,W}t(G,`requireCommon`);var lt,ut;function dt(){if(ut)return lt;ut=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
3
3
|
|
|
4
4
|
`+e.mark.snippet),r+` `+n):r}t(e,`formatError`);function n(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return t(n,`YAMLException2`),n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=t(function(t){return this.name+`: `+e(this,t)},`toString`),lt=n,lt}t(dt,`requireException`);var ft,pt;function mt(){if(pt)return ft;pt=1;let e=G();function n(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}t(n,`getLine`);function r(t,n){return e.repeat(` `,n-t.length)+t}t(r,`padStart`);function i(t,i){if(i=Object.create(i||null),!t.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(t.buffer);)s.push(c.index),o.push(c.index+c[0].length),t.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(t.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=n(t.buffer,o[l-a],s[l-a],t.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+r((t.line-a+1).toString(),d)+` | `+c.str+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`prb-scroll-keep`;function t(t,r){let i=()=>`${t.location.pathname}${t.location.hash}`;t.addEventListener(`pagehide`,()=>{let n={key:i(),pane:r?.scrollTop??0,window:t.scrollY};try{t.sessionStorage.setItem(e,JSON.stringify(n))}catch{}});let a=null;try{let n=t.sessionStorage.getItem(e);t.sessionStorage.removeItem(e),a=n?JSON.parse(n):null}catch{return}if(!a||a.key!==i()||!n(t))return;try{t.history.scrollRestoration=`manual`}catch{}r&&(r.scrollTop=a.pane),a.window&&t.scrollTo(0,a.window);let o=r?.scrollTop??0,s=a.pane;t.addEventListener(`load`,()=>{r&&r.scrollTop===o&&o!==s&&(r.scrollTop=s)},{once:!0})}function n(e){return e.performance?.getEntriesByType?.(`navigation`)[0]?.type===`reload`}async function r(e,t){try{await navigator.clipboard.writeText(t);let n=e.textContent;e.textContent=`Copied`,window.setTimeout(()=>{e.textContent=n},1200)}catch{let n=document.createElement(`input`);n.type=`text`,n.readOnly=!0,n.value=t,n.className=`prb-menu-id`,n.setAttribute(`data-id-field`,``),e.after(n),n.select()}}function i(e){return e<3e4?1e3:e<12e4?3e3:e<6e5?8e3:15e3}var a=[{id:`active`,name:`Active`,action:`Move to active`},{id:`waiting`,name:`Waiting`,action:`Mark waiting`},{id:`done`,name:`Done`,action:`Mark done`}];function o(e){if(typeof e!=`object`||!e)return;let{state:t,at:n}=e;if(!(t!==`waiting`&&t!==`done`||typeof n!=`number`||!Number.isFinite(n)))return{state:t,at:n}}function s(e,t){if(!e)return;let n=l(e,t);return n===void 0?{text:a.find(t=>t.id===e.state).name,changed:!1}:{text:n,changed:!0}}function c(e,t){return!e||e.state===`waiting`&&u(e,t)?`active`:e.state}function l(e,t){if(!(!e||!u(e,t)))return e.state===`waiting`?`Changed while waiting`:`Changed since done`}function u(e,t){return t!==void 0&&t.kind!==`created`&&t.at>e.at}function d(e,t,n){return l(t,n)!==void 0||e!==(t?.state??`active`)}var f=[`pinned`,`active`,`waiting`,`done`];function p(e,t,n,r){return e&&!h(r)?`pinned`:c(t,n)}function m(e,t){let n=e=>f.indexOf(t(e));return[...e].sort((e,t)=>n(e)-n(t))}function h(e){return e===`queue`}function g(e,t,n){return e?s(t,n)?.text:l(t,n)}var _=[`all`,`queue`,`in-progress`,`complete`],v=[`any`,`open`,`merged`,`closed`];function y(e,t){let n=`${e} review${e===1?``:`s`}`;return e===t?n:`${n} · ${t} branch${t===1?``:`es`}`}function b(e,t,n){let r={pinned:{shown:[],total:0},active:{shown:[],total:0},waiting:{shown:[],total:0},done:{shown:[],total:0}};for(let i of e){let e=t(i),a=r[e];a.total<n[e]&&a.shown.push(i),a.total+=1}return r}function x(){return{pinned:15,active:15,waiting:15,done:15}}function S(e){let t=new URLSearchParams(e.replace(/^#/,``)),n=t.get(`f`)??``,r=t.get(`pr`)??``;return{query:t.get(`q`)??``,filter:_.includes(n)?n:`all`,author:t.get(`by`)??``,pr:v.includes(r)?r:`any`}}function C(e){let t=new URLSearchParams;e.query!==``&&t.set(`q`,e.query),e.filter!==`all`&&t.set(`f`,e.filter),e.author!==``&&t.set(`by`,e.author),e.pr!==`any`&&t.set(`pr`,e.pr);let n=t.toString();return n===``?``:`#${n}`}function w(e,t){return t===`all`||t===`queue`||e.status===t}function T(e,t){return t===`any`||e.prState===t}function E(e,t){return t===``||e===t}function D(e){return e===`complete`?`Mark reviewed`:`Mark in progress`}function O(e){return e?`Unpin review`:`Pin review`}function k(e){return e?`Remove from review queue`:`Add to review queue`}function A(e,t){let n=t.query.trim().toLowerCase();return j(e.filter(e=>(!n||e.searchText.includes(n))&&w(e,t.filter)&&E(e.author,t.author)&&T(e,t.pr)),t.filter)}function j(e,t){return h(t)?e.filter(e=>e.queue!==void 0).sort((e,t)=>(e.queue??0)-(t.queue??0)):e}function M(e){return e===0?`Queue`:`Queue (${e})`}function N(e){return e===`complete`?`Reviewed`:e===`in-progress`?`In progress`:`New`}function P(e,t){if(e===0)return`Nothing selected`;let n=`${e} selected`;return t>0?`${n} · ${t} not shown`:n}function F(e){return e===0?`Select all`:`Select all ${e}`}function I(e){return e===0?`Delete`:`Delete ${e} review${e===1?``:`s`}`}function L(e){return`${I(e)}?`}function R(e,t,n){return e===``||t===``||t===e?`wait`:n?`hold`:`reload`}var z=`Fetch selected`;function B(e){return`${e} ${e===1?`repository`:`repositories`}`}function V(e){return`Fetching ${B(e)}…`}function H(e){return e.fetched===0?`Could not fetch ${B(e.repositories)}`:e.fetched===e.repositories?`Fetched ${B(e.repositories)}`:`Fetched ${e.fetched} of ${B(e.repositories)}`}function U(e,t){let n=new Set,r=new Set;for(let i of e)for(let e of i.lineage){let i=t[e];i!==void 0&&(n.add(e),r.add(i))}return{ids:[...n],repositories:r.size}}function W(e,t){return U(t,e).repositories>0}export{r as A,F as C,d as D,s as E,o as O,b as S,N as T,S as _,V as a,M as b,y as c,A as d,C as f,D as g,x as h,H as i,t as j,i as k,I as l,p as m,W as n,f as o,m as p,U as r,g as s,z as t,L as u,O as v,P as w,R as x,k as y};
|
package/static/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e,u as t}from"./chunk-B5CvMZtt.js";e(`/restart`),t(window,()=>window.location.reload());
|
package/static/notifications.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as e,r as t,t as n,u as r}from"./chunk-B5CvMZtt.js";n(`/restart`);var i=document.querySelector(`[data-notifications-count]`),a=document.querySelector(`[data-notifications-read-all]`);async function o(){try{let e=await fetch(`/notifications`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`read-all`})});if(!e.ok)return null;let t=await e.json();return typeof t.unread==`number`?t.unread:null}catch{return null}}function s(e){e.setAttribute(`data-read`,`true`);let t=e.querySelector(`.prb-notification-open`),n=t?.getAttribute(`aria-label`);t&&n?.startsWith(`Unread. `)&&t.setAttribute(`aria-label`,n.slice(8))}a?.addEventListener(`click`,()=>{a.disabled=!0,o().then(n=>{if(n===null){a.disabled=!1;return}document.querySelectorAll(`[data-notification-id]`).forEach(s),i&&(i.textContent=e(n)),t(document,n),a.disabled=n===0})}),r(window,()=>window.location.reload());
|
package/static/reviews.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,n as r,t as i}from"./chunk-BeL0x-wt.js";import{C as a,S as o,a as s,b as c,c as ee,d as l,f as te,g as ne,h as re,i as ie,l as ae,m as oe,o as se,p as u,r as ce,s as le,t as ue,u as de,v as fe,w as pe,x as me,y as he}from"./chunk-vvGSmhmc.js";function ge(e,t){t.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)})}var _e=`Fetch updates`,ve=`Fetch selected`;function d(e){return`${e} ${e===1?`repository`:`repositories`}`}function ye(e){return`Fetching ${d(e)}…`}function be(e){return e.fetched===0?`Could not fetch ${d(e.repositories)}`:e.fetched===e.repositories?`Fetched ${d(e.repositories)}`:`Fetched ${e.fetched} of ${d(e.repositories)}`}function xe(e,t){let n=new Set,r=new Set;for(let i of e)for(let e of i.lineage){let i=t[e];i!==void 0&&(n.add(e),r.add(i))}return{ids:[...n],repositories:r.size}}i(`/restart`);var f=[...document.querySelectorAll(`[data-card]`)].sort((e,t)=>Number(e.dataset.rank)-Number(t.dataset.rank)),p=[`active`,`waiting`,`done`],Se=Object.fromEntries(p.map(e=>[e,document.querySelector(`[data-cards="${e}"]`)])),m=document.querySelector(`.prb-index`);function Ce(e){return{id:e.dataset.id??``,queue:e.dataset.queue===void 0?void 0:Number(e.dataset.queue),status:e.dataset.status??`new`,pinned:e.dataset.pinned===`true`,prState:e.dataset.prState}}var h=document.querySelector(`[data-search]`),g=document.querySelector(`[data-status-filter]`),_=document.querySelector(`[data-author-filter]`),v=document.querySelector(`[data-pr-filter]`),we=document.querySelector(`[data-no-matches]`),Te=document.querySelector(`[data-count]`),y=l();function b(e){return{stored:ie({state:e.dataset.lifecycle,at:Number(e.dataset.lifecycleAt)}),activity:{at:Number(e.dataset.activityAt??0),kind:e.dataset.activityKind??`created`}}}function x(e){let{stored:t,activity:n}=b(e);return s(t,n)}var S=document.querySelector(`[data-bulk]`),C=document.querySelector(`[data-bulk-count]`),Ee=document.querySelector(`[data-bulk-delete]`),De=document.querySelector(`[data-bulk-question]`),w=document.querySelector(`[data-bulk-confirm]`),T=document.querySelector(`[data-bulk-actions]`),E=document.querySelector(`[data-bulk-error]`),D=document.querySelector(`[data-bulk-select-all]`),O=u(window.location.hash),k=new Set,A=!1,j=document.querySelector(`[data-fetch-updates]`),M=document.querySelector(`[data-bulk-fetch]`),N={},P=[],F=!1;function I(){let e=O.query.trim().toLowerCase();O.author!==``&&![..._?.options??[]].some(e=>e.value===O.author)&&(O.author=``);let t=ae(f.map(e=>({...Ce(e),searchText:e.dataset.searchText??``,author:e.dataset.author,card:e})),{...O,query:e}).map(e=>e.card);P=t;let n=fe(t,x,y),r=new Set(p.flatMap(e=>n[e].shown));for(let e of f)e.hidden=!r.has(e);for(let e of p){let t=Se[e];t&&ge(t,n[e].shown);let r=document.querySelector(`[data-load-more="${e}"]`);if(r&&(r.hidden=n[e].total<=n[e].shown.length),e===`active`)continue;let i=document.querySelector(`[data-section="${e}"]`);i&&(i.hidden=n[e].total===0);let a=i?.querySelector(`[data-section-count]`);a&&(a.textContent=String(n[e].total))}if(h&&h.value!==O.query&&(h.value=O.query),_&&(_.value=O.author,O.author===``?delete _.dataset.active:_.dataset.active=``),v||(O.pr=`any`),v&&(v.value=O.pr,O.pr===`any`?delete v.dataset.active:v.dataset.active=``),g&&(g.value=O.filter,O.filter===`all`?delete g.dataset.active:g.dataset.active=``),Te){let e=t.filter(e=>x(e)===`active`),n=e.reduce((e,t)=>e+Number(t.dataset.reviews??1),0);Te.textContent=se(n,e.length)}we&&(we.hidden=t.length>0||f.length===0),W(t),Ve()}function L(e,t){O={...O,...e},y=l(),I();let n=`${window.location.pathname}${window.location.search}${de(O)}`;t===`push`?window.history.pushState(null,``,n):window.history.replaceState(null,``,n)}h?.addEventListener(`input`,()=>L({query:h.value},`replace`)),h?.addEventListener(`keydown`,e=>{e.key===`Escape`&&h.value!==``&&(e.preventDefault(),L({query:``},`replace`))}),g?.addEventListener(`change`,()=>{L({filter:g.value},`push`)}),_?.addEventListener(`change`,()=>{L({author:_.value},`push`)}),v?.addEventListener(`change`,()=>{L({pr:v.value},`push`)}),document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-load-more]`)?.dataset.loadMore;!t||!p.includes(t)||(y={...y,[t]:y[t]+15},I())});for(let e of[`popstate`,`hashchange`])window.addEventListener(e,()=>{O=u(window.location.hash),y=l(),I()});document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-pin]`);if(!t?.dataset.pin)return;e.preventDefault(),e.stopPropagation();let n=t.getAttribute(`aria-pressed`)!==`true`;t.setAttribute(`aria-pressed`,String(n)),t.innerHTML=n?`★`:`☆`,t.setAttribute(`aria-label`,`${n?`Unsave`:`Save`} this review`);let r=t.closest(`[data-card]`);r&&(r.dataset.pinned=String(n)),fetch(`/pin`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:t.dataset.pin,pinned:n})}).catch(()=>{})});async function Oe(e,t){let n;try{let r=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:e,action:t})});if(!r.ok)return;n=(await r.json()).queue}catch{return}R(n),I()}function R(e){let t=new Map(e.map((e,t)=>[e,t]));for(let e of f){let n=t.get(e.dataset.id??``);n===void 0?delete e.dataset.queue:e.dataset.queue=String(n),n!==void 0&&e.dataset.lifecycle!==`active`&&(e.dataset.lifecycle=`active`,delete e.dataset.lifecycleAt,Ie(e))}for(let e of document.querySelectorAll(`[data-queue-action][data-queue-id]`)){let n=t.has(e.dataset.queueId??``);e.dataset.queueAction=n?`remove`:`add`,e.textContent=oe(n)}let n=document.querySelector(`[data-queue-option]`);n&&(n.textContent=re(e.length))}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-history-toggle]`);if(!t)return;e.preventDefault(),e.stopPropagation();let n=t.parentElement?.querySelector(`[data-history-list]`);if(!n)return;let r=n.hidden;n.hidden=!r,t.setAttribute(`aria-expanded`,String(r))}),I();function z(e){for(let t of document.querySelectorAll(`[data-menu]`)){if(t===e)continue;let n=t.querySelector(`[data-menu-panel]`),r=t.querySelector(`[data-menu-trigger]`);n&&(n.hidden=!0),r?.setAttribute(`aria-expanded`,`false`),B(t)}}function B(e){let t=e.querySelector(`[data-menu-items]`),n=e.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!1),n&&(n.hidden=!0),e.querySelector(`[data-menu-error]`)?.remove(),e.querySelector(`[data-id-field]`)?.remove()}document.addEventListener(`keydown`,e=>{e.key===`Escape`&&z()}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`[data-menu]`);if(!n)return void z();let r=t.closest(`[data-menu-trigger]`);if(r){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-panel]`);if(!t)return;let i=t.hidden;z(n),B(n),t.hidden=!i,r.setAttribute(`aria-expanded`,String(i));return}let i=t.closest(`[data-copy-id]`);if(i?.dataset.copyId){e.preventDefault(),e.stopPropagation(),a(i,i.dataset.copyId);return}let o=t.closest(`[data-mark-status]`);if(o?.dataset.markId){e.preventDefault(),e.stopPropagation(),z(),Pe(o.dataset.markId,o.dataset.markStatus===`complete`);return}let s=t.closest(`[data-lifecycle-set]`);if(s?.dataset.lifecycleId){e.preventDefault(),e.stopPropagation(),z(),Fe([s.dataset.lifecycleId],s.dataset.lifecycleSet);return}let c=t.closest(`[data-queue-action]`);if(c?.dataset.queueId){e.preventDefault(),e.stopPropagation(),z(),Oe(c.dataset.queueId,c.dataset.queueAction===`remove`?`remove`:`add`);return}if(t.closest(`[data-delete]`)){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-items]`),r=n.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!0),r&&(r.hidden=!1);return}if(t.closest(`[data-cancel-delete]`)){e.preventDefault(),e.stopPropagation(),B(n);return}if(t.closest(`[data-confirm-delete]`)){e.preventDefault(),e.stopPropagation(),ke(n);return}e.preventDefault(),e.stopPropagation()});async function ke(e){let t=e.querySelector(`[data-delete]`),n=t?.dataset.delete;if(!n)return;let r=e.querySelector(`[data-menu-confirm]`),i=e.querySelector(`[data-confirm-delete]`);i&&(i.disabled=!0,i.textContent=`Deleting`);try{let r=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,scope:t?.dataset.scope??`review`})});if(r.ok)return void window.location.reload();V(e,(await r.json().catch(()=>null))?.error??`That could not be deleted.`)}catch{V(e,`The workspace server did not answer. It may have stopped.`)}i&&(i.disabled=!1,i.textContent=`Delete`),r&&(r.hidden=!0);let a=e.querySelector(`[data-menu-items]`);a&&(a.hidden=!1)}function V(e,t){e.querySelector(`[data-menu-error]`)?.remove();let n=document.createElement(`p`);n.className=`prb-menu-error`,n.setAttribute(`data-menu-error`,``),n.textContent=t,e.querySelector(`[data-menu-panel]`)?.append(n)}function H(e){A=e,e||k.clear(),m&&(e?m.dataset.selecting=``:delete m.dataset.selecting),document.querySelector(`[data-select-mode]`)?.setAttribute(`aria-pressed`,String(e));for(let t of document.querySelectorAll(`.prb-card-link`))e?t.setAttribute(`aria-disabled`,`true`):t.removeAttribute(`aria-disabled`);U(),I()}function U(){w&&(w.hidden=!0),T&&(T.hidden=!1),E&&(E.hidden=!0,E.textContent=``)}function W(e){for(let e of f){let t=k.has(e.dataset.id??``),n=e.querySelector(`[data-select]`);n&&(n.checked=t),t?e.dataset.selected=``:delete e.dataset.selected}if(!S||(S.hidden=!A,!A))return;let t=new Set(e.filter(Ae).map(e=>e.dataset.id)),n=[...k].filter(e=>!t.has(e)).length;C&&(C.textContent=c(k.size,n)),D&&(D.textContent=he(e.length),D.disabled=e.every(e=>k.has(e.dataset.id??``))),Ee&&(Ee.textContent=le(je()));for(let e of S.querySelectorAll(`[data-bulk-mark], [data-bulk-lifecycle], [data-bulk-queue], [data-bulk-delete]`))e.disabled=k.size===0;M&&!F&&(M.disabled=X(K()).repositories===0)}function Ae(e){return!e.hidden&&e.closest(`details`)?.open!==!1}for(let e of document.querySelectorAll(`details[data-section]`))e.addEventListener(`toggle`,()=>W(P));document.querySelector(`[data-select-mode]`)?.addEventListener(`click`,()=>{H(!A)}),D?.addEventListener(`click`,()=>{for(let e of P)e.dataset.id&&k.add(e.dataset.id);U(),I()});function G(e){k.has(e)?k.delete(e):k.add(e),U(),I()}document.addEventListener(`change`,e=>{let t=e.target.closest(`[data-select]`);t?.dataset.select&&G(t.dataset.select)}),document.addEventListener(`click`,e=>{if(!A)return;let t=e.target,n=t.closest(`[data-card]`);n?.dataset.id&&(t.closest(`[data-select], [data-pin], [data-menu], [data-history-toggle]`)||(e.preventDefault(),G(n.dataset.id)))}),document.addEventListener(`keydown`,e=>{if(!A||e.key!==`Enter`)return;let t=e.target.closest(`.prb-card-link`)?.closest(`[data-card]`);t?.dataset.id&&(e.preventDefault(),G(t.dataset.id))});function K(){return f.filter(e=>k.has(e.dataset.id??``))}function je(){return K().reduce((e,t)=>e+Number(t.dataset.reviews??1),0)}function q(e){E&&(E.textContent=e,E.hidden=!1)}function J(e){for(let t of S?.querySelectorAll(`button`)??[])t.disabled=e}async function Me(e){let t=[...k];if(t.length!==0){J(!0);try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:t,complete:e})})).ok)return J(!1),q(`That could not be saved. The workspace server refused it.`)}catch{return J(!1),q(`The workspace server did not answer. It may have stopped.`)}Ne(K(),e),J(!1),H(!1)}}function Ne(e,t){let n=t?`complete`:`in-progress`,r=t?`in-progress`:`complete`;for(let t of e){t.dataset.status=n;let e=t.querySelector(`.prb-card-status`);e&&(e.dataset.status=n,e.textContent=me(n));let i=t.querySelector(`[data-mark-status]`);i&&(i.dataset.markStatus=r,i.textContent=te(r))}}async function Pe(e,t){try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:[e],complete:t})})).ok)return}catch{return}Ne(f.filter(t=>t.dataset.id===e),t),I()}async function Fe(e,t){let n;try{let r=await fetch(`/lifecycle`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,state:t})});n=r.ok?await r.json().catch(()=>null):null}catch{n=null}if(!n)return!1;let r=new Set(e);for(let e of f)r.has(e.dataset.id??``)&&(e.dataset.lifecycle=t,t===`active`?delete e.dataset.lifecycleAt:e.dataset.lifecycleAt=String(n.at),Ie(e));return R(n.queue),I(),!0}function Ie(e){let{stored:t,activity:n}=b(e),r=e.querySelector(`[data-lifecycle-chip]`);if(r){let e=ue(t,n);r.textContent=e??``,r.hidden=e===void 0}for(let r of e.querySelectorAll(`[data-lifecycle-set]`))r.hidden=!ce(r.dataset.lifecycleSet,t,n)}async function Le(e){let t=[...k];if(t.length===0)return;J(!0);let n=await Fe(t,e);if(J(!1),!n)return q(`That could not be saved. The workspace server refused it or did not answer.`);H(!1)}async function Re(){let e=[...k];if(e.length===0)return;J(!0);let t=null;try{let n=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e})});if(t=n.ok?await n.json().catch(()=>null):null,!t)return J(!1),U(),q(`Nothing was deleted. The workspace server refused it.`)}catch{return J(!1),U(),q(`The workspace server did not answer. It may have stopped.`)}let n=t.blocked??[],r=new Set(n.map(e=>e.id));for(let e of K())r.has(e.dataset.id??``)||e.remove();f=f.filter(e=>e.isConnected),k.clear();for(let e of r)k.add(e);if(J(!1),U(),n.length===0)return H(!1);I(),q([...new Set(n.map(e=>e.error))].join(` `))}async function ze(){let e=K().map(e=>e.dataset.id??``).filter(Boolean);if(e.length===0)return;J(!0);let t=null;try{let n=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,action:`add`})});t=n.ok?await n.json().catch(()=>null):null}catch{return J(!1),U(),q(`The workspace server did not answer. It may have stopped.`)}if(!t?.queue)return J(!1),U(),q(`Nothing was added. The workspace server refused it.`);R(t.queue);let n=t.refused??[];k.clear();for(let e of n)k.add(e.id);if(J(!1),U(),n.length===0)return H(!1);I(),q([...new Set(n.map(e=>e.error))].join(` `))}S?.addEventListener(`click`,e=>{let t=e.target;if(t.closest(`[data-bulk-queue]`))return void ze();let n=t.closest(`[data-bulk-mark]`);if(n)return void Me(n.dataset.bulkMark===`complete`);let r=t.closest(`[data-bulk-lifecycle]`);if(r)return void Le(r.dataset.bulkLifecycle);if(t.closest(`[data-bulk-delete]`)){De&&(De.textContent=ee(je())),T&&(T.hidden=!0),w&&(w.hidden=!1);return}if(t.closest(`[data-bulk-confirm-delete]`))return void Re();if(t.closest(`[data-bulk-cancel-delete]`))return U();if(t.closest(`[data-bulk-cancel]`))return H(!1)}),t(window,()=>window.location.reload()),pe(window,document.querySelector(`.prb-shell > main`));var Y=`prb-fetch-summary`,Be=4e3;function X(e){return xe(e.map(e=>({lineage:(e.dataset.lineage??e.dataset.id??``).split(` `).filter(Boolean)})),N)}function Ve(){j&&!F&&(j.disabled=X(P).repositories===0)}function He(e,t,n){e.textContent=t,window.setTimeout(()=>{F||(e.textContent=n)},Be)}async function Ue(){try{let e=await fetch(`/fetch-updates`);if(!e.ok)return;N=(await e.json()).targets??{}}catch{return}I()}async function We(e,t,n){let r=X(n);if(F||r.repositories===0)return;F=!0;for(let e of[j,M])e&&(e.disabled=!0);e.textContent=ye(r.repositories);let i=null;try{let e=await fetch(`/fetch-updates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:r.ids})});e.ok&&(i=await e.json())}catch{}F=!1,I();let a=be(i||{repositories:r.repositories,fetched:0,failed:[],moved:0});if((i?.moved??0)>0||Q){try{window.sessionStorage.setItem(Y,a)}catch{}if(!$())return void window.location.reload();Q=!0}He(e,a,t)}try{let e=window.sessionStorage.getItem(Y);e&&(window.sessionStorage.removeItem(Y),j&&He(j,e,_e))}catch{}j?.addEventListener(`click`,()=>void We(j,_e,P)),M?.addEventListener(`click`,()=>void We(M,ve,K())),Ue();var Ge=document.body.dataset.indexRevision??``,Z=document.body.dataset.live===`true`?Date.now():0,Q=!1;function $(){return k.size>0||document.activeElement===h||F}function Ke(){Q&&!$()&&window.location.reload()}async function qe(){try{let t=await fetch(`/revision`);if(t.ok){e(document,!0);let n=await t.json();r(document,n),n.live&&Z===0&&(Z=Date.now()),n.live||(Z=0);let i=ne(Ge,n.revision??``,$());if(i===`reload`)return void window.location.reload();i===`hold`&&(Q=!0)}}catch{e(document,!1)}window.setTimeout(()=>void qe(),o(Z===0?2**53-1:Date.now()-Z))}qe(),h?.addEventListener(`blur`,Ke),document.addEventListener(`click`,()=>window.setTimeout(Ke,0)),n();
|
|
1
|
+
import{a as e,i as t,n,o as r,s as i,t as a,u as o}from"./chunk-B5CvMZtt.js";import{A as s,C as c,D as l,O as ee,S as te,T as ne,_ as u,a as re,b as ie,c as ae,d as oe,f as se,g as ce,h as d,i as le,j as ue,k as de,l as fe,m as pe,n as me,o as f,p as he,r as ge,s as _e,t as ve,u as ye,w as be,x as xe,y as Se}from"./chunk-CofqJ-Qn.js";function Ce(e,t){t.forEach((t,n)=>{e.children[n]!==t&&e.insertBefore(t,e.children[n]??null)})}async function we(e,t,n){if(e.disabled)return;let r=e.getAttribute(`aria-pressed`)!==`true`;Te(e,r),e.disabled=!0;let i=await t(r).catch(()=>!1);if(e.disabled=!1,!i)return Te(e,!r);n(r)}function Te(e,t){e.setAttribute(`aria-pressed`,String(t)),e.innerHTML=t?`★`:`☆`,e.setAttribute(`aria-label`,`${t?`Unpin`:`Pin`} this review`)}a(`/restart`);var p=[...document.querySelectorAll(`[data-card]`)].sort((e,t)=>Number(e.dataset.rank)-Number(t.dataset.rank)),Ee=Object.fromEntries(f.map(e=>[e,document.querySelector(`[data-cards="${e}"]`)])),m=document.querySelector(`.prb-index`);function De(e){return{id:e.dataset.id??``,queue:e.dataset.queue===void 0?void 0:Number(e.dataset.queue),status:e.dataset.status??`new`,prState:e.dataset.prState}}var h=document.querySelector(`[data-search]`),g=document.querySelector(`[data-status-filter]`),_=document.querySelector(`[data-author-filter]`),v=document.querySelector(`[data-pr-filter]`),y=document.querySelector(`[data-no-matches]`),b=document.querySelector(`[data-count]`),x=d();function S(e){return{stored:ee({state:e.dataset.lifecycle,at:Number(e.dataset.lifecycleAt)}),activity:{at:Number(e.dataset.activityAt??0),kind:e.dataset.activityKind??`created`}}}function Oe(e){return e.dataset.pinned===`true`}function C(e){let{stored:t,activity:n}=S(e);return pe(Oe(e),t,n,k.filter)}var w=document.querySelector(`[data-bulk]`),ke=document.querySelector(`[data-bulk-count]`),Ae=document.querySelector(`[data-bulk-delete]`),je=document.querySelector(`[data-bulk-question]`),T=document.querySelector(`[data-bulk-confirm]`),E=document.querySelector(`[data-bulk-actions]`),D=document.querySelector(`[data-bulk-error]`),O=document.querySelector(`[data-bulk-select-all]`),k=u(window.location.hash),A=new Set,j=!1,M=document.querySelector(`[data-bulk-fetch]`),N={},P=[],F=!1;function I(){let e=k.query.trim().toLowerCase();k.author!==``&&![..._?.options??[]].some(e=>e.value===k.author)&&(k.author=``);let t=he(oe(p.map(e=>({...De(e),searchText:e.dataset.searchText??``,author:e.dataset.author,card:e})),{...k,query:e}).map(e=>e.card),C);P=t;let n=te(t,C,x),r=new Set(f.flatMap(e=>n[e].shown));for(let e of p)e.hidden=!r.has(e);for(let e of f){let t=Ee[e];t&&Ce(t,n[e].shown);let r=document.querySelector(`[data-load-more="${e}"]`);r&&(r.hidden=n[e].total<=n[e].shown.length);let i=document.querySelector(`[data-section="${e}"]`);i&&(i.hidden=n[e].total===0);let a=i?.querySelector(`[data-section-count]`);a&&(a.textContent=String(n[e].total))}if(h&&h.value!==k.query&&(h.value=k.query),_&&(_.value=k.author,k.author===``?delete _.dataset.active:_.dataset.active=``),v||(k.pr=`any`),v&&(v.value=k.pr,k.pr===`any`?delete v.dataset.active:v.dataset.active=``),g&&(g.value=k.filter,k.filter===`all`?delete g.dataset.active:g.dataset.active=``),b){let e=t.reduce((e,t)=>e+Number(t.dataset.reviews??1),0);b.textContent=ae(e,t.length)}y&&(y.hidden=t.length>0||p.length===0),Fe(t)}function L(e,t){k={...k,...e},x=d(),I();let n=`${window.location.pathname}${window.location.search}${se(k)}`;t===`push`?window.history.pushState(null,``,n):window.history.replaceState(null,``,n)}h?.addEventListener(`input`,()=>L({query:h.value},`replace`)),h?.addEventListener(`keydown`,e=>{e.key===`Escape`&&h.value!==``&&(e.preventDefault(),L({query:``},`replace`))}),g?.addEventListener(`change`,()=>{L({filter:g.value},`push`)}),_?.addEventListener(`change`,()=>{L({author:_.value},`push`)}),v?.addEventListener(`change`,()=>{L({pr:v.value},`push`)}),document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-load-more]`)?.dataset.loadMore;!t||!f.includes(t)||(x={...x,[t]:x[t]+15},I())});for(let e of[`popstate`,`hashchange`])window.addEventListener(e,()=>{k=u(window.location.hash),x=d(),I()});document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-pin]`);if(!t?.dataset.pin)return;e.preventDefault(),e.stopPropagation();let n=t.dataset.pin;we(t,e=>fetch(`/pin`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,pinned:e})}).then(e=>e.ok),e=>{let n=t.closest(`[data-card]`);n&&(n.dataset.pinned=String(e),q(n),I())})});async function Me(e,t){let n;try{let r=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:e,action:t})});if(!r.ok)return;n=(await r.json()).queue}catch{return}R(n),I()}function R(e){let t=new Map(e.map((e,t)=>[e,t]));for(let e of p){let n=t.get(e.dataset.id??``);n===void 0?delete e.dataset.queue:e.dataset.queue=String(n),n!==void 0&&e.dataset.lifecycle!==`active`&&(e.dataset.lifecycle=`active`,delete e.dataset.lifecycleAt,q(e))}for(let e of document.querySelectorAll(`[data-queue-action][data-queue-id]`)){let n=t.has(e.dataset.queueId??``);e.dataset.queueAction=n?`remove`:`add`,e.textContent=Se(n)}let n=document.querySelector(`[data-queue-option]`);n&&(n.textContent=ie(e.length))}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-history-toggle]`);if(!t)return;e.preventDefault(),e.stopPropagation();let n=t.parentElement?.querySelector(`[data-history-list]`);if(!n)return;let r=n.hidden;n.hidden=!r,t.setAttribute(`aria-expanded`,String(r))}),I();function z(e){for(let t of document.querySelectorAll(`[data-menu]`)){if(t===e)continue;let n=t.querySelector(`[data-menu-panel]`),r=t.querySelector(`[data-menu-trigger]`);n&&(n.hidden=!0),r?.setAttribute(`aria-expanded`,`false`),B(t)}}function B(e){let t=e.querySelector(`[data-menu-items]`),n=e.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!1),n&&(n.hidden=!0),e.querySelector(`[data-menu-error]`)?.remove(),e.querySelector(`[data-id-field]`)?.remove()}document.addEventListener(`keydown`,e=>{e.key===`Escape`&&z()}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`[data-menu]`);if(!n)return void z();let r=t.closest(`[data-menu-trigger]`);if(r){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-panel]`);if(!t)return;let i=t.hidden;z(n),B(n),t.hidden=!i,r.setAttribute(`aria-expanded`,String(i));return}let i=t.closest(`[data-copy-id]`);if(i?.dataset.copyId){e.preventDefault(),e.stopPropagation(),s(i,i.dataset.copyId);return}let a=t.closest(`[data-fetch-review]`);if(a?.dataset.fetchReview){e.preventDefault(),e.stopPropagation(),z();let t=a.closest(`[data-card]`);t&&Je([t]);return}let o=t.closest(`[data-mark-status]`);if(o?.dataset.markId){e.preventDefault(),e.stopPropagation(),z(),Be(o.dataset.markId,o.dataset.markStatus===`complete`);return}let c=t.closest(`[data-lifecycle-set]`);if(c?.dataset.lifecycleId){e.preventDefault(),e.stopPropagation(),z(),Ve([c.dataset.lifecycleId],c.dataset.lifecycleSet);return}let l=t.closest(`[data-queue-action]`);if(l?.dataset.queueId){e.preventDefault(),e.stopPropagation(),z(),Me(l.dataset.queueId,l.dataset.queueAction===`remove`?`remove`:`add`);return}if(t.closest(`[data-delete]`)){e.preventDefault(),e.stopPropagation();let t=n.querySelector(`[data-menu-items]`),r=n.querySelector(`[data-menu-confirm]`);t&&(t.hidden=!0),r&&(r.hidden=!1);return}if(t.closest(`[data-cancel-delete]`)){e.preventDefault(),e.stopPropagation(),B(n);return}if(t.closest(`[data-confirm-delete]`)){e.preventDefault(),e.stopPropagation(),Ne(n);return}e.preventDefault(),e.stopPropagation()});async function Ne(e){let t=e.querySelector(`[data-delete]`),n=t?.dataset.delete;if(!n)return;let r=e.querySelector(`[data-menu-confirm]`),i=e.querySelector(`[data-confirm-delete]`);i&&(i.disabled=!0,i.textContent=`Deleting`);try{let r=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({id:n,scope:t?.dataset.scope??`review`})});if(r.ok)return void window.location.reload();Pe(e,(await r.json().catch(()=>null))?.error??`That could not be deleted.`)}catch{Pe(e,`The workspace server did not answer. It may have stopped.`)}i&&(i.disabled=!1,i.textContent=`Delete`),r&&(r.hidden=!0);let a=e.querySelector(`[data-menu-items]`);a&&(a.hidden=!1)}function Pe(e,t){e.querySelector(`[data-menu-error]`)?.remove();let n=document.createElement(`p`);n.className=`prb-menu-error`,n.setAttribute(`data-menu-error`,``),n.textContent=t,e.querySelector(`[data-menu-panel]`)?.append(n)}function V(e){j=e,e||A.clear(),m&&(e?m.dataset.selecting=``:delete m.dataset.selecting),document.querySelector(`[data-select-mode]`)?.setAttribute(`aria-pressed`,String(e));for(let t of document.querySelectorAll(`.prb-card-link`))e?t.setAttribute(`aria-disabled`,`true`):t.removeAttribute(`aria-disabled`);H(),I()}function H(){T&&(T.hidden=!0),E&&(E.hidden=!1),D&&(D.hidden=!0,D.textContent=``)}function Fe(e){for(let e of p){let t=A.has(e.dataset.id??``),n=e.querySelector(`[data-select]`);n&&(n.checked=t),t?e.dataset.selected=``:delete e.dataset.selected}if(!w||(w.hidden=!j,!j))return;let t=new Set(e.filter(Ie).map(e=>e.dataset.id)),n=[...A].filter(e=>!t.has(e)).length;ke&&(ke.textContent=be(A.size,n)),O&&(O.textContent=c(e.length),O.disabled=e.every(e=>A.has(e.dataset.id??``))),Ae&&(Ae.textContent=fe(Le()));for(let e of w.querySelectorAll(`[data-bulk-mark], [data-bulk-lifecycle], [data-bulk-queue], [data-bulk-delete]`))e.disabled=A.size===0;M&&(M.hidden=!me(N,Y(W())))}function Ie(e){return!e.hidden&&e.closest(`details`)?.open!==!1}for(let e of document.querySelectorAll(`details[data-section]`))e.addEventListener(`toggle`,()=>Fe(P));document.querySelector(`[data-select-mode]`)?.addEventListener(`click`,()=>{V(!j)}),O?.addEventListener(`click`,()=>{for(let e of P)e.dataset.id&&A.add(e.dataset.id);H(),I()});function U(e){A.has(e)?A.delete(e):A.add(e),H(),I()}document.addEventListener(`change`,e=>{let t=e.target.closest(`[data-select]`);t?.dataset.select&&U(t.dataset.select)}),document.addEventListener(`click`,e=>{if(!j)return;let t=e.target,n=t.closest(`[data-card]`);n?.dataset.id&&(t.closest(`[data-select], [data-pin], [data-menu], [data-history-toggle]`)||(e.preventDefault(),U(n.dataset.id)))}),document.addEventListener(`keydown`,e=>{if(!j||e.key!==`Enter`)return;let t=e.target.closest(`.prb-card-link`)?.closest(`[data-card]`);t?.dataset.id&&(e.preventDefault(),U(t.dataset.id))});function W(){return he(p.filter(e=>A.has(e.dataset.id??``)),C)}function Le(){return W().reduce((e,t)=>e+Number(t.dataset.reviews??1),0)}function G(e){D&&(D.textContent=e,D.hidden=!1)}function K(e){for(let t of w?.querySelectorAll(`button`)??[])t.disabled=e}async function Re(e){let t=[...A];if(t.length!==0){K(!0);try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:t,complete:e})})).ok)return K(!1),G(`That could not be saved. The workspace server refused it.`)}catch{return K(!1),G(`The workspace server did not answer. It may have stopped.`)}ze(W(),e),K(!1),V(!1)}}function ze(e,t){let n=t?`complete`:`in-progress`,r=t?`in-progress`:`complete`;for(let t of e){t.dataset.status=n;let e=t.querySelector(`.prb-card-status`);e&&(e.dataset.status=n,e.textContent=ne(n));let i=t.querySelector(`[data-mark-status]`);i&&(i.dataset.markStatus=r,i.textContent=ce(r))}}async function Be(e,t){try{if(!(await fetch(`/status`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:[e],complete:t})})).ok)return}catch{return}ze(p.filter(t=>t.dataset.id===e),t),I()}async function Ve(e,t){let n;try{let r=await fetch(`/lifecycle`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,state:t})});n=r.ok?await r.json().catch(()=>null):null}catch{n=null}if(!n)return!1;let r=new Set(e);for(let e of p)r.has(e.dataset.id??``)&&(e.dataset.lifecycle=t,t===`active`?delete e.dataset.lifecycleAt:e.dataset.lifecycleAt=String(n.at),q(e));return R(n.queue),I(),!0}function q(e){let{stored:t,activity:n}=S(e),r=e.querySelector(`[data-lifecycle-chip]`);if(r){let i=_e(Oe(e),t,n);r.textContent=i??``,r.hidden=i===void 0}for(let r of e.querySelectorAll(`[data-lifecycle-set]`))r.hidden=!l(r.dataset.lifecycleSet,t,n)}async function He(e){let t=[...A];if(t.length===0)return;K(!0);let n=await Ve(t,e);if(K(!1),!n)return G(`That could not be saved. The workspace server refused it or did not answer.`);V(!1)}async function Ue(){let e=[...A];if(e.length===0)return;K(!0);let t=null;try{let n=await fetch(`/delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e})});if(t=n.ok?await n.json().catch(()=>null):null,!t)return K(!1),H(),G(`Nothing was deleted. The workspace server refused it.`)}catch{return K(!1),H(),G(`The workspace server did not answer. It may have stopped.`)}let n=t.blocked??[],r=new Set(n.map(e=>e.id));for(let e of W())r.has(e.dataset.id??``)||e.remove();p=p.filter(e=>e.isConnected),A.clear();for(let e of r)A.add(e);if(K(!1),H(),n.length===0)return V(!1);I(),G([...new Set(n.map(e=>e.error))].join(` `))}async function We(){let e=W().map(e=>e.dataset.id??``).filter(Boolean);if(e.length===0)return;K(!0);let t=null;try{let n=await fetch(`/queue`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:e,action:`add`})});t=n.ok?await n.json().catch(()=>null):null}catch{return K(!1),H(),G(`The workspace server did not answer. It may have stopped.`)}if(!t?.queue)return K(!1),H(),G(`Nothing was added. The workspace server refused it.`);R(t.queue);let n=t.refused??[];A.clear();for(let e of n)A.add(e.id);if(K(!1),H(),n.length===0)return V(!1);I(),G([...new Set(n.map(e=>e.error))].join(` `))}w?.addEventListener(`click`,e=>{let t=e.target;if(t.closest(`[data-bulk-queue]`))return void We();let n=t.closest(`[data-bulk-mark]`);if(n)return void Re(n.dataset.bulkMark===`complete`);let r=t.closest(`[data-bulk-lifecycle]`);if(r)return void He(r.dataset.bulkLifecycle);if(t.closest(`[data-bulk-delete]`)){je&&(je.textContent=ye(Le())),E&&(E.hidden=!0),T&&(T.hidden=!1);return}if(t.closest(`[data-bulk-confirm-delete]`))return void Ue();if(t.closest(`[data-bulk-cancel-delete]`))return H();if(t.closest(`[data-bulk-cancel]`))return V(!1)}),o(window,()=>window.location.reload()),ue(window,document.querySelector(`.prb-shell > main`));var J=`prb-fetch-summary`;function Y(e){return e.map(e=>({lineage:(e.dataset.lineage??e.dataset.id??``).split(` `).filter(Boolean)}))}function Ge(e){return ge(Y(e),N)}function Ke(){for(let e of p){let t=e.querySelector(`[data-fetch-review]`);t&&(t.hidden=!me(N,Y([e])))}}async function qe(){try{let e=await fetch(`/fetch-updates`);if(!e.ok)return;N=(await e.json()).targets??{}}catch{return}Ke(),I()}async function Je(e,n){let i=Ge(e);if(F||i.repositories===0)return;F=!0;let a=[M,...document.querySelectorAll(`[data-fetch-review]`)];for(let e of a)e&&(e.disabled=!0);n&&(n.textContent=re(i.repositories));let o=null;try{let e=await fetch(`/fetch-updates`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ids:i.ids})});e.ok&&(o=await e.json())}catch{}F=!1;for(let e of a)e&&(e.disabled=!1);n&&(n.textContent=ve),I();let s=o??{repositories:i.repositories,fetched:0,failed:[],moved:0},c={kind:s.fetched<s.repositories?`failed`:`ready`,text:le(s)};if(s.moved>0||Z){try{window.sessionStorage.setItem(J,JSON.stringify(c))}catch{}if(!Q())return void window.location.reload();Z=!0}t(r(),c)}try{let e=window.sessionStorage.getItem(J);if(e){window.sessionStorage.removeItem(J);let n=JSON.parse(e);typeof n.kind==`string`&&typeof n.text==`string`&&t(r(),{kind:n.kind,text:n.text})}}catch{}M?.addEventListener(`click`,()=>void Je(W(),M)),qe();var Ye=document.body.dataset.indexRevision??``,X=document.body.dataset.live===`true`?Date.now():0,Z=!1;function Q(){return A.size>0||document.activeElement===h||F}function Xe(){Z&&!Q()&&window.location.reload()}async function $(){try{let e=await fetch(`/revision`);if(e.ok){i(document,!0);let t=await e.json();n(document,t),t.live&&X===0&&(X=Date.now()),t.live||(X=0);let r=xe(Ye,t.revision??``,Q());if(r===`reload`)return void window.location.reload();r===`hold`&&(Z=!0)}}catch{i(document,!1)}window.setTimeout(()=>void $(),de(X===0?2**53-1:Date.now()-X))}$(),h?.addEventListener(`blur`,Xe),document.addEventListener(`click`,()=>window.setTimeout(Xe,0)),e();
|
package/static/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,c as t,t as n,u as r}from"./chunk-B5CvMZtt.js";function i(e,t){if(e===``)return null;try{let n=new URL(e);return n.origin===t&&/^\/r\/[^/]+$/.test(n.pathname)?n.href:null}catch{return null}}function a(e){let t=[...document.querySelectorAll(`[data-shutdown]`)],n=document.querySelector(`[data-shutdown-dialog]`),r=document.querySelector(`[data-shutdown-confirm]`);for(let e of t)e.addEventListener(`click`,()=>n?.showModal());document.querySelector(`[data-shutdown-cancel]`)?.addEventListener(`click`,()=>n?.close()),r?.addEventListener(`click`,()=>{r.disabled=!0,r.textContent=`Stopping…`,fetch(e,{method:`POST`}).then(e=>{if(!e.ok)throw Error(`Shutdown refused: ${e.status}`);n?.close(),o(t)}).catch(()=>{r.disabled=!1,r.textContent=`Stop server`})})}function o(e){document.body.dataset.serverStopped=`true`,t(document,`unreachable`);let n=document.createElement(`div`);n.className=`prb-stopped-notice`,n.setAttribute(`role`,`status`);let r=document.body.dataset.wayBack;n.textContent=r?`Workspace server stopped. This page is no longer being served. Run ${r} to bring it back.`:`Workspace server stopped. This page is no longer being served.`,document.body.prepend(n);for(let t of e)t.disabled=!0,t.classList.contains(`prb-strip-action`)||(t.textContent=`Server stopped`)}var s=[{id:`system`,label:`System`,help:`Follow your device setting`},{id:`light`,label:`Light`,help:`Always use light mode`},{id:`dark`,label:`Dark`,help:`Always use dark mode`}];function c(e){return s.some(t=>t.id===e)}function l(e){let t=e.querySelector(`[data-settings-theme]:checked`)?.value;return c(t)?t:void 0}function u(e,t){e.documentElement.dataset.theme=t}function d(e){for(let t of e.querySelectorAll(`[data-settings-theme]`))t.addEventListener(`change`,()=>{let t=l(e);t&&u(e,t)})}a(`/shutdown`),n(`/restart`);function f(){let e=document.querySelector(`[data-settings-back]`),t=i(document.referrer,window.location.origin);if(!e||t===null)return;e.href=t,e.textContent=``;let n=document.createElement(`span`);n.setAttribute(`aria-hidden`,`true`),n.textContent=`‹`,e.append(n,` Back to the review`)}f(),d(document);var p=document.querySelector(`[data-settings-save]`),m=document.querySelector(`[data-settings-status]`),h=document.querySelector(`[data-settings-port]`),g=document.querySelector(`[data-settings-port-error]`),_=document.querySelector(`[data-settings-agent]`);function v(){let e=document.querySelector(`[data-settings-usage]:checked`);return e?e.value===`on`:void 0}function y(e,t){m&&(m.textContent=e,m.dataset.kind=t)}function b(e){g&&(g.textContent=e??``),h&&(e?(h.setAttribute(`aria-invalid`,`true`),h.focus(),h.select()):h.removeAttribute(`aria-invalid`))}async function x(){if(!p)return;let e=v(),t=l(document),n={...h?{port:h.value.trim()}:{},..._?{agent:_.value}:{},...e===void 0?{}:{usageCounts:e},...t===void 0?{}:{theme:t}};p.disabled=!0,p.textContent=`Saving`;try{let e=await(await fetch(`/settings`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n)})).json().catch(()=>null);if(!e){y(`Nothing was saved. The workspace server did not answer.`,`error`);return}if(e.error){b(e.error),y(`Nothing was saved.`,`error`);return}b(null),h&&(h.value=String(e.port.configured)),u(document,e.theme),y(e.restartRequired?`Saved. This page is served on port ${e.port.current}; the workspace moves to ${e.port.configured} the next time it starts.`:`Saved.`,`saved`)}catch{y(`Nothing was saved. The workspace server could not be reached.`,`error`)}finally{p.disabled=!1,p.textContent=`Save changes`}}p?.addEventListener(`click`,()=>void x()),e(),r(window,()=>window.location.reload());
|
package/static/shell.css
CHANGED
|
@@ -281,7 +281,13 @@ body > * { flex: 0 0 auto; }
|
|
|
281
281
|
.prb-wordmark b { color: var(--wordmark-accent); font-weight: 700; }
|
|
282
282
|
|
|
283
283
|
/* ── Header ── */
|
|
284
|
+
/* Its own layer, above the panes. The `...` menu and the range panel hang down out of this bar over
|
|
285
|
+
the body, and without a stacking context of its own they competed at the root with what the body
|
|
286
|
+
positions: Buddy AI's edge tab (4) painted over an open menu (3), and so, at narrow widths, did
|
|
287
|
+
the assistant itself. */
|
|
284
288
|
.prb-header {
|
|
289
|
+
position: relative;
|
|
290
|
+
z-index: 5;
|
|
285
291
|
height: var(--header-height);
|
|
286
292
|
display: flex;
|
|
287
293
|
align-items: center;
|
|
@@ -412,6 +418,9 @@ body > * { flex: 0 0 auto; }
|
|
|
412
418
|
text-underline-offset: 2px;
|
|
413
419
|
}
|
|
414
420
|
.prb-feedback:hover { color: var(--text-primary); opacity: 1; }
|
|
421
|
+
/* The words, and only the words, above phone width. The icon is the phone-width form, where the
|
|
422
|
+
strip has no room for a text link; see the 600px block. */
|
|
423
|
+
.prb-feedback-icon { display: none; }
|
|
415
424
|
|
|
416
425
|
/* ── The global strip ──
|
|
417
426
|
*
|
|
@@ -2676,9 +2685,14 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
2676
2685
|
.prb-header-nav { display: flex; }
|
|
2677
2686
|
/* The assistant is an overlay at this width, not a column, so there is no boundary to drag. */
|
|
2678
2687
|
.prb-ask-resize { display: none; }
|
|
2688
|
+
/* Anchored to the body it covers, not to a sum of the bars above it. That sum assumed the header
|
|
2689
|
+
was a fixed height with nothing between it and the panes, and neither holds: a banner (job
|
|
2690
|
+
status, freshness, lineage) sits there often, and at phone width the review bar wraps. `.prb-body`
|
|
2691
|
+
is already positioned, so the panel covers exactly the panes and leaves everything above alone. */
|
|
2679
2692
|
.prb-body[data-ask='open'] .prb-ask {
|
|
2680
|
-
position:
|
|
2681
|
-
inset:
|
|
2693
|
+
position: absolute;
|
|
2694
|
+
inset: 0 0 0 auto;
|
|
2695
|
+
z-index: 3;
|
|
2682
2696
|
width: min(var(--ask-width), 100%);
|
|
2683
2697
|
}
|
|
2684
2698
|
.pr-helper-sidebar.prb-pane { padding: 20px 18px 48px; }
|
|
@@ -2689,6 +2703,47 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
2689
2703
|
.prb-context .prb-index-controls { max-width: none; padding: 0; }
|
|
2690
2704
|
}
|
|
2691
2705
|
|
|
2706
|
+
/* Phone width. Both bars were one fixed-height row of things that could not shrink, so below about
|
|
2707
|
+
600px the review bar and below about 450px the strip ran past the right edge and the whole page
|
|
2708
|
+
scrolled sideways. Placed after every base rule it overrides (the header, the strip, the change
|
|
2709
|
+
ref, the stats), because at equal specificity the later rule wins. */
|
|
2710
|
+
@media (max-width: 600px) {
|
|
2711
|
+
/* The strip keeps every control and the build; it gives up spacing and the feedback link's words.
|
|
2712
|
+
The accessible name stays "Send feedback", from the visually hidden label. */
|
|
2713
|
+
.prb-strip { gap: 4px; padding: 0 16px; }
|
|
2714
|
+
.prb-strip .prb-wordmark { min-width: 0; overflow: hidden; }
|
|
2715
|
+
.prb-strip .prb-build { margin-left: 4px; }
|
|
2716
|
+
.prb-feedback { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-muted); opacity: 1; }
|
|
2717
|
+
.prb-feedback:hover { background: var(--surface-2); }
|
|
2718
|
+
.prb-feedback-icon { display: inline-flex; }
|
|
2719
|
+
.prb-feedback-icon svg { width: 16px; height: 16px; }
|
|
2720
|
+
.prb-feedback-label {
|
|
2721
|
+
position: absolute;
|
|
2722
|
+
width: 1px;
|
|
2723
|
+
height: 1px;
|
|
2724
|
+
margin: -1px;
|
|
2725
|
+
overflow: hidden;
|
|
2726
|
+
clip-path: inset(50%);
|
|
2727
|
+
white-space: nowrap;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
/* The review bar becomes two rows: what the review is of, then its facts and controls. It grows
|
|
2731
|
+
with its content rather than clipping it; the panes below take what is left, and Buddy AI is
|
|
2732
|
+
anchored to them rather than to this bar's height. */
|
|
2733
|
+
.prb-review-bar {
|
|
2734
|
+
height: auto;
|
|
2735
|
+
min-height: var(--header-height);
|
|
2736
|
+
flex-wrap: wrap;
|
|
2737
|
+
row-gap: 6px;
|
|
2738
|
+
column-gap: 12px;
|
|
2739
|
+
padding: 10px 16px;
|
|
2740
|
+
}
|
|
2741
|
+
.prb-review-bar .prb-change-ref { flex: 1 1 0; }
|
|
2742
|
+
.prb-review-bar .prb-header-stats { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; row-gap: 6px; column-gap: 12px; }
|
|
2743
|
+
/* The menu closes the row wherever the row ends, so it stays in the same place as the facts wrap. */
|
|
2744
|
+
.prb-review-bar .prb-header-stats > .prb-menu { margin-left: auto; }
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2692
2747
|
@media (prefers-reduced-motion: reduce) {
|
|
2693
2748
|
*, *::before, *::after {
|
|
2694
2749
|
animation-duration: 0.01ms !important;
|
|
@@ -2956,38 +3011,6 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
2956
3011
|
color: var(--text-tertiary, var(--text-secondary));
|
|
2957
3012
|
}
|
|
2958
3013
|
|
|
2959
|
-
/* The way back into the batch. A bordered row rather than a bare link, because it is the one
|
|
2960
|
-
destination on this page that changes as the reviewer works, and it has to be findable at a
|
|
2961
|
-
glance on every return. The label and the title are separate lines of weight so the eye lands
|
|
2962
|
-
on which review it will open. */
|
|
2963
|
-
.prb-index-continue {
|
|
2964
|
-
display: flex;
|
|
2965
|
-
align-items: baseline;
|
|
2966
|
-
gap: 10px;
|
|
2967
|
-
margin: 0 0 14px;
|
|
2968
|
-
padding: 10px 14px;
|
|
2969
|
-
border: 1px solid var(--border);
|
|
2970
|
-
border-left: 3px solid var(--brand);
|
|
2971
|
-
border-radius: 8px;
|
|
2972
|
-
color: var(--text-primary);
|
|
2973
|
-
text-decoration: none;
|
|
2974
|
-
}
|
|
2975
|
-
.prb-index-continue:hover { border-color: var(--border-strong); }
|
|
2976
|
-
.prb-index-continue:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
|
|
2977
|
-
.prb-index-continue-label {
|
|
2978
|
-
flex: none;
|
|
2979
|
-
font-size: var(--t-meta);
|
|
2980
|
-
font-weight: 400;
|
|
2981
|
-
color: var(--brand);
|
|
2982
|
-
}
|
|
2983
|
-
.prb-index-continue-title {
|
|
2984
|
-
min-width: 0;
|
|
2985
|
-
overflow: hidden;
|
|
2986
|
-
font-size: var(--t-body);
|
|
2987
|
-
white-space: nowrap;
|
|
2988
|
-
text-overflow: ellipsis;
|
|
2989
|
-
}
|
|
2990
|
-
|
|
2991
3014
|
/* Between the controls and the list, quiet, because it describes the list rather than announcing
|
|
2992
3015
|
anything. It is rewritten in the browser as a filter narrows the set. */
|
|
2993
3016
|
.prb-index-summary {
|
|
@@ -3087,21 +3110,6 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
3087
3110
|
.prb-index-status select:focus-visible { outline: none; }
|
|
3088
3111
|
.prb-index-status:has(select[data-active]) { border-color: var(--brand); background-color: var(--brand); color: var(--on-brand-quiet); }
|
|
3089
3112
|
.prb-index-status select[data-active] { color: var(--on-brand); }
|
|
3090
|
-
/* Fetch updates: the secondary treatment Check for updates and Mark reviewed use, at the selects'
|
|
3091
|
-
height so the row lines up. What a run did shows in its own label for a moment, not in a row. */
|
|
3092
|
-
.prb-index-fetch-button {
|
|
3093
|
-
padding: 7px 12px;
|
|
3094
|
-
border: 1px solid var(--border);
|
|
3095
|
-
border-radius: 8px;
|
|
3096
|
-
background: transparent;
|
|
3097
|
-
color: var(--text-secondary);
|
|
3098
|
-
font: inherit;
|
|
3099
|
-
font-size: var(--t-meta);
|
|
3100
|
-
white-space: nowrap;
|
|
3101
|
-
cursor: pointer;
|
|
3102
|
-
}
|
|
3103
|
-
.prb-index-fetch-button:hover { border-color: var(--border-strong); color: var(--text-primary); }
|
|
3104
|
-
.prb-index-fetch-button:disabled { cursor: default; color: var(--text-muted); border-color: var(--border); }
|
|
3105
3113
|
|
|
3106
3114
|
.prb-cards {
|
|
3107
3115
|
display: flex;
|
|
@@ -3112,10 +3120,11 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
3112
3120
|
}
|
|
3113
3121
|
|
|
3114
3122
|
/* ── Sections and Load more ──
|
|
3115
|
-
Waiting and Done
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
.
|
|
3123
|
+
Pinned, Active, Waiting and Done, each a disclosure headed at the weight of the count line,
|
|
3124
|
+
because they are the same kind of thing, a count of cards, and must not outrank the cards. The
|
|
3125
|
+
gap goes only after a section that is drawn, so whichever comes first sits under the count line
|
|
3126
|
+
the way the list always did. Load more is one per section, quiet, and centred under its cards. */
|
|
3127
|
+
.prb-index-section:not([hidden]) ~ .prb-index-section { margin-top: 24px; }
|
|
3119
3128
|
.prb-index-section[hidden] { display: none; }
|
|
3120
3129
|
.prb-index-section-head {
|
|
3121
3130
|
margin: 0 2px 10px;
|
|
@@ -4604,8 +4613,32 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
4604
4613
|
}
|
|
4605
4614
|
.prb-kiss-field .pr-helper-markdown { font-size: var(--t-body); line-height: var(--lh-body); color: var(--pane-ink); }
|
|
4606
4615
|
|
|
4616
|
+
/* The case, before any heading: the reader reaches the point first. Body size in the full ink, the
|
|
4617
|
+
same register as the approach under it, so the two read as one argument in two steps. */
|
|
4618
|
+
.prb-kiss-gist { margin: 0 0 12px; font-size: var(--t-body); line-height: var(--lh-body); color: var(--pane-ink); }
|
|
4619
|
+
.prb-kiss-gist p { margin: 0; }
|
|
4620
|
+
|
|
4621
|
+
/* Signals to scan, not prose: one line, separators between, wrapping only between items. */
|
|
4622
|
+
.prb-kiss-gains { margin: 0 0 10px; font-size: var(--t-meta); line-height: var(--lh-body); color: var(--pane-ink-muted); overflow-wrap: anywhere; }
|
|
4623
|
+
/* Gains are a few words each and read best whole. The estimate is not held to that: a record from
|
|
4624
|
+
before schema 2 carries a whole sentence there, which must wrap rather than widen the pane. */
|
|
4625
|
+
.prb-kiss-gain:not([data-estimate]) { white-space: nowrap; }
|
|
4626
|
+
.prb-kiss-gain-note { color: var(--pane-ink-faint); }
|
|
4627
|
+
.prb-kiss-gain-sep { color: var(--pane-ink-faint); }
|
|
4628
|
+
|
|
4629
|
+
.prb-kiss-caveat { margin: 0 0 10px; font-size: var(--t-meta); line-height: var(--lh-body); color: var(--pane-ink); }
|
|
4630
|
+
.prb-kiss-caveat-label {
|
|
4631
|
+
margin-right: 4px;
|
|
4632
|
+
font-size: var(--t-pill);
|
|
4633
|
+
font-weight: 700;
|
|
4634
|
+
letter-spacing: 0.06em;
|
|
4635
|
+
text-transform: uppercase;
|
|
4636
|
+
color: var(--pane-ink-faint);
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4607
4639
|
/* Something to send after reading it, not instead of reading it: quoted so it reads as a draft
|
|
4608
4640
|
somebody still owns rather than as a message the product has decided to send. */
|
|
4641
|
+
.prb-kiss-evidence,
|
|
4609
4642
|
.prb-kiss-draft {
|
|
4610
4643
|
margin: 14px 0;
|
|
4611
4644
|
padding: 12px 14px;
|
|
@@ -4616,6 +4649,7 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
4616
4649
|
other than the reader, and open by default it doubles the card's height with prose to scroll
|
|
4617
4650
|
past. The label keeps the field register of everything above it, so a closed row still reads as
|
|
4618
4651
|
part of the card rather than as a control bolted under it. */
|
|
4652
|
+
.prb-kiss-evidence-title,
|
|
4619
4653
|
.prb-kiss-draft-title {
|
|
4620
4654
|
margin: 0;
|
|
4621
4655
|
font-size: var(--t-pill);
|
|
@@ -4625,8 +4659,13 @@ a.prb-rail-item { text-decoration: none; }
|
|
|
4625
4659
|
color: var(--pane-ink-faint);
|
|
4626
4660
|
cursor: pointer;
|
|
4627
4661
|
}
|
|
4662
|
+
.prb-kiss-evidence-title:hover,
|
|
4628
4663
|
.prb-kiss-draft-title:hover { color: var(--pane-ink); }
|
|
4664
|
+
.prb-kiss-evidence[open] .prb-kiss-evidence-title,
|
|
4629
4665
|
.prb-kiss-draft[open] .prb-kiss-draft-title { margin-bottom: 10px; }
|
|
4666
|
+
/* The evidence box follows the card's last visible block, and a draft beneath it sits close. */
|
|
4667
|
+
.prb-kiss-evidence + .prb-kiss-draft { margin-top: -6px; }
|
|
4668
|
+
.prb-kiss-evidence .prb-kiss-locations { margin-top: 4px; }
|
|
4630
4669
|
.prb-kiss-draft blockquote { margin: 0; font-size: var(--t-body); line-height: var(--lh-body); color: var(--pane-ink); }
|
|
4631
4670
|
|
|
4632
4671
|
/* The same control the assistant's replies carry, in this pane's light palette. Literal colours
|
|
@@ -5165,10 +5204,13 @@ body .prb-body[data-focus='buddy'] .prb-msg-user { max-width: min(90%, 78ch); }
|
|
|
5165
5204
|
width: 24px;
|
|
5166
5205
|
height: 24px;
|
|
5167
5206
|
margin-top: -3px;
|
|
5168
|
-
|
|
5207
|
+
border-radius: 6px;
|
|
5208
|
+
color: var(--pane-ink-muted);
|
|
5169
5209
|
}
|
|
5170
|
-
|
|
5171
|
-
|
|
5210
|
+
/* Copy beside it has the same rest, hover and size (sidebar.css): grey, a soft surface, and purple
|
|
5211
|
+
only while this menu is open, because then it is the AI action in play. */
|
|
5212
|
+
.prb-doc .prb-ask-buddy-trigger:hover { background: rgba(31, 35, 40, 0.07); color: var(--pane-ink-muted); }
|
|
5213
|
+
.prb-doc .prb-ask-buddy-trigger[aria-expanded='true'] { background: rgba(130, 80, 223, 0.1); color: var(--pane-accent-ink); }
|
|
5172
5214
|
.prb-doc .prb-ask-buddy-trigger:focus-visible { outline: 2px solid var(--pane-accent); outline-offset: -2px; }
|
|
5173
5215
|
|
|
5174
5216
|
/* The tooltip Copy uses beside it, so the two icons explain themselves the same way. */
|