p-backlog 0.13.0 → 0.13.1

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 (34) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/cli.js +1246 -795
  3. package/dist/web/assets/{CodeTab-BokbzP4a.js → CodeTab-DeM399k_.js} +1 -1
  4. package/dist/web/assets/CostTab-BkuP_lKs.js +1 -0
  5. package/dist/web/assets/EffectTab-C6yxsNf4.js +1 -0
  6. package/dist/web/assets/{Figure-CO87y2TD.js → Figure-CVTyKv4y.js} +1 -1
  7. package/dist/web/assets/{OverviewTab-naYN8aXk.js → OverviewTab-B83eJneA.js} +1 -1
  8. package/dist/web/assets/Page-DLaFG3Qi.js +59 -0
  9. package/dist/web/assets/{QualityTab-BMfBa6YW.js → QualityTab-DCMWjXz4.js} +1 -1
  10. package/dist/web/assets/ShareBar-DLIjLhrg.js +1 -0
  11. package/dist/web/assets/StatsPage-Dyu3XyGq.js +1 -0
  12. package/dist/web/assets/StatsTabState-C2YngECB.js +1 -0
  13. package/dist/web/assets/{StatsTable-CqH14eSD.js → StatsTable-4QrI6DcN.js} +1 -1
  14. package/dist/web/assets/UnavailableRepos-BSMfh0t_.js +1 -0
  15. package/dist/web/assets/index-DBSU7e-A.js +2 -0
  16. package/dist/web/assets/start-B7mNnilg.js +42 -0
  17. package/dist/web/assets/{start-DCkTSXpO.css → start-BmSqjxn9.css} +1 -1
  18. package/dist/web/assets/use-grain-panel-CSj1uVOI.js +55 -0
  19. package/dist/web/assets/web-paths-CziYixFT.js +1 -0
  20. package/dist/web/index.html +1 -1
  21. package/package.json +1 -1
  22. package/skill/backlog/SKILL.md +2 -2
  23. package/skill/backlog-en/SKILL.md +1 -1
  24. package/dist/web/assets/CostTab-D91_w1H0.js +0 -1
  25. package/dist/web/assets/EffectTab-CRlWfFF0.js +0 -1
  26. package/dist/web/assets/Page-BHZdQQhE.js +0 -59
  27. package/dist/web/assets/ShareBar-DBiU0f9_.js +0 -1
  28. package/dist/web/assets/StatsPage-Dr1pco7X.js +0 -1
  29. package/dist/web/assets/StatsTabState-CePos7h7.js +0 -1
  30. package/dist/web/assets/UnavailableRepos-BBbuCPNM.js +0 -1
  31. package/dist/web/assets/index-DpWYLB0A.js +0 -2
  32. package/dist/web/assets/start-Cw9zPEW-.js +0 -42
  33. package/dist/web/assets/use-grain-panel-BKTkjTK3.js +0 -55
  34. package/dist/web/assets/web-paths-yWGbLD6t.js +0 -1
