p-backlog 0.12.1 → 0.13.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 +77 -0
- package/README.md +7 -6
- package/README.ru.md +6 -5
- package/dist/cli.js +1394 -1062
- package/dist/web/assets/CodeTab-BokbzP4a.js +1 -0
- package/dist/web/assets/CostTab-D91_w1H0.js +1 -0
- package/dist/web/assets/EffectTab-CRlWfFF0.js +1 -0
- package/dist/web/assets/Figure-CO87y2TD.js +1 -0
- package/dist/web/assets/OverviewTab-LJh-9xzS.css +1 -0
- package/dist/web/assets/OverviewTab-naYN8aXk.js +1 -0
- package/dist/web/assets/Page-BHZdQQhE.js +59 -0
- package/dist/web/assets/PanelRows--wt894cQ.css +1 -0
- package/dist/web/assets/PanelRows.module-rg1MXy2z.js +1 -0
- package/dist/web/assets/QualityTab-BMfBa6YW.js +1 -0
- package/dist/web/assets/ShareBar-DBiU0f9_.js +1 -0
- package/dist/web/assets/StatsPage-D_urZSgL.css +1 -0
- package/dist/web/assets/StatsPage-Dr1pco7X.js +1 -0
- package/dist/web/assets/StatsTabState-CePos7h7.js +1 -0
- package/dist/web/assets/{StatsTable-Bkv5EU2n.js → StatsTable-CqH14eSD.js} +1 -1
- package/dist/web/assets/UnavailableRepos-BBbuCPNM.js +1 -0
- package/dist/web/assets/index-DpWYLB0A.js +2 -0
- package/dist/web/assets/start-Cw9zPEW-.js +42 -0
- package/dist/web/assets/start-DCkTSXpO.css +1 -0
- package/dist/web/assets/use-grain-panel-BKTkjTK3.js +55 -0
- package/dist/web/assets/web-paths-yWGbLD6t.js +1 -0
- package/dist/web/index.html +1 -1
- package/package.json +2 -2
- package/skill/backlog/SKILL.md +5 -2
- package/skill/backlog-en/SKILL.md +4 -2
- package/dist/web/assets/CodeTab-DnS8ehhs.js +0 -1
- package/dist/web/assets/CostTab-X-3Okq8y.js +0 -1
- package/dist/web/assets/EffectTab-DITN7zNC.js +0 -1
- package/dist/web/assets/Figure-8RcQUP-G.js +0 -1
- package/dist/web/assets/OverviewTab-BLcQ0tEl.js +0 -1
- package/dist/web/assets/OverviewTab-DeoTLTwg.css +0 -1
- package/dist/web/assets/Page-CtAVbr-z.js +0 -59
- package/dist/web/assets/PanelRows-6zccccnE.css +0 -1
- package/dist/web/assets/PanelRows.module-ZonfBTD-.js +0 -1
- package/dist/web/assets/QualityTab-tIfLA5rR.js +0 -1
- package/dist/web/assets/ShareBar-z49KNtHZ.js +0 -1
- package/dist/web/assets/StatsPage-B_pacptZ.css +0 -1
- package/dist/web/assets/StatsPage-RN5PvALN.js +0 -1
- package/dist/web/assets/StatsTabState-DuK85b6t.js +0 -1
- package/dist/web/assets/UnavailableRepos-D-bhtLZ4.js +0 -1
- package/dist/web/assets/index-0AsbsTM1.js +0 -2
- package/dist/web/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/dist/web/assets/start--LUt1aUh.js +0 -42
- package/dist/web/assets/start-rlqS5Z1d.css +0 -1
- package/dist/web/assets/use-grain-panel-DTtCKyng.js +0 -55
- package/dist/web/assets/web-paths-D-xBEJAy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{At as e,Bt as t,Ct as n,Dt as r,Et as i,Ft as a,Gt as o,Ht as s,It as c,Kt as l,Lt as u,Mt as d,Nt as f,Ot as p,Pt as m,Sn as h,St as g,Tt as _,Ut as v,Vt as y,Wt as b,at as x,bt as S,ct as C,fn as w,ft as T,gt as E,ht as D,it as O,jt as k,kt as A,nt as j,ot as ee,qt as te,rt as M,st as N,ut as P,vt as F,wt as I,xt as ne,yt as re,zt as ie}from"./Page-BHZdQQhE.js";import{t as ae}from"./index-DpWYLB0A.js";var L={};function R(e,t){!e&&!L[t]&&(L[t]=!0,console.warn(t))}var z=h(w(),1),oe=[`HydrateFallback`,`hydrateFallbackElement`],se=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ce({router:e,flushSync:t,onError:n,useTransitions:o}){o=r()||o;let[s,c]=z.useState(e.state),[l,u]=(0,z.useOptimistic)(s),[d,f]=z.useState(),[p,m]=z.useState({isTransitioning:!1}),[h,_]=z.useState(),[v,y]=z.useState(),[b,x]=z.useState(),C=z.useRef(new Map),w=z.useCallback((r,{deletedFetchers:i,newErrors:s,flushSync:l,viewTransitionOpts:d})=>{s&&n&&Object.values(s).forEach(e=>n(e,{location:r.location,params:r.matches[0]?.params??{},pattern:a(r.matches)})),r.fetchers.forEach((e,t)=>{e.data!==void 0&&C.current.set(t,e.data)}),i.forEach(e=>C.current.delete(e)),R(l===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let p=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(R(d==null||p,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!d||!p){t&&l?t(()=>c(r)):o===!1?c(r):z.startTransition(()=>{o===!0&&u(e=>B(e,r)),c(r)});return}if(t&&l){t(()=>{v&&(h?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>c(r))});n.finished.finally(()=>{t(()=>{_(void 0),y(void 0),f(void 0),m({isTransitioning:!1})})}),t(()=>y(n));return}v?(h?.resolve(),v.skipTransition(),x({state:r,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(f(r),m({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))},[e.window,t,v,h,o,u,n]);z.useLayoutEffect(()=>e.subscribe(w),[e,w]),z.useEffect(()=>{p.isTransitioning&&!p.flushSync&&_(new se)},[p]),z.useEffect(()=>{if(h&&d&&e.window){let t=d,n=h.promise,r=e.window.document.startViewTransition(async()=>{o===!1?c(t):z.startTransition(()=>{o===!0&&u(e=>B(e,t)),c(t)}),await n});r.finished.finally(()=>{_(void 0),y(void 0),f(void 0),m({isTransitioning:!1})}),y(r)}},[d,h,e.window,o,u]),z.useEffect(()=>{h&&d&&l.location.key===d.location.key&&h.resolve()},[h,v,l.location,d]),z.useEffect(()=>{!p.isTransitioning&&b&&(f(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),x(void 0))},[p.isTransitioning,b]);let T=z.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),E=e.basename||`/`,D=z.useMemo(()=>({router:e,navigator:T,static:!1,basename:E,onError:n}),[e,T,E,n]),O=z.useMemo(()=>({historyAction:l.historyAction,location:l.location,matches:l.matches,initialized:l.initialized,renderFallback:l.renderFallback,restoreScrollPosition:l.restoreScrollPosition,preventScrollReset:l.preventScrollReset,blockers:l.blockers}),[l.historyAction,l.location,l.matches,l.initialized,l.renderFallback,l.restoreScrollPosition,l.preventScrollReset,l.blockers]),k=z.useMemo(()=>({navigation:l.navigation,revalidation:l.revalidation}),[l.navigation,l.revalidation]),A=z.useMemo(()=>({loaderData:l.loaderData,actionData:l.actionData,errors:l.errors}),[l.loaderData,l.actionData,l.errors]),j=z.useMemo(()=>({fetchers:l.fetchers,fetcherData:C.current}),[l.fetchers]);return z.createElement(z.Fragment,null,z.createElement(F.Provider,{value:D},z.createElement(ne.Provider,{value:O},z.createElement(S.Provider,{value:k},z.createElement(re.Provider,{value:A},z.createElement(g.Provider,{value:j},z.createElement(i.Provider,{value:p},z.createElement(pe,{basename:E,location:l.location,navigationType:l.historyAction,navigator:T,useTransitions:o},z.createElement(le,{routes:e.routes,manifest:e.manifest,state:l,isStatic:!1,onError:n})))))))),null)}function B(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var le=z.memo(ue);function ue({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=z.useContext(F);return b(a,`You must render this element inside a <DataRouterContext.Provider> element`),E(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function de({to:n,replace:r,state:i,relative:a}){b(N(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:o,navigator:s}=z.useContext(I);l(!o,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:c}=z.useContext(_),{pathname:u}=C(),d=P(),f=t(n,m(c),u,a===`path`);e(typeof n==`string`?n:v(n),s.createHref(f),A(s),`reject`);let p=JSON.stringify(f);return z.useEffect(()=>{d(JSON.parse(p),{replace:r,state:i,relative:a})},[d,p,a,r,i]),null}function fe(e){return T(e.context)}function pe({basename:e=`/`,children:t=null,location:r,navigationType:i=`POP`,navigator:a,static:s=!1,useTransitions:c}){b(!N(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let u=e.replace(/^\/*/,`/`),d=z.useMemo(()=>({basename:u,navigator:a,static:s,useTransitions:c,future:{}}),[u,a,s,c]);typeof r==`string`&&(r=o(r));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:g=`default`,mask:_}=r,v=z.useMemo(()=>{let e=y(f,u);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:g,mask:_},navigationType:i}},[u,f,p,m,h,g,i,_]);return l(v!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:z.createElement(I.Provider,{value:d},z.createElement(n.Provider,{children:t,value:v}))}z.Component;var V=`application/x-www-form-urlencoded`;function H(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function me(e){return H(e)&&e.tagName.toLowerCase()===`button`}function he(e){return H(e)&&e.tagName.toLowerCase()===`form`}function ge(e){return H(e)&&e.tagName.toLowerCase()===`input`}function _e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ve(e,t){return e.button===0&&(!t||t===`_self`)&&!_e(e)}function U(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ye(e,t){let n=U(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var W=null;function be(){if(W===null)try{new FormData(document.createElement(`form`),0),W=!1}catch{W=!0}return W}var xe=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function G(e){return e!=null&&!xe.has(e)?(l(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`),null):e}function Se(e,t){let n,r,i,a,o;if(he(e)){let o=e.getAttribute(`action`);r=o?y(o,t):null,n=e.getAttribute(`method`)||`get`,i=G(e.getAttribute(`enctype`))||V,a=new FormData(e)}else if(me(e)||ge(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?y(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=G(e.getAttribute(`formenctype`))||G(o.getAttribute(`enctype`))||V,a=new FormData(o,e),!be()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(H(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=V,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Ce(e,t){if(e===!1||e==null)throw Error(t)}function we(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function Te(e,t){if(e.id in t)return t[e.id];try{let n=await ae(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ee(e){return e!=null&&typeof e.page==`string`}function De(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Oe(e,t,n){return Ne((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Te(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(De).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ke(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ae(e,t,{includeHydrateFallback:n}={}){return je(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function je(e){return[...new Set(e)]}function Me(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ne(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ee(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Me(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var K=z.createContext(void 0);K.displayName=`FrameworkContext`;function q(){let e=z.useContext(K);return Ce(e,`You must render this element inside a <HydratedRouter> element`),e}function Pe(e,t){let n=z.useContext(K),[r,i]=z.useState(!1),[a,o]=z.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=z.useRef(null);z.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),z.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:J(s,p),onBlur:J(c,m),onMouseEnter:J(l,p),onMouseLeave:J(u,m),onTouchStart:J(d,p)}]:[a,f,{}]:[!1,f,{}]}function J(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Fe({page:e,...t}){let n=r(),{nonce:i}=q(),{router:a}=M(`PrefetchPageLinks`),o=z.useMemo(()=>a.match(e),[a,a.routes,e]);return o?(t.nonce==null&&i&&(t={...t,nonce:i}),n?z.createElement(Le,{page:e,matches:o,...t}):z.createElement(Re,{page:e,matches:o,...t})):null}function Ie(e){let{manifest:t,routeModules:n}=q(),[r,i]=z.useState([]);return z.useEffect(()=>{let r=!1;return Oe(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Le({page:e,matches:t,...n}){let r=C(),i=z.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=we(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return z.createElement(z.Fragment,null,i.map(e=>z.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Re({page:e,matches:t,...n}){let r=C(),{manifest:i,routeModules:a}=q(),{matches:o}=x(`PrefetchPageLinks`),{loaderData:s}=O(`PrefetchPageLinks`),c=z.useMemo(()=>ke(e,t,o,i,r,`data`),[e,t,o,i,r]),l=z.useMemo(()=>ke(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=z.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=we(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=z.useMemo(()=>Ae(l,i),[l,i]),f=Ie(l);return z.createElement(z.Fragment,null,u.map(e=>z.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>z.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>z.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ze(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Be=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Be&&(window.__reactRouterVersion=`8`)}catch{}function Ve(e,t){return p({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:s({window:t?.window}),hydrationData:t?.hydrationData||He(),routes:e,mapRouteProperties:f,hydrationRouteProperties:oe,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function He(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ue(e.errors)}),e}function Ue(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new k(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&d.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Y=z.forwardRef(function({onClick:e,discover:n=`render`,prefetch:r=`none`,relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=z.useContext(I),b=typeof d==`string`&&te.test(d),x=ie(d,_);d=x.to;let S=ee(d,{relative:i}),w=C(),T=null;if(s){let e=t(s,[],w.mask?w.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:c([_,e.pathname])),T=v.createHref(e)}let[E,D,O]=Pe(r,h),k=Ke(d,{replace:o,mask:s,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function A(t){e&&e(t),t.defaultPrevented||k(t)}let j=!(x.isExternal||a),M=z.createElement(`a`,{...h,...O,href:(j?T:void 0)||x.absoluteURL||S,onClick:j?A:e,ref:ze(g,D),target:u,"data-discover":!b&&n===`render`?`true`:void 0});return E&&!b?z.createElement(z.Fragment,null,M,z.createElement(Fe,{page:S})):M});Y.displayName=`Link`;var We=z.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=D(a,{relative:c.relative}),d=C(),f=z.useContext(S),{navigator:p,basename:m}=z.useContext(I),h=f!=null&&$e(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=y(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,w=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`),T={isActive:x,isPending:w,isTransitioning:h},E=x?e:void 0,O;O=typeof n==`function`?n(T):[n,x?`active`:null,w?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let k=typeof i==`function`?i(T):i;return z.createElement(Y,{...c,"aria-current":E,className:O,ref:l,style:k,to:a,viewTransition:o},typeof s==`function`?s(T):s)});We.displayName=`NavLink`;var Ge=z.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=z.useContext(I),g=Xe(),_=Ze(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&te.test(s);return z.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?z.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Ge.displayName=`Form`;function Ke(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=P(),d=C(),f=D(e,{relative:o});return z.useCallback(p=>{if(ve(p,t)){p.preventDefault();let t=n===void 0?v(d)===v(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?z.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function qe(e){l(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=z.useRef(U(e)),n=z.useRef(!1),r=C(),i=z.useMemo(()=>ye(r.search,n.current?null:t.current),[r.search]),a=P();return[i,z.useCallback((e,t)=>{let r=U(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Je=0,Ye=()=>`__${String(++Je)}__`;function Xe(){let{router:e}=M(`useSubmit`),{basename:t}=z.useContext(I),n=j(`useSubmit`),r=e.fetch,i=e.navigate;return z.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Se(e,t);a.navigate===!1?await r(a.fetcherKey||Ye(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ze(e,{relative:t}={}){let{basename:n}=z.useContext(I),r=z.useContext(_);b(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...D(e||`.`,{relative:t})},o=C();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:c([n,a.pathname])),v(a)}function Qe(e,t){let{capture:n}=t||{};z.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`beforeunload`,e,t),()=>{window.removeEventListener(`beforeunload`,e,t)}},[e,n])}function $e(e,{relative:t}={}){let n=z.useContext(i);b(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=M(`useViewTransitionState`),a=D(e,{relative:t});if(!n.isTransitioning)return!1;let o=y(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=y(n.nextLocation.pathname,r)||n.nextLocation.pathname;return u(a.pathname,s)!=null||u(a.pathname,o)!=null}var X=`/p`,Z=`/t`,Q=`/stats`,et={task:`${Z}/:taskId`,projectList:`${X}/:projectId`,projectTask:`${X}/:projectId${Z}/:taskId`,stats:Q,projectStats:`${X}/:projectId${Q}`};function tt(e){return e===void 0?`/`:$(e)}function nt(e,t){return`${$(e)}${Z}/${t}`}function rt(e){return $(e)+Q}function $(e){return e===void 0?``:`${X}/${e}`}function it(e){return e===`overview`?null:e}function at(e,t){let n=it(t);return n===null?e:`${e}/${n}`}function ot(e,t){return at(rt(t),e)}export{at as a,Y as c,Qe as d,qe as f,ce as h,ot as i,We as l,fe as m,tt as n,it as o,de as p,rt as r,nt as s,et as t,Ve as u};
|
package/dist/web/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>Backlog</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DpWYLB0A.js"></script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "p-backlog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Keep pull requests clean and audit findings safe: a local, autonomous backlog for Claude Code. The agent files out-of-scope issues as Markdown tasks with context and re-checks them as code changes. Optional web UI with metrics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
44
|
"test": "vitest run",
|
|
45
|
-
"lint": "eslint . && stylelint \"src/**/*.css\" && prettier --check . && knip && jscpd && node scripts/check-cyrillic.mjs && node scripts/check-css-contracts.mjs",
|
|
45
|
+
"lint": "eslint . && stylelint \"src/**/*.css\" && prettier --check . && knip && jscpd && node scripts/check-cyrillic.mjs && node scripts/check-css-contracts.mjs && node scripts/check-css-hover.mjs",
|
|
46
46
|
"typecheck": "tsc -p tsconfig.json",
|
|
47
47
|
"build": "vite build && node scripts/build-node.mjs",
|
|
48
48
|
"install-skill": "node dist/cli.js setup",
|
package/skill/backlog/SKILL.md
CHANGED
|
@@ -96,6 +96,7 @@ description: Use when, while working on code, you notice a problem outside the c
|
|
|
96
96
|
| 1 | Это эпик, либо запись не прошла: файл задачи менялся во время записи или задача не прошла проверку | Эпик — показать пользователю задачи эпика из вывода и спросить, какую взять. Иначе прочитать сообщение: просит повторить команду — повторить, иначе сообщить пользователю |
|
|
97
97
|
| 2 | Задача или проект не найдены, открытых задач нет | Сообщить пользователю |
|
|
98
98
|
| 3 | Открытые блокеры или задача уже закрыта; при `--next` и `--path` — все подходящие задачи заблокированы | Перечислить блокеры и остановиться. `take <ID> --force` — только по прямой просьбе пользователя |
|
|
99
|
+
| 4 | Команда не выполнилась: файл задачи занят другим процессом или запись не удалась | Прочитать сообщение: файл занят — повторить команду чуть позже; не вышло или другая причина — сообщить пользователю |
|
|
99
100
|
|
|
100
101
|
1. Прочитай описание и `source`; нужные связанные задачи — `backlog show <ID>`.
|
|
101
102
|
2. Делай работу. Выполнил пункт чеклиста — сразу отметь его в файле задачи (`- [ ]` → `- [x]`, путь есть
|
|
@@ -133,7 +134,7 @@ Agent, `model: "sonnet"`): передай ID задач из сообщения
|
|
|
133
134
|
завершённые эпики и сдвинутые `source` он уже исправил сам — это поле `fixed`, список `{ kind, taskId, … }`:
|
|
134
135
|
`references-removed` — убраны ссылки на несуществующие задачи `ids`; `epic-closed` — эпик закрыт, все его
|
|
135
136
|
задачи `childIds` закрыты; `epic-reopened` — автоматически закрытый эпик снова открыт, его задачи
|
|
136
|
-
`childIds` снова открыты; `source-moved` — `source` сдвинулся или файл
|
|
137
|
+
`childIds` снова открыты; `source-moved` — `source` сдвинулся или файл кода переименован, а строки задачи
|
|
137
138
|
целы: `from` → `to`. Перескажи его пользователю одной строкой. Код выхода 5 — не сбой: есть кандидаты или
|
|
138
139
|
проблемы задач, которые надо разобрать; 0 — разбирать нечего.
|
|
139
140
|
2. У кандидата `source-changed` в JSON уже есть `problem` — первый абзац описания задачи, `snippet` —
|
|
@@ -161,7 +162,8 @@ Agent, `model: "sonnet"`): передай ID задач из сообщения
|
|
|
161
162
|
куда делся код, — спроси пользователя. Пара `duplicate` уходит, только когда подтверждены обе задачи.
|
|
162
163
|
|
|
163
164
|
Закрывай только с конкретной уликой: коммит, строка, факт отсутствия кода. «Похоже, уже неактуально» —
|
|
164
|
-
не улика: подтверди задачу и оставь открытой. Закрытая задача через 7 дней удаляется вместе с
|
|
165
|
+
не улика: подтверди задачу и оставь открытой. Закрытая задача через 7 дней удаляется вместе с файлом,
|
|
166
|
+
задача открытого эпика — через 7 дней после закрытия эпика.
|
|
165
167
|
|
|
166
168
|
4. `problems` — список `{ kind, … }`. `file-not-parsed`: файл `path` не разбирается, причины в `problems` —
|
|
167
169
|
поправь YAML руками, не меняя `id`. Остальное перечисли пользователю: `task-invalid` (ошибка `problem`
|
|
@@ -169,6 +171,7 @@ Agent, `model: "sonnet"`): передай ID задач из сообщения
|
|
|
169
171
|
`project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git не
|
|
170
172
|
доверяет каталогу `repo` другого владельца — `repos` в `project.md` править не надо, нужен
|
|
171
173
|
`git config --global --add safe.directory "<repo>"`, его запускает пользователь), `project-history-unreadable`,
|
|
174
|
+
`project-branches-unreadable` (ветки git не прочитались — пропавшие файлы задач не проверены), `merge-state-unknown` (git не смог ответить, влиты ли ветки `branches`, — их задачи проверены как обычные),
|
|
172
175
|
`prefix-shared` (у проектов `projectIds` один префикс — ID задач пересекаются).
|
|
173
176
|
5. В конце ответа — блок, по которому пользователь найдёт закрытое:
|
|
174
177
|
```
|
|
@@ -103,6 +103,7 @@ array) — fix them together, closing each one.
|
|
|
103
103
|
| 1 | It's an epic, or the write failed: the task file changed during the write or the task failed validation | Epic — show the user the epic's tasks from the output and ask which one to take. Otherwise read the message: if it asks to retry the command, retry; otherwise tell the user |
|
|
104
104
|
| 2 | Task or project not found, no open tasks | Tell the user |
|
|
105
105
|
| 3 | Open blockers, or the task is already closed; with `--next` and `--path` — every matching task is blocked | List the blockers and stop. `take <ID> --force` — only on the user's direct request |
|
|
106
|
+
| 4 | The command failed: the task file is busy in another process or the write failed | Read the message: file busy — retry the command a bit later; if it still fails or the cause is different, tell the user |
|
|
106
107
|
|
|
107
108
|
1. Read the description and `source`; for related tasks you need, use `backlog show <ID>`.
|
|
108
109
|
2. Do the work. Finished a checklist item — mark it in the task file right away (`- [ ]` → `- [x]`, the
|
|
@@ -144,7 +145,7 @@ subagent, do the re-check yourself.
|
|
|
144
145
|
`fixed` field, a list of `{ kind, taskId, … }`: `references-removed` — references to missing tasks `ids`
|
|
145
146
|
removed; `epic-closed` — the epic closed, all its tasks `childIds` are closed; `epic-reopened` — the
|
|
146
147
|
auto-closed epic reopened, its tasks `childIds` are open again; `source-moved` — `source` moved, or the
|
|
147
|
-
|
|
148
|
+
code file in `source` was renamed with its lines intact: `from` → `to`. Relay it to the user in one line. Exit code 5
|
|
148
149
|
is not a failure: there are candidates or task problems to work through; 0 means there is nothing to work
|
|
149
150
|
through.
|
|
150
151
|
2. A `source-changed` candidate already has `problem` in the JSON — the task description's first
|
|
@@ -175,7 +176,7 @@ subagent, do the re-check yourself.
|
|
|
175
176
|
|
|
176
177
|
Only close with concrete evidence: a commit, a line, the fact the code is gone. "Looks outdated" is not
|
|
177
178
|
evidence: confirm the task and leave it open. A closed task is deleted along with its file after 7
|
|
178
|
-
days.
|
|
179
|
+
days; a task of an open epic, 7 days after the epic closes.
|
|
179
180
|
|
|
180
181
|
4. `problems` — a list of `{ kind, … }`. `file-not-parsed`: the file `path` doesn't parse, reasons in
|
|
181
182
|
`problems` — fix the YAML by hand without changing `id`. List the rest for the user: `task-invalid` (error
|
|
@@ -183,6 +184,7 @@ subagent, do the re-check yourself.
|
|
|
183
184
|
`project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git doesn't
|
|
184
185
|
trust the directory `repo` owned by another user — don't edit `repos` in `project.md`, the user needs to run
|
|
185
186
|
`git config --global --add safe.directory "<repo>"`), `project-history-unreadable`,
|
|
187
|
+
`project-branches-unreadable` (git branches couldn't be read — missing task files weren't checked), `merge-state-unknown` (git couldn't tell whether branches `branches` landed — their tasks were checked as usual),
|
|
186
188
|
`prefix-shared` (projects `projectIds` share one prefix — their task IDs collide).
|
|
187
189
|
5. End your answer with a block the user can use to find what was closed:
|
|
188
190
|
```
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ft as e,h as t,j as n,ln as r}from"./Page-CtAVbr-z.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./StatsTabState-DuK85b6t.js";import{t as u}from"./PanelRows.module-ZonfBTD-.js";import{t as d}from"./ShareBar-z49KNtHZ.js";import{t as f}from"./UnavailableRepos-D-bhtLZ4.js";var p={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},m=r();function h({churn:e,period:t}){let{stats:r}=n(),a=i(),o=e[0]?.score??1;return(0,m.jsxs)(s,{title:r.churnTitle,period:a.of(`churn`,t),children:[(0,m.jsx)(l,{children:r.churnHint}),e.length===0?(0,m.jsx)(l,{children:r.churnEmpty}):(0,m.jsx)(`ul`,{className:u.rows,children:e.map(e=>(0,m.jsxs)(`li`,{className:p.churnRow,children:[(0,m.jsx)(`code`,{className:u.rowLabel,children:e.label}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.commits(e.commits)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.churnTasks(e.tasks,e.weight)}),(0,m.jsx)(d,{share:e.score/o})]},e.label))})]})}function g({density:e}){let{stats:t}=n();return(0,m.jsx)(s,{title:t.densityTitle,period:t.periodNow,children:e.projects.length===0?(0,m.jsx)(l,{children:t.noCodeData}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{rows:e.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),e.folders.length>0&&(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h3`,{className:u.subTitle,children:t.folders}),(0,m.jsx)(_,{rows:e.folders.map(e=>({key:e.label,label:(0,m.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function _({rows:e}){let{stats:t,core:r}=n();return(0,m.jsx)(`ul`,{className:u.rows,children:e.map(({key:e,label:n,row:i})=>(0,m.jsxs)(`li`,{className:p.densityRow,children:[(0,m.jsx)(`span`,{className:u.rowLabel,children:n}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.lines,`line`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.open,`task`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:i.perKloc===null?`—`:t.perKloc(i.perKloc)})]},e))})}function v(){let{projectId:n}=e(),r=t(`code`,n);return(0,m.jsx)(o,{query:r,children:e=>(0,m.jsx)(y,{report:e})})}function y({report:e}){let{stats:t}=n();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{repos:e.unavailableRepos}),(0,m.jsxs)(`div`,{className:a.blocks,children:[(0,m.jsx)(`div`,{className:a.wide,children:(0,m.jsx)(h,{churn:e.churn,period:e.periods.churn})}),(0,m.jsx)(g,{density:e.density})]}),(0,m.jsx)(c,{children:t.codeNote})]})}export{v as CodeTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,c as n,ft as r,i,j as a,ln as o,u as s,un as c}from"./Page-CtAVbr-z.js";import{_ as l,d as u,h as d,v as f}from"./index-0AsbsTM1.js";import{a as p,i as m,o as h,r as g,s as _,t as v}from"./StatsTabState-DuK85b6t.js";import{n as y,t as b}from"./Figure-8RcQUP-G.js";import{t as x}from"./StatsTable-Bkv5EU2n.js";import{_ as S,c as C,g as w,h as T,m as E,p as D,t as O}from"./use-grain-panel-DTtCKyng.js";var k=o();function A({totals:e,period:n}){let{stats:r}=a(),i=t(),o=p(),s=S(i);return(0,k.jsxs)(y,{period:o.of(`lastWeek`,n),children:[(0,k.jsx)(b,{label:r.backlogTokens,value:s(e.tokens),note:r.backlogTokensNote(s(e.hookTokens),s(e.cliTokens))}),(0,k.jsx)(b,{label:r.apiPrice,value:w(i,e.cost),note:e.hasUnpricedTokens?r.unpricedNote:void 0}),(0,k.jsx)(b,{label:r.hookTurns,value:s(e.hookTurns),note:r.hookRunsNote(s(e.hookRuns))}),(0,k.jsx)(b,{label:r.cliCalls,value:s(e.cliRuns)})]})}function j({models:e,period:n}){let{stats:r}=a(),i=t(),o=p();return(0,k.jsx)(h,{title:r.byModel,period:o.of(`days`,n),children:e.length===0?(0,k.jsx)(_,{children:r.noModels}):(0,k.jsx)(x,{label:r.byModel,head:r.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?r.fastModel(e.model):e.model,l(i,e.tokens),d(i,e.cost)]}))})})}function M({commands:e,period:n}){let{stats:r}=a(),i=t(),o=p();return(0,k.jsx)(h,{title:r.commandsTitle,period:o.of(`days`,n),children:e.length===0?(0,k.jsx)(_,{children:r.noCommands}):(0,k.jsx)(x,{label:r.commandsTitle,head:r.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,l(i,e.runs),r.milliseconds(e.avgMs),r.mebibytes(e.avgRssMb),r.mebibytes(e.maxRssMb)]}))})})}var N=`var(--chart-line-bright)`,P=`var(--chart-line-blue)`;function F(){let{stats:e}=a(),t=[{key:`rssMb`,label:e.processMemory,shape:`line`,color:N,format:e.mebibytes},{key:`heapUsedMb`,label:e.jsHeap,shape:`dashed`,color:P,format:e.mebibytes}],n=s().data?.samples??[],r=n.at(-1)?.rssMb??null,i=n.length===0?null:Math.max(...n.map(e=>e.rssMb)),o=t=>t===null?`—`:e.mebibytes(t);return(0,k.jsxs)(h,{title:e.serverMemory,children:[(0,k.jsx)(_,{children:e.memoryRestartNote}),(0,k.jsx)(E,{name:e.serverMemory,summary:e.memorySummary(o(r),o(i)),data:n,series:t,axes:{left:{tickFormatter:e.mebibytes}}})]})}var I=e(c(),1),L=`var(--chart-bar-warm)`,R=`var(--chart-bar-neutral)`,z=`var(--chart-line-green)`,B=`var(--chart-line-yellow)`;function V({day:e,...t}){return{start:e,...t}}function H({weeks:e,days:n,windows:r}){let{stats:i}=a(),o=t(),s=(0,I.useMemo)(()=>n.map(V),[n]),{grain:c,periods:l,period:u,toggle:d}=O(`spend`,`day`,{weeks:e,days:s},r),f=i.spendBy[c],p=S(o),m=[{key:`hookTokens`,label:i.hookTurnTokens,tooltipLabel:i.hookTurnsTooltip,shape:`bar`,color:L,stack:`tokens`,format:i.tokens},{key:`cliTokens`,label:i.cliOutputTokens,tooltipLabel:i.cliOutput,shape:`bar`,color:R,stack:`tokens`,format:i.tokens},{label:i.apiPriceTooltip,format:e=>e.hasUnpricedTokens&&e.cost!==null?`${w(o,e.cost)} (${i.unpricedNote})`:w(o,e.cost)},{key:`hookRuns`,label:i.hookRuns,shape:`line`,color:z,axis:`right`,format:p},{key:`cliRuns`,label:i.otherCommands,shape:`dashed`,color:B,axis:`right`,format:p}];return(0,k.jsx)(h,{title:f,period:u,aside:d,children:(0,k.jsx)(D,{name:f,grain:c,summary:i.spendSummary(C(o,c,l)),data:l,series:m,axes:{right:T}})})}function U(){let{projectId:e}=r(),t=n(e),{stats:i}=a();return(0,k.jsx)(v,{query:t,children:e=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(W,{scan:e.scan}),(0,k.jsx)(K,{report:e}),(0,k.jsx)(g,{children:i.costNote})]})})}function W({scan:e}){let{stats:t}=a(),n=G(t,e);return(0,k.jsx)(i,{className:m.warning,shown:n!==null,role:`status`,children:n})}function G(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function K({report:e}){let{stats:n}=a(),r=t(),i=q(e);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A,{totals:e.totals,period:e.periods.totals}),i!==null&&(0,k.jsx)(g,{children:n.costSince(u(r,i))}),(0,k.jsxs)(`div`,{className:m.blocks,children:[(0,k.jsx)(`div`,{className:m.wide,children:(0,k.jsx)(H,{weeks:e.weeks,days:e.days,windows:e.periods})}),(0,k.jsx)(j,{models:e.models,period:e.periods.days}),(0,k.jsx)(F,{}),(0,k.jsx)(`div`,{className:m.wide,children:(0,k.jsx)(M,{commands:e.commands,period:e.periods.days})})]})]})}function q({since:e,periods:t}){return e!==null&&f(e)>f(t.weeks.from)?e:null}export{U as CostTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,ft as t,h as n,j as r,ln as i}from"./Page-CtAVbr-z.js";import{S as a,_ as o}from"./index-0AsbsTM1.js";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./StatsTabState-DuK85b6t.js";import{t as p}from"./UnavailableRepos-D-bhtLZ4.js";import{n as m,t as h}from"./Figure-8RcQUP-G.js";import{t as g}from"./StatsTable-Bkv5EU2n.js";import{l as _,n as v,p as y,r as b,s as x,t as S,u as C}from"./use-grain-panel-DTtCKyng.js";var w={steps:`_steps_advmo_1`,now:`_now_advmo_13`},T=i();function E({totals:t}){let{stats:n}=r(),i=e();return(0,T.jsx)(u,{title:n.explainerTitle,children:(0,T.jsxs)(`ol`,{className:w.steps,children:[(0,T.jsx)(`li`,{children:n.explainerTask}),(0,T.jsxs)(`li`,{children:[n.explainerFixed,(0,T.jsx)(D,{children:n.fixedNow(t.fixedTasks,b(i,t.fixedLines))})]}),(0,T.jsxs)(`li`,{children:[n.explainerPending,(0,T.jsx)(D,{children:O(n,i,t)})]}),(0,T.jsxs)(`li`,{children:[n.explainerTests,(0,T.jsx)(D,{children:n.codeAndTests(v(i,t))})]}),(0,T.jsxs)(`li`,{children:[n.explainerNoise,(0,T.jsx)(D,{children:k(n,i,t)})]})]})})}function D({children:e}){let{stats:t}=r();return(0,T.jsxs)(`span`,{className:w.now,children:[t.now,` `,e]})}function O(e,t,n){return n.openTasks===0?e.noPending:n.estimatedLines===null?e.pendingWithoutEstimate(n.openTasks):e.pendingEstimated(x(t,n.openTasks,n.estimatedLines))}function k(e,t,n){if(n.estimatedLines===null&&n.openTasks>0)return e.estimateLater;if(n.noiseShare===null)return e.noCommitsSinceAdoption;let r=e=>_(t,e,n.estimatedLines);return e.noiseFormula(r(n.deferredLines),o(t,n.realLines),r(n.estimatedLines??0),C(n.noiseShare,n.estimatedLines))}var A=`var(--chart-bar-neutral)`,j=`var(--accent-ink)`;function M({periods:t,totals:n,grain:i}){let{stats:a,core:s}=r(),c=e(),l=[{key:`onTopicLines`,label:a.onTopicSeries,shape:`bar`,color:A,stack:`lines`,format:e=>s.count(Math.round(e),`line`)},{key:`deferredLines`,label:a.deferredSeries,shape:`hatch`,color:j,stack:`lines`,format:(e,t)=>_(c,e,t.estimatedLines)},{label:a.codeLines,format:e=>v(c,e).code},{label:a.testLines,format:e=>v(c,e).tests},{label:a.deferredTasks,format:e=>o(c,e.deferredTasks)}];return(0,T.jsx)(y,{name:a.effectTitle,grain:i,summary:N(a,c,i,t,n),data:t,series:l})}function N(e,t,n,r,i){let o=(n,r)=>e.linesText(b(t,n,r));if(n===`week`)return e.effectSummary(i.realLines,o(i.deferredLines,i.estimatedLines),C(i.noiseShare,i.estimatedLines));let s=e=>a(r.map(e)),c=o(s(e=>e.deferredLines),s(e=>e.estimatedLines??0));return e.effectDaysSummary(r.length,Math.round(s(e=>e.onTopicLines)),c)}function P({totals:t,period:n}){let{stats:i}=r(),a=e(),c=s();return(0,T.jsxs)(m,{period:c.labelled(i.effectWindow,n),children:[(0,T.jsx)(h,{label:i.keptOut,value:i.linesText(b(a,t.deferredLines,t.estimatedLines)),note:`${F(i,a,t)} · ${i.codeAndTests(v(a,t))}`}),(0,T.jsx)(h,{label:i.noiseWithoutBacklog,value:C(t.noiseShare,t.estimatedLines),note:i.noiseNote}),(0,T.jsx)(h,{label:i.deferredToBacklog,value:o(a,t.deferredTasks),note:i.deferredNote(t.fixedTasks,t.openTasks)}),(0,T.jsx)(h,{label:i.pullRequestLines,value:o(a,t.realLines)})]})}function F(e,t,n){let r=o(t,n.fixedLines);return n.estimatedLines===null?e.keptOutPending(r):e.keptOutEstimated(r,_(t,n.estimatedLines,n.estimatedLines))}function I({weeks:e,days:t,windows:n,totals:i}){let{stats:a}=r(),{grain:o,periods:s,period:c,toggle:l}=S(`effect`,`week`,{weeks:e,days:t},n);return(0,T.jsx)(u,{title:a.effectTitle,period:c,aside:l,children:(0,T.jsx)(M,{periods:s,totals:i,grain:o})})}function L({projects:t,period:n}){let{stats:i}=r(),a=e(),c=s();return(0,T.jsx)(u,{title:i.byProject,period:c.labelled(i.effectWindow,n),children:t.length===0?(0,T.jsx)(f,{children:i.noCodeData}):(0,T.jsx)(g,{label:i.byProject,head:i.projectsHead,rows:t.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,o(a,e.fixedLines),e.estimatedLines===null?`—`:_(a,e.estimatedLines,e.estimatedLines),o(a,e.realLines),C(e.noiseShare,e.estimatedLines)]}))})})}function R(){let{projectId:e}=t(),r=n(`effect`,e);return(0,T.jsx)(l,{query:r,children:e=>(0,T.jsx)(z,{report:e})})}function z({report:e}){let{stats:t}=r(),n=e.totals.deferredTasks===0;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(p,{repos:e.unavailableRepos}),n&&(0,T.jsx)(d,{children:t.noDeferredTasks}),(0,T.jsx)(P,{totals:e.totals,period:e.periods.weeks}),(0,T.jsxs)(`div`,{className:c.blocks,children:[(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(I,{weeks:e.weeks,days:e.days,windows:e.periods,totals:e.totals})}),(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(L,{projects:e.projects,period:e.periods.weeks})}),(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(E,{totals:e.totals})})]})]})}export{R as EffectTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,ln as n,un as r}from"./Page-CtAVbr-z.js";import{c as i}from"./StatsTabState-DuK85b6t.js";var a=e(r(),1),o={group:`_group_ihjlt_1`,figures:`_figures_ihjlt_7`,pair:`_pair_ihjlt_13`,figure:`_figure_ihjlt_7`,trend:`_trend_ihjlt_28`,value:`_value_ihjlt_33`,growth:`_growth_ihjlt_40`,decline:`_decline_ihjlt_44`},s=n(),c={growth:o.growth,decline:o.decline};function l({label:e,value:n,note:r,tone:l,trend:u}){let d=(0,a.useId)();return(0,s.jsxs)(`div`,{className:o.figure,role:`group`,"aria-labelledby":d,children:[(0,s.jsx)(`span`,{id:d,className:i.caption,children:e}),(0,s.jsx)(`span`,{className:t(o.value,l!==void 0&&c[l]),children:n}),u!==void 0&&(0,s.jsxs)(`span`,{className:t(o.trend,c[u.tone]),children:[(0,s.jsx)(`span`,{"aria-hidden":`true`,children:u.text}),(0,s.jsx)(`span`,{className:`visually-hidden`,children:u.speech})]}),r!==void 0&&(0,s.jsx)(`span`,{className:i.caption,children:r})]})}function u({columns:e,children:n}){return(0,s.jsx)(`div`,{className:t(o.figures,e===2&&o.pair),children:n})}function d({tone:e,children:t}){return(0,s.jsx)(`span`,{className:e===void 0?void 0:c[e],children:t})}function f({period:e,children:t}){let n=(0,a.useId)();return(0,s.jsxs)(`div`,{role:`group`,"aria-labelledby":n,className:o.group,children:[(0,s.jsx)(`p`,{id:n,className:i.caption,children:e}),(0,s.jsx)(u,{columns:4,children:t})]})}export{d as i,f as n,u as r,l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,M as t,a as n,ft as r,h as i,j as a,ln as o}from"./Page-CtAVbr-z.js";import{S as s,_ as c}from"./index-0AsbsTM1.js";import{c as l,n as u}from"./web-paths-D-xBEJAy.js";import{c as d,i as f,r as p}from"./start--LUt1aUh.js";import{a as m,i as h,n as g,o as _,s as v}from"./StatsTabState-DuK85b6t.js";import{t as y}from"./PanelRows.module-ZonfBTD-.js";import{t as b}from"./ShareBar-z49KNtHZ.js";import{i as x,r as S,t as C}from"./Figure-8RcQUP-G.js";import{_ as w,a as T,d as E,f as D,h as O,o as k,p as A,t as j}from"./use-grain-panel-DTtCKyng.js";var M={columns:`_columns_1m2da_1`,countList:`_countList_1m2da_7`,ageRows:`_ageRows_1m2da_11`,ageRow:`_ageRow_1m2da_11`,ageLabel:`_ageLabel_1m2da_25`,ageTrack:`_ageTrack_1m2da_29`,ageSegment:`_ageSegment_1m2da_37`,legend:`_legend_1m2da_41`,legendItem:`_legendItem_1m2da_50`,share:`_share_1m2da_61`,critical:`_critical_1m2da_65`,high:`_high_1m2da_69`,medium:`_medium_1m2da_73`,low:`_low_1m2da_77`,done:`_done_1m2da_81`,fixed:`_fixed_1m2da_85`,obsolete:`_obsolete_1m2da_89`,duplicate:`_duplicate_1m2da_93`,cancelled:`_cancelled_1m2da_97`,unknown:`_unknown_1m2da_101`,shareBar:`_shareBar_1m2da_105`,alarm:`_alarm_1m2da_117`,alarmOn:`_alarmOn_1m2da_123`},N=o(),P=t.toReversed();function F(e,t){let n=P.filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function I({age:e}){let{stats:r,core:i}=a(),o=e.buckets.map(({bucket:e,byPriority:n})=>({bucket:e,total:s(t.map(e=>n[e])),byPriority:n})),c=Math.max(1,...o.map(({total:e})=>e)),l=o.map(({bucket:e,total:t,byPriority:n})=>`${r.ageBuckets[e]}: ${t}${F(r,n)}`).join(`; `);return(0,N.jsxs)(_,{title:r.openAge,period:r.periodNow,children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.ageRows,children:o.map(({bucket:e,total:i,byPriority:a})=>(0,N.jsxs)(`div`,{className:M.ageRow,"aria-hidden":`true`,children:[(0,N.jsx)(`span`,{className:M.ageLabel,children:r.ageBuckets[e]}),(0,N.jsx)(`span`,{className:M.ageTrack,children:t.map(e=>(0,N.jsx)(`span`,{className:n(M.ageSegment,M[e]),style:{width:`${a[e]/c*100}%`}},e))}),(0,N.jsx)(`span`,{className:y.rowValue,children:i})]},e))}),(0,N.jsx)(`p`,{className:M.legend,children:P.map(e=>(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:i.priorityLabel(e)},e))}),(0,N.jsx)(`p`,{className:n(M.alarm,e.urgentStale>0&&M.alarmOn),children:r.urgentStale(e.urgentStale)})]})}var L={done:({stats:e})=>e.closingReasons.done,fixed:({core:e})=>e.resolutionLabel(`fixed`),obsolete:({core:e})=>e.resolutionLabel(`obsolete`),duplicate:({core:e})=>e.resolutionLabel(`duplicate`),cancelled:({stats:e})=>e.closingReasons.cancelled,unknown:({stats:e})=>e.closingReasons.unknown},R=Object.keys(L);function z({closing:e,period:t}){let r=a(),i=m(),{stats:o}=r,c=s(R.map(t=>e.byReason[t])),l=R.map(t=>`${L[t](r)}: ${e.byReason[t]}`).join(`; `);return(0,N.jsxs)(_,{title:o.closing,period:i.of(`weeks`,t),children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.shareBar,children:R.map(t=>(0,N.jsx)(`span`,{className:n(M.share,M[t]),style:{width:c===0?0:`${e.byReason[t]/c*100}%`}},t))}),(0,N.jsx)(`ul`,{className:y.rows,children:R.map(t=>(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:n(M.legendItem,M[t]),children:L[t](r)}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.byReason[t]})]},t))}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:o.noiseAndReopens}),(0,N.jsxs)(`ul`,{className:y.rows,children:[(0,N.jsx)(B,{label:o.duplicatesAmongClosed,value:E(e.duplicateShare)}),(0,N.jsx)(B,{label:o.noSourceAmongCreated,value:E(e.withoutSourceShare)}),(0,N.jsx)(B,{label:o.reopened,value:e.reopened})]})]})]})}function B({label:e,value:t}){return(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e}),(0,N.jsx)(`span`,{className:y.rowValue,children:t})]})}function V({hotspots:e,listPath:t}){let{stats:n}=a();return(0,N.jsx)(_,{title:n.hotspots,period:n.periodNow,children:(0,N.jsxs)(`div`,{className:M.columns,children:[(0,N.jsx)(H,{title:n.folders,empty:n.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,N.jsx)(`code`,{children:e}),count:t}))}),(0,N.jsx)(H,{title:n.tags,empty:n.noTags,items:e.tags.map(({tag:e,count:n})=>({key:e,label:(0,N.jsx)(l,{to:{pathname:t,search:f({...p,tags:[e]})},children:d(e)}),count:n}))})]})})}function H({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,N.jsxs)(`div`,{className:M.countList,children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:e}),n.length===0?(0,N.jsx)(v,{children:t}):(0,N.jsx)(`ul`,{className:y.rows,children:n.map(e=>(0,N.jsxs)(`li`,{className:y.countRow,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e.label}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.count}),(0,N.jsx)(b,{share:e.count/r})]},e.key))})]})}var U=`var(--chart-bar-neutral)`,W=`var(--chart-bar-green)`,G=`var(--chart-line-bright)`;function K({weeks:t,days:n,windows:r}){let{stats:i}=a(),o=e(),{grain:s,periods:c,period:l,toggle:u}=j(`flow`,`week`,{weeks:t,days:n},r),d=w(o),f=[{key:`created`,label:i.flowCreated,shape:`bar`,color:U,format:d},{key:`closed`,label:i.flowClosed,shape:`bar`,color:W,format:d},{key:`openAtEnd`,label:i.flowOpenAtEnd[s],tooltipLabel:i.flowOpen,shape:`line`,color:G,axis:`right`,format:d}],p=i.debtBy[s];return(0,N.jsx)(_,{title:p,period:l,aside:u,children:(0,N.jsx)(A,{name:p,grain:s,summary:i.flowSummary(T(s,c)),data:c,series:f,axes:{left:O,right:O}})})}var q=`var(--chart-bar-warm)`;function J({weeks:e,days:t,windows:n}){let{stats:r,core:i}=a(),{grain:o,periods:s,period:c,toggle:l}=j(`intake`,`day`,{weeks:e,days:t},n),u=[{key:`created`,label:r.createdTasks,tooltipLabel:r.flowCreated,shape:`bar`,color:q,format:e=>i.count(e,`task`)}],d=r.createdBy[o];return(0,N.jsx)(_,{title:d,period:c,aside:l,children:(0,N.jsx)(A,{name:d,grain:o,summary:r.intakeSummary(k(o,s)),data:s,series:u,axes:{left:O}})})}var Y={decline:`↓`,growth:`↑`};function X(){let{projectId:e}=r(),t=i(`overview`,e);return(0,N.jsx)(g,{query:t,children:t=>(0,N.jsx)(Z,{report:t,taskListPath:u(e)})})}function Z({report:e,taskListPath:t}){return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q,{totals:e.totals}),(0,N.jsxs)(`div`,{className:h.blocks,children:[(0,N.jsx)(K,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(J,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(V,{hotspots:e.hotspots,listPath:t}),(0,N.jsx)(I,{age:e.age}),(0,N.jsx)(z,{closing:e.closing,period:e.periods.weeks})]})]})}function Q({totals:t}){let{stats:n}=a(),r=e(),i=t.createdLastWeek-t.closedLastWeek;return(0,N.jsxs)(S,{columns:2,children:[(0,N.jsx)(C,{label:n.tasksToday,value:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(x,{tone:t.createdToday>0?`growth`:void 0,children:[`+`,t.createdToday]}),` `,(0,N.jsxs)(x,{tone:t.closedToday>0?`decline`:void 0,children:[`−`,t.closedToday]})]}),note:n.createdAndClosed}),(0,N.jsx)(C,{label:n.thisWeek,value:D(i),tone:$(i),note:n.weekNote(t.createdLastWeek,t.closedLastWeek),trend:ee(n,r,i,t.previous?.net)})]})}function $(e){if(e>0)return`growth`;if(e<0)return`decline`}function ee(e,t,n,r){if(r===void 0)return;let i=n-r,a=$(i);if(a===void 0)return;let o=c(t,Math.abs(i));return{text:e.weekTrend(Y[a],o),speech:e.weekTrendSpeech[a](o),tone:a}}export{X as OverviewTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._columns_1m2da_1{gap:var(--space-4);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}._countList_1m2da_7{min-width:0}._ageRows_1m2da_11{gap:var(--space-2);flex-direction:column;display:flex}._ageRow_1m2da_11{align-items:center;gap:var(--space-2);font-size:var(--text-sm);grid-template-columns:7rem minmax(0,1fr) 2.5rem;display:grid}._ageLabel_1m2da_25{color:var(--ink-muted)}._ageTrack_1m2da_29{background:var(--surface-sunken);border-radius:3px;height:10px;display:flex;overflow:hidden}._ageSegment_1m2da_37{height:100%}._legend_1m2da_41{gap:var(--space-3);font-size:var(--text-sm);color:var(--ink-subtle);flex-wrap:wrap;margin:0;display:flex}._legendItem_1m2da_50:before{content:"";width:8px;height:8px;background:var(--segment);border-radius:2px;margin-inline-end:var(--space-1);display:inline-block}._ageSegment_1m2da_37,._share_1m2da_61{background:var(--segment)}._critical_1m2da_65{--segment:var(--accent)}._high_1m2da_69{--segment:var(--warn)}._medium_1m2da_73{--segment:var(--ink-subtle)}._low_1m2da_77{--segment:var(--line-strong)}._done_1m2da_81{--segment:var(--ok)}._fixed_1m2da_85{--segment:var(--ink)}._obsolete_1m2da_89{--segment:var(--ink-subtle)}._duplicate_1m2da_93{--segment:var(--warn)}._cancelled_1m2da_97{--segment:var(--line-strong)}._unknown_1m2da_101{--segment:var(--warn)}._shareBar_1m2da_105{background:var(--surface-sunken);border-radius:3px;height:10px;display:flex;overflow:hidden}._share_1m2da_61{height:100%}._alarm_1m2da_117{font-size:var(--text-sm);color:var(--ink-muted);margin:0}._alarmOn_1m2da_123{color:var(--warn);font-weight:600}@container (width<=600px){._columns_1m2da_1{grid-template-columns:minmax(0,1fr)}}
|