Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions progress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A plugin for Paseo 0.13 and later that gives each worktree a live progress dashb
The dashboard shows:

- the run's title, a headline ("2 of 4 tickets done, 5 questions waiting for you, 1 stuck"), a one-line "now" ticker, and when it was last updated
- a "possibly stale" warning after 15 minutes with no update while tickets remain, unless Paseo shows an agent in the workspace still running, and never once every ticket is done or skipped or the run is finished; working items swap their spinner for a pulsing amber warning
- a "possibly stale" warning after 15 minutes with no update while tickets remain, unless Paseo shows an agent in the workspace still running, and never once every ticket is done or skipped or the run is finished. Working items spin while an agent in the worktree is running, hold still with a dot when it stops, and switch to a pulsing amber warning after 15 minutes with no update
- percent of estimated work done, time done of time estimated (like "1h 30m of 2h"; once everything is done, how long it really took), and a bar with one segment per ticket
- **Stuck:** blocked tickets, working tickets with no update for longer than their estimate, and blockers the agent flags
- **Tickets:** estimate, status, and the working ticket's stage. A ticket that waits for another (`--waits-for T03`) shows "Waits for Ticket 03" under its title until that one is done; waiting is the order of work, so it never counts as stuck, even if the agent also marked it blocked. Press a ticket for its story in a dialog. A summary on top shows its status and stage, time worked against the estimate as a bar that turns red past it, the agent's latest status line while it's working, and the agent on it. Tabs below hold the rest, each only when it has something: the ticket's write-up when it has a `--source` file (the start of it, with the rest a press away), a timeline of its stages and statuses with how long each took, and the activity, questions and deliverables that belong to it. The agent on a ticket shows by its chat title; pressing it opens that chat. Items tagged with `--ticket` belong exactly; older, untagged ones are matched by when they happened and marked "by time"
Expand All @@ -26,7 +26,7 @@ The panel lives in Explorer, beside the agent chat, so you can watch both. Open

On phones, Progress opens in Explorer too. On any phone, the pill stays above the message box while a run is open, so there's always a way in. SVG files, videos and PDFs preview on desktop and in Paseo's web app. On phones, videos and PDFs open on the daemon host, and an SVG file copies its path. A PDF in the Deliverables tab also has a button beside Copy that opens it in a Paseo tab, which is where it shows on an iPhone or iPad.

The first time a run starts in a worktree whose Progress panel has never been opened, the pill shows a spinner and reads **Progress** instead; pressing it opens the panel. Once the panel has been opened there, the plugin writes an empty `progress-panel-opened` file next to the progress file and the nudge never comes back, even for later runs. It doesn't open the panel by itself because Paseo switches to a workspace to open its panel, which would pull you away from whatever you're looking at.
The first time a run starts in a worktree whose Progress panel has never been opened, the pill reads **Progress** instead; pressing it opens the panel. Its icon spins while an agent in the worktree is running and tickets are left, and shows a checklist otherwise. The pill above the message box on phones uses the same icon. Once the panel has been opened there, the plugin writes an empty `progress-panel-opened` file next to the progress file and the nudge never comes back, even for later runs. It doesn't open the panel by itself because Paseo switches to a workspace to open its panel, which would pull you away from whatever you're looking at.

## Install

Expand Down Expand Up @@ -178,6 +178,11 @@ The progress file, `progress.jsonl`, holds one JSON event per line, each with a

## Changelog

### 1.14.6

- [Fixed] **The Progress pill spins only while work is happening.** It used to show a spinner until you first opened the panel, even after every ticket was done or the agent had stopped. Now it spins while an agent in the worktree is running and tickets are left, and shows the checklist icon otherwise. On phones, the pill that stays above the message box follows the same rule.
- [Fixed] **The panel moves only while work is happening.** After the agent stopped, the line under the title, the ticket in progress and its part of the progress bar kept moving for up to 15 minutes. Now they move only while an agent in the worktree is running and hold still when it stops. After 15 minutes with no update, the amber warning appears as before. If the agent finished every ticket but never closed the run, the line under the title kept spinning for good. It now shows a check.

### 1.14.5