@@ -1 +1 @@
1
- import{M as e,dn as t,h as n,mt as r}from"./Page-BHZdQQhE.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./StatsTabState-CePos7h7.js";import{t as u}from"./PanelRows.module-rg1MXy2z.js";import{t as d}from"./ShareBar-DBiU0f9_.js";import{t as f}from"./UnavailableRepos-BBbuCPNM.js";var p={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},m=t();function h({churn:t,period:n}){let{stats:r}=e(),a=i(),o=t[0]?.score??1;return(0,m.jsxs)(s,{title:r.churnTitle,period:a.of(`churn`,n),children:[(0,m.jsx)(l,{children:r.churnHint}),t.length===0?(0,m.jsx)(l,{children:r.churnEmpty}):(0,m.jsx)(`ul`,{className:u.rows,children:t.map(e=>(0,m.jsxs)(`li`,{className:p.churnRow,children:[(0,m.jsx)(`code`,{className:u.rowLabel,children:e.label}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.commits(e.commits)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.churnTasks(e.tasks,e.weight)}),(0,m.jsx)(d,{share:e.score/o})]},e.label))})]})}function g({density:t}){let{stats:n}=e();return(0,m.jsx)(s,{title:n.densityTitle,period:n.periodNow,children:t.projects.length===0?(0,m.jsx)(l,{children:n.noCodeData}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{rows:t.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),t.folders.length>0&&(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h3`,{className:u.subTitle,children:n.folders}),(0,m.jsx)(_,{rows:t.folders.map(e=>({key:e.label,label:(0,m.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function _({rows:t}){let{stats:n,core:r}=e();return(0,m.jsx)(`ul`,{className:u.rows,children:t.map(({key:e,label:t,row:i})=>(0,m.jsxs)(`li`,{className:p.densityRow,children:[(0,m.jsx)(`span`,{className:u.rowLabel,children:t}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.lines,`line`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.open,`task`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:i.perKloc===null?`—`:n.perKloc(i.perKloc)})]},e))})}function v(){let{projectId:e}=r(),t=n(`code`,e);return(0,m.jsx)(o,{query:t,children:e=>(0,m.jsx)(y,{report:e})})}function y({report:t}){let{stats:n}=e();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{repos:t.unavailableRepos}),(0,m.jsxs)(`div`,{className:a.blocks,children:[(0,m.jsx)(`div`,{className:a.wide,children:(0,m.jsx)(h,{churn:t.churn,period:t.periods.churn})}),(0,m.jsx)(g,{density:t.density})]}),(0,m.jsx)(c,{children:n.codeNote})]})}export{v as CodeTab};
1
+ import{N as e,fn as t,g as n,ht as r}from"./Page-DLaFG3Qi.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./StatsTabState-C2YngECB.js";import{t as u}from"./PanelRows.module-rg1MXy2z.js";import{t as d}from"./ShareBar-DLIjLhrg.js";import{t as f}from"./UnavailableRepos-BSMfh0t_.js";var p={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},m=t();function h({churn:t,period:n}){let{stats:r}=e(),a=i(),o=t[0]?.score??1;return(0,m.jsxs)(s,{title:r.churnTitle,period:a.of(`churn`,n),children:[(0,m.jsx)(l,{children:r.churnHint}),t.length===0?(0,m.jsx)(l,{children:r.churnEmpty}):(0,m.jsx)(`ul`,{className:u.rows,children:t.map(e=>(0,m.jsxs)(`li`,{className:p.churnRow,children:[(0,m.jsx)(`code`,{className:u.rowLabel,children:e.label}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.commits(e.commits)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.churnTasks(e.tasks,e.weight)}),(0,m.jsx)(d,{share:e.score/o})]},e.label))})]})}function g({density:t}){let{stats:n}=e();return(0,m.jsx)(s,{title:n.densityTitle,period:n.periodNow,children:t.projects.length===0?(0,m.jsx)(l,{children:n.noCodeData}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{rows:t.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),t.folders.length>0&&(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h3`,{className:u.subTitle,children:n.folders}),(0,m.jsx)(_,{rows:t.folders.map(e=>({key:e.label,label:(0,m.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function _({rows:t}){let{stats:n,core:r}=e();return(0,m.jsx)(`ul`,{className:u.rows,children:t.map(({key:e,label:t,row:i})=>(0,m.jsxs)(`li`,{className:p.densityRow,children:[(0,m.jsx)(`span`,{className:u.rowLabel,children:t}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.lines,`line`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.open,`task`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:i.perKloc===null?`—`:n.perKloc(i.perKloc)})]},e))})}function v(){let{projectId:e}=r(),t=n(`code`,e);return(0,m.jsx)(o,{query:t,children:e=>(0,m.jsx)(y,{report:e})})}function y({report:t}){let{stats:n}=e();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{repos:t.unavailableRepos}),(0,m.jsxs)(`div`,{className:a.blocks,children:[(0,m.jsx)(`div`,{className:a.wide,children:(0,m.jsx)(h,{churn:t.churn,period:t.periods.churn})}),(0,m.jsx)(g,{density:t.density})]}),(0,m.jsx)(c,{children:n.codeNote})]})}export{v as CodeTab};
@@ -0,0 +1 @@
1
+ import{Cn as e,M as t,N as n,d as r,fn as i,ht as a,i as o,l as s,pn as c}from"./Page-DLaFG3Qi.js";import{_ as l,d as u,v as d}from"./index-DBSU7e-A.js";import{d as f}from"./start-B7mNnilg.js";import{a as p,i as m,o as h,r as g,s as _,t as v}from"./StatsTabState-C2YngECB.js";import{n as y,t as b}from"./Figure-CVTyKv4y.js";import{t as x}from"./StatsTable-4QrI6DcN.js";import{C as S,S as C,_ as w,b as T,c as E,g as D,h as O,t as k,v as A,x as j,y as M}from"./use-grain-panel-CSj1uVOI.js";var N=i();function P({totals:e,period:r}){let{stats:i}=n(),a=t(),o=p(),s=S(a),c=T(a,e);return(0,N.jsxs)(y,{period:o.of(`lastWeek`,r),children:[(0,N.jsx)(b,{label:i.backlogTokens,value:s(e.tokens),note:i.backlogTokensNote(s(e.hookTokens),s(e.cliTokens))}),(0,N.jsx)(b,{label:i.apiPrice,value:M(c),note:C(c,i.unpricedNote)}),(0,N.jsx)(b,{label:i.hookTurns,value:s(e.hookTurns),note:i.hookRunsNote(s(e.hookRuns))}),(0,N.jsx)(b,{label:i.cliCalls,value:s(e.cliRuns)})]})}function F({models:e,period:r}){let{stats:i}=n(),a=t(),o=p();return(0,N.jsx)(h,{title:i.byModel,period:o.of(`days`,r),children:e.length===0?(0,N.jsx)(_,{children:i.noModels}):(0,N.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,l(a,e.tokens),A(a,e.cost)]}))})})}function I({commands:e,period:r}){let{stats:i}=n(),a=t(),o=p();return(0,N.jsx)(h,{title:i.commandsTitle,period:o.of(`days`,r),children:e.length===0?(0,N.jsx)(_,{children:i.noCommands}):(0,N.jsx)(x,{label:i.commandsTitle,head:i.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,l(a,e.runs),i.milliseconds(e.avgMs),i.mebibytes(e.avgRssMb),i.mebibytes(e.maxRssMb)]}))})})}var L=`var(--chart-line-bright)`,R=`var(--chart-line-blue)`;function z(){let{stats:e}=n(),t=[{key:`rssMb`,label:e.processMemory,shape:`line`,color:L,format:e.mebibytes},{key:`heapUsedMb`,label:e.jsHeap,shape:`dashed`,color:R,format:e.mebibytes}],i=r(),a=i.data.samples,o=a.at(-1)?.rssMb??null,s=a.length===0?null:Math.max(...a.map(e=>e.rssMb)),c=t=>t===null?`—`:e.mebibytes(t);return(0,N.jsxs)(h,{title:e.serverMemory,children:[(0,N.jsx)(_,{children:e.memoryRestartNote}),i.error!==null&&(0,N.jsx)(f,{error:i.error,onRetry:()=>i.refetch()}),(0,N.jsx)(D,{name:e.serverMemory,summary:e.memorySummary(c(o),c(s)),data:a,series:t,axes:{left:{tickFormatter:e.mebibytes}}})]})}var B=e(c(),1),V=`var(--chart-bar-warm)`,H=`var(--chart-bar-neutral)`,U=`var(--chart-line-green)`,W=`var(--chart-line-yellow)`;function G({day:e,...t}){return{start:e,...t}}function K({weeks:e,days:r,windows:i}){let{stats:a}=n(),o=t(),s=(0,B.useMemo)(()=>r.map(G),[r]),{grain:c,periods:l,period:u,toggle:d}=k(`spend`,`day`,{weeks:e,days:s},i),f=a.spendBy[c],p=S(o),m=[{key:`hookTokens`,label:a.hookTurnTokens,tooltipLabel:a.hookTurnsTooltip,shape:`bar`,color:V,stack:`tokens`,format:a.tokens},{key:`cliTokens`,label:a.cliOutputTokens,tooltipLabel:a.cliOutput,shape:`bar`,color:H,stack:`tokens`,format:a.tokens},{label:a.apiPriceTooltip,format:e=>j(T(o,e),a.unpricedNote)},{key:`hookRuns`,label:a.hookRuns,shape:`line`,color:U,axis:`right`,format:p},{key:`cliRuns`,label:a.otherCommands,shape:`dashed`,color:W,axis:`right`,format:p}];return(0,N.jsx)(h,{title:f,period:u,aside:d,children:(0,N.jsx)(O,{name:f,grain:c,summary:a.spendSummary(E(o,c,l,a.unpricedNote)),data:l,series:m,axes:{right:w}})})}function q(){let{projectId:e}=a(),t=s(e),{stats:r}=n();return(0,N.jsx)(v,{query:t,children:e=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(J,{scan:e.scan}),(0,N.jsx)(X,{report:e}),(0,N.jsx)(g,{children:r.costNote})]})})}function J({scan:e}){let{stats:t}=n(),r=Y(t,e);return(0,N.jsx)(o,{className:m.warning,shown:r!==null,role:`status`,children:r})}function Y(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function X({report:e}){let{stats:r}=n(),i=t(),a=Z(e);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(P,{totals:e.totals,period:e.periods.totals}),a!==null&&(0,N.jsx)(g,{children:r.costSince(u(i,a))}),(0,N.jsxs)(`div`,{className:m.blocks,children:[(0,N.jsx)(`div`,{className:m.wide,children:(0,N.jsx)(K,{weeks:e.weeks,days:e.days,windows:e.periods})}),(0,N.jsx)(F,{models:e.models,period:e.periods.days}),(0,N.jsx)(z,{}),(0,N.jsx)(`div`,{className:m.wide,children:(0,N.jsx)(I,{commands:e.commands,period:e.periods.days})})]})]})}function Z({since:e,periods:t}){return e!==null&&d(e)>d(t.weeks.from)?e:null}export{q as CostTab};
@@ -0,0 +1 @@
1
+ import{M as e,N as t,fn as n,g as r,ht as i}from"./Page-DLaFG3Qi.js";import{S as a,_ as o}from"./index-DBSU7e-A.js";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./StatsTabState-C2YngECB.js";import{t as p}from"./UnavailableRepos-BSMfh0t_.js";import{n as m,t as h}from"./Figure-CVTyKv4y.js";import{t as g}from"./StatsTable-4QrI6DcN.js";import{d as _,f as v,h as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./use-grain-panel-CSj1uVOI.js";var E={steps:`_steps_advmo_1`,now:`_now_advmo_13`},D=n();function O({totals:n}){let{stats:r}=t(),i=e();return(0,D.jsx)(u,{title:r.explainerTitle,children:(0,D.jsxs)(`ol`,{className:E.steps,children:[(0,D.jsx)(`li`,{children:r.explainerTask}),(0,D.jsxs)(`li`,{children:[r.explainerFixed,(0,D.jsx)(k,{children:r.fixedNow(n.fixedTasks,S(i,n.fixedLines))})]}),(0,D.jsxs)(`li`,{children:[r.explainerPending,(0,D.jsx)(k,{children:A(r,i,n)})]}),(0,D.jsxs)(`li`,{children:[r.explainerTests,(0,D.jsx)(k,{children:r.codeAndTests(x(i,n))})]}),(0,D.jsxs)(`li`,{children:[r.explainerNoise,(0,D.jsx)(k,{children:j(r,i,n)})]})]})})}function k({children:e}){let{stats:n}=t();return(0,D.jsxs)(`span`,{className:E.now,children:[n.now,` `,e]})}function A(e,t,n){return n.openTasks===0?e.noPending:n.estimatedLines===null?e.pendingWithoutEstimate(n.openTasks):e.pendingEstimated(C(t,n.openTasks,n.estimatedLines))}function j(e,t,n){if(n.estimatedLines===null&&n.openTasks>0)return e.estimateLater;if(n.noiseShare===null)return e.noCommitsSinceAdoption;let r=e=>_(t,e,n.estimatedLines);return e.noiseFormula(r(n.deferredLines),o(t,n.realLines),r(n.estimatedLines??0),T(n.noiseShare,n.estimatedLines))}var M=`var(--chart-bar-neutral)`,N=`var(--accent-ink)`;function P({periods:n,totals:r,grain:i}){let{stats:a,core:s}=t(),c=e(),l=[{key:`onTopicLines`,label:a.onTopicSeries,shape:`bar`,color:M,stack:`lines`,format:e=>s.count(Math.round(e),`line`)},{key:`deferredLines`,label:a.deferredSeries,shape:`hatch`,color:N,stack:`lines`,format:(e,t)=>_(c,e,t.estimatedLines)},{label:a.codeLines,format:e=>x(c,e).code},{label:a.testLines,format:e=>x(c,e).tests},{label:a.deferredTasks,format:e=>o(c,e.deferredTasks)}];return(0,D.jsx)(y,{name:a.effectTitle,grain:i,summary:F(a,c,i,n,r),data:n,series:l})}function F(e,t,n,r,i){let o=(n,r)=>e.linesText(S(t,n,r));if(n===`week`)return e.effectSummary(i.realLines,o(i.deferredLines,i.estimatedLines),v(i.noiseShare,i.estimatedLines));let s=e=>a(r.map(e)),c=o(s(e=>e.deferredLines),s(e=>e.estimatedLines??0));return e.effectDaysSummary(r.length,Math.round(s(e=>e.onTopicLines)),c)}function I({totals:n,period:r}){let{stats:i}=t(),a=e(),c=s();return(0,D.jsxs)(m,{period:c.labelled(i.effectWindow,r),children:[(0,D.jsx)(h,{label:i.keptOut,value:i.linesText(S(a,n.deferredLines,n.estimatedLines)),note:`${L(i,a,n)} · ${i.codeAndTests(x(a,n))}`}),(0,D.jsx)(h,{label:i.noiseWithoutBacklog,value:v(n.noiseShare,n.estimatedLines),note:i.noiseNote}),(0,D.jsx)(h,{label:i.deferredToBacklog,value:o(a,n.deferredTasks),note:i.deferredNote(n.fixedTasks,n.openTasks)}),(0,D.jsx)(h,{label:i.pullRequestLines,value:o(a,n.realLines)})]})}function L(e,t,n){let r=o(t,n.fixedLines);return n.estimatedLines===null?e.keptOutPending(r):e.keptOutEstimated(r,b(t,n.estimatedLines))}function R({weeks:e,days:n,windows:r,totals:i}){let{stats:a}=t(),{grain:o,periods:s,period:c,toggle:l}=w(`effect`,`week`,{weeks:e,days:n},r);return(0,D.jsx)(u,{title:a.effectTitle,period:c,aside:l,children:(0,D.jsx)(P,{periods:s,totals:i,grain:o})})}function z({projects:n,period:r}){let{stats:i}=t(),a=e(),c=s();return(0,D.jsx)(u,{title:i.byProject,period:c.labelled(i.effectWindow,r),children:n.length===0?(0,D.jsx)(f,{children:i.noCodeData}):(0,D.jsx)(g,{label:i.byProject,head:i.projectsHead,rows:n.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,o(a,e.fixedLines),e.estimatedLines===null?`—`:b(a,e.estimatedLines),o(a,e.realLines),v(e.noiseShare,e.estimatedLines)]}))})})}function B(){let{projectId:e}=i(),t=r(`effect`,e);return(0,D.jsx)(l,{query:t,children:e=>(0,D.jsx)(V,{report:e})})}function V({report:e}){let{stats:n}=t(),r=e.totals.deferredTasks===0;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(p,{repos:e.unavailableRepos}),r&&(0,D.jsx)(d,{children:n.noDeferredTasks}),(0,D.jsx)(I,{totals:e.totals,period:e.periods.weeks}),(0,D.jsxs)(`div`,{className:c.blocks,children:[(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(R,{weeks:e.weeks,days:e.days,windows:e.periods,totals:e.totals})}),(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(z,{projects:e.projects,period:e.periods.weeks})}),(0,D.jsx)(`div`,{className:c.wide,children:(0,D.jsx)(O,{totals:e.totals})})]})]})}export{B as EffectTab};
@@ -1 +1 @@
1
- import{Sn as e,a as t,dn as n,fn as r}from"./Page-BHZdQQhE.js";import{c as i}from"./StatsTabState-CePos7h7.js";var a=e(r(),1),o={group:`_group_ihjlt_1`,figures:`_figures_ihjlt_7`,pair:`_pair_ihjlt_13`,figure:`_figure_ihjlt_7`,trend:`_trend_ihjlt_28`,value:`_value_ihjlt_33`,growth:`_growth_ihjlt_40`,decline:`_decline_ihjlt_44`},s=n(),c={growth:o.growth,decline:o.decline};function l({label:e,value:n,note:r,tone:l,trend:u}){let d=(0,a.useId)();return(0,s.jsxs)(`div`,{className:o.figure,role:`group`,"aria-labelledby":d,children:[(0,s.jsx)(`span`,{id:d,className:i.caption,children:e}),(0,s.jsx)(`span`,{className:t(o.value,l!==void 0&&c[l]),children:n}),u!==void 0&&(0,s.jsxs)(`span`,{className:t(o.trend,c[u.tone]),children:[(0,s.jsx)(`span`,{"aria-hidden":`true`,children:u.text}),(0,s.jsx)(`span`,{className:`visually-hidden`,children:u.speech})]}),r!==void 0&&(0,s.jsx)(`span`,{className:i.caption,children:r})]})}function u({columns:e,children:n}){return(0,s.jsx)(`div`,{className:t(o.figures,e===2&&o.pair),children:n})}function d({tone:e,children:t}){return(0,s.jsx)(`span`,{className:e===void 0?void 0:c[e],children:t})}function f({period:e,children:t}){let n=(0,a.useId)();return(0,s.jsxs)(`div`,{role:`group`,"aria-labelledby":n,className:o.group,children:[(0,s.jsx)(`p`,{id:n,className:i.caption,children:e}),(0,s.jsx)(u,{columns:4,children:t})]})}export{d as i,f as n,u as r,l as t};
1
+ import{Cn as e,a as t,fn as n,pn as r}from"./Page-DLaFG3Qi.js";import{c as i}from"./StatsTabState-C2YngECB.js";var a=e(r(),1),o={group:`_group_ihjlt_1`,figures:`_figures_ihjlt_7`,pair:`_pair_ihjlt_13`,figure:`_figure_ihjlt_7`,trend:`_trend_ihjlt_28`,value:`_value_ihjlt_33`,growth:`_growth_ihjlt_40`,decline:`_decline_ihjlt_44`},s=n(),c={growth:o.growth,decline:o.decline};function l({label:e,value:n,note:r,tone:l,trend:u}){let d=(0,a.useId)();return(0,s.jsxs)(`div`,{className:o.figure,role:`group`,"aria-labelledby":d,children:[(0,s.jsx)(`span`,{id:d,className:i.caption,children:e}),(0,s.jsx)(`span`,{className:t(o.value,l!==void 0&&c[l]),children:n}),u!==void 0&&(0,s.jsxs)(`span`,{className:t(o.trend,c[u.tone]),children:[(0,s.jsx)(`span`,{"aria-hidden":`true`,children:u.text}),(0,s.jsx)(`span`,{className:`visually-hidden`,children:u.speech})]}),r!==void 0&&(0,s.jsx)(`span`,{className:i.caption,children:r})]})}function u({columns:e,children:n}){return(0,s.jsx)(`div`,{className:t(o.figures,e===2&&o.pair),children:n})}function d({tone:e,children:t}){return(0,s.jsx)(`span`,{className:e===void 0?void 0:c[e],children:t})}function f({period:e,children:t}){let n=(0,a.useId)();return(0,s.jsxs)(`div`,{role:`group`,"aria-labelledby":n,className:o.group,children:[(0,s.jsx)(`p`,{id:n,className:i.caption,children:e}),(0,s.jsx)(u,{columns:4,children:t})]})}export{d as i,f as n,u as r,l as t};
@@ -1 +1 @@
1
- import{M as e,P as t,a as n,dn as r,h as i,j as a,mt as o}from"./Page-BHZdQQhE.js";import{S as s,_ as c}from"./index-DpWYLB0A.js";import{c as l,n as u}from"./web-paths-yWGbLD6t.js";import{c as d,i as f,r as p}from"./start-Cw9zPEW-.js";import{a as m,i as h,n as g,o as _,s as v}from"./StatsTabState-CePos7h7.js";import{t as y}from"./PanelRows.module-rg1MXy2z.js";import{t as b}from"./ShareBar-DBiU0f9_.js";import{i as x,r as S,t as C}from"./Figure-CO87y2TD.js";import{_ as w,a as T,b as E,h as D,m as O,o as k,p as A,t as j}from"./use-grain-panel-BKTkjTK3.js";var M={columns:`_columns_h1u9m_1`,countList:`_countList_h1u9m_7`,ageRows:`_ageRows_h1u9m_11`,ageRow:`_ageRow_h1u9m_11`,ageLabel:`_ageLabel_h1u9m_25`,ageTrack:`_ageTrack_h1u9m_29`,ageSegment:`_ageSegment_h1u9m_37`,legend:`_legend_h1u9m_41`,legendItem:`_legendItem_h1u9m_50`,share:`_share_h1u9m_61`,critical:`_critical_h1u9m_65`,high:`_high_h1u9m_69`,medium:`_medium_h1u9m_73`,low:`_low_h1u9m_77`,done:`_done_h1u9m_81`,fixed:`_fixed_h1u9m_85`,obsolete:`_obsolete_h1u9m_89`,duplicate:`_duplicate_h1u9m_93`,cancelled:`_cancelled_h1u9m_97`,unknown:`_unknown_h1u9m_101`,shareBar:`_shareBar_h1u9m_105`,alarm:`_alarm_h1u9m_117`,alarmOn:`_alarmOn_h1u9m_123`},N=r(),P=t.toReversed();function F(e,t){let n=P.filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function I({age:r}){let{stats:i,core:a}=e(),o=r.buckets.map(({bucket:e,byPriority:n})=>({bucket:e,total:s(t.map(e=>n[e])),byPriority:n})),c=Math.max(1,...o.map(({total:e})=>e)),l=o.map(({bucket:e,total:t,byPriority:n})=>`${i.ageBuckets[e]}: ${t}${F(i,n)}`).join(`; `);return(0,N.jsxs)(_,{title:i.openAge,period:i.periodNow,children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.ageRows,children:o.map(({bucket:e,total:r,byPriority:a})=>(0,N.jsxs)(`div`,{className:M.ageRow,"aria-hidden":`true`,children:[(0,N.jsx)(`span`,{className:M.ageLabel,children:i.ageBuckets[e]}),(0,N.jsx)(`span`,{className:M.ageTrack,children:t.map(e=>(0,N.jsx)(`span`,{className:n(M.ageSegment,M[e]),style:{width:`${a[e]/c*100}%`}},e))}),(0,N.jsx)(`span`,{className:y.rowValue,children:r})]},e))}),(0,N.jsx)(`p`,{className:M.legend,children:P.map(e=>(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:a.priorityLabel(e)},e))}),(0,N.jsx)(`p`,{className:n(M.alarm,r.urgentStale>0&&M.alarmOn),children:i.urgentStale(r.urgentStale)})]})}var L={done:({stats:e})=>e.closingReasons.done,fixed:({core:e})=>e.resolutionLabel(`fixed`),obsolete:({core:e})=>e.resolutionLabel(`obsolete`),duplicate:({core:e})=>e.resolutionLabel(`duplicate`),cancelled:({stats:e})=>e.closingReasons.cancelled,unknown:({stats:e})=>e.closingReasons.unknown},R=Object.keys(L);function z({closing:t,period:r}){let i=e(),a=m(),{stats:o}=i,c=s(R.map(e=>t.byReason[e])),l=R.map(e=>`${L[e](i)}: ${t.byReason[e]}`).join(`; `);return(0,N.jsxs)(_,{title:o.closing,period:a.of(`weeks`,r),children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.shareBar,children:R.map(e=>(0,N.jsx)(`span`,{className:n(M.share,M[e]),style:{width:c===0?0:`${t.byReason[e]/c*100}%`}},e))}),(0,N.jsx)(`ul`,{className:y.rows,children:R.map(e=>(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:L[e](i)}),(0,N.jsx)(`span`,{className:y.rowValue,children:t.byReason[e]})]},e))}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:o.noiseAndReopens}),(0,N.jsxs)(`ul`,{className:y.rows,children:[(0,N.jsx)(B,{label:o.duplicatesAmongClosed,value:A(t.duplicateShare)}),(0,N.jsx)(B,{label:o.noSourceAmongCreated,value:A(t.withoutSourceShare)}),(0,N.jsx)(B,{label:o.reopened,value:t.reopened})]})]})]})}function B({label:e,value:t}){return(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e}),(0,N.jsx)(`span`,{className:y.rowValue,children:t})]})}function V({hotspots:t,listPath:n}){let{stats:r}=e();return(0,N.jsx)(_,{title:r.hotspots,period:r.periodNow,children:(0,N.jsxs)(`div`,{className:M.columns,children:[(0,N.jsx)(H,{title:r.folders,empty:r.noSourceFolders,items:t.folders.map(({label:e,count:t})=>({key:e,label:(0,N.jsx)(`code`,{children:e}),count:t}))}),(0,N.jsx)(H,{title:r.tags,empty:r.noTags,items:t.tags.map(({tag:e,count:t})=>({key:e,label:(0,N.jsx)(l,{to:{pathname:n,search:f({...p,tags:[e]})},children:d(e)}),count:t}))})]})})}function H({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,N.jsxs)(`div`,{className:M.countList,children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:e}),n.length===0?(0,N.jsx)(v,{children:t}):(0,N.jsx)(`ul`,{className:y.rows,children:n.map(e=>(0,N.jsxs)(`li`,{className:y.countRow,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e.label}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.count}),(0,N.jsx)(b,{share:e.count/r})]},e.key))})]})}var U=`var(--chart-bar-neutral)`,W=`var(--chart-bar-green)`,G=`var(--chart-line-bright)`;function K({weeks:t,days:n,windows:r}){let{stats:i}=e(),o=a(),{grain:s,periods:c,period:l,toggle:u}=j(`flow`,`week`,{weeks:t,days:n},r),d=E(o),f=[{key:`created`,label:i.flowCreated,shape:`bar`,color:U,format:d},{key:`closed`,label:i.flowClosed,shape:`bar`,color:W,format:d},{key:`openAtEnd`,label:i.flowOpenAtEnd[s],tooltipLabel:i.flowOpen,shape:`line`,color:G,axis:`right`,format:d}],p=i.debtBy[s];return(0,N.jsx)(_,{title:p,period:l,aside:u,children:(0,N.jsx)(D,{name:p,grain:s,summary:i.flowSummary(T(s,c)),data:c,series:f,axes:{left:w,right:w}})})}var q=`var(--chart-bar-warm)`;function J({weeks:t,days:n,windows:r,backlogSince:i}){let{stats:a,core:o}=e(),{grain:s,periods:c,range:l,period:u,toggle:d}=j(`intake`,`day`,{weeks:t,days:n},r),f=[{key:`created`,label:a.createdTasks,tooltipLabel:a.flowCreated,shape:`bar`,color:q,format:e=>o.count(e,`task`)}],p=a.createdBy[s];return(0,N.jsx)(_,{title:p,period:u,aside:d,children:(0,N.jsx)(D,{name:p,grain:s,summary:a.intakeSummary(k(s,c,{now:l.to,backlogSince:i})),data:c,series:f,axes:{left:w}})})}var Y={decline:`↓`,growth:`↑`};function X(){let{projectId:e}=o(),t=i(`overview`,e);return(0,N.jsx)(g,{query:t,children:t=>(0,N.jsx)(Z,{report:t,taskListPath:u(e)})})}function Z({report:e,taskListPath:t}){return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q,{totals:e.totals}),(0,N.jsxs)(`div`,{className:h.blocks,children:[(0,N.jsx)(K,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(J,{weeks:e.weeks,days:e.days,windows:e.periods,backlogSince:e.backlogSince}),(0,N.jsx)(V,{hotspots:e.hotspots,listPath:t}),(0,N.jsx)(I,{age:e.age}),(0,N.jsx)(z,{closing:e.closing,period:e.periods.weeks})]})]})}function Q({totals:t}){let{stats:n}=e(),r=a(),i=t.createdLastWeek-t.closedLastWeek;return(0,N.jsxs)(S,{columns:2,children:[(0,N.jsx)(C,{label:n.tasksToday,value:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(x,{tone:t.createdToday>0?`growth`:void 0,children:[`+`,t.createdToday]}),` `,(0,N.jsxs)(x,{tone:t.closedToday>0?`decline`:void 0,children:[`−`,t.closedToday]})]}),note:n.createdAndClosed}),(0,N.jsx)(C,{label:n.thisWeek,value:O(i),tone:$(i),note:n.weekNote(t.createdLastWeek,t.closedLastWeek),trend:ee(n,r,i,t.previous?.net)})]})}function $(e){if(e>0)return`growth`;if(e<0)return`decline`}function ee(e,t,n,r){if(r===void 0)return;let i=n-r,a=$(i);if(a===void 0)return;let o=c(t,Math.abs(i));return{text:e.weekTrend(Y[a],o),speech:e.weekTrendSpeech[a](o),tone:a}}export{X as OverviewTab};
1
+ import{F as e,M as t,N as n,a as r,fn as i,g as a,ht as o}from"./Page-DLaFG3Qi.js";import{S as s,_ as c}from"./index-DBSU7e-A.js";import{c as l,n as u}from"./web-paths-CziYixFT.js";import{c as d,i as f,r as p}from"./start-B7mNnilg.js";import{a as m,i as h,n as g,o as _,s as v}from"./StatsTabState-C2YngECB.js";import{t as y}from"./PanelRows.module-rg1MXy2z.js";import{t as b}from"./ShareBar-DLIjLhrg.js";import{i as x,r as S,t as C}from"./Figure-CVTyKv4y.js";import{C as w,_ as T,a as E,h as D,m as O,o as k,p as A,t as j}from"./use-grain-panel-CSj1uVOI.js";var M={columns:`_columns_h1u9m_1`,countList:`_countList_h1u9m_7`,ageRows:`_ageRows_h1u9m_11`,ageRow:`_ageRow_h1u9m_11`,ageLabel:`_ageLabel_h1u9m_25`,ageTrack:`_ageTrack_h1u9m_29`,ageSegment:`_ageSegment_h1u9m_37`,legend:`_legend_h1u9m_41`,legendItem:`_legendItem_h1u9m_50`,share:`_share_h1u9m_61`,critical:`_critical_h1u9m_65`,high:`_high_h1u9m_69`,medium:`_medium_h1u9m_73`,low:`_low_h1u9m_77`,done:`_done_h1u9m_81`,fixed:`_fixed_h1u9m_85`,obsolete:`_obsolete_h1u9m_89`,duplicate:`_duplicate_h1u9m_93`,cancelled:`_cancelled_h1u9m_97`,unknown:`_unknown_h1u9m_101`,shareBar:`_shareBar_h1u9m_105`,alarm:`_alarm_h1u9m_117`,alarmOn:`_alarmOn_h1u9m_123`},N=i(),P=e.toReversed();function F(e,t){let n=P.filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function I({age:t}){let{stats:i,core:a}=n(),o=t.buckets.map(({bucket:t,byPriority:n})=>({bucket:t,total:s(e.map(e=>n[e])),byPriority:n})),c=Math.max(1,...o.map(({total:e})=>e)),l=o.map(({bucket:e,total:t,byPriority:n})=>`${i.ageBuckets[e]}: ${t}${F(i,n)}`).join(`; `);return(0,N.jsxs)(_,{title:i.openAge,period:i.periodNow,children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.ageRows,children:o.map(({bucket:t,total:n,byPriority:a})=>(0,N.jsxs)(`div`,{className:M.ageRow,"aria-hidden":`true`,children:[(0,N.jsx)(`span`,{className:M.ageLabel,children:i.ageBuckets[t]}),(0,N.jsx)(`span`,{className:M.ageTrack,children:e.map(e=>(0,N.jsx)(`span`,{className:r(M.ageSegment,M[e]),style:{width:`${a[e]/c*100}%`}},e))}),(0,N.jsx)(`span`,{className:y.rowValue,children:n})]},t))}),(0,N.jsx)(`p`,{className:M.legend,children:P.map(e=>(0,N.jsx)(`span`,{className:r(M.legendItem,M[e]),children:a.priorityLabel(e)},e))}),(0,N.jsx)(`p`,{className:r(M.alarm,t.urgentStale>0&&M.alarmOn),children:i.urgentStale(t.urgentStale)})]})}var L={done:({stats:e})=>e.closingReasons.done,fixed:({core:e})=>e.resolutionLabel(`fixed`),obsolete:({core:e})=>e.resolutionLabel(`obsolete`),duplicate:({core:e})=>e.resolutionLabel(`duplicate`),cancelled:({stats:e})=>e.closingReasons.cancelled,unknown:({stats:e})=>e.closingReasons.unknown},R=Object.keys(L);function z({closing:e,period:t}){let i=n(),a=m(),{stats:o}=i,c=s(R.map(t=>e.byReason[t])),l=R.map(t=>`${L[t](i)}: ${e.byReason[t]}`).join(`; `);return(0,N.jsxs)(_,{title:o.closing,period:a.of(`weeks`,t),children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.shareBar,children:R.map(t=>(0,N.jsx)(`span`,{className:r(M.share,M[t]),style:{width:c===0?0:`${e.byReason[t]/c*100}%`}},t))}),(0,N.jsx)(`ul`,{className:y.rows,children:R.map(t=>(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:r(M.legendItem,M[t]),children:L[t](i)}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.byReason[t]})]},t))}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:o.noiseAndReopens}),(0,N.jsxs)(`ul`,{className:y.rows,children:[(0,N.jsx)(B,{label:o.duplicatesAmongClosed,value:A(e.duplicateShare)}),(0,N.jsx)(B,{label:o.noSourceAmongCreated,value:A(e.withoutSourceShare)}),(0,N.jsx)(B,{label:o.reopened,value:e.reopened})]})]})]})}function B({label:e,value:t}){return(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e}),(0,N.jsx)(`span`,{className:y.rowValue,children:t})]})}function V({hotspots:e,listPath:t}){let{stats:r}=n();return(0,N.jsx)(_,{title:r.hotspots,period:r.periodNow,children:(0,N.jsxs)(`div`,{className:M.columns,children:[(0,N.jsx)(H,{title:r.folders,empty:r.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,N.jsx)(`code`,{children:e}),count:t}))}),(0,N.jsx)(H,{title:r.tags,empty:r.noTags,items:e.tags.map(({tag:e,count:n})=>({key:e,label:(0,N.jsx)(l,{to:{pathname:t,search:f({...p,tags:[e]})},children:d(e)}),count:n}))})]})})}function H({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,N.jsxs)(`div`,{className:M.countList,children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:e}),n.length===0?(0,N.jsx)(v,{children:t}):(0,N.jsx)(`ul`,{className:y.rows,children:n.map(e=>(0,N.jsxs)(`li`,{className:y.countRow,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e.label}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.count}),(0,N.jsx)(b,{share:e.count/r})]},e.key))})]})}var U=`var(--chart-bar-neutral)`,W=`var(--chart-bar-green)`,G=`var(--chart-line-bright)`;function K({weeks:e,days:r,windows:i}){let{stats:a}=n(),o=t(),{grain:s,periods:c,period:l,toggle:u}=j(`flow`,`week`,{weeks:e,days:r},i),d=w(o),f=[{key:`created`,label:a.flowCreated,shape:`bar`,color:U,format:d},{key:`closed`,label:a.flowClosed,shape:`bar`,color:W,format:d},{key:`openAtEnd`,label:a.flowOpenAtEnd[s],tooltipLabel:a.flowOpen,shape:`line`,color:G,axis:`right`,format:d}],p=a.debtBy[s];return(0,N.jsx)(_,{title:p,period:l,aside:u,children:(0,N.jsx)(D,{name:p,grain:s,summary:a.flowSummary(E(s,c)),data:c,series:f,axes:{left:T,right:T}})})}var q=`var(--chart-bar-warm)`;function J({weeks:e,days:t,windows:r,backlogSince:i}){let{stats:a,core:o}=n(),{grain:s,periods:c,range:l,period:u,toggle:d}=j(`intake`,`day`,{weeks:e,days:t},r),f=[{key:`created`,label:a.createdTasks,tooltipLabel:a.flowCreated,shape:`bar`,color:q,format:e=>o.count(e,`task`)}],p=a.createdBy[s];return(0,N.jsx)(_,{title:p,period:u,aside:d,children:(0,N.jsx)(D,{name:p,grain:s,summary:a.intakeSummary(k(s,c,{now:l.to,backlogSince:i})),data:c,series:f,axes:{left:T}})})}var Y={decline:`↓`,growth:`↑`};function X(){let{projectId:e}=o(),t=a(`overview`,e);return(0,N.jsx)(g,{query:t,children:t=>(0,N.jsx)(Z,{report:t,taskListPath:u(e)})})}function Z({report:e,taskListPath:t}){return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q,{totals:e.totals}),(0,N.jsxs)(`div`,{className:h.blocks,children:[(0,N.jsx)(K,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(J,{weeks:e.weeks,days:e.days,windows:e.periods,backlogSince:e.backlogSince}),(0,N.jsx)(V,{hotspots:e.hotspots,listPath:t}),(0,N.jsx)(I,{age:e.age}),(0,N.jsx)(z,{closing:e.closing,period:e.periods.weeks})]})]})}function Q({totals:e}){let{stats:r}=n(),i=t(),a=e.createdLastWeek-e.closedLastWeek;return(0,N.jsxs)(S,{columns:2,children:[(0,N.jsx)(C,{label:r.tasksToday,value:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(x,{tone:e.createdToday>0?`growth`:void 0,children:[`+`,e.createdToday]}),` `,(0,N.jsxs)(x,{tone:e.closedToday>0?`decline`:void 0,children:[`−`,e.closedToday]})]}),note:r.createdAndClosed}),(0,N.jsx)(C,{label:r.thisWeek,value:O(a),tone:$(a),note:r.weekNote(e.createdLastWeek,e.closedLastWeek),trend:ee(r,i,a,e.previous?.net)})]})}function $(e){if(e>0)return`growth`;if(e<0)return`decline`}function ee(e,t,n,r){if(r===void 0)return;let i=n-r,a=$(i);if(a===void 0)return;let o=c(t,Math.abs(i));return{text:e.weekTrend(Y[a],o),speech:e.weekTrendSpeech[a](o),tone:a}}export{X as OverviewTab};