paseo-beads 0.1.0 → 0.1.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.
- package/client/panel.tsx +2 -4
- package/client/project.ts +18 -0
- package/images/plan.png +0 -0
- package/package.json +1 -1
package/client/panel.tsx
CHANGED
|
@@ -21,7 +21,7 @@ import { ALL_WORK, buildBoard, type BoardFilter } from "./board";
|
|
|
21
21
|
import { BoardView } from "./board-view";
|
|
22
22
|
import { authorityLabel, authorityTone, errorLabel, relativeAge, toneColor } from "./format";
|
|
23
23
|
import { OverviewView } from "./overview-view";
|
|
24
|
-
import { buildProject, isParked, workIn, type ProjectModel } from "./project";
|
|
24
|
+
import { buildProject, isParked, workIn, workTracks, type ProjectModel } from "./project";
|
|
25
25
|
import {
|
|
26
26
|
AlertRow,
|
|
27
27
|
BlockerRow,
|
|
@@ -585,9 +585,7 @@ function isSerious(severity: string): boolean {
|
|
|
585
585
|
* when nothing blocks it, but nobody works on an epic directly.
|
|
586
586
|
*/
|
|
587
587
|
function planTracks(data: DashboardResult, project: ProjectModel): DashboardResult["tracks"] {
|
|
588
|
-
return data.tracks
|
|
589
|
-
.map((track) => ({ ...track, items: track.items.filter((item) => project.byId.get(item.id)?.container !== true) }))
|
|
590
|
-
.filter((track) => track.items.length > 0);
|
|
588
|
+
return workTracks(data.tracks, project);
|
|
591
589
|
}
|
|
592
590
|
|
|
593
591
|
const EMPTY_PROJECT_INPUT = {
|
package/client/project.ts
CHANGED
|
@@ -601,3 +601,21 @@ function labelsOf(live: readonly WorkItem[]): Pick<ProjectModel, "commonLabels"
|
|
|
601
601
|
|
|
602
602
|
return { commonLabels: common, labels };
|
|
603
603
|
}
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Plan tracks with containers removed: `bv` lists a container as actionable
|
|
607
|
+
* when nothing blocks it, but nobody works on one directly. A track's total
|
|
608
|
+
* drops by the containers removed, or it would read "9 items (4 shown)" when
|
|
609
|
+
* the other five were epics shown on purpose nowhere. Items past the payload
|
|
610
|
+
* cap are unknown, so they stay in the total and still read as not shown.
|
|
611
|
+
*/
|
|
612
|
+
export function workTracks(tracks: readonly Track[], project: ProjectModel): Track[] {
|
|
613
|
+
const result: Track[] = [];
|
|
614
|
+
for (const track of tracks) {
|
|
615
|
+
const items = track.items.filter((item) => project.byId.get(item.id)?.container !== true);
|
|
616
|
+
if (items.length === 0) continue;
|
|
617
|
+
const removed = track.items.length - items.length;
|
|
618
|
+
result.push({ ...track, items, totalItems: Math.max(items.length, track.totalItems - removed) });
|
|
619
|
+
}
|
|
620
|
+
return result;
|
|
621
|
+
}
|
package/images/plan.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-beads",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Read-only Beads console for Paseo: project progress, ready and waiting work, the critical chain, and a whole-project board, read through bv.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "cuongntr",
|