p-backlog 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +6 -1
- package/README.ru.md +6 -1
- package/dist/web/assets/{CodeTab-DvhAb0kx.js → CodeTab-Ddvnjbd6.js} +1 -1
- package/dist/web/assets/{CostTab-DHmrPaIY.js → CostTab-Cu3d7ZQU.js} +1 -1
- package/dist/web/assets/{EffectTab-C-W3n29N.js → EffectTab-B5vD2IRd.js} +1 -1
- package/dist/web/assets/{Figure-DUapj1C7.js → Figure-9hmAHZdE.js} +1 -1
- package/dist/web/assets/{OverviewTab-B-6PIEfD.js → OverviewTab-6CLXNVdb.js} +1 -1
- package/dist/web/assets/{Page-U8D0vJva.js → Page-DDIe6-7m.js} +2 -2
- package/dist/web/assets/{QualityTab-B9ahq43v.js → QualityTab-DRcSKcoJ.js} +1 -1
- package/dist/web/assets/ShareBar-IQ1F0KDC.js +1 -0
- package/dist/web/assets/{StatsPage-DBqHQi5S.js → StatsPage-5bZJVJOW.js} +1 -1
- package/dist/web/assets/{StatsTabState-DlqTtrvX.js → StatsTabState-CRCdDmJS.js} +1 -1
- package/dist/web/assets/{StatsTable-ClPy3aOI.js → StatsTable-DnRbvab_.js} +1 -1
- package/dist/web/assets/UnavailableRepos-D8c8AxrV.js +1 -0
- package/dist/web/assets/{index-wzgTQj7a.js → index-kQnR69c7.js} +2 -2
- package/dist/web/assets/start-X9I0fE1J.js +42 -0
- package/dist/web/assets/{start-DPlw6J9o.css → start-h5Eo7J7Z.css} +1 -1
- package/dist/web/assets/{use-grain-panel-DpW0vjfB.js → use-grain-panel-C3ucdgrl.js} +2 -2
- package/dist/web/assets/use-grain-panel-gQnbcY1o.css +1 -0
- package/dist/web/assets/{web-paths-X1IR2jNR.js → web-paths-CMXVvb90.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +2 -1
- package/dist/web/assets/ShareBar-B-seexQa.js +0 -1
- package/dist/web/assets/UnavailableRepos-8SE6XJSM.js +0 -1
- package/dist/web/assets/start-BR6m00jS.js +0 -38
- package/dist/web/assets/use-grain-panel-nSBWtox9.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
- The web app shows tasks as a board too: the "List / Board" switch next to the search, a column per status in the
|
|
6
|
+
filter plus "done" as a drop target, and cards dragged between columns with the mouse, by touch or from the keyboard
|
|
7
|
+
change the task's status, with Undo. The view is kept in the address (`?view=board`), so filters, projects and the
|
|
8
|
+
task card work the same as in the list.
|
|
9
|
+
|
|
3
10
|
## 0.11.0
|
|
4
11
|
|
|
5
12
|
- `backlog check` and the Stop hook no longer ask to re-check a task whose own lines are intact. Before, lines inserted
|
package/README.md
CHANGED
|
@@ -240,6 +240,11 @@ backlog serve --port 5000
|
|
|
240
240
|
The server listens on `127.0.0.1` only and reflects directory changes immediately: a task created by the
|
|
241
241
|
agent shows up in an open tab without a reload.
|
|
242
242
|
|
|
243
|
+
Tasks show as a list or as a board (the "List / Board" switch next to the search). The board has a column per status
|
|
244
|
+
in the filter, plus "done" as a drop target; drag a card to another column — with the mouse, by touch, or from the
|
|
245
|
+
keyboard (Space picks it up, left and right arrows choose the column, Space drops it) — to change its status, and Undo
|
|
246
|
+
puts it back. Epics stay in the list.
|
|
247
|
+
|
|
243
248
|
To have it start automatically on login instead, install it as a service (macOS, Linux, and Windows are
|
|
244
249
|
supported):
|
|
245
250
|
|
|
@@ -321,7 +326,7 @@ npm run typecheck
|
|
|
321
326
|
npm run lint
|
|
322
327
|
|
|
323
328
|
npx playwright install chromium # once, before the first e2e run
|
|
324
|
-
npm run test:e2e # Playwright in Chromium: bulk actions, live updates, CSP, charts, task panel width
|
|
329
|
+
npm run test:e2e # Playwright in Chromium: bulk actions, board drag and drop, live updates, CSP, charts, task panel width
|
|
325
330
|
npx playwright install webkit # optional: the same suite in WebKit too
|
|
326
331
|
npx playwright test # Chromium, then WebKit
|
|
327
332
|
|
package/README.ru.md
CHANGED
|
@@ -235,6 +235,11 @@ backlog serve --port 5000
|
|
|
235
235
|
Сервер слушает только `127.0.0.1` и показывает изменения каталога сразу: задача, созданная агентом,
|
|
236
236
|
появляется в открытой вкладке без перезагрузки.
|
|
237
237
|
|
|
238
|
+
Задачи видны списком или доской (переключатель «Список / Доска» рядом с поиском). На доске по колонке на каждый
|
|
239
|
+
статус из фильтра и «сделана» как место для переноса; перетащите карточку в другую колонку — мышью, пальцем или с
|
|
240
|
+
клавиатуры (пробел — взять, стрелки влево и вправо — выбрать колонку, пробел — положить), — и статус сменится,
|
|
241
|
+
«Отменить» вернёт его. Эпики остаются в списке.
|
|
242
|
+
|
|
238
243
|
Чтобы сервер поднимался сам при входе в систему, установите его как службу (поддерживаются macOS, Linux
|
|
239
244
|
и Windows):
|
|
240
245
|
|
|
@@ -316,7 +321,7 @@ npm run typecheck
|
|
|
316
321
|
npm run lint
|
|
317
322
|
|
|
318
323
|
npx playwright install chromium # один раз, перед первым запуском e2e
|
|
319
|
-
npm run test:e2e # Playwright в Chromium: массовые действия, живое обновление, CSP, графики, ширина панели задачи
|
|
324
|
+
npm run test:e2e # Playwright в Chromium: массовые действия, перенос на доске, живое обновление, CSP, графики, ширина панели задачи
|
|
320
325
|
npx playwright install webkit # по желанию: тот же набор ещё и в WebKit
|
|
321
326
|
npx playwright test # Chromium, затем WebKit
|
|
322
327
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ft as e,h as t,j as n,ln as r}from"./Page-
|
|
1
|
+
import{ft as e,h as t,j as n,ln as r}from"./Page-DDIe6-7m.js";import{a as i,i as a,n as o,o as s,r as c,s as l}from"./StatsTabState-CRCdDmJS.js";import{t as u}from"./PanelRows.module-ZonfBTD-.js";import{t as d}from"./ShareBar-IQ1F0KDC.js";import{t as f}from"./UnavailableRepos-D8c8AxrV.js";var p={churnRow:`_churnRow_ledt8_1`,densityRow:`_densityRow_ledt8_8`},m=r();function h({churn:e,period:t}){let{stats:r}=n(),a=i(),o=e[0]?.score??1;return(0,m.jsxs)(s,{title:r.churnTitle,period:a.of(`churn`,t),children:[(0,m.jsx)(l,{children:r.churnHint}),e.length===0?(0,m.jsx)(l,{children:r.churnEmpty}):(0,m.jsx)(`ul`,{className:u.rows,children:e.map(e=>(0,m.jsxs)(`li`,{className:p.churnRow,children:[(0,m.jsx)(`code`,{className:u.rowLabel,children:e.label}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.commits(e.commits)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.churnTasks(e.tasks,e.weight)}),(0,m.jsx)(d,{share:e.score/o})]},e.label))})]})}function g({density:e}){let{stats:t}=n();return(0,m.jsx)(s,{title:t.densityTitle,period:t.periodNow,children:e.projects.length===0?(0,m.jsx)(l,{children:t.noCodeData}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_,{rows:e.projects.map(e=>({key:e.projectId,label:e.name,row:e}))}),e.folders.length>0&&(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`h3`,{className:u.subTitle,children:t.folders}),(0,m.jsx)(_,{rows:e.folders.map(e=>({key:e.label,label:(0,m.jsx)(`code`,{children:e.label}),row:e}))})]})]})})}function _({rows:e}){let{stats:t,core:r}=n();return(0,m.jsx)(`ul`,{className:u.rows,children:e.map(({key:e,label:n,row:i})=>(0,m.jsxs)(`li`,{className:p.densityRow,children:[(0,m.jsx)(`span`,{className:u.rowLabel,children:n}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.lines,`line`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:r.count(i.open,`task`)}),(0,m.jsx)(`span`,{className:u.rowValue,children:i.perKloc===null?`—`:t.perKloc(i.perKloc)})]},e))})}function v(){let{projectId:n}=e(),r=t(`code`,n);return(0,m.jsx)(o,{query:r,children:e=>(0,m.jsx)(y,{report:e})})}function y({report:e}){let{stats:t}=n();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f,{repos:e.unavailableRepos}),(0,m.jsxs)(`div`,{className:a.blocks,children:[(0,m.jsx)(`div`,{className:a.wide,children:(0,m.jsx)(h,{churn:e.churn,period:e.periods.churn})}),(0,m.jsx)(g,{density:e.density})]}),(0,m.jsx)(c,{children:t.codeNote})]})}export{v as CodeTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,c as n,ft as r,i,j as a,ln as o,u as s,un as c}from"./Page-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,c as n,ft as r,i,j as a,ln as o,u as s,un as c}from"./Page-DDIe6-7m.js";import{_ as l,d as u,h as d,v as f}from"./index-kQnR69c7.js";import{a as p,i as m,o as h,r as g,s as _,t as v}from"./StatsTabState-CRCdDmJS.js";import{n as y,t as b}from"./Figure-9hmAHZdE.js";import{t as x}from"./StatsTable-DnRbvab_.js";import{_ as S,c as C,g as w,h as T,m as E,p as D,t as O}from"./use-grain-panel-C3ucdgrl.js";var k=o();function A({totals:e,period:n}){let{stats:r}=a(),i=t(),o=p(),s=S(i);return(0,k.jsxs)(y,{period:o.of(`lastWeek`,n),children:[(0,k.jsx)(b,{label:r.backlogTokens,value:s(e.tokens),note:r.backlogTokensNote(s(e.hookTokens),s(e.cliTokens))}),(0,k.jsx)(b,{label:r.apiPrice,value:w(i,e.cost),note:e.hasUnpricedTokens?r.unpricedNote:void 0}),(0,k.jsx)(b,{label:r.hookTurns,value:s(e.hookTurns),note:r.hookRunsNote(s(e.hookRuns))}),(0,k.jsx)(b,{label:r.cliCalls,value:s(e.cliRuns)})]})}function j({models:e,period:n}){let{stats:r}=a(),i=t(),o=p();return(0,k.jsx)(h,{title:r.byModel,period:o.of(`days`,n),children:e.length===0?(0,k.jsx)(_,{children:r.noModels}):(0,k.jsx)(x,{label:r.byModel,head:r.modelsHead,rows:e.map(e=>({key:`${e.model}:${e.fast}`,cells:[e.fast?r.fastModel(e.model):e.model,l(i,e.tokens),d(i,e.cost)]}))})})}function M({commands:e,period:n}){let{stats:r}=a(),i=t(),o=p();return(0,k.jsx)(h,{title:r.commandsTitle,period:o.of(`days`,n),children:e.length===0?(0,k.jsx)(_,{children:r.noCommands}):(0,k.jsx)(x,{label:r.commandsTitle,head:r.commandsHead,rows:e.map(e=>({key:e.command,cells:[e.command,l(i,e.runs),r.milliseconds(e.avgMs),r.mebibytes(e.avgRssMb),r.mebibytes(e.maxRssMb)]}))})})}var N=`var(--chart-line-bright)`,P=`var(--chart-line-blue)`;function F(){let{stats:e}=a(),t=[{key:`rssMb`,label:e.processMemory,shape:`line`,color:N,format:e.mebibytes},{key:`heapUsedMb`,label:e.jsHeap,shape:`dashed`,color:P,format:e.mebibytes}],n=s().data?.samples??[],r=n.at(-1)?.rssMb??null,i=n.length===0?null:Math.max(...n.map(e=>e.rssMb)),o=t=>t===null?`—`:e.mebibytes(t);return(0,k.jsxs)(h,{title:e.serverMemory,children:[(0,k.jsx)(_,{children:e.memoryRestartNote}),(0,k.jsx)(E,{name:e.serverMemory,summary:e.memorySummary(o(r),o(i)),data:n,series:t,axes:{left:{tickFormatter:e.mebibytes}}})]})}var I=e(c(),1),L=`var(--chart-bar-warm)`,R=`var(--chart-bar-neutral)`,z=`var(--chart-line-green)`,B=`var(--chart-line-yellow)`;function V({day:e,...t}){return{start:e,...t}}function H({weeks:e,days:n,windows:r}){let{stats:i}=a(),o=t(),s=(0,I.useMemo)(()=>n.map(V),[n]),{grain:c,periods:l,period:u,toggle:d}=O(`spend`,`day`,{weeks:e,days:s},r),f=i.spendBy[c],p=S(o),m=[{key:`hookTokens`,label:i.hookTurnTokens,tooltipLabel:i.hookTurnsTooltip,shape:`bar`,color:L,stack:`tokens`,format:i.tokens},{key:`cliTokens`,label:i.cliOutputTokens,tooltipLabel:i.cliOutput,shape:`bar`,color:R,stack:`tokens`,format:i.tokens},{label:i.apiPriceTooltip,format:e=>e.hasUnpricedTokens&&e.cost!==null?`${w(o,e.cost)} (${i.unpricedNote})`:w(o,e.cost)},{key:`hookRuns`,label:i.hookRuns,shape:`line`,color:z,axis:`right`,format:p},{key:`cliRuns`,label:i.otherCommands,shape:`dashed`,color:B,axis:`right`,format:p}];return(0,k.jsx)(h,{title:f,period:u,aside:d,children:(0,k.jsx)(D,{name:f,grain:c,summary:i.spendSummary(C(o,c,l)),data:l,series:m,axes:{right:T}})})}function U(){let{projectId:e}=r(),t=n(e),{stats:i}=a();return(0,k.jsx)(v,{query:t,children:e=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(W,{scan:e.scan}),(0,k.jsx)(K,{report:e}),(0,k.jsx)(g,{children:i.costNote})]})})}function W({scan:e}){let{stats:t}=a(),n=G(t,e);return(0,k.jsx)(i,{className:m.warning,shown:n!==null,role:`status`,children:n})}function G(e,t){return t.listed?t.filesTotal===0?e.noTranscripts:t.bytesLeft>0?e.scanProgress(t.filesDone,t.filesTotal):null:e.scanStarting}function K({report:e}){let{stats:n}=a(),r=t(),i=q(e);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A,{totals:e.totals,period:e.periods.totals}),i!==null&&(0,k.jsx)(g,{children:n.costSince(u(r,i))}),(0,k.jsxs)(`div`,{className:m.blocks,children:[(0,k.jsx)(`div`,{className:m.wide,children:(0,k.jsx)(H,{weeks:e.weeks,days:e.days,windows:e.periods})}),(0,k.jsx)(j,{models:e.models,period:e.periods.days}),(0,k.jsx)(F,{}),(0,k.jsx)(`div`,{className:m.wide,children:(0,k.jsx)(M,{commands:e.commands,period:e.periods.days})})]})]})}function q({since:e,periods:t}){return e!==null&&f(e)>f(t.weeks.from)?e:null}export{U as CostTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,ft as t,h as n,j as r,ln as i}from"./Page-
|
|
1
|
+
import{A as e,ft as t,h as n,j as r,ln as i}from"./Page-DDIe6-7m.js";import{S as a,_ as o}from"./index-kQnR69c7.js";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./StatsTabState-CRCdDmJS.js";import{t as p}from"./UnavailableRepos-D8c8AxrV.js";import{n as m,t as h}from"./Figure-9hmAHZdE.js";import{t as g}from"./StatsTable-DnRbvab_.js";import{l as _,n as v,p as y,r as b,s as x,t as S,u as C}from"./use-grain-panel-C3ucdgrl.js";var w={steps:`_steps_advmo_1`,now:`_now_advmo_13`},T=i();function E({totals:t}){let{stats:n}=r(),i=e();return(0,T.jsx)(u,{title:n.explainerTitle,children:(0,T.jsxs)(`ol`,{className:w.steps,children:[(0,T.jsx)(`li`,{children:n.explainerTask}),(0,T.jsxs)(`li`,{children:[n.explainerFixed,(0,T.jsx)(D,{children:n.fixedNow(t.fixedTasks,b(i,t.fixedLines))})]}),(0,T.jsxs)(`li`,{children:[n.explainerPending,(0,T.jsx)(D,{children:O(n,i,t)})]}),(0,T.jsxs)(`li`,{children:[n.explainerTests,(0,T.jsx)(D,{children:n.codeAndTests(v(i,t))})]}),(0,T.jsxs)(`li`,{children:[n.explainerNoise,(0,T.jsx)(D,{children:k(n,i,t)})]})]})})}function D({children:e}){let{stats:t}=r();return(0,T.jsxs)(`span`,{className:w.now,children:[t.now,` `,e]})}function O(e,t,n){return n.openTasks===0?e.noPending:n.estimatedLines===null?e.pendingWithoutEstimate(n.openTasks):e.pendingEstimated(x(t,n.openTasks,n.estimatedLines))}function k(e,t,n){if(n.estimatedLines===null&&n.openTasks>0)return e.estimateLater;if(n.noiseShare===null)return e.noCommitsSinceAdoption;let r=e=>_(t,e,n.estimatedLines);return e.noiseFormula(r(n.deferredLines),o(t,n.realLines),r(n.estimatedLines??0),C(n.noiseShare,n.estimatedLines))}var A=`var(--chart-bar-neutral)`,j=`var(--accent-ink)`;function M({periods:t,totals:n,grain:i}){let{stats:a,core:s}=r(),c=e(),l=[{key:`onTopicLines`,label:a.onTopicSeries,shape:`bar`,color:A,stack:`lines`,format:e=>s.count(Math.round(e),`line`)},{key:`deferredLines`,label:a.deferredSeries,shape:`hatch`,color:j,stack:`lines`,format:(e,t)=>_(c,e,t.estimatedLines)},{label:a.codeLines,format:e=>v(c,e).code},{label:a.testLines,format:e=>v(c,e).tests},{label:a.deferredTasks,format:e=>o(c,e.deferredTasks)}];return(0,T.jsx)(y,{name:a.effectTitle,grain:i,summary:N(a,c,i,t,n),data:t,series:l})}function N(e,t,n,r,i){let o=(n,r)=>e.linesText(b(t,n,r));if(n===`week`)return e.effectSummary(i.realLines,o(i.deferredLines,i.estimatedLines),C(i.noiseShare,i.estimatedLines));let s=e=>a(r.map(e)),c=o(s(e=>e.deferredLines),s(e=>e.estimatedLines??0));return e.effectDaysSummary(r.length,Math.round(s(e=>e.onTopicLines)),c)}function P({totals:t,period:n}){let{stats:i}=r(),a=e(),c=s();return(0,T.jsxs)(m,{period:c.labelled(i.effectWindow,n),children:[(0,T.jsx)(h,{label:i.keptOut,value:i.linesText(b(a,t.deferredLines,t.estimatedLines)),note:`${F(i,a,t)} · ${i.codeAndTests(v(a,t))}`}),(0,T.jsx)(h,{label:i.noiseWithoutBacklog,value:C(t.noiseShare,t.estimatedLines),note:i.noiseNote}),(0,T.jsx)(h,{label:i.deferredToBacklog,value:o(a,t.deferredTasks),note:i.deferredNote(t.fixedTasks,t.openTasks)}),(0,T.jsx)(h,{label:i.pullRequestLines,value:o(a,t.realLines)})]})}function F(e,t,n){let r=o(t,n.fixedLines);return n.estimatedLines===null?e.keptOutPending(r):e.keptOutEstimated(r,_(t,n.estimatedLines,n.estimatedLines))}function I({weeks:e,days:t,windows:n,totals:i}){let{stats:a}=r(),{grain:o,periods:s,period:c,toggle:l}=S(`effect`,`week`,{weeks:e,days:t},n);return(0,T.jsx)(u,{title:a.effectTitle,period:c,aside:l,children:(0,T.jsx)(M,{periods:s,totals:i,grain:o})})}function L({projects:t,period:n}){let{stats:i}=r(),a=e(),c=s();return(0,T.jsx)(u,{title:i.byProject,period:c.labelled(i.effectWindow,n),children:t.length===0?(0,T.jsx)(f,{children:i.noCodeData}):(0,T.jsx)(g,{label:i.byProject,head:i.projectsHead,rows:t.map(e=>({key:e.projectId,cells:[e.name,e.deferredTasks,o(a,e.fixedLines),e.estimatedLines===null?`—`:_(a,e.estimatedLines,e.estimatedLines),o(a,e.realLines),C(e.noiseShare,e.estimatedLines)]}))})})}function R(){let{projectId:e}=t(),r=n(`effect`,e);return(0,T.jsx)(l,{query:r,children:e=>(0,T.jsx)(z,{report:e})})}function z({report:e}){let{stats:t}=r(),n=e.totals.deferredTasks===0;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(p,{repos:e.unavailableRepos}),n&&(0,T.jsx)(d,{children:t.noDeferredTasks}),(0,T.jsx)(P,{totals:e.totals,period:e.periods.weeks}),(0,T.jsxs)(`div`,{className:c.blocks,children:[(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(I,{weeks:e.weeks,days:e.days,windows:e.periods,totals:e.totals})}),(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(L,{projects:e.projects,period:e.periods.weeks})}),(0,T.jsx)(`div`,{className:c.wide,children:(0,T.jsx)(E,{totals:e.totals})})]})]})}export{R as EffectTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,ln as n,un as r}from"./Page-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,ln as n,un as r}from"./Page-DDIe6-7m.js";import{c as i}from"./StatsTabState-CRCdDmJS.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{A as e,M as t,a as n,ft as r,h as i,j as a,ln as o}from"./Page-
|
|
1
|
+
import{A as e,M as t,a as n,ft as r,h as i,j as a,ln as o}from"./Page-DDIe6-7m.js";import{S as s,_ as c}from"./index-kQnR69c7.js";import{c as l,n as u}from"./web-paths-CMXVvb90.js";import{c as d,n as f,r as p}from"./start-X9I0fE1J.js";import{a as m,i as h,n as g,o as _,s as v}from"./StatsTabState-CRCdDmJS.js";import{t as y}from"./PanelRows.module-ZonfBTD-.js";import{t as b}from"./ShareBar-IQ1F0KDC.js";import{i as x,r as S,t as C}from"./Figure-9hmAHZdE.js";import{_ as w,a as T,d as E,f as D,h as O,o as k,p as A,t as j}from"./use-grain-panel-C3ucdgrl.js";var M={columns:`_columns_1m2da_1`,countList:`_countList_1m2da_7`,ageRows:`_ageRows_1m2da_11`,ageRow:`_ageRow_1m2da_11`,ageLabel:`_ageLabel_1m2da_25`,ageTrack:`_ageTrack_1m2da_29`,ageSegment:`_ageSegment_1m2da_37`,legend:`_legend_1m2da_41`,legendItem:`_legendItem_1m2da_50`,share:`_share_1m2da_61`,critical:`_critical_1m2da_65`,high:`_high_1m2da_69`,medium:`_medium_1m2da_73`,low:`_low_1m2da_77`,done:`_done_1m2da_81`,fixed:`_fixed_1m2da_85`,obsolete:`_obsolete_1m2da_89`,duplicate:`_duplicate_1m2da_93`,cancelled:`_cancelled_1m2da_97`,unknown:`_unknown_1m2da_101`,shareBar:`_shareBar_1m2da_105`,alarm:`_alarm_1m2da_117`,alarmOn:`_alarmOn_1m2da_123`},N=o(),P=t.toReversed();function F(e,t){let n=P.filter(e=>t[e]>0).map(n=>`${e.priorityCounts[n]} ${t[n]}`);return n.length===0?``:` (${n.join(`, `)})`}function I({age:e}){let{stats:r,core:i}=a(),o=e.buckets.map(({bucket:e,byPriority:n})=>({bucket:e,total:s(t.map(e=>n[e])),byPriority:n})),c=Math.max(1,...o.map(({total:e})=>e)),l=o.map(({bucket:e,total:t,byPriority:n})=>`${r.ageBuckets[e]}: ${t}${F(r,n)}`).join(`; `);return(0,N.jsxs)(_,{title:r.openAge,period:r.periodNow,children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.ageRows,children:o.map(({bucket:e,total:i,byPriority:a})=>(0,N.jsxs)(`div`,{className:M.ageRow,"aria-hidden":`true`,children:[(0,N.jsx)(`span`,{className:M.ageLabel,children:r.ageBuckets[e]}),(0,N.jsx)(`span`,{className:M.ageTrack,children:t.map(e=>(0,N.jsx)(`span`,{className:n(M.ageSegment,M[e]),style:{width:`${a[e]/c*100}%`}},e))}),(0,N.jsx)(`span`,{className:y.rowValue,children:i})]},e))}),(0,N.jsx)(`p`,{className:M.legend,children:P.map(e=>(0,N.jsx)(`span`,{className:n(M.legendItem,M[e]),children:i.priorityLabel(e)},e))}),(0,N.jsx)(`p`,{className:n(M.alarm,e.urgentStale>0&&M.alarmOn),children:r.urgentStale(e.urgentStale)})]})}var L={done:({stats:e})=>e.closingReasons.done,fixed:({core:e})=>e.resolutionLabel(`fixed`),obsolete:({core:e})=>e.resolutionLabel(`obsolete`),duplicate:({core:e})=>e.resolutionLabel(`duplicate`),cancelled:({stats:e})=>e.closingReasons.cancelled,unknown:({stats:e})=>e.closingReasons.unknown},R=Object.keys(L);function z({closing:e,period:t}){let r=a(),i=m(),{stats:o}=r,c=s(R.map(t=>e.byReason[t])),l=R.map(t=>`${L[t](r)}: ${e.byReason[t]}`).join(`; `);return(0,N.jsxs)(_,{title:o.closing,period:i.of(`weeks`,t),children:[(0,N.jsx)(`div`,{role:`img`,"aria-label":l,className:M.shareBar,children:R.map(t=>(0,N.jsx)(`span`,{className:n(M.share,M[t]),style:{width:c===0?0:`${e.byReason[t]/c*100}%`}},t))}),(0,N.jsx)(`ul`,{className:y.rows,children:R.map(t=>(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:n(M.legendItem,M[t]),children:L[t](r)}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.byReason[t]})]},t))}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:o.noiseAndReopens}),(0,N.jsxs)(`ul`,{className:y.rows,children:[(0,N.jsx)(B,{label:o.duplicatesAmongClosed,value:E(e.duplicateShare)}),(0,N.jsx)(B,{label:o.noSourceAmongCreated,value:E(e.withoutSourceShare)}),(0,N.jsx)(B,{label:o.reopened,value:e.reopened})]})]})]})}function B({label:e,value:t}){return(0,N.jsxs)(`li`,{className:y.row,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e}),(0,N.jsx)(`span`,{className:y.rowValue,children:t})]})}function V({hotspots:e,listPath:t}){let{stats:n}=a();return(0,N.jsx)(_,{title:n.hotspots,period:n.periodNow,children:(0,N.jsxs)(`div`,{className:M.columns,children:[(0,N.jsx)(H,{title:n.folders,empty:n.noSourceFolders,items:e.folders.map(({label:e,count:t})=>({key:e,label:(0,N.jsx)(`code`,{children:e}),count:t}))}),(0,N.jsx)(H,{title:n.tags,empty:n.noTags,items:e.tags.map(({tag:e,count:n})=>({key:e,label:(0,N.jsx)(l,{to:{pathname:t,search:p({...f,tags:[e]})},children:d(e)}),count:n}))})]})})}function H({title:e,empty:t,items:n}){let r=Math.max(1,...n.map(e=>e.count));return(0,N.jsxs)(`div`,{className:M.countList,children:[(0,N.jsx)(`h3`,{className:y.subTitle,children:e}),n.length===0?(0,N.jsx)(v,{children:t}):(0,N.jsx)(`ul`,{className:y.rows,children:n.map(e=>(0,N.jsxs)(`li`,{className:y.countRow,children:[(0,N.jsx)(`span`,{className:y.rowLabel,children:e.label}),(0,N.jsx)(`span`,{className:y.rowValue,children:e.count}),(0,N.jsx)(b,{share:e.count/r})]},e.key))})]})}var U=`var(--chart-bar-neutral)`,W=`var(--chart-bar-green)`,G=`var(--chart-line-bright)`;function K({weeks:t,days:n,windows:r}){let{stats:i}=a(),o=e(),{grain:s,periods:c,period:l,toggle:u}=j(`flow`,`week`,{weeks:t,days:n},r),d=w(o),f=[{key:`created`,label:i.flowCreated,shape:`bar`,color:U,format:d},{key:`closed`,label:i.flowClosed,shape:`bar`,color:W,format:d},{key:`openAtEnd`,label:i.flowOpenAtEnd[s],tooltipLabel:i.flowOpen,shape:`line`,color:G,axis:`right`,format:d}],p=i.debtBy[s];return(0,N.jsx)(_,{title:p,period:l,aside:u,children:(0,N.jsx)(A,{name:p,grain:s,summary:i.flowSummary(T(s,c)),data:c,series:f,axes:{left:O,right:O}})})}var q=`var(--chart-bar-warm)`;function J({weeks:e,days:t,windows:n}){let{stats:r,core:i}=a(),{grain:o,periods:s,period:c,toggle:l}=j(`intake`,`day`,{weeks:e,days:t},n),u=[{key:`created`,label:r.createdTasks,tooltipLabel:r.flowCreated,shape:`bar`,color:q,format:e=>i.count(e,`task`)}],d=r.createdBy[o];return(0,N.jsx)(_,{title:d,period:c,aside:l,children:(0,N.jsx)(A,{name:d,grain:o,summary:r.intakeSummary(k(o,s)),data:s,series:u,axes:{left:O}})})}var Y={decline:`↓`,growth:`↑`};function X(){let{projectId:e}=r(),t=i(`overview`,e);return(0,N.jsx)(g,{query:t,children:t=>(0,N.jsx)(Z,{report:t,taskListPath:u(e)})})}function Z({report:e,taskListPath:t}){return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Q,{totals:e.totals}),(0,N.jsxs)(`div`,{className:h.blocks,children:[(0,N.jsx)(K,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(J,{weeks:e.weeks,days:e.days,windows:e.periods}),(0,N.jsx)(V,{hotspots:e.hotspots,listPath:t}),(0,N.jsx)(I,{age:e.age}),(0,N.jsx)(z,{closing:e.closing,period:e.periods.weeks})]})]})}function Q({totals:t}){let{stats:n}=a(),r=e(),i=t.createdLastWeek-t.closedLastWeek;return(0,N.jsxs)(S,{columns:2,children:[(0,N.jsx)(C,{label:n.tasksToday,value:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(x,{tone:t.createdToday>0?`growth`:void 0,children:[`+`,t.createdToday]}),` `,(0,N.jsxs)(x,{tone:t.closedToday>0?`decline`:void 0,children:[`−`,t.closedToday]})]}),note:n.createdAndClosed}),(0,N.jsx)(C,{label:n.thisWeek,value:D(i),tone:$(i),note:n.weekNote(t.createdLastWeek,t.closedLastWeek),trend:ee(n,r,i,t.previous?.net)})]})}function $(e){if(e>0)return`growth`;if(e<0)return`decline`}function ee(e,t,n,r){if(r===void 0)return;let i=n-r,a=$(i);if(a===void 0)return;let o=c(t,Math.abs(i));return{text:e.weekTrend(Y[a],o),speech:e.weekTrendSpeech[a](o),tone:a}}export{X as OverviewTab};
|