p-backlog 0.13.0 → 0.14.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/README.md +1 -1
  3. package/README.ru.md +1 -1
  4. package/dist/cli.js +2451 -1479
  5. package/dist/web/assets/CodeTab-D7apweTn.js +1 -0
  6. package/dist/web/assets/CostTab-Cbq-tBpi.js +1 -0
  7. package/dist/web/assets/EffectTab-CSJBH_A_.js +1 -0
  8. package/dist/web/assets/Figure-BkubK2zp.js +1 -0
  9. package/dist/web/assets/OverviewTab-D1S-xV7F.js +1 -0
  10. package/dist/web/assets/Page-DcJkvJR8.js +81 -0
  11. package/dist/web/assets/QualityTab-Bvo5sLJL.js +1 -0
  12. package/dist/web/assets/ShareBar-CVoET5r9.js +1 -0
  13. package/dist/web/assets/StatsPage-CC1pIw6W.js +1 -0
  14. package/dist/web/assets/StatsTabState-DsgM-E6r.js +1 -0
  15. package/dist/web/assets/StatsTable-Dfk5L9ju.js +1 -0
  16. package/dist/web/assets/UnavailableRepos-DEI_jdL7.js +1 -0
  17. package/dist/web/assets/index-CrooTAtB.js +2 -0
  18. package/dist/web/assets/start-CTwcHqnH.js +257 -0
  19. package/dist/web/assets/start-D3XxrO_Y.css +1 -0
  20. package/dist/web/assets/use-grain-panel-C8dF5mz1.js +69 -0
  21. package/dist/web/assets/web-paths-Cv9UykyI.js +1 -0
  22. package/dist/web/index.html +1 -1
  23. package/package.json +6 -6
  24. package/skill/backlog/SKILL.md +2 -2
  25. package/skill/backlog-en/SKILL.md +1 -1
  26. package/dist/web/assets/CodeTab-BokbzP4a.js +0 -1
  27. package/dist/web/assets/CostTab-D91_w1H0.js +0 -1
  28. package/dist/web/assets/EffectTab-CRlWfFF0.js +0 -1
  29. package/dist/web/assets/Figure-CO87y2TD.js +0 -1
  30. package/dist/web/assets/OverviewTab-naYN8aXk.js +0 -1
  31. package/dist/web/assets/Page-BHZdQQhE.js +0 -59
  32. package/dist/web/assets/QualityTab-BMfBa6YW.js +0 -1
  33. package/dist/web/assets/ShareBar-DBiU0f9_.js +0 -1
  34. package/dist/web/assets/StatsPage-Dr1pco7X.js +0 -1
  35. package/dist/web/assets/StatsTabState-CePos7h7.js +0 -1
  36. package/dist/web/assets/StatsTable-CqH14eSD.js +0 -1
  37. package/dist/web/assets/UnavailableRepos-BBbuCPNM.js +0 -1
  38. package/dist/web/assets/index-DpWYLB0A.js +0 -2
  39. package/dist/web/assets/start-Cw9zPEW-.js +0 -42
  40. package/dist/web/assets/start-DCkTSXpO.css +0 -1
  41. package/dist/web/assets/use-grain-panel-BKTkjTK3.js +0 -55
  42. package/dist/web/assets/web-paths-yWGbLD6t.js +0 -1
