p-backlog 0.8.1 → 0.10.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 (57) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +15 -7
  3. package/README.ru.md +15 -6
  4. package/dist/cli.js +5476 -4561
  5. package/dist/web/assets/CodeTab-ClCaW8AS.js +1 -0
  6. package/dist/web/assets/CostTab-CtI3iFiW.js +1 -0
  7. package/dist/web/assets/EffectTab-DcvyEB2U.js +1 -0
  8. package/dist/web/assets/Figure-DkmKAO9C.css +1 -0
  9. package/dist/web/assets/Figure-DxKUx52i.js +1 -0
  10. package/dist/web/assets/OverviewTab-DE_6Z9ps.js +1 -0
  11. package/dist/web/assets/Page-buthlp0V.js +59 -0
  12. package/dist/web/assets/Page-r2s5SXpX.css +1 -0
  13. package/dist/web/assets/PanelRows-6zccccnE.css +1 -0
  14. package/dist/web/assets/PanelRows.module-ZonfBTD-.js +1 -0
  15. package/dist/web/assets/QualityTab-CkoKu4X0.js +1 -0
  16. package/dist/web/assets/ShareBar-B5phBvQk.css +1 -0
  17. package/dist/web/assets/ShareBar-BAS4lpze.js +1 -0
  18. package/dist/web/assets/StatsPage-B_pacptZ.css +1 -0
  19. package/dist/web/assets/StatsPage-Bmr75f8J.js +1 -0
  20. package/dist/web/assets/StatsTabState-BacJCCdC.css +1 -0
  21. package/dist/web/assets/StatsTabState-D93FkgT5.js +1 -0
  22. package/dist/web/assets/StatsTable-D-PylWl7.js +1 -0
  23. package/dist/web/assets/StatsTable-DPDsjAV6.css +1 -0
  24. package/dist/web/assets/UnavailableRepos-DyBVFVrQ.js +1 -0
  25. package/dist/web/assets/index-BFmeY_kk.js +2 -0
  26. package/dist/web/assets/start-CJ8zVmAB.js +38 -0
  27. package/dist/web/assets/start-CjkFx30s.css +1 -0
  28. package/dist/web/assets/summaries-D57lRSim.js +1 -0
  29. package/dist/web/assets/use-grain-panel-UcuXHAhT.js +55 -0
  30. package/dist/web/assets/use-grain-panel-nSBWtox9.css +1 -0
  31. package/dist/web/assets/web-paths--TbmQ8rA.js +1 -0
  32. package/dist/web/index.html +1 -1
  33. package/package.json +12 -6
  34. package/skill/backlog/SKILL.md +23 -15
  35. package/skill/backlog-en/SKILL.md +25 -16
  36. package/dist/web/assets/CodeTab-Bn0Zl7PI.js +0 -1
  37. package/dist/web/assets/CostTab-BBsTM7es.js +0 -1
  38. package/dist/web/assets/EffectTab-gDz3Omnz.js +0 -1
  39. package/dist/web/assets/Figure-DAdnR-Fu.js +0 -1
  40. package/dist/web/assets/OverviewTab-CkZ7dCcx.js +0 -1
  41. package/dist/web/assets/QualityTab-Bkxkcnh2.js +0 -1
  42. package/dist/web/assets/ShareBar-CoTArw6Q.js +0 -1
  43. package/dist/web/assets/StatsPage-B-sQM9n_.js +0 -1
  44. package/dist/web/assets/StatsPage-CHUVlZXv.css +0 -1
  45. package/dist/web/assets/StatsPage.module-DxtnhZOJ.js +0 -1
  46. package/dist/web/assets/StatsTabState-BauB3xdU.js +0 -1
  47. package/dist/web/assets/StatsTabState-CUDEyUDu.css +0 -1
  48. package/dist/web/assets/StatsTable-Dg0CrPof.js +0 -1
  49. package/dist/web/assets/StatsTable-Z9x-Xaha.css +0 -1
  50. package/dist/web/assets/UnavailableRepos-BTMsOBI-.js +0 -1
  51. package/dist/web/assets/cx-CutaZ2Ho.js +0 -55
  52. package/dist/web/assets/index-CM8tBSED.js +0 -2
  53. package/dist/web/assets/start-CbHSVk3k.css +0 -1
  54. package/dist/web/assets/start-Cm2kfqW8.js +0 -41
  55. package/dist/web/assets/use-grain-panel-BczBScgN.js +0 -55
  56. package/dist/web/assets/use-grain-panel-tQC8-pw2.css +0 -1
  57. package/dist/web/assets/value-dot-Dy8YzPPT.js +0 -1
