@stevecastaneda/paseo-progress 0.1.4 → 0.1.5
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 +3 -3
- package/dist/shared/format.js +7 -0
- package/dist/shared/show.js +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/shared/format.ts +7 -0
- package/shared/show.ts +2 -2
package/client/panel.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import React, { useEffect, useRef, useState } from "react";
|
|
|
12
12
|
import { ActivityIndicator, Animated, Platform, Pressable, ScrollView, Text, View } from "react-native";
|
|
13
13
|
import { shortTitle, type Activity, type Dashboard, type FileIssue, type ProgressSegment, type StuckItem, type Ticket } from "../shared/dashboard";
|
|
14
14
|
import { PROGRESS_FILE, type TicketStatus } from "../shared/events";
|
|
15
|
-
import { formatMinutes, formatWorkDone, minutesSince } from "../shared/format";
|
|
15
|
+
import { formatEstimate, formatMinutes, formatWorkDone, minutesSince } from "../shared/format";
|
|
16
16
|
import { markPanelOpened } from "../shared/rpc";
|
|
17
17
|
import { useDashboard } from "./dashboard-query";
|
|
18
18
|
import { STATUS_LABEL } from "./status-badge";
|
|
@@ -446,11 +446,11 @@ function TicketRow({ colors, ticket, live, now, onOpen, deliverables }: { colors
|
|
|
446
446
|
) : null}
|
|
447
447
|
{ticket.note ? <Text style={{ color: colors.foregroundMuted, fontSize: 12, lineHeight: 17 }}>{ticket.note}</Text> : null}
|
|
448
448
|
</View>
|
|
449
|
-
{/* Fixed slots so the Package icon and estimates line up down the list, whether or not a row has deliverables; they're listed in its dialog. */}
|
|
449
|
+
{/* Fixed slots so the Package icon and estimates line up down the list, whether or not a row has deliverables; they're listed in its dialog. The estimate slot fits "45 min" and "10.5 h"; longer ones grow rather than clip. */}
|
|
450
450
|
<View accessibilityLabel={deliverables ? (deliverables === 1 ? "Has a deliverable" : `Has ${deliverables} deliverables`) : undefined} style={{ width: 12, height: 18, justifyContent: "center" }}>
|
|
451
451
|
{deliverables ? <Icon name="Package" size={12} color={colors.foregroundMuted} /> : null}
|
|
452
452
|
</View>
|
|
453
|
-
<Text style={{ minWidth:
|
|
453
|
+
<Text style={{ minWidth: 40, flexShrink: 0, textAlign: "right", color: colors.foregroundMuted, fontSize: 12, lineHeight: 18, fontVariant: ["tabular-nums"] }}>{formatEstimate(ticket.estimateMin)}</Text>
|
|
454
454
|
<View style={{ paddingTop: 2 }}><Icon name="ChevronRight" size={14} color={colors.foregroundMuted} /></View>
|
|
455
455
|
</PressableRow>
|
|
456
456
|
);
|
package/dist/shared/format.js
CHANGED
|
@@ -11,6 +11,13 @@ export function formatMinutes(totalMin) {
|
|
|
11
11
|
return `${minutes} min`;
|
|
12
12
|
return minutes ? `${hours} h ${minutes} min` : `${hours} h`;
|
|
13
13
|
}
|
|
14
|
+
// A ticket's estimate, the way people say one: "45 min" under an hour, then
|
|
15
|
+
// hours to one decimal: "1 h", "1.5 h", "2.1 h".
|
|
16
|
+
export function formatEstimate(totalMin) {
|
|
17
|
+
if (totalMin < 60)
|
|
18
|
+
return formatMinutes(totalMin);
|
|
19
|
+
return `${Math.round(totalMin / 6) / 10} h`;
|
|
20
|
+
}
|
|
14
21
|
// Estimated work done out of the total, in the units people estimate in:
|
|
15
22
|
// "5 of 10 min", "1 h 30 min of 2 h". Under an hour on both sides, the unit is
|
|
16
23
|
// said once.
|
package/dist/shared/show.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { headlineText, shortTitle } from "./dashboard.js";
|
|
2
|
-
import { formatAgo, formatClock, formatMinutes, formatWorkDone, minutesSince } from "./format.js";
|
|
2
|
+
import { formatAgo, formatClock, formatEstimate, formatMinutes, formatWorkDone, minutesSince } from "./format.js";
|
|
3
3
|
const STATUS = { not_started: "Not started", working: "Working", blocked: "Blocked", done: "Done", skipped: "Skipped" };
|
|
4
4
|
// The dashboard as plain text, so an agent can check what the user sees.
|
|
5
5
|
export function dashboardText(dashboard, nowMs) {
|
|
@@ -40,7 +40,7 @@ export function dashboardText(dashboard, nowMs) {
|
|
|
40
40
|
for (const ticket of dashboard.tickets) {
|
|
41
41
|
const stage = ticket.status === "working" && ticket.stage ? `, ${ticket.stage} stage` : "";
|
|
42
42
|
const status = ticket.waitingFor ? `Waiting for ${ticket.waitingFor.id}` : STATUS[ticket.status];
|
|
43
|
-
lines.push(` ${ticket.id} ${status}${stage} ${ticket.estimateMin}
|
|
43
|
+
lines.push(` ${ticket.id} ${status}${stage} ${formatEstimate(ticket.estimateMin)} ${ticket.title}`);
|
|
44
44
|
}
|
|
45
45
|
if (dashboard.questions.open.length) {
|
|
46
46
|
lines.push("", "Questions waiting");
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stevecastaneda/paseo-progress",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@stevecastaneda/paseo-progress",
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.5",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@getpaseo/client": "^0.9.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stevecastaneda/paseo-progress",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A live progress dashboard per worktree for Paseo, drawn from a file agents write with the paseo-progress command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Steve Castaneda",
|
package/shared/format.ts
CHANGED
|
@@ -12,6 +12,13 @@ export function formatMinutes(totalMin: number): string {
|
|
|
12
12
|
return minutes ? `${hours} h ${minutes} min` : `${hours} h`;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// A ticket's estimate, the way people say one: "45 min" under an hour, then
|
|
16
|
+
// hours to one decimal: "1 h", "1.5 h", "2.1 h".
|
|
17
|
+
export function formatEstimate(totalMin: number): string {
|
|
18
|
+
if (totalMin < 60) return formatMinutes(totalMin);
|
|
19
|
+
return `${Math.round(totalMin / 6) / 10} h`;
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
// Estimated work done out of the total, in the units people estimate in:
|
|
16
23
|
// "5 of 10 min", "1 h 30 min of 2 h". Under an hour on both sides, the unit is
|
|
17
24
|
// said once.
|
package/shared/show.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Dashboard } from "./dashboard.ts";
|
|
2
2
|
import { headlineText, shortTitle } from "./dashboard.ts";
|
|
3
|
-
import { formatAgo, formatClock, formatMinutes, formatWorkDone, minutesSince } from "./format.ts";
|
|
3
|
+
import { formatAgo, formatClock, formatEstimate, formatMinutes, formatWorkDone, minutesSince } from "./format.ts";
|
|
4
4
|
|
|
5
5
|
const STATUS: Record<string, string> = { not_started: "Not started", working: "Working", blocked: "Blocked", done: "Done", skipped: "Skipped" };
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ export function dashboardText(dashboard: Dashboard, nowMs: number): string {
|
|
|
38
38
|
for (const ticket of dashboard.tickets) {
|
|
39
39
|
const stage = ticket.status === "working" && ticket.stage ? `, ${ticket.stage} stage` : "";
|
|
40
40
|
const status = ticket.waitingFor ? `Waiting for ${ticket.waitingFor.id}` : STATUS[ticket.status];
|
|
41
|
-
lines.push(` ${ticket.id} ${status}${stage} ${ticket.estimateMin}
|
|
41
|
+
lines.push(` ${ticket.id} ${status}${stage} ${formatEstimate(ticket.estimateMin)} ${ticket.title}`);
|
|
42
42
|
}
|
|
43
43
|
if (dashboard.questions.open.length) {
|
|
44
44
|
lines.push("", "Questions waiting");
|