@@ -0,0 +1 @@
1
+ import{At as e,Ct as t,Dt as n,Et as r,Ft as i,Gt as a,Ht as o,It as s,Jt as c,Kt as l,Lt as u,Mt as d,Nt as f,Ot as p,Pt as m,Rt as h,St as g,Tt as _,Ut as v,Vt as y,Wt as b,Yt as x,_t as S,at as C,bt as w,ct as T,ft as E,it as D,jt as O,kt as k,lt as A,mn as j,mt as M,ot as ee,qt as N,st as P,ut as F,vt as te,wn as ne,wt as re,xt as ie,zt as I}from"./Page-DcJkvJR8.js";var L={};function R(e,t){!e&&!L[t]&&(L[t]=!0,console.warn(t))}var z=ne(j(),1),ae=[`HydrateFallback`,`hydrateFallbackElement`],oe=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 se({router:e,flushSync:n,onError:r,useTransitions:i}){i=k()||i;let[a,o]=z.useState(e.state),[s,c]=(0,z.useOptimistic)(a),[l,d]=z.useState(),[f,m]=z.useState({isTransitioning:!1}),[h,_]=z.useState(),[v,y]=z.useState(),[b,x]=z.useState(),S=z.useRef(new Map),C=z.useCallback((t,{deletedFetchers:a,newErrors:s,flushSync:l,viewTransitionOpts:f})=>{s&&r&&Object.values(s).forEach(e=>r(e,{location:t.location,params:t.matches[0]?.params??{},pattern:u(t.matches)})),t.fetchers.forEach((e,t)=>{e.data!==void 0&&S.current.set(t,e.data)}),a.forEach(e=>S.current.delete(e)),R(l===!1||n!=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(f==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."),!f||!p)n&&l?n(()=>o(t)):i===!1?o(t):z.startTransition(()=>{i===!0&&c(e=>B(e,t)),o(t)});else if(n&&l){n(()=>{v&&(h?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})});let r=e.window.document.startViewTransition(()=>{n(()=>o(t))});r.finished.finally(()=>{n(()=>{_(void 0),y(void 0),d(void 0),m({isTransitioning:!1})})}),n(()=>y(r))}else v?(h?.resolve(),v.skipTransition(),x({state:t,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(d(t),m({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))},[e.window,n,v,h,i,c,r]);z.useLayoutEffect(()=>e.subscribe(C),[e,C]),z.useEffect(()=>{f.isTransitioning&&!f.flushSync&&_(new oe)},[f]),z.useEffect(()=>{if(h&&l&&e.window){let t=l,n=h.promise,r=e.window.document.startViewTransition(async()=>{i===!1?o(t):z.startTransition(()=>{i===!0&&c(e=>B(e,t)),o(t)}),await n});r.finished.finally(()=>{_(void 0),y(void 0),d(void 0),m({isTransitioning:!1})}),y(r)}},[l,h,e.window,i,c]),z.useEffect(()=>{h&&l&&s.location.key===l.location.key&&h.resolve()},[h,v,s.location,l]),z.useEffect(()=>{!f.isTransitioning&&b&&(d(b.state),m({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),x(void 0))},[f.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:r}),[e,T,E,r]),O=z.useMemo(()=>({historyAction:s.historyAction,location:s.location,matches:s.matches,initialized:s.initialized,renderFallback:s.renderFallback,restoreScrollPosition:s.restoreScrollPosition,preventScrollReset:s.preventScrollReset,blockers:s.blockers}),[s.historyAction,s.location,s.matches,s.initialized,s.renderFallback,s.restoreScrollPosition,s.preventScrollReset,s.blockers]),A=z.useMemo(()=>({navigation:s.navigation,revalidation:s.revalidation}),[s.navigation,s.revalidation]),j=z.useMemo(()=>({loaderData:s.loaderData,actionData:s.actionData,errors:s.errors}),[s.loaderData,s.actionData,s.errors]),M=z.useMemo(()=>({fetchers:s.fetchers,fetcherData:S.current}),[s.fetchers]);return z.createElement(z.Fragment,null,z.createElement(w.Provider,{value:D},z.createElement(t.Provider,{value:O},z.createElement(g.Provider,{value:A},z.createElement(ie.Provider,{value:j},z.createElement(re.Provider,{value:M},z.createElement(p.Provider,{value:f},z.createElement(fe,{basename:E,location:s.location,navigationType:s.historyAction,navigator:T,useTransitions:i},z.createElement(ce,{routes:e.routes,manifest:e.manifest,state:s,isStatic:!1,onError:r})))))))),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 ce=z.memo(le);function le({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=z.useContext(w);return l(a,`You must render this element inside a <DataRouterContext.Provider> element`),te(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function ue({to:e,replace:t,state:i,relative:u}){l(A(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:f,navigator:p}=z.useContext(r);c(!f,`<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:m}=z.useContext(n),{pathname:h}=F(),g=E(),_=o(e,s(m),h,u===`path`);d(typeof e==`string`?e:a(e),p.createHref(_),O(p),`reject`);let v=JSON.stringify(_);return z.useEffect(()=>{g(JSON.parse(v),{replace:t,state:i,relative:u})},[g,v,u,t,i]),null}function de(e){return M(e.context)}function fe({basename:e=`/`,children:t=null,location:n,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){l(!A(),`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:o,useTransitions:s,future:{}}),[u,a,o,s]);typeof n==`string`&&(n=N(n));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:g=`default`,mask:y}=n,b=z.useMemo(()=>{let e=v(f,u);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:g,mask:y},navigationType:i}},[u,f,p,m,h,g,i,y]);return c(b!=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.`),b==null?null:z.createElement(r.Provider,{value:d},z.createElement(_.Provider,{children:t,value:b}))}z.Component;var V=`application/x-www-form-urlencoded`;function H(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function pe(e){return H(e)&&e.tagName.toLowerCase()===`button`}function me(e){return H(e)&&e.tagName.toLowerCase()===`form`}function he(e){return H(e)&&e.tagName.toLowerCase()===`input`}function ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _e(e,t){return e.button===0&&(!t||t===`_self`)&&!ge(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 ve(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 ye(){if(W===null)try{new FormData(document.createElement(`form`),0),W=!1}catch{W=!0}return W}var be=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function G(e){return e!=null&&!be.has(e)?(c(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`),null):e}function xe(e,t){let n,r,i,a,o;if(me(e)){let o=e.getAttribute(`action`);r=o?v(o,t):null,n=e.getAttribute(`method`)||`get`,i=G(e.getAttribute(`enctype`))||V,a=new FormData(e)}else if(pe(e)||he(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?v(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),!ye()){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 Se(e,t){if(e===!1||e==null)throw Error(t)}function Ce(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 we(e,t){if(e.id in t)return t[e.id];try{let n=await 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 Te(e){return e!=null&&typeof e.page==`string`}function Ee(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 De(e,t,n){return Me((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await we(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ee).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Oe(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 ke(e,t,{includeHydrateFallback:n}={}){return Ae(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 Ae(e){return[...new Set(e)]}function je(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Me(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Te(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(je(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 Se(e,`You must render this element inside a <HydratedRouter> element`),e}function Ne(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 Pe({page:e,...t}){let n=k(),{nonce:r}=q(),{router:i}=C(`PrefetchPageLinks`),a=z.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?z.createElement(Ie,{page:e,matches:a,...t}):z.createElement(Le,{page:e,matches:a,...t})):null}function Fe(e){let{manifest:t,routeModules:n}=q(),[r,i]=z.useState([]);return z.useEffect(()=>{let r=!1;return De(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ie({page:e,matches:t,...n}){let r=F(),i=z.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ce(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 Le({page:e,matches:t,...n}){let r=F(),{manifest:i,routeModules:a}=q(),{matches:o}=P(`PrefetchPageLinks`),{loaderData:s}=ee(`PrefetchPageLinks`),c=z.useMemo(()=>Oe(e,t,o,i,r,`data`),[e,t,o,i,r]),l=z.useMemo(()=>Oe(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=Ce(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(()=>ke(l,i),[l,i]),f=Fe(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 Re(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ze=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ze&&(window.__reactRouterVersion=`8`)}catch{}function Be(t,n){return e({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:b({window:n?.window}),hydrationData:n?.hydrationData||Ve(),routes:t,mapRouteProperties:i,hydrationRouteProperties:ae,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,instrumentations:n?.instrumentations}).initialize()}function Ve(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:He(e.errors)}),e}function He(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 f(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&m.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:t=`render`,prefetch:n=`none`,relative:i,reloadDocument:a,replace:s,mask:c,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...g},_){let{basename:v,navigator:b,useTransitions:S}=z.useContext(r),C=typeof d==`string`&&x.test(d),w=y(d,v);d=w.to;let E=T(d,{relative:i}),D=F(),O=null;if(c){let e=o(c,[],D.mask?D.mask.pathname:`/`,!0);v!==`/`&&(e.pathname=e.pathname===`/`?v:h([v,e.pathname])),O=b.createHref(e)}let[k,A,j]=Ne(n,g),M=Ge(d,{replace:s,mask:c,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:p,defaultShouldRevalidate:m,useTransitions:S});function ee(t){e&&e(t),t.defaultPrevented||M(t)}let N=!(w.isExternal||a),P=z.createElement(`a`,{...g,...j,href:(N?O:void 0)||w.absoluteURL||E,onClick:N?ee:e,ref:Re(_,A),target:u,"data-discover":!C&&t===`render`?`true`:void 0});return k&&!C?z.createElement(z.Fragment,null,P,z.createElement(Pe,{page:E})):P});Y.displayName=`Link`;var Ue=z.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=S(o,{relative:l.relative}),f=F(),p=z.useContext(g),{navigator:m,basename:h}=z.useContext(r),_=p!=null&&Qe(d)&&s===!0,y=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,b=f.pathname,x=p?.navigation.location?p.navigation.location.pathname:null;t||(b=b.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&h&&(x=v(x,h)||x);let C=y!==`/`&&y.endsWith(`/`)?y.length-1:y.length,w=b===y||!i&&b.startsWith(y)&&b.charAt(C)===`/`,T=x!=null&&(x===y||!i&&x.startsWith(y)&&x.charAt(C)===`/`),E={isActive:w,isPending:T,isTransitioning:_},D=w?e:void 0,O;O=typeof n==`function`?n(E):[n,w?`active`:null,T?`pending`:null,_?`transitioning`:null].filter(Boolean).join(` `);let k=typeof a==`function`?a(E):a;return z.createElement(Y,{...l,"aria-current":D,className:O,ref:u,style:k,to:o,viewTransition:s},typeof c==`function`?c(E):c)});Ue.displayName=`NavLink`;var We=z.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=z.useContext(r),_=Ye(),v=Xe(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&x.test(c);return z.createElement(`form`,{ref:h,method:y,action:v,onSubmit:i?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s,c=()=>_(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?z.startTransition(()=>c()):c()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});We.displayName=`Form`;function Ge(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=E(),f=F(),p=S(e,{relative:s});return z.useCallback(m=>{if(_e(m,t)){m.preventDefault();let t=n===void 0?a(f)===a(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?z.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,o,s,c,l,u])}function Ke(e){c(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=F(),i=z.useMemo(()=>ve(r.search,n.current?null:t.current),[r.search]),a=E();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 qe=0,Je=()=>`__${String(++qe)}__`;function Ye(){let{router:e}=C(`useSubmit`),{basename:t}=z.useContext(r),n=D(`useSubmit`),i=e.fetch,a=e.navigate;return z.useCallback(async(e,r={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=xe(e,t);r.navigate===!1?await i(r.fetcherKey||Je(),n,r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,relative:r.relative,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,flushSync:r.flushSync}):await a(r.action||o,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,relative:r.relative,formData:l,body:u,formMethod:r.method||s,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[i,a,t,n])}function Xe(e,{relative:t}={}){let{basename:i}=z.useContext(r),o=z.useContext(n);l(o,`useFormAction must be used inside a RouteContext`);let[s]=o.matches.slice(-1),c={...S(e||`.`,{relative:t})},u=F();if(e==null){c.search=u.search;let e=new URLSearchParams(c.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();c.search=n?`?${n}`:``}}return(!e||e===`.`)&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`),i!==`/`&&(c.pathname=c.pathname===`/`?i:h([i,c.pathname])),a(c)}function Ze(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 Qe(e,{relative:t}={}){let n=z.useContext(p);l(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=C(`useViewTransitionState`),i=S(e,{relative:t});if(!n.isTransitioning)return!1;let a=v(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=v(n.nextLocation.pathname,r)||n.nextLocation.pathname;return I(i.pathname,o)!=null||I(i.pathname,a)!=null}var X=`/p`,Z=`/t`,Q=`/stats`,$e={task:`${Z}/:taskId`,projectList:`${X}/:projectId`,projectTask:`${X}/:projectId${Z}/:taskId`,stats:Q,projectStats:`${X}/:projectId${Q}`};function et(e){return e===void 0?`/`:$(e)}function tt(e,t){return`${$(e)}${Z}/${t}`}function nt(e){return $(e)+Q}function $(e){return e===void 0?``:`${X}/${e}`}function rt(e){return e===`overview`?null:e}function it(e,t){let n=rt(t);return n===null?e:`${e}/${n}`}function at(e,t){return it(nt(t),e)}export{it as a,Y as c,Ze as d,Ke as f,se as h,at as i,Ue as l,de as m,et as n,rt as o,ue as p,nt as r,tt as s,$e as t,Be as u};
@@ -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-DpWYLB0A.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-CrooTAtB.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.13.0",
3
+ "version": "0.14.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",
@@ -58,11 +58,11 @@
58
58
  "format": "prettier --write ."
59
59
  },
60
60
  "dependencies": {
61
- "@hono/node-server": "^2.1.1",
61
+ "@hono/node-server": "^2.1.7",
62
62
  "chokidar": "^5.0.0",
63
- "hono": "^4.13.8",
63
+ "hono": "^4.13.18",
64
64
  "yaml": "^2.9.1",
65
- "zod": "^4.6.5"
65
+ "zod": "^4.6.7"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@dnd-kit/core": "^6.3.1",
@@ -76,7 +76,7 @@
76
76
  "@types/react": "^19.3.0",
77
77
  "@types/react-dom": "^19.3.0",
78
78
  "@vitejs/plugin-react": "^6.1.1",
79
- "@vitest/coverage-v8": "^5.0.1",
79
+ "@vitest/coverage-v8": "^5.0.5",
80
80
  "concurrently": "^10.0.5",
81
81
  "esbuild": "^0.28.2",
82
82
  "eslint": "^10.11.0",
@@ -101,7 +101,7 @@
101
101
  "typescript": "~6.0.3",
102
102
  "typescript-eslint": "^8.70.0",
103
103
  "vite": "^8.3.0",
104
- "vitest": "^5.0.1"
104
+ "vitest": "^5.0.5"
105
105
  },
106
106
  "bin": {
107
107
  "backlog": "dist/cli.js"
@@ -169,8 +169,8 @@ Agent, `model: "sonnet"`): передай ID задач из сообщения
169
169
  поправь YAML руками, не меняя `id`. Остальное перечисли пользователю: `task-invalid` (ошибка `problem`
170
170
  в задаче `taskId`), `fix-failed` (исправление не записалось, причина `cause`), `epics-wait-for-files`,
171
171
  `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git не
172
- доверяет каталогу `repo` другого владельца — `repos` в `project.md` править не надо, нужен
173
- `git config --global --add safe.directory "<repo>"`, его запускает пользователь), `project-history-unreadable`,
172
+ доверяет каталогу `repo` другого владельца — `repos` в `project.md` править не надо, нужна команда из поля
173
+ `trustCommand`, её запускает пользователь), `project-history-unreadable`,
174
174
  `project-branches-unreadable` (ветки git не прочитались — пропавшие файлы задач не проверены), `merge-state-unknown` (git не смог ответить, влиты ли ветки `branches`, — их задачи проверены как обычные),
175
175
  `prefix-shared` (у проектов `projectIds` один префикс — ID задач пересекаются).
176
176
  5. В конце ответа — блок, по которому пользователь найдёт закрытое:
@@ -183,7 +183,7 @@ subagent, do the re-check yourself.
183
183
  `problem` in task `taskId`), `fix-failed` (the fix wasn't written, reason `cause`), `epics-wait-for-files`,
184
184
  `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git doesn't
185
185
  trust the directory `repo` owned by another user — don't edit `repos` in `project.md`, the user needs to run
186
- `git config --global --add safe.directory "<repo>"`), `project-history-unreadable`,
186
+ the command from `trustCommand`), `project-history-unreadable`,
187
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),
188
188
  `prefix-shared` (projects `projectIds` share one prefix — their task IDs collide).
189
189
  5. End your answer with a block the user can use to find what was closed:
@@ -1 +0,0 @@
1
- import{M as e,dn as t,h as n,mt as r}from"./Page-BHZdQQhE.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./StatsTabState-CePos7h7.js";import{t as u}from"./PanelRows.module-rg1MXy2z.js";import{t as d}from"./ShareBar-DBiU0f9_.js";import{t as f}from"./UnavailableRepos-BBbuCPNM.js";var p={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},m=t();function h({churn:t,period:n}){let{stats:r}=e(),a=i(),o=t[0]?.score??1;return(0,m.jsxs)(s,{title:r.churnTitle,period:a.of(`churn`,n),children:[(0,m.jsx)(l,{children:r.churnHint}),t.length===0?(0,m.jsx)(l,{children:r.churnEmpty}):(0,m.jsx)(`ul`,{className:u.rows,children:t.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:t}){let{stats:n}=e();return(0,m.jsx)(s,{title:n.densityTitle,period:n.periodNow,children:t.projects.length===0?(0,m.jsx)(l,{children:n.noCodeData}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{rows:t.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),t.folders.length>0&&(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h3`,{className:u.subTitle,children:n.folders}),(0,m.jsx)(_,{rows:t.folders.map(e=>({key:e.label,label:(0,m.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function _({rows:t}){let{stats:n,core:r}=e();return(0,m.jsx)(`ul`,{className:u.rows,children:t.map(({key:e,label:t,row:i})=>(0,m.jsxs)(`li`,{className:p.densityRow,children:[(0,m.jsx)(`span`,{className:u.rowLabel,children:t}),(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?`—`:n.perKloc(i.perKloc)})]},e))})}function v(){let{projectId:e}=r(),t=n(`code`,e);return(0,m.jsx)(o,{query:t,children:e=>(0,m.jsx)(y,{report:e})})}function y({report:t}){let{stats:n}=e();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{repos:t.unavailableRepos}),(0,m.jsxs)(`div`,{className:a.blocks,children:[(0,m.jsx)(`div`,{className:a.wide,children:(0,m.jsx)(h,{churn:t.churn,period:t.periods.churn})}),(0,m.jsx)(g,{density:t.density})]}),(0,m.jsx)(c,{children:n.codeNote})]})}export{v as CodeTab};
@@ -1 +0,0 @@
1
- import{M as e,Sn as t,c as n,dn as r,fn as i,i as a,j as o,mt as s,u as c}from"./Page-BHZdQQhE.js";import{_ as l,d as u,v as d}from"./index-DpWYLB0A.js";import{d as f}from"./start-Cw9zPEW-.js";import{a as p,i as m,o as h,r as g,s as _,t as v}from"./StatsTabState-CePos7h7.js";import{n as y,t as b}from"./Figure-CO87y2TD.js";import{t as x}from"./StatsTable-CqH14eSD.js";import{_ as S,b as C,c as w,g as T,h as E,t as D,v as O,y as k}from"./use-grain-panel-BKTkjTK3.js";var A=r();function j({totals:t,period:n}){let{stats:r}=e(),i=o(),a=p(),s=C(i),c=k(i,t);return(0,A.jsxs)(y,{period:a.of(`lastWeek`,n),children:[(0,A.jsx)(b,{label:r.backlogTokens,value:s(t.tokens),note:r.backlogTokensNote(s(t.hookTokens),s(t.cliTokens))}),(0,A.jsx)(b,{label:r.apiPrice,value:c.value,note:c.withoutUnpricedModels?r.unpricedNote:void 0}),(0,A.jsx)(b,{label:r.hookTurns,value:s(t.hookTurns),note:r.hookRunsNote(s(t.hookRuns))}),(0,A.jsx)(b,{label:r.cliCalls,value:s(t.cliRuns)})]})}function M({models:t,period:n}){let{stats:r}=e(),i=o(),a=p();return(0,A.jsx)(h,{title:r.byModel,period:a.of(`days`,n),children:t.length===0?(0,A.jsx)(_,{children:r.noModels}):(0,A.jsx)(x,{label:r.byModel,head:r.modelsHead,rows:t.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?r.fastModel(e.model):e.model,l(i,e.tokens),O(i,e.cost)]}))})})}function N({commands:t,period:n}){let{stats:r}=e(),i=o(),a=p();return(0,A.jsx)(h,{title:r.commandsTitle,period:a.of(`days`,n),children:t.length===0?(0,A.jsx)(_,{children:r.noCommands}):(0,A.jsx)(x,{label:r.commandsTitle,head:r.commandsHead,rows:t.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 P=t(i(),1),F=`var(--chart-line-bright)`,I=`var(--chart-line-blue)`;function L(){let{stats:t}=e(),n=[{key:`rssMb`,label:t.processMemory,shape:`line`,color:F,format:t.mebibytes},{key:`heapUsedMb`,label:t.jsHeap,shape:`dashed`,color:I,format:t.mebibytes}],r=c(),[i,a]=(0,P.useState)(!1),o=()=>{a(!0),r.refetch().finally(()=>a(!1))},s=r.data.samples,l=s.at(-1)?.rssMb??null,u=s.length===0?null:Math.max(...s.map(e=>e.rssMb)),d=e=>e===null?`—`:t.mebibytes(e);return(0,A.jsxs)(h,{title:t.serverMemory,children:[(0,A.jsx)(_,{children:t.memoryRestartNote}),r.error!==null&&(0,A.jsx)(f,{error:r.error,fetching:i,onRetry:o}),(0,A.jsx)(T,{name:t.serverMemory,summary:t.memorySummary(d(l),d(u)),data:s,series:n,axes:{left:{tickFormatter:t.mebibytes}}})]})}var R=`var(--chart-bar-warm)`,z=`var(--chart-bar-neutral)`,B=`var(--chart-line-green)`,V=`var(--chart-line-yellow)`;function H({day:e,...t}){return{start:e,...t}}function U({weeks:t,days:n,windows:r}){let{stats:i}=e(),a=o(),s=(0,P.useMemo)(()=>n.map(H),[n]),{grain:c,periods:l,period:u,toggle:d}=D(`spend`,`day`,{weeks:t,days:s},r),f=i.spendBy[c],p=C(a),m=[{key:`hookTokens`,label:i.hookTurnTokens,tooltipLabel:i.hookTurnsTooltip,shape:`bar`,color:R,stack:`tokens`,format:i.tokens},{key:`cliTokens`,label:i.cliOutputTokens,tooltipLabel:i.cliOutput,shape:`bar`,color:z,stack:`tokens`,format:i.tokens},{label:i.apiPriceTooltip,format:e=>i.pricedCostText(k(a,e))},{key:`hookRuns`,label:i.hookRuns,shape:`line`,color:B,axis:`right`,format:p},{key:`cliRuns`,label:i.otherCommands,shape:`dashed`,color:V,axis:`right`,format:p}];return(0,A.jsx)(h,{title:f,period:u,aside:d,children:(0,A.jsx)(E,{name:f,grain:c,summary:i.spendSummary(w(a,c,l)),data:l,series:m,axes:{right:S}})})}function W(){let{projectId:t}=s(),r=n(t),{stats:i}=e();return(0,A.jsx)(v,{query:r,children:e=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(G,{scan:e.scan}),(0,A.jsx)(q,{report:e}),(0,A.jsx)(g,{children:i.costNote})]})})}function G({scan:t}){let{stats:n}=e(),r=K(n,t);return(0,A.jsx)(a,{className:m.warning,shown:r!==null,role:`status`,children:r})}function K(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function q({report:t}){let{stats:n}=e(),r=o(),i=J(t);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(j,{totals:t.totals,period:t.periods.totals}),i!==null&&(0,A.jsx)(g,{children:n.costSince(u(r,i))}),(0,A.jsxs)(`div`,{className:m.blocks,children:[(0,A.jsx)(`div`,{className:m.wide,children:(0,A.jsx)(U,{weeks:t.weeks,days:t.days,windows:t.periods})}),(0,A.jsx)(M,{models:t.models,period:t.periods.days}),(0,A.jsx)(L,{}),(0,A.jsx)(`div`,{className:m.wide,children:(0,A.jsx)(N,{commands:t.commands,period:t.periods.days})})]})]})}function J({since:e,periods:t}){return e!==null&&d(e)>d(t.weeks.from)?e:null}export{W as CostTab};
@@ -1 +0,0 @@
1
- import{M as e,dn as t,h as n,j as r,mt as i}from"./Page-BHZdQQhE.js";import{S as a,_ as o}from"./index-DpWYLB0A.js";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./StatsTabState-CePos7h7.js";import{t as p}from"./UnavailableRepos-BBbuCPNM.js";import{n as m,t as h}from"./Figure-CO87y2TD.js";import{t as g}from"./StatsTable-CqH14eSD.js";import{d as _,f as v,h as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./use-grain-panel-BKTkjTK3.js";var E={steps:`_steps_advmo_1`,now:`_now_advmo_13`},D=t();function O({totals:t}){let{stats:n}=e(),i=r();return(0,D.jsx)(u,{title:n.explainerTitle,children:(0,D.jsxs)(`ol`,{className:E.steps,children:[(0,D.jsx)(`li`,{children:n.explainerTask}),(0,D.jsxs)(`li`,{children:[n.explainerFixed,(0,D.jsx)(k,{children:n.fixedNow(t.fixedTasks,S(i,t.fixedLines))})]}),(0,D.jsxs)(`li`,{children:[n.explainerPending,(0,D.jsx)(k,{children:A(n,i,t)})]}),(0,D.jsxs)(`li`,{children:[n.explainerTests,(0,D.jsx)(k,{children:n.codeAndTests(x(i,t))})]}),(0,D.jsxs)(`li`,{children:[n.explainerNoise,(0,D.jsx)(k,{children:j(n,i,t)})]})]})})}function k({children:t}){let{stats:n}=e();return(0,D.jsxs)(`span`,{className:E.now,children:[n.now,` `,t]})}function A(e,t,n){return n.openTasks===0?e.noPending:n.estimatedLines===null?e.pendingWithoutEstimate(n.openTasks):e.pendingEstimated(C(t,n.openTasks,n.estimatedLines))}function j(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),T(n.noiseShare,n.estimatedLines))}var M=`var(--chart-bar-neutral)`,N=`var(--accent-ink)`;function P({periods:t,totals:n,grain:i}){let{stats:a,core:s}=e(),c=r(),l=[{key:`onTopicLines`,label:a.onTopicSeries,shape:`bar`,color:M,stack:`lines`,format:e=>s.count(Math.round(e),`line`)},{key:`deferredLines`,label:a.deferredSeries,shape:`hatch`,color:N,stack:`lines`,format:(e,t)=>_(c,e,t.estimatedLines)},{label:a.codeLines,format:e=>x(c,e).code},{label:a.testLines,format:e=>x(c,e).tests},{label:a.deferredTasks,format:e=>o(c,e.deferredTasks)}];return(0,D.jsx)(y,{name:a.effectTitle,grain:i,summary:F(a,c,i,t,n),data:t,series:l})}function F(e,t,n,r,i){let o=(n,r)=>e.linesText(S(t,n,r));if(n===`week`)return e.effectSummary(i.realLines,o(i.deferredLines,i.estimatedLines),v(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 I({totals:t,period:n}){let{stats:i}=e(),a=r(),c=s();return(0,D.jsxs)(m,{period:c.labelled(i.effectWindow,n),children:[(0,D.jsx)(h,{label:i.keptOut,value:i.linesText(S(a,t.deferredLines,t.estimatedLines)),note:`${L(i,a,t)} · ${i.codeAndTests(x(a,t))}`}),(0,D.jsx)(h,{label:i.noiseWithoutBacklog,value:v(t.noiseShare,t.estimatedLines),note:i.noiseNote}),(0,D.jsx)(h,{label:i.deferredToBacklog,value:o(a,t.deferredTasks),note:i.deferredNote(t.fixedTasks,t.openTasks)}),(0,D.jsx)(h,{label:i.pullRequestLines,value:o(a,t.realLines)})]})}function L(e,t,n){let r=o(t,n.fixedLines);return n.estimatedLines===null?e.keptOutPending(r):e.keptOutEstimated(r,b(t,n.estimatedLines))}function R({weeks:t,days:n,windows:r,totals:i}){let{stats:a}=e(),{grain:o,periods:s,period:c,toggle:l}=w(`effect`,`week`,{weeks:t,days:n},r);return(0,D.jsx)(u,{title:a.effectTitle,period:c,aside:l,children:(0,D.jsx)(P,{periods:s,totals:i,grain:o})})}function z({projects:t,period:n}){let{stats:i}=e(),a=r(),c=s();return(0,D.jsx)(u,{title:i.byProject,period:c.labelled(i.effectWindow,n),children:t.length===0?(0,D.jsx)(f,{children:i.noCodeData}):(0,D.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?`—`:b(a,e.estimatedLines),o(a,e.realLines),v(e.noiseShare,e.estimatedLines)]}))})})}function B(){let{projectId:e}=i(),t=n(`effect`,e);return(0,D.jsx)(l,{query:t,children:e=>(0,D.jsx)(V,{report:e})})}function V({report:t}){let{stats:n}=e(),r=t.totals.deferredTasks===0;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(p,{repos:t.unavailableRepos}),r&&(0,D.jsx)(d,{children:n.noDeferredTasks}),(0,D.jsx)(I,{totals:t.totals,period:t.periods.weeks}),(0,D.jsxs)(`div`,{className:c.blocks,children:[(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(R,{weeks:t.weeks,days:t.days,windows:t.periods,totals:t.totals})}),(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(z,{projects:t.projects,period:t.periods.weeks})}),(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(O,{totals:t.totals})})]})]})}export{B as EffectTab};
@@ -1 +0,0 @@
1
- import{Sn as e,a as t,dn as n,fn as r}from"./Page-BHZdQQhE.js";import{c as i}from"./StatsTabState-CePos7h7.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{M as e,P as t,a as n,dn as r,h as i,j as a,mt as o}from"./Page-BHZdQQhE.js";import{S as s,_ as c}from"./index-DpWYLB0A.js";import{c as l,n as u}from"./web-paths-yWGbLD6t.js";import{c as d,i as f,r as p}from"./start-Cw9zPEW-.js";import{a as m,i as h,n as g,o as _,s as v}from"./StatsTabState-CePos7h7.js";import{t as y}from"./PanelRows.module-rg1MXy2z.js";import{t as b}from"./ShareBar-DBiU0f9_.js";import{i as x,r as S,t as C}from"./Figure-CO87y2TD.js";import{_ as w,a as T,b as E,h as D,m as O,o as k,p as A,t as j}from"./use-grain-panel-BKTkjTK3.js";var M={columns:`_columns_h1u9m_1`,countList:`_countList_h1u9m_7`,ageRows:`_ageRows_h1u9m_11`,ageRow:`_ageRow_h1u9m_11`,ageLabel:`_ageLabel_h1u9m_25`,ageTrack:`_ageTrack_h1u9m_29`,ageSegment:`_ageSegment_h1u9m_37`,legend:`_legend_h1u9m_41`,legendItem:`_legendItem_h1u9m_50`,share:`_share_h1u9m_61`,critical:`_critical_h1u9m_65`,high:`_high_h1u9m_69`,medium:`_medium_h1u9m_73`,low:`_low_h1u9m_77`,done:`_done_h1u9m_81`,fixed:`_fixed_h1u9m_85`,obsolete:`_obsolete_h1u9m_89`,duplicate:`_duplicate_h1u9m_93`,cancelled:`_cancelled_h1u9m_97`,unknown:`_unknown_h1u9m_101`,shareBar:`_shareBar_h1u9m_105`,alarm:`_alarm_h1u9m_117`,alarmOn:`_alarmOn_h1u9m_123`},N=r(),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:r}){let{stats:i,core:a}=e(),o=r.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})=>`${i.ageBuckets[e]}: ${t}${F(i,n)}`).join(`; `);return(0,N.jsxs)(_,{title:i.openAge,period:i.periodNow,children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.ageRows,children:o.map(({bucket:e,total:r,byPriority:a})=>(0,N.jsxs)(`div`,{className:M.ageRow,"aria-hidden":`true`,children:[(0,N.jsx)(`span`,{className:M.ageLabel,children:i.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:r})]},e))}),(0,N.jsx)(`p`,{className:M.legend,children:P.map(e=>(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:a.priorityLabel(e)},e))}),(0,N.jsx)(`p`,{className:n(M.alarm,r.urgentStale>0&&M.alarmOn),children:i.urgentStale(r.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:t,period:r}){let i=e(),a=m(),{stats:o}=i,c=s(R.map(e=>t.byReason[e])),l=R.map(e=>`${L[e](i)}: ${t.byReason[e]}`).join(`; `);return(0,N.jsxs)(_,{title:o.closing,period:a.of(`weeks`,r),children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.shareBar,children:R.map(e=>(0,N.jsx)(`span`,{className:n(M.share,M[e]),style:{width:c===0?0:`${t.byReason[e]/c*100}%`}},e))}),(0,N.jsx)(`ul`,{className:y.rows,children:R.map(e=>(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:L[e](i)}),(0,N.jsx)(`span`,{className:y.rowValue,children:t.byReason[e]})]},e))}),(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:A(t.duplicateShare)}),(0,N.jsx)(B,{label:o.noSourceAmongCreated,value:A(t.withoutSourceShare)}),(0,N.jsx)(B,{label:o.reopened,value:t.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:t,listPath:n}){let{stats:r}=e();return(0,N.jsx)(_,{title:r.hotspots,period:r.periodNow,children:(0,N.jsxs)(`div`,{className:M.columns,children:[(0,N.jsx)(H,{title:r.folders,empty:r.noSourceFolders,items:t.folders.map(({label:e,count:t})=>({key:e,label:(0,N.jsx)(`code`,{children:e}),count:t}))}),(0,N.jsx)(H,{title:r.tags,empty:r.noTags,items:t.tags.map(({tag:e,count:t})=>({key:e,label:(0,N.jsx)(l,{to:{pathname:n,search:f({...p,tags:[e]})},children:d(e)}),count:t}))})]})})}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}=e(),o=a(),{grain:s,periods:c,period:l,toggle:u}=j(`flow`,`week`,{weeks:t,days:n},r),d=E(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)(D,{name:p,grain:s,summary:i.flowSummary(T(s,c)),data:c,series:f,axes:{left:w,right:w}})})}var q=`var(--chart-bar-warm)`;function J({weeks:t,days:n,windows:r,backlogSince:i}){let{stats:a,core:o}=e(),{grain:s,periods:c,range:l,period:u,toggle:d}=j(`intake`,`day`,{weeks:t,days:n},r),f=[{key:`created`,label:a.createdTasks,tooltipLabel:a.flowCreated,shape:`bar`,color:q,format:e=>o.count(e,`task`)}],p=a.createdBy[s];return(0,N.jsx)(_,{title:p,period:u,aside:d,children:(0,N.jsx)(D,{name:p,grain:s,summary:a.intakeSummary(k(s,c,{now:l.to,backlogSince:i})),data:c,series:f,axes:{left:w}})})}var Y={decline:`↓`,growth:`↑`};function X(){let{projectId:e}=o(),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,backlogSince:e.backlogSince}),(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}=e(),r=a(),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:O(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};