@stevecastaneda/paseo-progress 1.2.0 → 1.3.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/README.md +5 -0
- package/client/dialog-stack.tsx +2 -1
- package/client/preview.tsx +25 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,6 +125,11 @@ The progress file, `progress.jsonl`, holds one JSON event per line, each with a
|
|
|
125
125
|
|
|
126
126
|
## Changelog
|
|
127
127
|
|
|
128
|
+
### 1.3.0
|
|
129
|
+
|
|
130
|
+
- The file preview has a **Copy** button beside the path. It copies the full path, so you can paste it into your message to the agent without closing the preview. Before, the path was cut off when it was long, and you had to close the preview and copy it from the list.
|
|
131
|
+
- The path stays in view below a tall image or long file. Before, it scrolled with the file and you had to scroll to the bottom to see it.
|
|
132
|
+
|
|
128
133
|
### 1.2.0
|
|
129
134
|
|
|
130
135
|
- A folder deliverable opens in Paseo as a list of its files. Press a file to preview it, or a folder inside to list that one; **Back** returns to the list. This works from a phone and when the worktree is on another computer. Before, Progress asked the computer running Paseo to open the folder. On a Linux server with no desktop, that failed with `spawn xdg-open ENOENT`.
|
package/client/dialog-stack.tsx
CHANGED
|
@@ -80,7 +80,8 @@ export function StackedDialog({ colors, root, onClose, questions = [], dashboard
|
|
|
80
80
|
<NarrowProvider value={false}>
|
|
81
81
|
{preview ? (
|
|
82
82
|
<PreviewContent colors={colors} attachment={preview.attachment} workspaceId={context.workspaceId} workspaceDirectory={context.workspaceDirectory}
|
|
83
|
-
onOpenOnHost={() => { onClose(); void opener.openOnHost(preview.attachment); }}
|
|
83
|
+
onOpenOnHost={() => { onClose(); void opener.openOnHost(preview.attachment); }}
|
|
84
|
+
onCopyPath={() => void opener.copyPath(preview.attachment)} onBack={back}
|
|
84
85
|
gallery={{ items: preview.group, onSelect: (attachment) => replaceTop({ ...preview, attachment }) }} onLong={setPreviewLong}
|
|
85
86
|
onOpenEntry={openAttachment} />
|
|
86
87
|
) : (
|
package/client/preview.tsx
CHANGED
|
@@ -30,6 +30,7 @@ type PreviewProps = {
|
|
|
30
30
|
workspaceId: string;
|
|
31
31
|
workspaceDirectory: string;
|
|
32
32
|
onOpenOnHost(): void;
|
|
33
|
+
onCopyPath(): void;
|
|
33
34
|
onBack?(): void;
|
|
34
35
|
gallery?: Gallery;
|
|
35
36
|
onOpenEntry(attachment: Attachment, group: Attachment[]): void;
|
|
@@ -37,7 +38,7 @@ type PreviewProps = {
|
|
|
37
38
|
|
|
38
39
|
// `onLong` says when the file is too tall for the dialog, so the host turns off
|
|
39
40
|
// its own scrolling and the file scrolls with the actions pinned below.
|
|
40
|
-
export function PreviewContent({ colors, attachment, workspaceId, workspaceDirectory, onOpenOnHost, onBack, gallery, onOpenEntry, onLong }: PreviewProps & { onLong(long: boolean): void }) {
|
|
41
|
+
export function PreviewContent({ colors, attachment, workspaceId, workspaceDirectory, onOpenOnHost, onCopyPath, onBack, gallery, onOpenEntry, onLong }: PreviewProps & { onLong(long: boolean): void }) {
|
|
41
42
|
const fetchPreview = useRpc(previewDeliverable);
|
|
42
43
|
const readPiece = useRpc(readDeliverablePiece);
|
|
43
44
|
const checkHost = useRpc(canOpenOnHost);
|
|
@@ -152,16 +153,26 @@ export function PreviewContent({ colors, attachment, workspaceId, workspaceDirec
|
|
|
152
153
|
<Image accessibilityLabel={attachment.title} source={{ uri: preview.data.dataUri }} resizeMode="contain" style={mediaStyle} />
|
|
153
154
|
) : null}
|
|
154
155
|
{preview.data?.kind === "video" ? <VideoPlayer video={preview.data.video} label={attachment.title} style={mediaStyle} /> : null}
|
|
155
|
-
{/* The path as a caption under the file, where it has the full width. */}
|
|
156
|
-
{!preview.isPending && videoLoading ? (
|
|
157
|
-
<Text style={[caption, { marginTop: -4, fontVariant: ["tabular-nums"] }]}>{videoLoading}</Text>
|
|
158
|
-
) : (
|
|
159
|
-
<Text selectable numberOfLines={1} ellipsizeMode="middle" style={[caption, { marginTop: -4 }]}>
|
|
160
|
-
{attachment.path}
|
|
161
|
-
</Text>
|
|
162
|
-
)}
|
|
163
156
|
</>
|
|
164
157
|
);
|
|
158
|
+
// The path as a caption under the file, where it has the full width, with Copy
|
|
159
|
+
// beside it so it can go into a message without leaving the dialog. A long
|
|
160
|
+
// file scrolls above it, so it stays in view with the actions.
|
|
161
|
+
const path = !preview.isPending && videoLoading ? (
|
|
162
|
+
<Text style={[caption, { fontVariant: ["tabular-nums"] }]}>{videoLoading}</Text>
|
|
163
|
+
) : (
|
|
164
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 6 }}>
|
|
165
|
+
<Text selectable numberOfLines={1} ellipsizeMode="middle" style={[caption, { flex: 1, minWidth: 0 }]}>
|
|
166
|
+
{attachment.path}
|
|
167
|
+
</Text>
|
|
168
|
+
{/* Optical: the 22px button centers on the 17px caption line without growing it. */}
|
|
169
|
+
<PressScale accessibilityRole="button" accessibilityLabel={`Copy the path of ${attachment.title}`} hitSlop={6} outerStyle={{ marginVertical: -3 }}
|
|
170
|
+
onPress={onCopyPath}
|
|
171
|
+
style={({ pressed, hovered }) => ({ padding: 4, borderRadius: 4, backgroundColor: pressed ? colors.border : hovered ? colors.surface2 : "transparent" })}>
|
|
172
|
+
<Icon name="Copy" size={14} color={colors.foregroundMuted} />
|
|
173
|
+
</PressScale>
|
|
174
|
+
</View>
|
|
175
|
+
);
|
|
165
176
|
// Back on the left, Previous and Next in the middle, Open on the right.
|
|
166
177
|
const actions = (
|
|
167
178
|
<View style={{ flexDirection: "row", alignItems: "center", gap: 12 }}>
|
|
@@ -177,11 +188,15 @@ export function PreviewContent({ colors, attachment, workspaceId, workspaceDirec
|
|
|
177
188
|
return long ? (
|
|
178
189
|
<>
|
|
179
190
|
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ gap: 12 }}>{content}</ScrollView>
|
|
191
|
+
<View style={{ marginTop: 8 }}>{path}</View>
|
|
180
192
|
{actions}
|
|
181
193
|
</>
|
|
182
194
|
) : (
|
|
183
195
|
<View style={{ gap: 20 }}>
|
|
184
|
-
<View style={{ gap:
|
|
196
|
+
<View style={{ gap: 8 }}>
|
|
197
|
+
<View style={{ gap: 12 }}>{content}</View>
|
|
198
|
+
{path}
|
|
199
|
+
</View>
|
|
185
200
|
{actions}
|
|
186
201
|
</View>
|
|
187
202
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stevecastaneda/paseo-progress",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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",
|