- [Fixed] **Agents record your answer on the first try.** In Claude Code, an agent that hadn't loaded the answer tool guessed its field names, and the call failed once before the agent retried. The skill now has agents load every Progress tool at once, and again after Claude Code compacts a long chat. Asking a question also tells the agent which fields the answer takes.
Expand Down
8 changes: 4 additions & 4 deletions progress/client/dialog-stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { PluginWorkspacePanelProps } from "@getpaseo/plugin/client";
import { Icon, Modal } from "@getpaseo/plugin/client/ui";
import React, { useEffect, useRef, useState } from "react";
import { isPage } from "../shared/attachments";
import type { Dashboard, Question } from "../shared/dashboard";
import type { Dashboard, Liveness, Question } from "../shared/dashboard";
import { type Attachment, attachmentIcon, useAttachmentOpener } from "./attachments";
import { NarrowProvider } from "./narrow";
import { BackButton, galleryFiles, PreviewContent } from "./preview";
Expand Down Expand Up @@ -31,7 +31,7 @@ export function StackedDialog({
questions = [],
dashboard,
now,
live = true,
liveness = "running",
compact = false,
context,
}: {
Expand All @@ -42,7 +42,7 @@ export function StackedDialog({
// Needed only when it opens on a ticket.
dashboard?: Dashboard;
now: number;
live?: boolean;
liveness?: Liveness;
// Paseo's phone-sized layout; the ticket's tabs scroll sideways there.
compact?: boolean;
context: AttachmentContext;
Expand Down Expand Up @@ -155,7 +155,7 @@ export function StackedDialog({
dashboard={dashboard}
ticket={ticket}
now={now}
live={live}
liveness={liveness}
compact={compact}
context={context}
onOpenAgent={openAgent}
Expand Down
8 changes: 7 additions & 1 deletion progress/client/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,13 @@ test("pending and failed settings reads leave content usable, and a saved overri
test("pill icons update same-mode titles and labels without extra polls and ignore late effects after cleanup", async () => {
for (const attention of [true, false]) {
const { h, effects, cleanups, setLanguage } = languageHarness();
h.responses["progress.attention"] = { configured: true, questions: attention ? 2 : 0, stuck: attention ? 1 : 0, runOpen: true, panelOpened: attention };
h.responses["progress.attention"] = {
configured: true,
questions: attention ? 2 : 0,
stuck: attention ? 1 : 0,
run: "ticketsLeft",
panelOpened: attention,
};
const stop = h.load("client/pills.tsx").contributePills(h.client);
h.agents.bootstrap([{ agent: { id: "a", workspaceId: "w" } }]);
h.workspaces.bootstrap([{ id: "w", workspaceDirectory: "/w", projectRootPath: "/w" }]);
Expand Down
55 changes: 34 additions & 21 deletions progress/client/lifecycle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ test("tapping a question reference copies it in the reply format", () => {
});

function attentionWith(questions: number, stuck: number, run: { open?: boolean; panelOpened?: boolean } = {}) {
return { configured: true, questions, stuck, runOpen: run.open ?? false, panelOpened: run.panelOpened ?? false };
return { configured: true, questions, stuck, run: run.open ? "ticketsLeft" : "closed", panelOpened: run.panelOpened ?? false };
}

function report(questions: number, stuck: number, runOpen: boolean, panelOpened: boolean) {
return { configured: true, questions, stuck, runOpen, panelOpened };
function report(questions: number, stuck: number, run: "closed" | "ticketsLeft" | "ticketsSettled", panelOpened: boolean) {
return { configured: true, questions, stuck, run, panelOpened };
}

function openRun(panelOpened: boolean, questions = 0) {
Expand All @@ -115,25 +115,38 @@ function openRun(panelOpened: boolean, questions = 0) {

test("one rule decides what the pill shows, its icon, and whether pressing it opens the popover", () => {
const { pillFor, isIdle } = clientHarness(directory).load("client/pill-state.ts");
const desktop = { phone: false };
const phone = { phone: true };
const cases: Array<[string, unknown, { phone: boolean }, unknown]> = [
["no progress file", { ...report(2, 1, true, false), configured: false }, desktop, null],
["questions and stuck", report(2, 1, true, true), desktop, { mode: "attention", label: "2Q · 1 stuck", icon: "stuck" }],
["questions only keep the full word", report(12, 0, true, true), desktop, { mode: "attention", label: "12 questions", icon: "questions" }],
["stuck only", report(0, 2, true, true), desktop, { mode: "attention", label: "2 stuck", icon: "stuck" }],
["one question, even after the run closed", report(1, 0, false, true), desktop, { mode: "attention", label: "1 question", icon: "questions" }],
["a new run's panel never opened", report(0, 0, true, false), desktop, { mode: "started", label: "Progress", icon: "started" }],
["panel opened, desktop has Explorer", report(0, 0, true, true), desktop, null],
["panel opened, a phone needs the way in", report(0, 0, true, true), phone, { mode: "open", label: "Progress", icon: "open" }],
["a phone after the run finished", report(0, 0, false, true), phone, null],
const desktop = { phone: false, running: true };
const desktopQuiet = { phone: false, running: false };
const phone = { phone: true, running: true };
const phoneQuiet = { phone: true, running: false };
const cases: Array<[string, unknown, { phone: boolean; running: boolean }, unknown]> = [
["no progress file", { ...report(2, 1, "ticketsLeft", false), configured: false }, desktop, null],
["questions and stuck", report(2, 1, "ticketsLeft", true), desktop, { mode: "attention", label: "2Q · 1 stuck", icon: "stuck" }],
["questions only keep the full word", report(12, 0, "ticketsLeft", true), desktop, { mode: "attention", label: "12 questions", icon: "questions" }],
["stuck only", report(0, 2, "ticketsLeft", true), desktop, { mode: "attention", label: "2 stuck", icon: "stuck" }],
["one question, even after the run closed", report(1, 0, "closed", true), desktop, { mode: "attention", label: "1 question", icon: "questions" }],
["a new run's panel never opened, agent working", report(0, 0, "ticketsLeft", false), desktop, { mode: "started", label: "Progress", icon: "working" }],
[
"a new run's panel never opened, agent stopped",
report(0, 0, "ticketsLeft", false),
desktopQuiet,
{ mode: "started", label: "Progress", icon: "checklist" },
],
["every ticket settled, agent still running", report(0, 0, "ticketsSettled", false), desktop, { mode: "started", label: "Progress", icon: "checklist" }],
["a finished run never nudges", report(0, 0, "closed", false), desktop, null],
["panel opened, desktop has Explorer", report(0, 0, "ticketsLeft", true), desktop, null],
["panel opened, a phone needs the way in", report(0, 0, "ticketsLeft", true), phone, { mode: "open", label: "Progress", icon: "working" }],
["a phone while the agent is stopped", report(0, 0, "ticketsLeft", true), phoneQuiet, { mode: "open", label: "Progress", icon: "checklist" }],
["a phone once every ticket is settled", report(0, 0, "ticketsSettled", true), phone, { mode: "open", label: "Progress", icon: "checklist" }],
["a phone after the run finished", report(0, 0, "closed", true), phone, null],
];
for (const [name, input, where, expected] of cases) {
assert.deepEqual(JSON.parse(JSON.stringify(pillFor(input, where))), expected, name);
for (const [name, input, workspace, expected] of cases) {
assert.deepEqual(JSON.parse(JSON.stringify(pillFor(input, workspace))), expected, name);
}
assert.equal(pillFor(undefined, desktop), null, "not read yet");
assert.equal(isIdle(report(0, 0, false, true)), true);
assert.equal(isIdle(report(1, 0, false, true)), false, "a question left on a closed run still counts");
assert.equal(isIdle(report(0, 0, "closed", true)), true);
assert.equal(isIdle(report(0, 0, "ticketsSettled", true)), false, "a settled run isn't finished yet");
assert.equal(isIdle(report(1, 0, "closed", true)), false, "a question left on a closed run still counts");
});

test("an agent's composer shows a pill while its workspace has questions waiting or something stuck", async () => {
Expand Down Expand Up @@ -178,7 +191,7 @@ test("an agent's composer shows a pill while its workspace has questions waiting

test("a workspace without a progress file never shows a pill", async () => {
const h = clientHarness(directory);
h.responses["progress.attention"] = { configured: false, questions: 0, stuck: 0, runOpen: false, panelOpened: false };
h.responses["progress.attention"] = { configured: false, questions: 0, stuck: 0, run: "closed", panelOpened: false };
const stop = h.load("client/pills.tsx").contributePills(h.client);
h.agents.bootstrap([{ agent: { id: "a", workspaceId: "w" } }]);
h.workspaces.bootstrap([{ id: "w", workspaceDirectory: "/w", projectRootPath: "/w" }]);
Expand All @@ -190,7 +203,7 @@ test("a workspace without a progress file never shows a pill", async () => {
test("a worktree with nothing going on is checked every 30 seconds instead of every 5", async () => {
const h = clientHarness(directory);
const { contributePills, PILL_POLL_MS, IDLE_POLL_EVERY } = h.load("client/pills.tsx");
h.responses["progress.attention"] = { configured: false, questions: 0, stuck: 0, runOpen: false, panelOpened: false };
h.responses["progress.attention"] = { configured: false, questions: 0, stuck: 0, run: "closed", panelOpened: false };
const stop = contributePills(h.client);
h.agents.bootstrap([{ agent: { id: "a", workspaceId: "w" } }]);
h.workspaces.bootstrap([{ id: "w", workspaceDirectory: "/w", projectRootPath: "/w" }]);
Expand Down
1 change: 1 addition & 0 deletions progress/client/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const messages: ProgressMessages = {
workDoneLong: "of estimated work done",
stuck: "Stuck",
possiblyStalled: "Possibly stalled",
paused: "Paused",
waiting: "Waiting",
workingSince: "Working since ",
startedWorking: "Started working ",
Expand Down
1 change: 1 addition & 0 deletions progress/client/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const messages: ProgressMessages = {
workDoneLong: "的预计工作已完成",
stuck: "卡住",
possiblyStalled: "可能已停滞",
paused: "已暂停",
waiting: "等待中",
workingSince: "开始工作于 ",
startedWorking: "开始工作于 ",
Expand Down
1 change: 1 addition & 0 deletions progress/client/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface ProgressMessages {
stuck: string;
waiting: string;
possiblyStalled: string;
paused: string;
workingSince: string;
startedWorking: string;
flagged: string;
Expand Down
Loading
Loading