@@ -0,0 +1 @@
1
+ ._frame_1h4aw_1{gap:var(--space-2);flex-direction:column;min-width:0;margin:0;display:flex}._summary_1h4aw_9{font-size:var(--text-sm);margin:0}._plot_1h4aw_14{height:var(--plot-height);min-width:0}@media (width<=600px){._plot_1h4aw_14{height:var(--plot-height-compact)}}._plot_1h4aw_14 .recharts-cartesian-axis-tick-value{fill:var(--ink-subtle);font-size:var(--text-sm)}._plot_1h4aw_14 .recharts-cartesian-axis-line,._plot_1h4aw_14 .recharts-cartesian-grid line{stroke:var(--line)}._plot_1h4aw_14 .recharts-line-curve,._plot_1h4aw_14 .recharts-area-curve,._plot_1h4aw_14 .recharts-line-dots{filter:drop-shadow(0 0 1px var(--surface-raised)) drop-shadow(0 0 1px var(--surface-raised))}._plot_1h4aw_14 .recharts-surface:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}._plot_1h4aw_14 .recharts-tooltip-wrapper{outline:none}._legend_1h4aw_53{gap:var(--space-1) var(--space-3);color:var(--ink-subtle);font-size:var(--text-sm);flex-wrap:wrap;display:flex}._legendItem_1h4aw_61{align-items:center;gap:var(--space-1);display:inline-flex}._swatch_1h4aw_67{flex:none;display:inline-block}._bar_1h4aw_72{background:var(--swatch);border-radius:2px;width:10px;height:10px}._hatch_1h4aw_79{background:repeating-linear-gradient(45deg, var(--swatch) 0 2px, var(--surface-raised) 2px 5px);border-radius:2px;width:10px;height:10px}._line_1h4aw_86{border-top:2px solid var(--swatch);width:14px}._dashed_1h4aw_91{border-top:2px dashed var(--swatch);width:14px}._tooltip_1h4aw_96{gap:var(--space-1);padding:var(--space-2) var(--space-3);border:1px solid var(--line);border-radius:var(--radius-control);background:var(--surface-raised);box-shadow:var(--shadow-panel);color:var(--ink);font-size:var(--text-sm);flex-direction:column;display:flex}._tooltipTitle_1h4aw_109{margin:0;font-weight:600}._tooltipRows_1h4aw_114{gap:2px var(--space-3);grid-template-columns:auto auto;margin:0;display:grid}._tooltipRows_1h4aw_114 dt{align-items:center;gap:var(--space-1);color:var(--ink-muted);display:inline-flex}._tooltipRows_1h4aw_114 dd{text-align:end;font-variant-numeric:tabular-nums;margin:0}._tooltipRow_1h4aw_114{display:contents}._grain_tsnw3_1{gap:var(--space-1);display:inline-flex}
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{At as t,Bt as n,Ct as r,Dt as i,Et as a,Ft as o,Gt as s,Ht as c,Lt as l,Mt as u,Nt as d,Ot as f,Pt as p,Rt as m,St as h,Tt as g,Ut as _,Vt as v,Wt as y,_t as b,at as x,bt as S,ct as C,et as w,gt as T,it as E,jt as D,kt as O,mt as k,nt as A,ot as j,pt as M,rt as ee,tt as N,un as P,ut as F,vt as I,wt as te,xt as ne,yt as re,zt as L}from"./Page-buthlp0V.js";import{t as ie}from"./index-BFmeY_kk.js";var ae={};function R(e,t){!e&&!ae[t]&&(ae[t]=!0,console.warn(t))}var z=e(P(),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:r}){r=g()||r;let[i,a]=z.useState(e.state),[o,s]=(0,z.useOptimistic)(i),[c,l]=z.useState(),[u,f]=z.useState({isTransitioning:!1}),[p,m]=z.useState(),[h,_]=z.useState(),[v,y]=z.useState(),x=z.useRef(new Map),C=z.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:d(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&x.current.set(t,e.data)}),o.forEach(e=>x.current.delete(e)),R(u===!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 v=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(R(g==null||v,"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."),!g||!v){t&&u?t(()=>a(i)):r===!1?a(i):z.startTransition(()=>{r===!0&&s(e=>B(e,i)),a(i)});return}if(t&&u){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),_(void 0),l(void 0),f({isTransitioning:!1})})}),t(()=>_(n));return}h?(p?.resolve(),h.skipTransition(),y({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),f({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,h,p,r,s,n]);z.useLayoutEffect(()=>e.subscribe(C),[e,C]),z.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new se)},[u]),z.useEffect(()=>{if(p&&c&&e.window){let t=c,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):z.startTransition(()=>{r===!0&&s(e=>B(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),_(void 0),l(void 0),f({isTransitioning:!1})}),_(i)}},[c,p,e.window,r,s]),z.useEffect(()=>{p&&c&&o.location.key===c.location.key&&p.resolve()},[p,h,o.location,c]),z.useEffect(()=>{!u.isTransitioning&&v&&(l(v.state),f({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),y(void 0))},[u.isTransitioning,v]);let w=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:w,static:!1,basename:E,onError:n}),[e,w,E,n]),O=z.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),k=z.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),A=z.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),j=z.useMemo(()=>({fetchers:o.fetchers,fetcherData:x.current}),[o.fetchers]);return z.createElement(z.Fragment,null,z.createElement(T.Provider,{value:D},z.createElement(re.Provider,{value:O},z.createElement(I.Provider,{value:k},z.createElement(b.Provider,{value:A},z.createElement(S.Provider,{value:j},z.createElement(te.Provider,{value:u},z.createElement(pe,{basename:E,location:o.location,navigationType:o.historyAction,navigator:w,useTransitions:r},z.createElement(le,{routes:e.routes,manifest:e.manifest,state:o,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(T);return c(a,`You must render this element inside a <DataRouterContext.Provider> element`),k(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function de({to:e,replace:t,state:n,relative:a}){c(x(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:o,navigator:s}=z.useContext(h);y(!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:l}=z.useContext(r),{pathname:d}=j(),p=C(),g=m(e,u(l),d,a===`path`);f(typeof e==`string`?e:v(e),s.createHref(g),i(s),`reject`);let _=JSON.stringify(g);return z.useEffect(()=>{p(JSON.parse(_),{replace:t,state:n,relative:a})},[p,_,a,t,n]),null}function fe(e){return F(e.context)}function pe({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){c(!x(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),l=z.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=_(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:g}=n,v=z.useMemo(()=>{let e=L(u,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:g},navigationType:r}},[s,u,d,f,p,m,r,g]);return y(v!=null,`<Router basename="${s}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:z.createElement(h.Provider,{value:l},z.createElement(ne.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)?(y(!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?L(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?L(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 ie(()=>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=g(),{nonce:r}=q(),{router:i}=N(`PrefetchPageLinks`),a=z.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?z.createElement(Le,{page:e,matches:a,...t}):z.createElement(Re,{page:e,matches:a,...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=j(),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=j(),{manifest:i,routeModules:a}=q(),{matches:o}=ee(`PrefetchPageLinks`),{loaderData:s}=A(`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 a({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:n({window:t?.window}),hydrationData:t?.hydrationData||He(),routes:e,mapRouteProperties:D,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 n=Object.entries(e),r={};for(let[e,i]of n)if(i&&i.__type===`RouteErrorResponse`)r[e]=new O(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type===`Error`){if(typeof i.__subType==`string`&&t.includes(i.__subType)){let t=window[i.__subType];if(typeof t==`function`)try{let n=new t(i.message);n.stack=``,r[e]=n}catch{}}if(r[e]==null){let t=Error(i.message);t.stack=``,r[e]=t}}else r[e]=i;return r}var Y=z.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:c,target:u,to:d,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:_,...v},y){let{basename:b,navigator:x,useTransitions:S}=z.useContext(h),C=typeof d==`string`&&s.test(d),w=l(d,b);d=w.to;let T=E(d,{relative:r}),D=j(),O=null;if(o){let e=m(o,[],D.mask?D.mask.pathname:`/`,!0);b!==`/`&&(e.pathname=e.pathname===`/`?b:p([b,e.pathname])),O=x.createHref(e)}let[k,A,M]=Pe(n,v),ee=Ke(d,{replace:a,mask:o,state:c,target:u,preventScrollReset:f,relative:r,viewTransition:g,defaultShouldRevalidate:_,useTransitions:S});function N(t){e&&e(t),t.defaultPrevented||ee(t)}let P=!(w.isExternal||i),F=z.createElement(`a`,{...v,...M,href:(P?O:void 0)||w.absoluteURL||T,onClick:P?N:e,ref:ze(y,A),target:u,"data-discover":!C&&t===`render`?`true`:void 0});return k&&!C?z.createElement(z.Fragment,null,F,z.createElement(Fe,{page:T})):F});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=M(a,{relative:c.relative}),d=j(),f=z.useContext(I),{navigator:p,basename:m}=z.useContext(h),g=f!=null&&$e(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f?.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=L(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(b)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return z.createElement(Y,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):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:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},g)=>{let{useTransitions:_}=z.useContext(h),v=Xe(),y=Ze(c,{relative:u}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&s.test(c);return z.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,c=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?z.startTransition(()=>c()):c()},...m,"data-discover":!x&&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=C(),d=j(),f=M(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){y(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=j(),i=z.useMemo(()=>ye(r.search,n.current?null:t.current),[r.search]),a=C();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}=N(`useSubmit`),{basename:t}=z.useContext(h),n=w(`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(h),i=z.useContext(r);c(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...M(e||`.`,{relative:t})},s=j();if(e==null){o.search=s.search;let e=new URLSearchParams(o.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();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:p([n,o.pathname])),v(o)}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(te);c(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=N(`useViewTransitionState`),i=M(e,{relative:t});if(!n.isTransitioning)return!1;let a=L(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=L(n.nextLocation.pathname,r)||n.nextLocation.pathname;return o(i.pathname,s)!=null||o(i.pathname,a)!=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};
@@ -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-CM8tBSED.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BFmeY_kk.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.8.1",
3
+ "version": "0.10.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,19 +42,20 @@
42
42
  ],
43
43
  "scripts": {
44
44
  "test": "vitest run",
45
- "lint": "eslint . && knip && node scripts/check-cyrillic.mjs",
45
+ "lint": "eslint . && stylelint \"src/**/*.css\" && prettier --check . && knip && jscpd && node scripts/check-cyrillic.mjs && node scripts/check-css-contracts.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",
49
- "start": "npm run build && node dist/server.js",
50
- "dev": "concurrently -k -n server,web \"tsx watch src/server/main.ts\" \"vite\"",
51
- "test:e2e": "playwright test",
49
+ "start": "npm run build && node dist/cli.js serve",
50
+ "dev": "concurrently -k -n server,web \"tsx watch src/cli/main.ts serve\" \"vite\"",
51
+ "test:e2e": "playwright test --project=chromium",
52
52
  "screenshots": "npm run build && tsx scripts/screenshots/make.ts",
53
53
  "plugins": "tsx scripts/build-plugins.ts",
54
54
  "test:package": "vitest run --config vitest.package.config.ts",
55
55
  "prepare": "npm run build",
56
56
  "test:coverage": "vitest run --coverage",
57
- "knip": "knip"
57
+ "knip": "knip",
58
+ "format": "prettier --write ."
58
59
  },
59
60
  "dependencies": {
60
61
  "@hono/node-server": "^2.1.1",
@@ -80,8 +81,10 @@
80
81
  "eslint": "^10.11.0",
81
82
  "eslint-plugin-react-hooks": "^7.1.1",
82
83
  "globals": "^17.12.0",
84
+ "jscpd": "^5.4.0",
83
85
  "jsdom": "^30.1.0",
84
86
  "knip": "^6.37.0",
87
+ "prettier": "3.9.9",
85
88
  "react": "^19.3.0",
86
89
  "react-dom": "^19.3.0",
87
90
  "react-is": "^19.3.0",
@@ -90,6 +93,9 @@
90
93
  "recharts": "^3.10.1",
91
94
  "remark-gfm": "^4.0.1",
92
95
  "sharp": "^0.35.4",
96
+ "stylelint": "^17.16.0",
97
+ "stylelint-config-standard": "^40.0.0",
98
+ "stylelint-declaration-strict-value": "^1.12.1",
93
99
  "tsx": "^4.23.15",
94
100
  "typescript": "~6.0.3",
95
101
  "typescript-eslint": "^8.70.0",
@@ -56,9 +56,10 @@ description: Use when, while working on code, you notice a problem outside the c
56
56
  - `--category` — обязательно. Запах кода — его категория из каталога code-smells: `bloaters`,
57
57
  `change-preventers`, `couplers`, `data-dealers`, `dispensables`, `functional-abusers`,
58
58
  `lexical-abusers`, `oo-abusers`, `obfuscators`. Неправильное поведение — `bug`.
59
- - `--found` — как найдена, обязательно: `incidental` — ты сам заметил проблему по ходу работы и вынес её,
60
- чтобы не раздувать текущую правку; `review` — находка аудита или ревью по просьбе пользователя; `manual` —
61
- пользователь попросил завести задачу. Только `incidental` считается выигрышем в статистике «Эффект».
59
+ - `--found` — как найдена; передавай всегда: без флага задача запишется как `manual` и не попадёт в «Эффект».
60
+ `incidental` — ты сам заметил проблему по ходу работы и вынес её, чтобы не раздувать текущую правку;
61
+ `review` — находка аудита или ревью по просьбе пользователя; `manual` — пользователь попросил завести
62
+ задачу. Только `incidental` считается выигрышем в статистике «Эффект».
62
63
  - Работаешь над задачей из беклога — добавь `--related <её ID>`.
63
64
  - Чеклист — проверяемые шаги: по нему считается прогресс.
64
65
  - Код выхода 3 и «Похоже на SPA-12 — …» — такая задача уже открыта: новую не создавай, упомяни
@@ -91,7 +92,7 @@ description: Use when, while working on code, you notice a problem outside the c
91
92
  | Код | Что случилось | Что делать |
92
93
  |---|---|---|
93
94
  | 0 | Статус стал `in-progress`, выведены путь, связи и текст задачи | Работать |
94
- | 1 | Это эпик | Показать пользователю задачи эпика из вывода и спросить, какую взять |
95
+ | 1 | Это эпик, либо запись не прошла: файл задачи менялся во время записи или задача не прошла проверку | Эпик — показать пользователю задачи эпика из вывода и спросить, какую взять. Иначе прочитать сообщение: просит повторить команду — повторить, иначе сообщить пользователю |
95
96
  | 2 | Задача или проект не найдены, открытых задач нет | Сообщить пользователю |
96
97
  | 3 | Открытые блокеры или задача уже закрыта; при `--next` и `--path` — все подходящие задачи заблокированы | Перечислить блокеры и остановиться. `take <ID> --force` — только по прямой просьбе пользователя |
97
98
 
@@ -99,13 +100,18 @@ description: Use when, while working on code, you notice a problem outside the c
99
100
  2. Делай работу. Выполнил пункт чеклиста — сразу отметь его в файле задачи (`- [ ]` → `- [x]`, путь есть
100
101
  в выводе `take`). Появились новые шаги — допиши их в чеклист. Frontmatter руками не меняй.
101
102
  3. Посторонние проблемы, найденные по ходу, — через «Записать задачу» с `--related <ID>`.
102
- 4. Перед закрытием проверь результат командами проекта: тесты, линт, типы.
103
- 5. Всё сделано, проверено и закоммичено → `backlog close <ID> --as fixed --reason "Исправлено в <sha>: <что
104
- именно>"` — по хешу статистика узнаёт, кто и чем исправил. Коммита нет (правки ещё не закоммичены) →
105
- `backlog status <ID> done`. Если CLI предупредил о неотмеченных пунктах —
106
- отметь сделанные; если что-то не сделано, задача не закончена.
107
- 6. Сделано не всё → статус оставь `in-progress`, допиши в конец файла задачи раздел и скажи пользователю,
108
- что осталось:
103
+ 4. Закрывай только проверенное: тесты, линт и типы проекта прошли, а если правку ещё будут ревьюить —
104
+ ревью пройдено и замечания по задаче исправлены. Задача, закрытая раньше и возвращённая в работу
105
+ (`backlog status <ID> in-progress`), считается переоткрытой; закрывая её снова, начни `--reason` с
106
+ прежних коммитов — CLI их назовёт.
107
+ 5. Закоммить правку и сразу закрой: `backlog close <ID> --as fixed --reason "Исправлено в <sha>: <что
108
+ именно>"` — хеш есть в выводе `git commit`, по нему статистика узнаёт, кто и чем исправил; исправление
109
+ в нескольких коммитах — перечисли все, основной первым: статистика считает только первый. Коммит
110
+ сделает позже пользователь или его не будет вовсе → `backlog status <ID> done`; появится коммит — тот
111
+ же `backlog close <ID> --as fixed …` привяжет его, не открывая задачу. Если CLI предупредил о
112
+ неотмеченных пунктах — отметь сделанные; если что-то не сделано, задача не закончена.
113
+ 6. Сделано не всё или правка ждёт ревью → статус оставь `in-progress`, допиши в конец файла задачи раздел
114
+ и скажи пользователю, что осталось:
109
115
  ```markdown
110
116
  ## Заметки
111
117
  - <сегодняшняя дата>: сделано …; осталось …, потому что …
@@ -120,9 +126,9 @@ description: Use when, while working on code, you notice a problem outside the c
120
126
  завершённые эпики и сдвинутые `source` он уже исправил сам — это поле `fixed`, список `{ kind, taskId, … }`:
121
127
  `references-removed` — убраны ссылки на несуществующие задачи `ids`; `epic-closed` — эпик закрыт, все его
122
128
  задачи `childIds` закрыты; `epic-reopened` — автоматически закрытый эпик снова открыт, его задачи
123
- `childIds` снова открыты; `source-moved` — `source` сдвинулся `from` → `to`. Перескажи его пользователю
124
- одной строкой. Код выхода 5 — не сбой: есть кандидаты или проблемы задач, которые надо разобрать; 0 —
125
- разбирать нечего.
129
+ `childIds` снова открыты; `source-moved` — `source` сдвинулся или файл задачи переименован, а её строки
130
+ целы: `from` → `to`. Перескажи его пользователю одной строкой. Код выхода 5 — не сбой: есть кандидаты или
131
+ проблемы задач, которые надо разобрать; 0 — разбирать нечего.
126
132
  2. У кандидата `source-changed` в JSON уже есть `problem` — первый абзац описания задачи, `snippet` —
127
133
  текущий код вокруг `source` с номерами строк — и `diff` — изменения файла с последней проверки (у
128
134
  обрезанного `diffOmittedLines` — сколько строк не показано). Обычно этого хватает: реши по ним, не вызывая
@@ -153,7 +159,9 @@ description: Use when, while working on code, you notice a problem outside the c
153
159
  4. `problems` — список `{ kind, … }`. `file-not-parsed`: файл `path` не разбирается, причины в `problems` —
154
160
  поправь YAML руками, не меняя `id`. Остальное перечисли пользователю: `task-invalid` (ошибка `problem`
155
161
  в задаче `taskId`), `fix-failed` (исправление не записалось, причина `cause`), `epics-wait-for-files`,
156
- `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-history-unreadable`,
162
+ `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git не
163
+ доверяет каталогу `repo` другого владельца — `repos` в `project.md` править не надо, нужен
164
+ `git config --global --add safe.directory "<repo>"`, его запускает пользователь), `project-history-unreadable`,
157
165
  `prefix-shared` (у проектов `projectIds` один префикс — ID задач пересекаются).
158
166
  5. В конце ответа — блок, по которому пользователь найдёт закрытое:
159
167
  ```
@@ -62,10 +62,10 @@ this same task.
62
62
  - `--category` — required. For a code smell, use its category from the code-smells catalog: `bloaters`,
63
63
  `change-preventers`, `couplers`, `data-dealers`, `dispensables`, `functional-abusers`,
64
64
  `lexical-abusers`, `oo-abusers`, `obfuscators`. For incorrect behavior, use `bug`.
65
- - `--found` — how it was found, required: `incidental` — you noticed the problem yourself while working and
66
- moved it out so the current change stays small; `review` — a finding from an audit or review the user asked
67
- for; `manual` — the user asked you to record the task. Only `incidental` counts as a gain in the Effect
68
- statistics.
65
+ - `--found` — how it was found; always pass it: without the flag the task is recorded as `manual` and does
66
+ not count in Effect. `incidental` — you noticed the problem yourself while working and moved it out so the
67
+ current change stays small; `review` — a finding from an audit or review the user asked for; `manual` — the
68
+ user asked you to record the task. Only `incidental` counts as a gain in the Effect statistics.
69
69
  - If you're working on a task from the backlog — add `--related <its ID>`.
70
70
  - The checklist holds verifiable steps: progress is counted from it.
71
71
  - Exit code 3 and "Looks like SPA-12 — …" mean such a task is already open: don't create a new one,
@@ -99,7 +99,7 @@ array) — fix them together, closing each one.
99
99
  | Code | What happened | What to do |
100
100
  |---|---|---|
101
101
  | 0 | Status became `in-progress`, the path, links, and task text were printed | Work on it |
102
- | 1 | It's an epic | Show the user the epic's tasks from the output and ask which one to take |
102
+ | 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 |
103
103
  | 2 | Task or project not found, no open tasks | Tell the user |
104
104
  | 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 |
105
105
 
@@ -108,13 +108,19 @@ array) — fix them together, closing each one.
108
108
  path is in the `take` output). New steps came up — add them to the checklist. Don't edit the
109
109
  frontmatter by hand.
110
110
  3. Unrelated problems found along the way — through "Log a task" with `--related <ID>`.
111
- 4. Before closing, verify the result with the project's own commands: tests, lint, types.
112
- 5. Everything is done, verified, and committed → `backlog close <ID> --as fixed --reason "Fixed in <sha>:
113
- <what exactly>"` — the hash lets stats know who fixed it and with what. No commit yet (changes aren't
114
- committed) → `backlog status <ID> done`. If the CLI warned about unchecked items — check off the ones
115
- that are done; if something isn't done, the task isn't finished.
116
- 6. Not everything is done → leave the status `in-progress`, append a section to the end of the task file
117
- and tell the user what's left:
111
+ 4. Close only verified work: the project's tests, lint, and types pass, and if the change is still going
112
+ to be reviewed — the review is done and its findings on the task are fixed. A task closed earlier and
113
+ put back to work (`backlog status <ID> in-progress`) counts as reopened; when closing it again, start
114
+ `--reason` with the earlier commits — the CLI names them.
115
+ 5. Commit the change and close right away: `backlog close <ID> --as fixed --reason "Fixed in <sha>: <what
116
+ exactly>"` — the hash is in the `git commit` output, and it lets stats know who fixed it and with what;
117
+ a fix spread over several commits — list them all, the main one first: stats count only the first. The
118
+ user will commit later, or there will be no commit at all → `backlog status <ID> done`; once the
119
+ commit exists, the same `backlog close <ID> --as fixed …` attaches it without reopening the task. If
120
+ the CLI warned about unchecked items — check off the ones that are done; if something isn't done, the
121
+ task isn't finished.
122
+ 6. Not everything is done, or the change awaits review → leave the status `in-progress`, append a section
123
+ to the end of the task file and tell the user what's left:
118
124
  ```markdown
119
125
  ## Notes
120
126
  - <today's date>: done …; left …, because …
@@ -129,9 +135,10 @@ message), a request to "check the backlog", or "clean up the backlog".
129
135
  Dangling references, completed epics, and shifted `source` — it already fixed those itself; that's the
130
136
  `fixed` field, a list of `{ kind, taskId, … }`: `references-removed` — references to missing tasks `ids`
131
137
  removed; `epic-closed` — the epic closed, all its tasks `childIds` are closed; `epic-reopened` — the
132
- auto-closed epic reopened, its tasks `childIds` are open again; `source-moved` — `source`
133
- moved `from` → `to`. Relay it to the user in one line. Exit code 5 is not a failure: there are candidates or
134
- task problems to work through; 0 means there is nothing to work through.
138
+ auto-closed epic reopened, its tasks `childIds` are open again; `source-moved` — `source` moved, or the
139
+ task's file was renamed with its lines intact: `from` → `to`. Relay it to the user in one line. Exit code 5
140
+ is not a failure: there are candidates or task problems to work through; 0 means there is nothing to work
141
+ through.
135
142
  2. A `source-changed` candidate already has `problem` in the JSON — the task description's first
136
143
  paragraph — `snippet` — the current code around `source` with line numbers — and `diff` — the file's
137
144
  changes since the last check (when cut short, `diffOmittedLines` says how many lines are not shown).
@@ -165,7 +172,9 @@ message), a request to "check the backlog", or "clean up the backlog".
165
172
  4. `problems` — a list of `{ kind, … }`. `file-not-parsed`: the file `path` doesn't parse, reasons in
166
173
  `problems` — fix the YAML by hand without changing `id`. List the rest for the user: `task-invalid` (error
167
174
  `problem` in task `taskId`), `fix-failed` (the fix wasn't written, reason `cause`), `epics-wait-for-files`,
168
- `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-history-unreadable`,
175
+ `project-without-repos`, `project-repos-missing`, `project-repo-not-git`, `project-repo-unsafe` (git doesn't
176
+ trust the directory `repo` owned by another user — don't edit `repos` in `project.md`, the user needs to run
177
+ `git config --global --add safe.directory "<repo>"`), `project-history-unreadable`,
169
178
  `prefix-shared` (projects `projectIds` share one prefix — their task IDs collide).
170
179
  5. End your answer with a block the user can use to find what was closed:
171
180
  ```
@@ -1 +0,0 @@
1
- import{cn as e,ft as t,i as n,k as r}from"./cx-CutaZ2Ho.js";import{a as i,i as a,n as o,r as s}from"./StatsTabState-BauB3xdU.js";import{t as c}from"./ShareBar-CoTArw6Q.js";import{t as l}from"./StatsPage.module-DxtnhZOJ.js";import{t as u}from"./UnavailableRepos-BTMsOBI-.js";var d={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},f=e();function p({churn:e,period:t}){let{stats:n}=r(),o=a(),l=e[0]?.score??1;return(0,f.jsxs)(i,{title:n.churnTitle,period:o.of(`churn`,t),children:[(0,f.jsx)(`p`,{className:s.muted,children:n.churnHint}),e.length===0?(0,f.jsx)(`p`,{className:s.muted,children:n.churnEmpty}):(0,f.jsx)(`ul`,{className:s.rows,children:e.map(e=>(0,f.jsxs)(`li`,{className:d.churnRow,children:[(0,f.jsx)(`code`,{className:s.rowLabel,children:e.label}),(0,f.jsx)(`span`,{className:s.rowValue,children:n.commits(e.commits)}),(0,f.jsx)(`span`,{className:s.rowValue,children:n.churnTasks(e.tasks,e.weight)}),(0,f.jsx)(c,{share:e.score/l})]},e.label))})]})}function m({density:e}){let{stats:t}=r();return(0,f.jsx)(i,{title:t.densityTitle,period:t.periodNow,children:e.projects.length===0?(0,f.jsx)(`p`,{className:s.muted,children:t.noCodeData}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h,{rows:e.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),e.folders.length>0&&(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h3`,{className:s.subTitle,children:t.folders}),(0,f.jsx)(h,{rows:e.folders.map(e=>({key:e.label,label:(0,f.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function h({rows:e}){let{stats:t,core:n}=r();return(0,f.jsx)(`ul`,{className:s.rows,children:e.map(({key:e,label:r,row:i})=>(0,f.jsxs)(`li`,{className:d.densityRow,children:[(0,f.jsx)(`span`,{className:s.rowLabel,children:r}),(0,f.jsx)(`span`,{className:s.rowValue,children:n.count(i.lines,`line`)}),(0,f.jsx)(`span`,{className:s.rowValue,children:n.count(i.open,`task`)}),(0,f.jsx)(`span`,{className:s.rowValue,children:i.perKloc===null?`—`:t.perKloc(i.perKloc)})]},e))})}function g(){let{projectId:e}=t(),r=n(e);return(0,f.jsx)(o,{query:r,children:e=>(0,f.jsx)(_,{report:e})})}function _({report:e}){let{stats:t}=r();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u,{repos:e.unavailableRepos}),(0,f.jsxs)(`div`,{className:l.blocks,children:[(0,f.jsx)(`div`,{className:s.wide,children:(0,f.jsx)(p,{churn:e.churn,period:e.periods.churn})}),(0,f.jsx)(m,{density:e.density})]}),(0,f.jsx)(`p`,{className:l.note,children:t.codeNote})]})}export{g as CodeTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{F as t,I as n,O as r,a as i,c as a,cn as o,ft as s,k as c,ln as l}from"./cx-CutaZ2Ho.js";import{_ as u,d,h as f,x as p}from"./index-CM8tBSED.js";import{a as m,i as h,r as g,t as _}from"./StatsTabState-BauB3xdU.js";import{t as v}from"./StatsPage.module-DxtnhZOJ.js";import{n as y,t as b}from"./Figure-DAdnR-Fu.js";import{t as x}from"./StatsTable-Dg0CrPof.js";import{A as S,B as C,C as w,D as ee,Dt as T,E as te,F as ne,G as re,H as ie,I as ae,J as oe,K as se,L as ce,M as le,N as ue,O as de,P as fe,Q as pe,R as me,St as he,T as ge,Tt as _e,U as ve,V as ye,X as be,Y as xe,Z as Se,_ as Ce,_t as E,a as we,at as Te,b as Ee,bt as De,c as Oe,ct as ke,d as Ae,dt as je,et as D,f as Me,ft as O,g as Ne,h as k,ht as Pe,i as A,it as Fe,j as Ie,k as Le,kt as Re,l as ze,lt as Be,m as Ve,mt as He,n as Ue,nt as j,o as We,ot as Ge,p as Ke,pt as M,q as qe,r as Je,rt as Ye,s as Xe,st as Ze,t as Qe,tt as $e,u as et,ut as N,v as P,vt as tt,wt as F,x as nt,xt as I,y as L,yt as rt,z as it}from"./use-grain-panel-BczBScgN.js";import{a as at,i as ot,n as st,o as ct,r as lt,t as R}from"./value-dot-Dy8YzPPT.js";function z(e,n){return n===null?`—`:t(f(e,n))}var B=o();function ut({totals:e,period:t}){let{stats:i}=c(),a=r(),o=h(),s=e=>n(a,e);return(0,B.jsxs)(y,{period:o.of(`lastWeek`,t),children:[(0,B.jsx)(b,{label:i.backlogTokens,value:s(e.tokens),note:i.backlogTokensNote(s(e.hookTokens),s(e.cliTokens))}),(0,B.jsx)(b,{label:i.apiPrice,value:z(a,e.cost),note:e.hasUnpricedTokens?i.unpricedNote:void 0}),(0,B.jsx)(b,{label:i.hookTurns,value:s(e.hookTurns),note:i.hookRunsNote(s(e.hookRuns))}),(0,B.jsx)(b,{label:i.cliCalls,value:s(e.cliRuns)})]})}function dt({models:e,period:t}){let{stats:i}=c(),a=r(),o=h();return(0,B.jsx)(m,{title:i.byModel,period:o.of(`costDays`,t),children:e.length===0?(0,B.jsx)(`p`,{className:g.muted,children:i.noModels}):(0,B.jsx)(x,{label:i.byModel,head:i.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?i.fastModel(e.model):e.model,n(a,e.tokens),f(a,e.cost)]}))})})}function ft({commands:e,period:t}){let{stats:i}=c(),a=r(),o=h();return(0,B.jsx)(m,{title:i.commandsTitle,period:o.of(`costDays`,t),children:e.length===0?(0,B.jsx)(`p`,{className:g.muted,children:i.noCommands}):(0,B.jsx)(x,{label:i.commandsTitle,head:i.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,n(a,e.runs),i.milliseconds(e.avgMs),i.megabytes(e.avgRssMb),i.megabytes(e.maxRssMb)]}))})})}var pt=(e,t,n)=>re(e,`xAxis`,P(e,t),n),mt=(e,t,n)=>qe(e,`xAxis`,P(e,t),n),ht=(e,t,n)=>re(e,`yAxis`,L(e,t),n),gt=(e,t,n)=>qe(e,`yAxis`,L(e,t),n),_t=M([j,pt,ht,mt,gt],(e,t,n,r,i)=>je(e,`xAxis`)?Ge(t,r,!1):Ge(n,i,!1)),V=M([oe,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),vt=e=>{var t=j(e);return je(t,`xAxis`)?`yAxis`:`xAxis`},yt=(e,t)=>vt(e)===`yAxis`?L(e,t):P(e,t),bt=(e,t,n)=>se(e,vt(e),yt(e,t),n),xt=M([V,bt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=xe(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),St=M([V,bt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(rt)}}),Ct=M([j,pt,ht,mt,gt,xt,pe,_t,V,Se,St],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return Qt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),H=e(l()),wt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],Tt=[`id`,`baseLine`];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}function Et(e,t){if(e==null)return{};var n,r,i=Dt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ot(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!O(a)||!O(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return I(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),I(c)?H.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function kt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!O(a)||!O(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return I(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),I(c)?H.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function At(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?H.createElement(kt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):H.createElement(Ot,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function jt(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=Et(e,wt),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=de(),h=d.id,g=d.baseLine,_=Et(d,Tt),v=T(_),y=H.createElement(D,U({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&H.createElement(D,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:d.points})),x=l!==`none`&&c&&Array.isArray(g)&&H.createElement(D,U({},v,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:g}));return o&&(i||n<1)?H.createElement(F,null,H.createElement(`defs`,null,H.createElement(`clipPath`,{id:m},H.createElement(At,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),H.createElement(F,{clipPath:`url(#${m})`},y,b,x)):H.createElement(H.Fragment,null,y,b,x)}var Mt=[`id`],Nt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function Pt(e,t){if(e==null)return{};var n,r,i=Ft(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ft(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?It(Object(n),!0).forEach(function(t){Lt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lt(e,t,n){return(t=Rt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rt(e){var t=zt(e,`string`);return typeof t==`symbol`?t:t+``}function zt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Bt={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ue,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[G(G({},e.next),{},{x:E(e.prev.x,e.next.x,t),y:E(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:jt,xAxisId:0,yAxisId:0,zIndex:be.area};function K(e,t){return e&&e!==`none`?e:t}var Vt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:K(r,i),value:Be(n,t),payload:e}]},Ht=H.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:he,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Be(o,t),hide:s,type:u,color:K(r,a),unit:c,formatter:l,graphicalItemId:d}};return H.createElement(ne,{tooltipEntrySettings:f})});function Ut(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=T(r);return H.createElement(ct,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Wt(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return G(G({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return H.createElement(me,{value:t?r:void 0},n)}function Gt(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=a.layout,u=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange,m=a.shape,h=a.id,g=Pt(a,Mt),_=G(G({},_e(g)),{},{id:h,points:t,connectNulls:f,type:u,baseLine:n,layout:l,stroke:d,isRange:p,animationElapsedTime:o,isAnimating:s,isEntrance:c});return H.createElement(H.Fragment,null,t?.length>1&&H.createElement(F,{clipPath:r?`url(#clipPath-${i})`:void 0},H.createElement(ae,{option:m,DefaultShape:Bt.shape,shapeProps:_})),H.createElement(Ut,{points:t,props:g,clipPathId:i}))}function Kt(e,t,n){if(I(e)){var r=I(t)?t:void 0;return E(r,e,n)}if(De(e)||tt(e)){var i=I(t)?t:void 0;return E(i,0,n)}return e}function qt(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,p=r.animationInterpolateFn,m=(0,H.useMemo)(()=>({points:o,baseLine:s}),[o,s]),h=Ie(m,a),g=Ye(),_=S(r.onAnimationStart,r.onAnimationEnd),v=_.isAnimating,y=_.handleAnimationStart,b=_.handleAnimationEnd,x=h.startValue;if(g==null)return null;var C=Array.isArray(s)&&Array.isArray(x)?le(x,s,f):Array.isArray(s)?le(null,s,f):null;return H.createElement(Le,{animationInput:m,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:y,onAnimationEnd:b,animationInterpolateFn:p,animationMatchBy:f,layout:g},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?p(C,i,g):a?s:Kt(s,x,i);return h.syncStepValue(c,i),H.createElement(Wt,{showLabels:!v,points:o},r.children,H.createElement(Gt,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:v||i<1,isEntrance:a}),H.createElement(it,{label:r.label}))})}function Jt(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,H.useRef)(null),a=(0,H.useRef)();return H.createElement(qt,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var Yt=class extends H.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,c=e.xAxisId,l=e.yAxisId,u=e.width,d=e.height,f=e.id,p=e.baseLine,m=e.zIndex;if(t)return null;var h=Re(`recharts-area`,i),g=f,_=ot(n),v=_.r,y=_.strokeWidth,b=ce(n),x=v*2+y,S=s?`url(#clipPath-${b?``:`dots-`}${g})`:void 0;return H.createElement(ie,{zIndex:m},H.createElement(F,{className:h},s&&H.createElement(`defs`,null,H.createElement(Ee,{clipPathId:g,xAxisId:c,yAxisId:l}),!b&&H.createElement(`clipPath`,{id:`clipPath-dots-${g}`},H.createElement(`rect`,{x:o-x/2,y:a-x/2,width:u+x,height:d+x}))),H.createElement(Jt,{needClip:s,clipPathId:g,props:this.props})),H.createElement(at,{points:r,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}),this.props.isRange&&Array.isArray(p)&&H.createElement(at,{points:p,mainColor:K(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}};function Xt(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=Pt(e,Nt),g=Fe(),_=ve(),v=nt(p,m).needClip,y=Te(),b=He(t=>Ct(t,e.id,y))??{},x=b.points,S=b.isRange,C=b.baseLine,w=ge();if(g!==`horizontal`&&g!==`vertical`||w==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var ee=w.height,T=w.width,te=w.x,ne=w.y;return!x||!x.length?null:H.createElement(Yt,W({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:C,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:ee,hide:l,layout:g,isAnimationActive:u,isRange:S,legendType:d,needClip:v,points:x,stroke:f,width:T,left:te,top:ne,xAxisId:p,yAxisId:m}))}var Zt=(e,t,n,r,i)=>{var a=n??t;if(I(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function Qt(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=Zt(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=N(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=N(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>N(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:Ze({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:Ze({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function $t(e){var t=Pe(e,Bt),n=Te();return H.createElement(ee,{id:t.id,type:`area`},e=>H.createElement(H.Fragment,null,H.createElement(fe,{legendPayload:Vt(t)}),H.createElement(Ht,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),H.createElement(te,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:ke(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),H.createElement(Xt,W({},t,{id:e}))))}var q=H.memo($t,$e);q.displayName=`Area`;var en=[`axis`],tn=(0,H.forwardRef)((e,t)=>H.createElement(Ve,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:en,tooltipPayloadSearcher:ye,categoricalChartProps:e,ref:t})),J=`var(--chart-line-bright)`,Y=`var(--chart-line-blue)`;function nn(e,t){return Ue(n=>({title:Me(t,n.at),rows:[{label:e.processMemory,value:e.megabytes(n.rssMb),shape:`line`,color:J},{label:e.jsHeap,value:e.megabytes(n.heapUsedMb),shape:`dashed`,color:Y}]}))}function rn(){let{stats:e}=c(),t=r(),n=(0,H.useMemo)(()=>nn(e,t),[e,t]),i=[{label:e.processMemory,shape:`line`,color:J},{label:e.jsHeap,shape:`dashed`,color:Y}],o=a().data?.samples??[],s=o.at(-1)?.rssMb??null,l=o.length===0?null:Math.max(...o.map(e=>e.rssMb));return(0,B.jsxs)(m,{title:e.serverMemory,children:[(0,B.jsx)(`p`,{className:g.muted,children:e.memoryRestartNote}),(0,B.jsx)(Ke,{summary:e.memorySummary(e.megabytes(s),e.megabytes(l)),legend:i,children:(0,B.jsxs)(tn,{data:o,margin:We,"aria-label":e.chartLabel(e.serverMemory,`sample`),children:[(0,B.jsx)(w,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`at`,tickFormatter:e=>et(t,e),...Xe}),(0,B.jsx)(k,{tickFormatter:t=>e.megabytes(t),width:60,...A}),(0,B.jsx)(C,{content:n,...Oe,cursor:{stroke:`var(--line-strong)`}}),(0,B.jsx)(q,{dataKey:`rssMb`,stroke:J,strokeWidth:3,fill:J,fillOpacity:Je,dot:!1,isAnimationActive:!1}),(0,B.jsx)(q,{dataKey:`heapUsedMb`,stroke:Y,strokeWidth:2,strokeDasharray:`5 4`,fill:`none`,dot:!1,isAnimationActive:!1})]})})]})}var X=`var(--chart-bar-warm)`,Z=`var(--chart-bar-neutral)`,Q=`var(--chart-line-green)`,$=`var(--chart-line-yellow)`;function an(e,t,r){return Ue(i=>({title:e.periodOf(r,d(t,i.start)),rows:[{label:e.hookTurnsTooltip,value:e.tokens(i.hookTokens),shape:`bar`,color:X},{label:e.cliOutput,value:e.tokens(i.cliTokens),shape:`bar`,color:Z},{label:e.apiPriceTooltip,value:i.hasUnpricedTokens&&i.cost!==null?`${z(t,i.cost)} (${e.unpricedNote})`:z(t,i.cost)},{label:e.hookRuns,value:n(t,i.hookRuns),shape:`line`,color:Q},{label:e.otherCommands,value:n(t,i.cliRuns),shape:`dashed`,color:$}]}))}function on({day:e,...t}){return{start:e,...t}}function sn({weeks:e,days:t,windows:n}){let{stats:i}=c(),a=r(),o=(0,H.useMemo)(()=>t.map(on),[t]),{grain:s,periods:l,period:u,toggle:d}=Qe(`spend`,`day`,{week:e,day:o},n),f=(0,H.useMemo)(()=>an(i,a,s),[i,a,s]),p=i.spendBy[s],h=[{label:i.hookTurnTokens,shape:`bar`,color:X},{label:i.cliOutputTokens,shape:`bar`,color:Z},{label:i.hookRuns,shape:`line`,color:Q},{label:i.otherCommands,shape:`dashed`,color:$}],g=e=>Ae(a,e);return(0,B.jsx)(m,{title:p,period:u,aside:d,children:(0,B.jsx)(Ke,{summary:cn(i,a,s,l),legend:h,children:(0,B.jsxs)(st,{data:l,margin:We,"aria-label":i.chartLabel(p,s),children:[(0,B.jsx)(w,{vertical:!1}),(0,B.jsx)(Ne,{dataKey:`start`,tickFormatter:e=>ze(a,e),...Xe}),(0,B.jsx)(k,{yAxisId:`tokens`,tickFormatter:g,width:60,...A}),(0,B.jsx)(k,{yAxisId:`runs`,orientation:`right`,allowDecimals:!1,tickFormatter:g,width:60,...A}),(0,B.jsx)(C,{content:f,...Oe}),(0,B.jsx)(Ce,{yAxisId:`tokens`,dataKey:`hookTokens`,stackId:`tokens`,fill:X,isAnimationActive:!1}),(0,B.jsx)(Ce,{yAxisId:`tokens`,dataKey:`cliTokens`,stackId:`tokens`,fill:Z,radius:we,isAnimationActive:!1}),(0,B.jsx)(lt,{yAxisId:`runs`,dataKey:`hookRuns`,stroke:Q,strokeWidth:3,dot:R(Q),isAnimationActive:!1}),(0,B.jsx)(lt,{yAxisId:`runs`,dataKey:`cliRuns`,stroke:$,strokeWidth:2,strokeDasharray:`5 4`,dot:R($),isAnimationActive:!1})]})})})}function cn(e,t,r,i){let a=e=>p(i.map(e)),o=e=>n(t,e);return e.spendSummary({grain:r,periodCount:i.length,hookTokens:a(e=>e.hookTokens),cliTokens:o(a(e=>e.cliTokens)),money:f(t,ln(i)),hookRuns:o(a(e=>e.hookRuns)),cliRuns:o(a(e=>e.cliRuns))})}function ln(e){return e.every(e=>e.cost===null)?null:p(e.map(e=>e.cost??0))}function un(){let{projectId:e}=s(),t=i(e),{stats:n}=c();return(0,B.jsx)(_,{query:t,children:e=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(dn,{scan:e.scan}),(0,B.jsx)(pn,{report:e}),(0,B.jsx)(`p`,{className:v.note,children:n.costNote})]})})}function dn({scan:e}){let{stats:t}=c(),n=fn(t,e);return(0,B.jsx)(`p`,{className:n===null?`visually-hidden`:v.warning,role:`status`,children:n})}function fn(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function pn({report:e}){let{stats:t}=c(),n=r(),i=mn(e);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ut,{totals:e.totals,period:e.periods.totals}),i!==null&&(0,B.jsx)(`p`,{className:v.note,children:t.costSince(d(n,i))}),(0,B.jsxs)(`div`,{className:v.blocks,children:[(0,B.jsx)(`div`,{className:g.wide,children:(0,B.jsx)(sn,{weeks:e.weeks,days:e.days,windows:e.periods})}),(0,B.jsx)(dt,{models:e.models,period:e.periods.days}),(0,B.jsx)(rn,{}),(0,B.jsx)(`div`,{className:g.wide,children:(0,B.jsx)(ft,{commands:e.commands,period:e.periods.days})})]})]})}function mn({since:e,periods:t}){return e!==null&&u(e)>u(t.weeks.from)?e:null}export{un as CostTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,I as n,M as r,O as i,cn as a,ft as o,j as s,k as c,ln as l,s as u}from"./cx-CutaZ2Ho.js";import{d,x as f}from"./index-CM8tBSED.js";import{a as p,i as m,n as h,r as g}from"./StatsTabState-BauB3xdU.js";import{t as _}from"./StatsPage.module-DxtnhZOJ.js";import{t as v}from"./UnavailableRepos-BTMsOBI-.js";import{n as y,t as b}from"./Figure-DAdnR-Fu.js";import{t as ee}from"./StatsTable-Dg0CrPof.js";import{B as x,C as S,V as C,_ as w,a as T,c as E,d as D,g as O,h as k,i as A,l as j,m as M,n as N,o as P,p as F,s as I,t as L}from"./use-grain-panel-BczBScgN.js";var R=e(l()),z=[`axis`,`item`],B=(0,R.forwardRef)((e,t)=>R.createElement(M,{chartName:`BarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:z,tooltipPayloadSearcher:C,categoricalChartProps:e,ref:t})),V={steps:`_steps_advmo_1`,now:`_now_advmo_13`},H=a();function U({totals:e}){let{stats:t}=c(),n=i();return(0,H.jsx)(p,{title:t.explainerTitle,children:(0,H.jsxs)(`ol`,{className:V.steps,children:[(0,H.jsx)(`li`,{children:t.explainerTask}),(0,H.jsxs)(`li`,{children:[t.explainerFixed,(0,H.jsx)(W,{children:t.fixedNow(e.fixedTasks,e.fixedLines)})]}),(0,H.jsxs)(`li`,{children:[t.explainerPending,(0,H.jsx)(W,{children:G(t,e)})]}),(0,H.jsxs)(`li`,{children:[t.explainerTests,(0,H.jsx)(W,{children:t.codeAndTests(e)})]}),(0,H.jsxs)(`li`,{children:[t.explainerNoise,(0,H.jsx)(W,{children:K(t,n,e)})]})]})})}function W({children:e}){let{stats:t}=c();return(0,H.jsxs)(`span`,{className:V.now,children:[t.now,` `,e]})}function G(e,t){return t.openTasks===0?e.noPending:t.estimatedLines===null?e.pendingWithoutEstimate(t.openTasks):e.pendingEstimated(t.openTasks,t.estimatedLines,t.estimatedLines/t.openTasks)}function K(e,i,a){if(a.estimatedLines===null&&a.openTasks>0)return e.estimateLater;if(a.noiseShare===null)return e.noCommitsSinceAdoption;let o=a.estimatedLines??0,c=r(a.estimatedLines);return e.noiseFormula(t(i,a.deferredLines,c),n(i,a.realLines),t(i,o,c),s(a.noiseShare))}var q=`var(--chart-bar-neutral)`,J=`var(--accent-ink)`,Y=6,X=3;function Z(e,n,r,i){let a=e=>t(r,e,Math.round(e)>0);return N(t=>({title:e.periodOf(i,d(r,t.start)),rows:[{label:e.onTopicSeries,value:n.count(Math.round(t.onTopicLines),`line`),shape:`bar`,color:q},{label:e.deferredSeries,value:a(t.deferredLines),shape:`hatch`,color:J},{label:e.codeLines,value:a(t.deferredLines-t.deferredTestLines)},{label:e.testLines,value:a(t.deferredTestLines)},{label:e.deferredTasks,value:String(t.deferredTasks)}]}))}function Q({periods:e,totals:t,grain:n}){let{stats:r,core:a}=c(),o=i(),s=(0,R.useMemo)(()=>Z(r,a,o,n),[r,a,o,n]),l=(0,R.useId)(),u=[{label:r.onTopicSeries,shape:`bar`,color:q},{label:r.deferredSeries,shape:`hatch`,color:J}];return(0,H.jsx)(F,{summary:$(r,n,e,t),legend:u,children:(0,H.jsxs)(B,{data:e,margin:P,"aria-label":r.chartLabel(r.effectTitle,n),children:[(0,H.jsx)(`defs`,{children:(0,H.jsxs)(`pattern`,{id:l,width:Y,height:Y,patternUnits:`userSpaceOnUse`,patternTransform:`rotate(45)`,children:[(0,H.jsx)(`rect`,{width:Y,height:Y,fill:`var(--surface-raised)`}),(0,H.jsx)(`line`,{x1:0,y1:0,x2:0,y2:Y,stroke:J,strokeWidth:X})]})}),(0,H.jsx)(S,{vertical:!1}),(0,H.jsx)(O,{dataKey:`start`,tickFormatter:e=>j(o,e),...I}),(0,H.jsx)(k,{tickFormatter:e=>D(o,e),width:60,...A}),(0,H.jsx)(x,{content:s,...E}),(0,H.jsx)(w,{dataKey:`onTopicLines`,stackId:`lines`,fill:q,isAnimationActive:!1}),(0,H.jsx)(w,{dataKey:`deferredLines`,stackId:`lines`,fill:`url(#${l})`,radius:T,isAnimationActive:!1})]})})}function $(e,t,n,i){let a=r(i.estimatedLines);if(t===`week`)return e.effectSummary(i.realLines,e.linesText(i.deferredLines,a),s(i.noiseShare));let o=Math.round(f(n.map(e=>e.onTopicLines)));return e.effectDaysSummary(n.length,o,e.linesText(f(n.map(e=>e.deferredLines)),a))}function te({totals:e,period:t}){let{stats:r}=c(),a=i(),o=m();return(0,H.jsxs)(y,{period:o.labelled(r.effectWindow,t),children:[(0,H.jsx)(b,{label:r.keptOut,value:ne(r,e),note:`${re(r,a,e)} · ${r.codeAndTests(e)}`}),(0,H.jsx)(b,{label:r.noiseWithoutBacklog,value:s(e.noiseShare),note:r.noiseNote}),(0,H.jsx)(b,{label:r.deferredToBacklog,value:String(e.fixedTasks+e.openTasks),note:r.deferredNote(e.fixedTasks,e.openTasks)}),(0,H.jsx)(b,{label:r.pullRequestLines,value:n(a,e.realLines)})]})}function ne(e,t){return t.estimatedLines===null?e.linesText(t.fixedLines,!1):e.linesText(t.deferredLines,r(t.estimatedLines))}function re(e,i,a){let o=n(i,a.fixedLines);return a.estimatedLines===null?e.keptOutPending(o):e.keptOutEstimated(o,t(i,a.estimatedLines,r(a.estimatedLines)))}function ie({weeks:e,days:t,windows:n,totals:r}){let{stats:i}=c(),{grain:a,periods:o,period:s,toggle:l}=L(`effect`,`week`,{week:e,day:t},n);return(0,H.jsx)(p,{title:i.effectTitle,period:s,aside:l,children:(0,H.jsx)(Q,{periods:o,totals:r,grain:a})})}function ae({projects:e,period:a}){let{stats:o}=c(),l=i(),u=m();return(0,H.jsx)(p,{title:o.byProject,period:u.labelled(o.effectWindow,a),children:e.length===0?(0,H.jsx)(`p`,{className:g.muted,children:o.noCodeData}):(0,H.jsx)(ee,{label:o.byProject,head:o.projectsHead,rows:e.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,n(l,e.fixedLines),e.estimatedLines===null?`—`:t(l,e.estimatedLines,r(e.estimatedLines)),n(l,e.realLines),s(e.noiseShare)]}))})})}function oe(){let{projectId:e}=o(),t=u(e);return(0,H.jsx)(h,{query:t,children:e=>(0,H.jsx)(se,{report:e})})}function se({report:e}){let{stats:t}=c(),n=e.totals.fixedTasks+e.totals.openTasks===0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v,{repos:e.unavailableRepos}),n&&(0,H.jsx)(`p`,{className:_.note,children:t.noDeferredTasks}),(0,H.jsx)(te,{totals:e.totals,period:e.periods.weeks}),(0,H.jsxs)(`div`,{className:_.blocks,children:[(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(ie,{weeks:e.weeks,days:e.days,windows:e.periods,totals:e.totals})}),(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(ae,{projects:e.projects,period:e.periods.weeks})}),(0,H.jsx)(`div`,{className:g.wide,children:(0,H.jsx)(U,{totals:e.totals})})]})]})}export{oe as EffectTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{cn as t,ln as n,t as r}from"./cx-CutaZ2Ho.js";import{t as i}from"./StatsPage.module-DxtnhZOJ.js";var a=e(n(),1),o=t(),s={growth:i.growth,decline:i.decline};function c({label:e,value:t,note:n,tone:c,trend:l}){let u=(0,a.useId)();return(0,o.jsxs)(`div`,{className:i.figure,role:`group`,"aria-labelledby":u,children:[(0,o.jsx)(`span`,{id:u,className:i.figureLabel,children:e}),(0,o.jsx)(`span`,{className:r(i.figureValue,c!==void 0&&s[c]),children:t}),l!==void 0&&(0,o.jsxs)(`span`,{className:r(i.figureTrend,s[l.tone]),children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,children:l.text}),(0,o.jsx)(`span`,{className:`visually-hidden`,children:l.speech})]}),n!==void 0&&(0,o.jsx)(`span`,{className:i.figureNote,children:n})]})}function l({period:e,children:t}){let n=(0,a.useId)();return(0,o.jsxs)(`div`,{role:`group`,"aria-labelledby":n,className:i.figureGroup,children:[(0,o.jsx)(`p`,{id:n,className:i.note,children:e}),(0,o.jsx)(`div`,{className:i.totals,children:t})]})}export{l as n,c as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{B as t,L as n,O as r,R as i,cn as a,ft as o,h as s,k as c,ln as l,t as u}from"./cx-CutaZ2Ho.js";import{d,x as f}from"./index-CM8tBSED.js";import{c as p,u as m}from"./start-Cm2kfqW8.js";import{a as h,i as g,n as _,r as v}from"./StatsTabState-BauB3xdU.js";import{t as ee}from"./ShareBar-CoTArw6Q.js";import{t as y}from"./StatsPage.module-DxtnhZOJ.js";import{t as b}from"./Figure-DAdnR-Fu.js";import{B as x,C as S,_ as C,a as w,c as T,d as E,g as D,h as O,i as k,l as A,n as j,o as M,p as N,s as P,t as F}from"./use-grain-panel-BczBScgN.js";import{n as I,r as L,t as te}from"./value-dot-Dy8YzPPT.js";var R={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`},z=a();function ne(e,n){let r=[...t].reverse().filter(e=>n[e]>0).map(t=>`${e.priorityCounts[t]} ${n[t]}`);return r.length===0?``:` (${r.join(`, `)})`}function B({age:e}){let{stats:n,core:r}=c(),i=e.buckets.map(({bucket:e,byPriority:n})=>({bucket:e,total:f(t.map(e=>n[e])),byPriority:n})),a=Math.max(1,...i.map(({total:e})=>e)),o=i.map(({bucket:e,total:t,byPriority:r})=>`${n.ageBuckets[e]}: ${t}${ne(n,r)}`).join(`; `);return(0,z.jsxs)(h,{title:n.openAge,period:n.periodNow,children:[(0,z.jsx)(`div`,{role:`img`,"aria-label":o,className:R.ageRows,children:i.map(({bucket:e,total:r,byPriority:i})=>(0,z.jsxs)(`div`,{className:R.ageRow,"aria-hidden":`true`,children:[(0,z.jsx)(`span`,{className:R.ageLabel,children:n.ageBuckets[e]}),(0,z.jsx)(`span`,{className:R.ageTrack,children:t.map(e=>(0,z.jsx)(`span`,{className:u(R.ageSegment,R[e]),style:{width:`${i[e]/a*100}%`}},e))}),(0,z.jsx)(`span`,{className:v.rowValue,children:r})]},e))}),(0,z.jsx)(`p`,{className:R.legend,children:[...t].reverse().map(e=>(0,z.jsx)(`span`,{className:u(R.legendItem,R[e]),children:r.priorityLabel(e)},e))}),(0,z.jsx)(`p`,{className:u(R.alarm,e.urgentStale>0&&R.alarmOn),children:n.urgentStale(e.urgentStale)})]})}var V=[`done`,`fixed`,`obsolete`,`duplicate`,`cancelled`,`unknown`];function H(e,{stats:t,core:n}){return e===`done`||e===`cancelled`||e===`unknown`?t.closingReasons[e]:n.resolutionLabel(e)}function re({closing:e,period:t}){let r=c(),i=g(),{stats:a}=r,o=f(V.map(t=>e.byReason[t])),s=V.map(t=>`${H(t,r)}: ${e.byReason[t]}`).join(`; `);return(0,z.jsxs)(h,{title:a.closing,period:i.of(`weeks`,t),children:[(0,z.jsx)(`div`,{role:`img`,"aria-label":s,className:R.shareBar,children:V.map(t=>(0,z.jsx)(`span`,{className:u(R.share,R[t]),style:{width:o===0?0:`${e.byReason[t]/o*100}%`}},t))}),(0,z.jsx)(`ul`,{className:v.rows,children:V.map(t=>(0,z.jsxs)(`li`,{className:v.row,children:[(0,z.jsx)(`span`,{className:u(R.legendItem,R[t]),children:H(t,r)}),(0,z.jsx)(`span`,{className:v.rowValue,children:e.byReason[t]})]},t))}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:v.subTitle,children:a.noiseAndReopens}),(0,z.jsxs)(`ul`,{className:v.rows,children:[(0,z.jsx)(U,{label:a.duplicatesAmongClosed,value:n(e.duplicateShare)}),(0,z.jsx)(U,{label:a.noSourceAmongCreated,value:n(e.withoutSourceShare)}),(0,z.jsx)(U,{label:a.reopened,value:e.reopened})]})]})]})}function U({label:e,value:t}){return(0,z.jsxs)(`li`,{className:v.row,children:[(0,z.jsx)(`span`,{className:v.rowLabel,children:e}),(0,z.jsx)(`span`,{className:v.rowValue,children:t})]})}var ie=`↓`,W=`↑`;function G(e,t,n){if(t===null||n===null)return;let r=t-n;if(r===0)return;let i=r<0,a=String(Math.abs(r));return{text:e.weekTrend(i?ie:W,a),speech:e.weekTrendSpeech(a,i),tone:i?`decline`:`growth`}}function K({hotspots:e,listPath:t}){let{stats:n}=c();return(0,z.jsx)(h,{title:n.hotspots,period:n.periodNow,children:(0,z.jsxs)(`div`,{className:R.columns,children:[(0,z.jsx)(q,{title:n.folders,empty:n.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,z.jsx)(`code`,{children:e}),count:t}))}),(0,z.jsx)(q,{title:n.tags,empty:n.noTags,items:e.tags.map(({tag:e,count:n})=>({key:e,label:(0,z.jsxs)(m,{to:{pathname:t,search:`tag=${encodeURIComponent(e)}`},children:[`#`,e]}),count:n}))})]})})}function q({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,z.jsxs)(`div`,{className:R.countList,children:[(0,z.jsx)(`h3`,{className:v.subTitle,children:e}),n.length===0?(0,z.jsx)(`p`,{className:v.muted,children:t}):(0,z.jsx)(`ul`,{className:v.rows,children:n.map(e=>(0,z.jsxs)(`li`,{className:v.countRow,children:[(0,z.jsx)(`span`,{className:v.rowLabel,children:e.label}),(0,z.jsx)(`span`,{className:v.rowValue,children:e.count}),(0,z.jsx)(ee,{share:e.count/r})]},e.key))})]})}var J=e(l(),1),Y=`var(--chart-bar-neutral)`,X=`var(--chart-bar-green)`,Z=`var(--chart-line-bright)`;function ae(e,t,n){return j(r=>({title:e.periodOf(n,d(t,r.start)),rows:[{label:e.flowCreated,value:String(r.created),shape:`bar`,color:Y},{label:e.flowClosed,value:String(r.closed),shape:`bar`,color:X},{label:e.flowOpen,value:String(r.openAtEnd),shape:`line`,color:Z}]}))}function oe({weeks:e,days:t,windows:n}){let{stats:i}=c(),a=r(),{grain:o,periods:s,period:l,toggle:u}=F(`flow`,`week`,{week:e,day:t},n),d=(0,J.useMemo)(()=>ae(i,a,o),[i,a,o]),p=[{label:i.flowCreated,shape:`bar`,color:Y},{label:i.flowClosed,shape:`bar`,color:X},{label:i.flowOpenAtEnd[o],shape:`line`,color:Z}],m=i.debtBy[o],g=i.flowSummary({grain:o,periodCount:s.length,created:f(s.map(e=>e.created)),closed:f(s.map(e=>e.closed)),openNow:s.at(-1)?.openAtEnd??0}),_=e=>E(a,e);return(0,z.jsx)(h,{title:m,period:l,aside:u,children:(0,z.jsx)(N,{summary:g,legend:p,children:(0,z.jsxs)(I,{data:s,margin:M,"aria-label":i.chartLabel(m,o),children:[(0,z.jsx)(S,{vertical:!1}),(0,z.jsx)(D,{dataKey:`start`,tickFormatter:e=>A(a,e),...P}),(0,z.jsx)(O,{yAxisId:`flow`,allowDecimals:!1,tickFormatter:_,width:60,...k}),(0,z.jsx)(O,{yAxisId:`open`,orientation:`right`,allowDecimals:!1,tickFormatter:_,width:60,...k}),(0,z.jsx)(x,{content:d,...T}),(0,z.jsx)(C,{yAxisId:`flow`,dataKey:`created`,fill:Y,radius:w,isAnimationActive:!1}),(0,z.jsx)(C,{yAxisId:`flow`,dataKey:`closed`,fill:X,radius:w,isAnimationActive:!1}),(0,z.jsx)(L,{yAxisId:`open`,dataKey:`openAtEnd`,stroke:Z,strokeWidth:3,dot:te(Z),isAnimationActive:!1})]})})})}var Q=`var(--chart-bar-warm)`;function se(e,t,n,r){return j(i=>({title:e.periodOf(r,d(n,i.start)),rows:[{label:e.flowCreated,value:t.count(i.created,`task`),shape:`bar`,color:Q}]}))}function $({weeks:e,days:t,windows:n}){let{stats:i,core:a}=c(),o=r(),{grain:s,periods:l,period:u,toggle:d}=F(`intake`,`day`,{week:e,day:t},n),p=(0,J.useMemo)(()=>se(i,a,o,s),[i,a,o,s]),m=[{label:i.createdTasks,shape:`bar`,color:Q}],g=i.createdBy[s];return(0,z.jsx)(h,{title:g,period:u,aside:d,children:(0,z.jsx)(N,{summary:i.intakeSummary(s,l.length,f(l.map(e=>e.created))),legend:m,children:(0,z.jsxs)(I,{data:l,margin:M,"aria-label":i.chartLabel(g,s),children:[(0,z.jsx)(S,{vertical:!1}),(0,z.jsx)(D,{dataKey:`start`,tickFormatter:e=>A(o,e),...P}),(0,z.jsx)(O,{allowDecimals:!1,tickFormatter:e=>E(o,e),width:60,...k}),(0,z.jsx)(x,{content:p,...T}),(0,z.jsx)(C,{dataKey:`created`,fill:Q,radius:w,isAnimationActive:!1})]})})})}function ce(){let{projectId:e}=o(),t=s(e);return(0,z.jsx)(_,{query:t,children:t=>(0,z.jsx)(le,{report:t,taskListPath:p(e)})})}function le({report:e,taskListPath:t}){return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ue,{totals:e.totals}),(0,z.jsxs)(`div`,{className:y.blocks,children:[(0,z.jsx)(oe,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,z.jsx)($,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,z.jsx)(K,{hotspots:e.hotspots,listPath:t}),(0,z.jsx)(B,{age:e.age}),(0,z.jsx)(re,{closing:e.closing,period:e.periods.weeks})]})]})}function ue({totals:e}){let{stats:t}=c(),n=e.createdLastWeek-e.closedLastWeek,r=e.previous;return(0,z.jsxs)(`div`,{className:u(y.totals,y.totalsPair),children:[(0,z.jsx)(b,{label:t.tasksToday,value:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`span`,{className:e.createdToday>0?y.growth:void 0,children:[`+`,e.createdToday]}),` `,(0,z.jsxs)(`span`,{className:e.closedToday>0?y.decline:void 0,children:[`−`,e.closedToday]})]}),note:t.createdAndClosed}),(0,z.jsx)(b,{label:t.thisWeek,value:i(n),tone:de(n),note:t.weekNote(e.createdLastWeek,e.closedLastWeek),trend:G(t,n,r?.net??null)})]})}function de(e){if(e>0)return`growth`;if(e<0)return`decline`}export{ce as OverviewTab};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{L as t,O as n,cn as r,ft as i,k as a,ln as o,u as s}from"./cx-CutaZ2Ho.js";import{d as c,x as l}from"./index-CM8tBSED.js";import{a as u,i as d,n as f,r as p}from"./StatsTabState-BauB3xdU.js";import{t as m}from"./StatsPage.module-DxtnhZOJ.js";import{t as h}from"./StatsTable-Dg0CrPof.js";import{B as g,C as _,_ as v,a as y,c as b,g as x,h as S,i as C,l as w,n as T,o as E,p as D,s as O,t as k}from"./use-grain-panel-BczBScgN.js";import{n as A,r as j,t as M}from"./value-dot-Dy8YzPPT.js";var N=e(o(),1),P=r(),F=`var(--chart-bar-neutral)`,I=`var(--chart-line-green)`;function L(e,n,r){return T(i=>({title:e.periodOf(r,c(n,i.start)),rows:[{label:e.decidedCandidates,value:String(i.decided),shape:`bar`,color:F},{label:e.precision,value:t(i.precision),shape:`line`,color:I}]}))}function R({periods:e,grain:r}){let{stats:i}=a(),o=n(),s=(0,N.useMemo)(()=>L(i,o,r),[i,o,r]),c=[{label:i.decidedCandidates,shape:`bar`,color:F},{label:i.precision,shape:`line`,color:I}],u=l(e.map(e=>e.decided)),d=e.filter(e=>e.precision!==null).at(-1),f=i.accuracySummary({grain:r,periodCount:e.length,decided:u,latestPrecision:d===void 0?null:t(d.precision)});return(0,P.jsx)(D,{summary:f,legend:c,children:(0,P.jsxs)(A,{data:e,margin:E,"aria-label":i.chartLabel(i.accuracyTitle,r),children:[(0,P.jsx)(_,{vertical:!1}),(0,P.jsx)(x,{dataKey:`start`,tickFormatter:e=>w(o,e),...O}),(0,P.jsx)(S,{yAxisId:`decided`,allowDecimals:!1,width:60,...C}),(0,P.jsx)(S,{yAxisId:`precision`,orientation:`right`,domain:[0,1],tickFormatter:t,width:60,...C}),(0,P.jsx)(g,{content:s,...b}),(0,P.jsx)(v,{yAxisId:`decided`,dataKey:`decided`,fill:F,radius:y,isAnimationActive:!1}),(0,P.jsx)(j,{yAxisId:`precision`,type:`monotone`,dataKey:`precision`,stroke:I,strokeWidth:3,connectNulls:!0,dot:M(I),isAnimationActive:!1})]})})}function z({rows:e,weeks:n,days:r,windows:i,methodRows:o,matchRows:s}){let{stats:c,core:l}=a(),f=d(),{grain:m,periods:g,period:_,toggle:v}=k(`accuracy`,`week`,{week:n,day:r},i),y=f.of(`weeks`,i.weeks),b=e=>e===`source-changed`?o.map(e=>B(c,e,e.by===`unknown`?c.beforeMethodRecorded:c.checkedBy(l.checkMethodLabel(e.by)))):e===`duplicate`?s.map(e=>B(c,e,e.by===`unknown`?c.beforeMatchRecorded:c.matchedBy(l.duplicateMatchLabel(e.by)))):[];return(0,P.jsx)(u,{title:c.accuracyTitle,period:_,aside:e.length===0?void 0:v,children:e.length===0?(0,P.jsx)(`p`,{className:p.muted,children:c.noCandidates}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{className:p.muted,children:c.accuracyHint}),(0,P.jsx)(R,{periods:g,grain:m}),(0,P.jsx)(`p`,{className:p.muted,children:y}),(0,P.jsx)(h,{label:c.accuracyTable(y),head:c.accuracyHead,rows:e.flatMap(e=>[{key:e.evidence,tone:e.evidence===`total`?`total`:void 0,cells:[l.evidenceLabel(e.evidence),e.candidates,e.closed,e.verified,e.open,t(e.precision)]},...b(e.evidence).map(t=>({...t,key:`${e.evidence}-${t.key}`}))])})]})})}function B(e,n,r){return{key:n.by,tone:`child`,cells:[e.splitRow(r),n.candidates,n.closed,n.verified,n.open,t(n.precision)]}}function V({graph:e,period:t}){let{stats:n,core:r}=a(),i=d(),{projects:o,filter:s}=e;return s.filtered===0&&o.every(e=>e.state===`none`)?(0,P.jsx)(u,{title:n.graphTitle,children:(0,P.jsx)(`p`,{className:p.muted,children:n.graphMissing(e=>(0,P.jsx)(`code`,{children:e},e))})}):(0,P.jsxs)(u,{title:n.graphTitle,children:[(0,P.jsx)(`p`,{className:p.muted,children:n.graphHint}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:i.labelled(n.filteredTitle,t)}),s.filtered===0?(0,P.jsx)(`p`,{className:p.muted,children:n.nothingFiltered}):(0,P.jsx)(h,{label:n.filteredTable,head:n.filteredHead,rows:[{key:`filtered`,cells:[n.filteredByGraph,s.filtered]},{key:`caught`,cells:[n.filteredCaught,s.caught]},{key:`missed`,cells:[n.filteredMissed,s.missed]},{key:`quiet`,cells:[n.filteredQuiet,s.quiet]}]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:n.periodCaption(n.projects,n.periodNow)}),(0,P.jsx)(h,{label:n.graphByProject,head:n.graphHead,rows:o.map(e=>({key:e.projectId,cells:[e.name,r.graphStateLabel(e.state),e.pinned,H(e)]}))})]})]})}function H({state:e,pinned:n,resolved:r}){return e===`none`||e===`unreadable`?`—`:`${r} (${t(n===0?null:r/n)})`}function U({rows:e,period:t}){let{stats:n,core:r}=a(),i=d(),o=e=>e.category===`unknown`?n.categoryUnknown:r.categoryLabel(e.category??void 0);return(0,P.jsx)(u,{title:n.categoriesTitle,period:i.of(`weeks`,t),children:e.length===0?(0,P.jsx)(`p`,{className:p.muted,children:n.categoriesEmpty}):(0,P.jsx)(h,{label:n.categoriesTitle,head:n.categoriesHead,rows:e.map(e=>({key:e.category??`none`,cells:[o(e),e.open,e.weight,e.created,e.closed]}))})})}function W({found:e,branches:t,period:n}){let{stats:r}=a(),i=d(),o=e=>e.found===null?r.foundNotRecorded:e.found===`unknown`?r.foundUnknown:r.foundLabels[e.found];return(0,P.jsxs)(u,{title:r.originTitle,period:i.of(`weeks`,n),children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:r.foundTitle}),(0,P.jsx)(h,{label:r.foundTitle,head:r.foundHead,rows:e.map(e=>({key:e.found??`not-recorded`,cells:[o(e),e.created,e.open,e.fixed]}))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:p.subTitle,children:r.branchesTitle}),t.length===0?(0,P.jsx)(`p`,{className:p.muted,children:r.branchesEmpty}):(0,P.jsx)(h,{label:r.branchesTitle,head:r.branchesHead,rows:t.map(e=>({key:e.label,cells:[(0,P.jsx)(`code`,{children:e.label}),e.created,e.open]}))})]})]})}function G(){let{projectId:e}=i(),t=s(e);return(0,P.jsx)(f,{query:t,children:e=>(0,P.jsx)(K,{report:e})})}function K({report:e}){return(0,P.jsxs)(`div`,{className:m.blocks,children:[(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(z,{rows:e.accuracy,weeks:e.accuracyWeeks,days:e.accuracyDays,windows:e.periods,methodRows:e.methodAccuracy,matchRows:e.matchAccuracy})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(V,{graph:e.graph,period:e.periods.weeks})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(U,{rows:e.categories,period:e.periods.weeks})}),(0,P.jsx)(`div`,{className:p.wide,children:(0,P.jsx)(W,{found:e.found,branches:e.branches,period:e.periods.weeks})})]})}export{G as QualityTab};
@@ -1 +0,0 @@
1
- import{cn as e}from"./cx-CutaZ2Ho.js";import{r as t}from"./StatsTabState-BauB3xdU.js";var n=e();function r({share:e}){return(0,n.jsx)(`span`,{className:t.track,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:t.fill,style:{transform:`scaleX(${e})`}})})}export{r as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ft as t,cn as n,ft as r,k as i,l as a,ln as o,lt as s,m as c,ot as l,t as u}from"./cx-CutaZ2Ho.js";import{a as d,d as f,i as p,l as m,o as h,t as g,u as _}from"./start-Cm2kfqW8.js";import{t as v}from"./StatsPage.module-DxtnhZOJ.js";var y=e(o(),1),b=n();function x(){let{projectId:e}=r(),{pathname:n}=l(),o=a(),x=c(e),{app:S,core:C,stats:w}=i(),T=e===void 0?w.projects:d(o.data,e),E=w.heading(T),D=m(e),O=e=>e===``?D:`${D}/${e}`,k=(e,n)=>t({path:O(e),end:!0},n)!==null,A=g.find(e=>e.segment!==``&&k(e.segment,n))??g[0],j=s().location?.pathname,M=(0,y.useRef)(null),N=j===void 0?void 0:g.find(e=>k(e.segment,j)),P=w.docTitle(A.segment===``?E:`${w.tabs[A.key]} · ${E}`);return p(P),(0,b.jsxs)(`main`,{id:`content`,tabIndex:-1,className:v.page,"aria-busy":N!==void 0||void 0,children:[(0,b.jsx)(`h1`,{ref:M,tabIndex:-1,className:v.heading,children:E}),e===void 0&&o.data!==void 0&&(0,b.jsx)(`p`,{className:v.scopeNote,children:h(o.data,S)}),(x.data?.signals.length??0)>0&&(0,b.jsxs)(`div`,{className:v.signals,role:`status`,"aria-labelledby":`stats-signals-heading`,children:[(0,b.jsx)(`strong`,{id:`stats-signals-heading`,className:v.signalsTitle,children:w.alerts}),(0,b.jsx)(`ul`,{children:x.data?.signals.map(e=>(0,b.jsx)(`li`,{children:C.signal(e)},e.kind))})]}),(0,b.jsx)(`nav`,{className:v.tabs,"aria-label":w.tabsLabel,children:g.map(e=>(0,b.jsx)(_,{to:O(e.segment),className:u(v.tab,e===A&&v.tabActive,e===N&&v.tabPending),"aria-current":e===A?`page`:void 0,children:w.tabs[e.key]},e.key))}),(0,b.jsx)(f,{context:{heading:M}})]})}export{x as StatsPage};
@@ -1 +0,0 @@
1
- ._page_10yeb_1{min-width:0;overflow-y:var(--main-overflow,auto);container-type:inline-size}._heading_10yeb_7{padding:var(--space-4) var(--space-5) 0;font-size:var(--text-lg);text-wrap:balance;margin:0;font-weight:600}._scopeNote_10yeb_15{margin:var(--space-1) var(--space-5) 0;color:var(--ink-subtle);font-size:var(--text-sm)}._signals_10yeb_21{margin:var(--space-3) var(--space-5) 0;padding:var(--space-2) var(--space-4);border:1px solid var(--warn);border-radius:var(--radius-control);background:var(--warn-soft);color:var(--ink)}._signalsTitle_10yeb_30{margin-bottom:var(--space-1);display:block}._signals_10yeb_21 ul{margin:0;padding-inline-start:var(--space-4)}._tabs_10yeb_40{gap:var(--space-1);padding:var(--space-3) var(--space-5) 0;border-bottom:1px solid var(--line);flex-wrap:wrap;display:flex}._tab_10yeb_40{padding:var(--space-2) var(--space-3);color:var(--ink-muted);white-space:nowrap;transition:color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);border-bottom:2px solid #0000;text-decoration:none}._tab_10yeb_40:hover{color:var(--ink)}._tabActive_10yeb_61{border-bottom-color:var(--ink);color:var(--ink)}._tabPending_10yeb_66{border-bottom-color:var(--line-strong);cursor:progress}._content_10yeb_71{gap:var(--space-4);padding:var(--space-4) var(--space-5) var(--space-6);flex-direction:column;display:flex}._hint_10yeb_78{max-width:60ch;margin:var(--space-6) var(--space-5);color:var(--ink-muted)}._hintLoading_10yeb_84{color:var(--ink-subtle)}._hint_10yeb_78 p{margin:0 0 var(--space-3);text-wrap:pretty}._warning_10yeb_93{padding:var(--space-3) var(--space-4);border:1px solid var(--warn);border-radius:var(--radius-control);background:var(--warn-soft);color:var(--ink);text-wrap:pretty;margin:0}._totals_10yeb_103{gap:var(--space-3);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}._totalsPair_10yeb_109{grid-template-columns:repeat(2,minmax(0,1fr))}._figureGroup_10yeb_113{gap:var(--space-2);flex-direction:column;display:flex}._figure_10yeb_113{gap:var(--space-1);padding:var(--space-3);border-radius:var(--radius-control);background:var(--surface-raised);box-shadow:0 0 0 1px var(--line);border:none;flex-direction:column;display:flex}._figureLabel_10yeb_130,._figureNote_10yeb_131{color:var(--ink-subtle);font-size:var(--text-sm)}._figureTrend_10yeb_136{font-size:var(--text-sm);font-variant-numeric:tabular-nums}._figureValue_10yeb_141{font-size:var(--text-xl);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-weight:600}._growth_10yeb_148{color:var(--accent-ink)}._decline_10yeb_152{color:var(--ok)}._blocks_10yeb_156{gap:var(--space-3);grid-template-columns:repeat(2,minmax(0,1fr));display:grid}._note_10yeb_162{max-width:70ch;color:var(--ink-subtle);font-size:var(--text-sm);text-wrap:pretty;margin:0}@container (width<=900px){._totals_10yeb_103{grid-template-columns:repeat(2,minmax(0,1fr))}._blocks_10yeb_156{grid-template-columns:minmax(0,1fr)}}@container (width<=480px){._totals_10yeb_103{grid-template-columns:minmax(0,1fr)}}
@@ -1 +0,0 @@
1
- var e={page:`_page_10yeb_1`,heading:`_heading_10yeb_7`,scopeNote:`_scopeNote_10yeb_15`,signals:`_signals_10yeb_21`,signalsTitle:`_signalsTitle_10yeb_30`,tabs:`_tabs_10yeb_40`,tab:`_tab_10yeb_40`,tabActive:`_tabActive_10yeb_61`,tabPending:`_tabPending_10yeb_66`,content:`_content_10yeb_71`,hint:`_hint_10yeb_78`,hintLoading:`_hintLoading_10yeb_84`,warning:`_warning_10yeb_93`,totals:`_totals_10yeb_103`,totalsPair:`_totalsPair_10yeb_109`,figureGroup:`_figureGroup_10yeb_113`,figure:`_figure_10yeb_113`,figureLabel:`_figureLabel_10yeb_130`,figureNote:`_figureNote_10yeb_131`,figureTrend:`_figureTrend_10yeb_136`,figureValue:`_figureValue_10yeb_141`,growth:`_growth_10yeb_148`,decline:`_decline_10yeb_152`,blocks:`_blocks_10yeb_156`,note:`_note_10yeb_162`};export{e as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{O as t,T as n,cn as r,dt as i,k as a,ln as o,t as s}from"./cx-CutaZ2Ho.js";import{l as c,p as l}from"./index-CM8tBSED.js";import{r as u,s as d}from"./start-Cm2kfqW8.js";import{t as f}from"./StatsPage.module-DxtnhZOJ.js";var p=e(o(),1),m={panel:`_panel_1n3ez_1`,head:`_head_1n3ez_14`,heading:`_heading_1n3ez_22`,period:`_period_1n3ez_29`,title:`_title_1n3ez_35`},h=r();function g({title:e,period:t,aside:n,children:r}){let i=(0,p.useId)(),a=(0,p.useId)();return(0,h.jsxs)(`section`,{className:m.panel,"aria-labelledby":i,"aria-describedby":t===void 0?void 0:a,children:[(0,h.jsxs)(`div`,{className:m.head,children:[(0,h.jsxs)(`div`,{className:m.heading,children:[(0,h.jsx)(`h2`,{id:i,className:m.title,children:e}),t!==void 0&&(0,h.jsx)(`p`,{id:a,className:m.period,children:t})]}),n]}),r]})}function _(){let{stats:e}=a(),n=t(),r=(t,r)=>e.periodCaption(t,l(n,r.from,r.to)),i=(t,n)=>r(e.periodWindows[t],n);return{of:i,ofGrain:(e,t)=>e===`week`?i(`weeks`,t.weeks):i(`days`,t.days),labelled:r}}var v={muted:`_muted_14ll2_1`,subTitle:`_subTitle_14ll2_7`,rows:`_rows_14ll2_14`,countRow:`_countRow_14ll2_28`,row:`_row_14ll2_14`,rowLabel:`_rowLabel_14ll2_41`,rowValue:`_rowValue_14ll2_58`,wide:`_wide_14ll2_64`,track:`_track_14ll2_68`,fill:`_fill_14ll2_75`,grain:`_grain_14ll2_82`};function y({query:e,empty:t,children:r}){let{stats:o}=a(),{error:c,data:l,isFetching:p}=e,m=l!==void 0,g=c instanceof n&&c.status===404,_=g?null:c,v=c===null&&!m,y=l!==void 0&&t!==void 0&&t.isEmpty(l),b=x(o,c,g,m,y?t.message:null),{status:S,keepFocus:C}=u(b===null&&_===null,i()?.heading);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{ref:S,tabIndex:-1,role:`status`,"aria-live":`polite`,className:b===null&&_===null?`visually-hidden`:s(f.hint,v&&f.hintLoading),children:[b!==null&&(0,h.jsx)(`p`,{children:b}),_!==null&&(0,h.jsx)(d,{error:_,fetching:p,onRetry:()=>{C(),e.refetch()}})]}),!g&&l!==void 0&&!y&&(0,h.jsx)(`div`,{className:f.content,children:r(l)})]})}function b({query:e,children:n}){let{stats:r}=a(),i=t(),o=e.data?.invalidJournalLines??0,s=e.data?.unknownJournalLines??0,c=e.data?.unparsedTasks??0,l=[o>0?r.invalidJournalLines(o):null,s>0?r.unknownJournalLines(s):null,c>0?r.unparsedTasks(c):null].filter(e=>e!==null);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:l.length>0?f.warning:`visually-hidden`,role:`status`,children:l.join(` `)}),(0,h.jsx)(y,{query:e,empty:{isEmpty:e=>e.taskCount===0,message:r.noTasks},children:e=>(0,h.jsxs)(h.Fragment,{children:[n(e),(0,h.jsx)(`p`,{className:f.note,children:S(r,i,e.journalSince)})]})})]})}function x(e,t,n,r,i){return n?e.projectNotFound:t===null?r?i:e.loading:null}function S(e,t,n){return n===null?e.journalEmpty:e.journalSince(c(t,n))}export{g as a,_ as i,b as n,v as r,y as t};
@@ -1 +0,0 @@
1
- ._panel_1n3ez_1{gap:var(--space-3);min-width:0;padding:var(--space-4);border-radius:var(--radius-control);background:var(--surface-raised);box-shadow:0 0 0 1px var(--line);border:none;flex-direction:column;display:flex;container-type:inline-size}._head_1n3ez_14{justify-content:space-between;align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}._heading_1n3ez_22{gap:var(--space-1);flex-direction:column;min-width:0;display:flex}._period_1n3ez_29{color:var(--ink-subtle);font-size:var(--text-sm);margin:0}._title_1n3ez_35{font-size:var(--text-base);margin:0;font-weight:600}._muted_14ll2_1{color:var(--ink-subtle);font-size:var(--text-sm);margin:0}._subTitle_14ll2_7{margin:0 0 var(--space-2);color:var(--ink);font-size:var(--text-sm);font-weight:600}._rows_14ll2_14{gap:var(--space-1);margin:var(--space-2) 0 0;font-size:var(--text-sm);flex-direction:column;padding:0;list-style:none;display:flex}._subTitle_14ll2_7+._rows_14ll2_14{margin-top:0}._countRow_14ll2_28{align-items:center;gap:var(--space-2);grid-template-columns:minmax(0,1fr) auto minmax(48px,96px);display:grid}._row_14ll2_14{justify-content:space-between;gap:var(--space-2);display:flex}._rowLabel_14ll2_41{white-space:normal;overflow-wrap:anywhere;min-width:0}._rowLabel_14ll2_41 a{color:var(--ink);text-decoration:underline;-webkit-text-decoration-color:var(--ink-subtle);text-decoration-color:var(--ink-subtle);text-underline-offset:2px}._rowLabel_14ll2_41 a:hover{-webkit-text-decoration-color:var(--ink);text-decoration-color:var(--ink)}._rowValue_14ll2_58{color:var(--ink-muted);font-variant-numeric:tabular-nums;flex-shrink:0}._wide_14ll2_64{grid-column:1/-1}._track_14ll2_68{background:var(--line);border-radius:2px;height:4px;overflow:hidden}._fill_14ll2_75{background:var(--accent-ink);transform-origin:0;height:100%;display:block}._grain_14ll2_82{gap:var(--space-1);display:inline-flex}
@@ -1 +0,0 @@
1
- import{O as e,cn as t,k as n}from"./cx-CutaZ2Ho.js";import{g as r}from"./index-CM8tBSED.js";var i={scroll:`_scroll_14ae0_1`,table:`_table_14ae0_14`,child:`_child_14ae0_45`,total:`_total_14ae0_49`},a=t();function o({label:t,head:o,rows:s}){let{stats:c}=n(),l=e(),u=e=>typeof e==`number`?r(l,e):e;return(0,a.jsx)(`div`,{className:i.scroll,tabIndex:0,role:`region`,"aria-label":c.tableLabel(t),children:(0,a.jsxs)(`table`,{className:i.table,children:[(0,a.jsx)(`thead`,{children:(0,a.jsx)(`tr`,{children:o.map(e=>(0,a.jsx)(`th`,{scope:`col`,children:e},e))})}),(0,a.jsx)(`tbody`,{children:s.map(e=>(0,a.jsx)(`tr`,{className:e.tone&&i[e.tone],children:e.cells.map((e,t)=>t===0?(0,a.jsx)(`th`,{scope:`row`,children:u(e)},o[t]):(0,a.jsx)(`td`,{children:u(e)},o[t]))},e.key))})]})})}export{o as t};
@@ -1 +0,0 @@
1
- ._scroll_14ae0_1{background:linear-gradient(to right, var(--surface-raised) 30%, transparent) left / 24px 100% no-repeat local, linear-gradient(to left, var(--surface-raised) 30%, transparent) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, color-mix(in oklch, var(--ink) 35%, transparent), transparent) left / 10px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, color-mix(in oklch, var(--ink) 35%, transparent), transparent) right / 10px 100% no-repeat scroll;overflow-x:auto}._scroll_14ae0_1:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}._table_14ae0_14{border-collapse:collapse;width:100%;font-size:var(--text-sm);font-variant-numeric:tabular-nums}._table_14ae0_14 th,._table_14ae0_14 td{padding:var(--space-1) var(--space-2);border-bottom:1px solid var(--line);text-align:end;white-space:nowrap}._table_14ae0_14 th:first-child,._table_14ae0_14 td:first-child{text-align:start;padding-inline-start:0}._table_14ae0_14 thead th{color:var(--ink-subtle);font-weight:500}._table_14ae0_14 tbody th{color:var(--ink);font-weight:400}._table_14ae0_14 tbody ._child_14ae0_45>*{color:var(--ink-subtle)}._table_14ae0_14 tbody ._total_14ae0_49>*{font-weight:600}
@@ -1 +0,0 @@
1
- import{cn as e,k as t}from"./cx-CutaZ2Ho.js";import{t as n}from"./StatsPage.module-DxtnhZOJ.js";var r=e();function i({repos:e}){let{stats:i}=t();return e.map(e=>(0,r.jsx)(`p`,{className:n.warning,role:`status`,children:i.unavailableRepo(e)},e))}export{i as t};