@andrioid/paseo-attention-span 0.6.1 → 0.7.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.
Files changed (50) hide show
  1. package/OVERVIEW.md +2 -0
  2. package/client/attention-screen.tsx +4 -1
  3. package/client/entity.tsx +15 -3
  4. package/client/icons.ts +2 -0
  5. package/client/item-actions.ts +49 -1
  6. package/client/next-up.tsx +49 -7
  7. package/client/pickers.tsx +4 -3
  8. package/client/ui.tsx +4 -1
  9. package/client/wrap-up.tsx +51 -4
  10. package/docs/architecture.md +4 -3
  11. package/docs/screenshots/desktop-dark-doing-acknowledge.png +0 -0
  12. package/docs/screenshots/desktop-dark-doing-clear.png +0 -0
  13. package/docs/screenshots/desktop-dark-doing-issue-sheet.png +0 -0
  14. package/docs/screenshots/desktop-dark-doing-reviewers.png +0 -0
  15. package/docs/screenshots/desktop-dark-doing-sheet.png +0 -0
  16. package/docs/screenshots/desktop-dark-doing-wrap-dirty.png +0 -0
  17. package/docs/screenshots/desktop-dark-doing-wrap-multi.png +0 -0
  18. package/docs/screenshots/desktop-dark-doing-wrap.png +0 -0
  19. package/docs/screenshots/desktop-dark-doing.png +0 -0
  20. package/docs/screenshots/desktop-dark-history-filtered.png +0 -0
  21. package/docs/screenshots/desktop-dark-history-groups.png +0 -0
  22. package/docs/screenshots/desktop-dark-history.png +0 -0
  23. package/docs/screenshots/desktop-dark-next-up-setup.png +0 -0
  24. package/docs/screenshots/desktop-dark-next-up.png +0 -0
  25. package/docs/screenshots/desktop-dark-settings.png +0 -0
  26. package/docs/screenshots/desktop-dark-setup.png +0 -0
  27. package/docs/screenshots/desktop-dark-waiting-too-long.png +0 -0
  28. package/docs/screenshots/desktop-dark-waiting.png +0 -0
  29. package/docs/screenshots/phone-dark-doing.png +0 -0
  30. package/docs/screenshots/phone-dark-history.png +0 -0
  31. package/docs/screenshots/phone-light-next-up-filtered.png +0 -0
  32. package/index.server.ts +2 -0
  33. package/package.json +1 -1
  34. package/requirements.yaml +4 -0
  35. package/server/classify.ts +44 -3
  36. package/server/context.ts +95 -3
  37. package/server/fetch.ts +29 -3
  38. package/server/fixture.ts +21 -5
  39. package/server/github-types.ts +15 -1
  40. package/server/queries.ts +15 -1
  41. package/server/references.ts +12 -0
  42. package/server/service.ts +90 -11
  43. package/server/store.ts +17 -2
  44. package/server/view.ts +24 -4
  45. package/shared/attention.ts +39 -2
  46. package/shared/item-view.ts +5 -4
  47. package/shared/next-up-filter.ts +19 -0
  48. package/shared/prompts.ts +39 -22
  49. package/shared/rpc.ts +4 -0
  50. package/shared/wrap-up.ts +34 -9
package/OVERVIEW.md CHANGED
@@ -10,6 +10,8 @@ This is the one you'll live in. At the top is **Wrap up**: finished or handed-of
10
10
 
11
11
  Wrap up is the cleanup pass. A PR that merged, an issue that closed, work that left your hands, a review you finished on someone else's PR: if one of your sessions is still open on it, it sits here once the agent is idle, newest finish first. **Archive session** puts the session, the sub-agents it started and its worktree away. If anything is uncommitted or unpushed, or the worktree has terminals open, you get a sheet first, shaped like Paseo's own: "Uncommitted changes: 2 files (+12 −3)", "1 unpushed commit", the terminals it closes, with **Open session** beside **Archive**; several sessions get a list of their own. **Archive all clean** does the tidy ones in one go. A worktree another session still lives in stays, and so does its row, saying which session kept it, until the worktree goes or you dismiss it; a local checkout is never archived; and there's no Undo, which is exactly why it checks first. Archived work goes to History as already read, not as a new note.
12
12
 
13
+ Sometimes all the PRs under an issue merge and the issue stays open anyway: they went into a feature branch, or the description only mentioned it. Wrap up asks about those too, session or not: "Close #12? #34 and #35 merged 2h ago". **Close #12** closes it as completed, with Undo. The × keeps it open until another PR of yours merges under it, which covers "first of three" plans. While it's asking, the issue stays in Next up with a "PRs merged" pill. A session open on that work joins the question's row, and becomes an ordinary Archive session row once you've answered.
14
+
13
15
  ![Doing](docs/screenshots/desktop-dark-doing.png)
14
16
 
15
17
  Each item shows up once, under whichever reason is most urgent. An issue and the PRs that close it count as one item, and so does a stack of PRs. A stack is one change wearing several PRs, so it shouldn't take up five rows.
@@ -215,6 +215,7 @@ function AttentionList({
215
215
  login={view.login}
216
216
  fixture={!!view.fixtureAgents}
217
217
  openAgent={act.openAgent}
218
+ {...act.askActions}
218
219
  onArchive={(item, confirm, terminals) => act.archiveRows([item], confirm, item.key, terminals)}
219
220
  onArchiveAll={async () => {
220
221
  const clean = wrap.filter(cleanSingle);
@@ -260,6 +261,8 @@ function AttentionList({
260
261
  projects={view.projects}
261
262
  selectedProjects={view.projectFilter}
262
263
  onFilter={(change) => act.filterNextUp(view, change)}
264
+ byRepo={view.unclaimedByRepo ?? false}
265
+ onByRepo={(on) => act.groupNextUp(view, on)}
263
266
  // Narrowed to one repository, a new issue starts there [ISS-01].
264
267
  onNewIssue={() => setNewIssue({ nextUp: view.sources.length === 1 && view.sources[0].startsWith("repo:") ? view.sources[0].slice(5) : undefined })}
265
268
  agents={actions.agents}
@@ -283,7 +286,7 @@ function AttentionList({
283
286
  />
284
287
  ) : null}
285
288
  {newIssue ? <NewIssueSheet request={newIssue} view={view} onView={attention.setView} onStarted={act.started} onClose={() => setNewIssue(null)} /> : null}
286
- {act.options ? <SessionOptions spec={act.options} config={view.config} started={act.started} onClose={act.closeOptions} /> : null}
289
+ {act.options ? <SessionOptions spec={act.options} config={view.config} started={act.startedOn} onClose={act.closeOptions} /> : null}
287
290
  {act.placing ? <CodeRepoPicker issueRepo={act.placing.target.repo} missing={act.placing.missing} onPick={act.place} onClose={act.cancelPlacing} /> : null}
288
291
  </ScrollView>
289
292
  );
package/client/entity.tsx CHANGED
@@ -26,13 +26,25 @@ export function NumberText({ number }: { number: number }) {
26
26
  // "#160 · acme/shop", to lead a Meta line: the number on its own first, then the repo with its name standing out from its
27
27
  // owner, so cards from several repos scan.
28
28
  export function PlaceText({ place }: { place: Place }) {
29
- const strong = useStrongText();
30
- const label = repoLabel(place.repo, place.login);
31
- const cut = label.lastIndexOf("/") + 1;
32
29
  return (
33
30
  <>
34
31
  <NumberText number={place.number} />
35
32
  {" · "}
33
+ <RepoText repo={place.repo} login={place.login} />
34
+ </>
35
+ );
36
+ }
37
+
38
+ // "acme/shop" with its name standing out from its owner; mine without the owner where `login` is given. Bold where it heads
39
+ // a group [NXT-14].
40
+ export function RepoText({ repo, login, bold }: { repo: string; login: string | null; bold?: boolean }) {
41
+ const { c } = useStyles();
42
+ const text = useStrongText();
43
+ const strong = bold ? { color: c.foreground, fontWeight: "600" as const } : text;
44
+ const label = repoLabel(repo, login);
45
+ const cut = label.lastIndexOf("/") + 1;
46
+ return (
47
+ <>
36
48
  {label.slice(0, cut)}
37
49
  <Text style={strong}>{label.slice(cut)}</Text>
38
50
  </>
package/client/icons.ts CHANGED
@@ -57,6 +57,8 @@ export const ICONS = {
57
57
  userMinus: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0-8 0M6 21v-2a4 4 0 0 1 4-4h4c.348 0 .686.045 1.009.128M16 19h6\"/></svg>" },
58
58
  // Tabler archive: puts a finished item's Paseo sessions away [ATT-22].
59
59
  archive: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M3 4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/><path d=\"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8M10 12h4\"/></g></svg>" },
60
+ // Tabler folder: a repository, as Unclaimed groups by them [NXT-14].
61
+ folder: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2\"/></svg>" },
60
62
  chevronDown: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"/></svg>" },
61
63
  // Tabler message-ai: marks actions that start or continue an agent session.
62
64
  agent: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M8 9h8m-8 4h3.5m-1.506 6.804L8 21v-3H6a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v4\"/><path d=\"M14 21v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6\"/></g></svg>" },
@@ -72,6 +72,14 @@ export interface Actions {
72
72
  started: (agentId: string) => Promise<void>;
73
73
  }
74
74
 
75
+ // A session just started on an item.
76
+ export interface Started {
77
+ agentId: string;
78
+ itemKey: string;
79
+ kind: SessionKind;
80
+ target: Target;
81
+ }
82
+
75
83
  function issueTarget(issue: NextUpIssue): Target {
76
84
  return { kind: "issue", repo: issue.repo, number: issue.number, title: issue.title, url: issue.url, defaultBranch: issue.defaultBranch };
77
85
  }
@@ -94,8 +102,10 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
94
102
  const saveScopes = useRpc(rpc.setScopes);
95
103
  const saveSources = useRpc(rpc.setSources);
96
104
  const saveProjects = useRpc(rpc.setProjectFilter);
105
+ const saveByRepo = useRpc(rpc.setUnclaimedByRepo);
97
106
  const closeIssue = useRpc(rpc.closeIssue);
98
107
  const reopenIssue = useRpc(rpc.reopenIssue);
108
+ const keepOpen = useRpc(rpc.keepOpen);
99
109
  const update = useRpc(rpc.updateBranch);
100
110
  const merge = useRpc(rpc.mergePullRequest);
101
111
  const close = useRpc(rpc.closePullRequest);
@@ -145,11 +155,25 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
145
155
  else toast.show("Session started. Open it from the sidebar.", { variant: "success" });
146
156
  }
147
157
 
158
+ // A session started from somewhere with no card for it (a new issue, feedback): open it, or it'd be hard to find.
148
159
  async function started(agentId: string) {
149
160
  await queryClient.invalidateQueries({ queryKey: AGENTS_QUERY_KEY });
150
161
  openAgent(agentId);
151
162
  }
152
163
 
164
+ // A session started on an item leaves me here, so I can start several in a row; the item's card offers Open session
165
+ // [SES-10]. The session goes on the list at once, so the card offers it even if the poll after fails, rather than Start
166
+ // again; the next poll that succeeds replaces it with Paseo's own.
167
+ async function startedOn({ agentId, itemKey, kind, target }: Started) {
168
+ queryClient.setQueryData<AgentSummary[]>(AGENTS_QUERY_KEY, (agents = []) =>
169
+ agents.some((agent) => agent.id === agentId)
170
+ ? agents
171
+ : [...agents, { id: agentId, itemKey, kind, status: "running", requiresAttention: false, title: null, workspaceId: null, lastActivityAt: new Date().toISOString() }],
172
+ );
173
+ await queryClient.invalidateQueries({ queryKey: AGENTS_QUERY_KEY });
174
+ toast.show(`Session started on #${target.number}`, { variant: "success" });
175
+ }
176
+
153
177
  // One tap: start a session with defaults [SES-01]. An open one is offered first, by the card [SES-03].
154
178
  async function startWithDefaults(itemKey: string, kind: SessionKind, target: Target, before?: () => Promise<unknown>) {
155
179
  if (!view) return;
@@ -163,7 +187,8 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
163
187
  await before?.();
164
188
  const { context } = await fetchContext({ kind, target });
165
189
  const prompt = renderPrompt(kind, target, context, config);
166
- await started(await startSession(paseo, { itemKey, kind, target, prompt, config, fetchProviders, checkout }));
190
+ const agentId = await startSession(paseo, { itemKey, kind, target, prompt, config, fetchProviders, checkout });
191
+ await startedOn({ agentId, itemKey, kind, target });
167
192
  }
168
193
 
169
194
  function place(codeRepo: string) {
@@ -317,6 +342,19 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
317
342
  },
318
343
  };
319
344
 
345
+ // Wrap up's "Close #12?": closes as completed, or keeps it open until another PR merges under it; each with Undo [ATT-24].
346
+ const askActions = {
347
+ onCloseIssue: (item: WrapItem) => {
348
+ const key = item.wrap.itemKey;
349
+ const target: Target = { kind: "issue", repo: item.repo, number: item.number, title: item.title, url: item.url };
350
+ change(item.key, "Close", () => closeIssue({ key, target, reason: "completed" }), `Closed #${item.number} as completed`, () => reopenIssue({ key, target }));
351
+ },
352
+ onKeepOpen: (item: WrapItem) => {
353
+ const key = item.wrap.itemKey;
354
+ change(item.key, "Keep open", () => keepOpen({ key, on: true }), `Kept #${item.number} open`, () => keepOpen({ key, on: false }));
355
+ },
356
+ };
357
+
320
358
  const failedSaving = (error: Error) => toast.error(`Saving the filter failed: ${error.message}`);
321
359
  // Ticks apply right away, like Next up's; the server remembers them [HIS-07].
322
360
  function filterHistory(view: AttentionView, next: HistoryFilter[]) {
@@ -332,6 +370,13 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
332
370
  if (change.sources) saveSources({ sources: change.sources }).catch(failedSaving);
333
371
  if (change.projectFilter) saveProjects({ projects: change.projectFilter }).catch(failedSaving);
334
372
  }
373
+ // Shown at once, and remembered; the saved view then wins over a refresh that started before it [NXT-14].
374
+ function groupNextUp(view: AttentionView, on: boolean) {
375
+ attention.setView({ ...view, unclaimedByRepo: on });
376
+ saveByRepo({ on })
377
+ .then((saved) => attention.setView(saved))
378
+ .catch((error: Error) => toast.error(`Saving the grouping failed: ${error.message}`));
379
+ }
335
380
 
336
381
  return {
337
382
  busy,
@@ -352,12 +397,15 @@ export function useItemActions(attention: ReturnType<typeof useAttention>, navig
352
397
  fetchDetails,
353
398
  openAgent,
354
399
  started,
400
+ startedOn,
355
401
  archiveRows,
356
402
  archiveWorktree,
357
403
  dismissKept: (row: KeptRow) => void run(`kept:${row.workspaceId}`, "Dismiss", async () => attention.setView(await dismissKept({ workspaceId: row.workspaceId }))),
358
404
  itemActions,
359
405
  issueActions,
406
+ askActions,
360
407
  filterHistory,
361
408
  filterNextUp,
409
+ groupNextUp,
362
410
  };
363
411
  }
@@ -13,15 +13,15 @@ import {
13
13
  type UnclaimedSource,
14
14
  } from "../shared/attention";
15
15
  import type { NextUpSource } from "../shared/config";
16
- import { CLEAR_FILTER, type FilterChange, nextUpFilter } from "../shared/next-up-filter";
16
+ import { CLEAR_FILTER, type FilterChange, nextUpFilter, repoGroups } from "../shared/next-up-filter";
17
17
  import type { IconName } from "./icons";
18
18
  import type { FetchDetails } from "./item-actions";
19
19
  import { CardList, CardRow, type Tone } from "./card";
20
20
  import { sessionEntry, startAnotherEntry } from "./session-menu";
21
21
  import { ActionSheet, DETAILS_STALE_MS, DetailLines, type DetailsQuery, detailsKey, FilterSheet, githubEntry, type SheetEntry, usePrefetchOnRest } from "./sheet";
22
- import { IssuePills, PlaceText } from "./entity";
22
+ import { IssuePills, PlaceText, RepoText } from "./entity";
23
23
  import { Still } from "./still";
24
- import { Button, FilterButton, Meta, SectionHeader, useStyles } from "./ui";
24
+ import { Button, FilterButton, Meta, SectionHeader, TablerIcon, useStyles } from "./ui";
25
25
 
26
26
  const TYPE_ICONS: Record<string, IconName> = { bug: "bug", feature: "feature", debt: "debt", task: "task", epic: "epic" };
27
27
 
@@ -42,6 +42,9 @@ interface Props {
42
42
  selectedProjects: string[];
43
43
  // Change any filter or all at once, so Clear empties them in one go.
44
44
  onFilter: (change: FilterChange) => void;
45
+ // Unclaimed grouped by repository, and turning it on or off [NXT-14].
46
+ byRepo: boolean;
47
+ onByRepo: (on: boolean) => void;
45
48
  agents: AgentSummary[];
46
49
  // Mine, so my repos show without the owner.
47
50
  login: string | null;
@@ -59,16 +62,18 @@ interface Props {
59
62
  onNewIssue: () => void;
60
63
  }
61
64
 
62
- type RowProps = Omit<Props, "calm" | "openSettings" | "assigned" | "unclaimed" | "unclaimedFrom" | "selected" | "sources" | "selectedSources" | "projects" | "selectedProjects" | "onFilter" | "onNewIssue">;
65
+ type RowProps = Omit<Props, "calm" | "openSettings" | "assigned" | "unclaimed" | "unclaimedFrom" | "selected" | "sources" | "selectedSources" | "projects" | "selectedProjects" | "onFilter" | "byRepo" | "onByRepo" | "onNewIssue">;
63
66
 
64
67
  // Assigned issues first [NXT-06], then unclaimed ones [NXT-01]; both already ranked by the server [NXT-02].
65
- export function NextUpList({ calm, openSettings, assigned, unclaimed, unclaimedFrom, selected, sources, selectedSources, projects, selectedProjects, onFilter, onNewIssue, ...rowProps }: Props) {
68
+ export function NextUpList({ calm, openSettings, assigned, unclaimed, unclaimedFrom, selected, sources, selectedSources, projects, selectedProjects, onFilter, byRepo, onByRepo, onNewIssue, ...rowProps }: Props) {
66
69
  const styles = useStyles();
67
70
  const filter = useMemo(
68
71
  () => nextUpFilter({ unclaimed, selected, sources, selectedSources, projects, selectedProjects }),
69
72
  [unclaimed, selected, sources, selectedSources, projects, selectedProjects],
70
73
  );
71
74
  const { shown, picked, groups } = filter;
75
+ // Only with two repositories or more is there anything to group [NXT-14].
76
+ const repos = useMemo(() => repoGroups(shown), [shown]);
72
77
  const [filtering, setFiltering] = useState(false);
73
78
 
74
79
  // Both point at where Next up looks: plainly when it has nowhere to look, quietly when it found nothing [NXT-13].
@@ -96,7 +101,18 @@ export function NextUpList({ calm, openSettings, assigned, unclaimed, unclaimedF
96
101
  count={shown.length}
97
102
  action={
98
103
  <View style={styles.wrap}>
99
- <Button label="New issue" icon="plus" variant="ghost" onPress={onNewIssue} />
104
+ {/* Just icons on a phone, so the header stays one line with Filter in it [NXT-14]. */}
105
+ {repos ? (
106
+ <Button
107
+ label={styles.compact ? undefined : "Group by repo"}
108
+ accessibilityLabel="Group by repo"
109
+ icon="folder"
110
+ variant={byRepo ? "calm" : "ghost"}
111
+ pressed={byRepo}
112
+ onPress={() => onByRepo(!byRepo)}
113
+ />
114
+ ) : null}
115
+ <Button label={styles.compact ? undefined : "New issue"} accessibilityLabel="New issue" icon="plus" variant="ghost" onPress={onNewIssue} />
100
116
  {groups.length > 0 ? <FilterButton count={picked} onPress={() => setFiltering(true)} /> : null}
101
117
  </View>
102
118
  }
@@ -114,6 +130,15 @@ export function NextUpList({ calm, openSettings, assigned, unclaimed, unclaimedF
114
130
  <Text style={styles.text}>No repos to look in. Register a project in Paseo, or choose where Next up looks in Settings.</Text>
115
131
  ) : shown.length === 0 ? (
116
132
  <Text style={styles.text}>{filter.empty}</Text>
133
+ ) : byRepo && repos ? (
134
+ <View style={{ gap: 8 }}>
135
+ {repos.map((group, index) => (
136
+ <View key={group.repo} style={{ gap: 8, marginTop: index ? 10 : 0 }}>
137
+ <RepoHeading repo={group.repo} count={group.issues.length} login={rowProps.login} />
138
+ <IssueList issues={group.issues} claim {...rowProps} />
139
+ </View>
140
+ ))}
141
+ </View>
117
142
  ) : (
118
143
  <IssueList issues={shown} claim {...rowProps} />
119
144
  )}
@@ -122,6 +147,21 @@ export function NextUpList({ calm, openSettings, assigned, unclaimed, unclaimedF
122
147
  );
123
148
  }
124
149
 
150
+ // A repository's name over its issues, standing out more than History's sub-groups, since it's what the list is sorted by
151
+ // [NXT-14]. Cards keep their repo too, for when this has scrolled away [NXT-10].
152
+ function RepoHeading({ repo, count, login }: { repo: string; count: number; login: string | null }) {
153
+ const styles = useStyles();
154
+ return (
155
+ <View style={[styles.row, { gap: 6, paddingVertical: 2 }]} accessibilityRole="header">
156
+ <TablerIcon name="folder" size={14} color={styles.c.foregroundMuted} />
157
+ <Text style={[styles.muted, { fontSize: 13 }]}>
158
+ <RepoText repo={repo} login={login} bold />
159
+ {` · ${count}`}
160
+ </Text>
161
+ </View>
162
+ );
163
+ }
164
+
125
165
  function IssueList({ issues, claim, ...rowProps }: RowProps & { issues: NextUpIssue[]; claim: boolean }) {
126
166
  return (
127
167
  <CardList>
@@ -132,8 +172,10 @@ function IssueList({ issues, claim, ...rowProps }: RowProps & { issues: NextUpIs
132
172
  );
133
173
  }
134
174
 
135
- // An open PR that closes it means someone may already be on it [NXT-10].
175
+ // An open PR that closes it means someone may already be on it [NXT-10]; my PRs under it all merged mean it may be done,
176
+ // while Wrap up asks [ATT-24].
136
177
  function prSignal(issue: NextUpIssue): Chip[] {
178
+ if (issue.prsMerged) return [{ text: "PRs merged", tone: "good" }];
137
179
  const [first, ...more] = issue.openPrs;
138
180
  if (!first) return [];
139
181
  return [{ text: `PR by ${first.author ?? "someone"}${more.length ? ` +${more.length}` : ""}`, tone: "warn" }];
@@ -8,7 +8,7 @@ import type { AttentionConfig } from "../shared/config";
8
8
  import { ago } from "../shared/format";
9
9
  import { renderPrompt } from "../shared/prompts";
10
10
  import * as rpc from "../shared/rpc";
11
- import type { OptionsSpec } from "./item-actions";
11
+ import type { OptionsSpec, Started } from "./item-actions";
12
12
  import { branchWorkspaces, findCheckout, githubProjects, listProfiles, noProjectMessage, resolveAgentConfig, startSession, useStartRpcs } from "./sessions";
13
13
  import { Dialog } from "./sheet";
14
14
  import { Avatar, Button, CheckRow, Loading, TablerIcon, Toggle, useStyles } from "./ui";
@@ -137,7 +137,7 @@ export function ReviewerSheet({
137
137
  }
138
138
 
139
139
  // Session options in a modal: a bottom sheet on phones [SES-02].
140
- export function SessionOptions({ spec, config, started, onClose }: { spec: OptionsSpec; config: AttentionConfig; started: (agentId: string) => Promise<void>; onClose: () => void }) {
140
+ export function SessionOptions({ spec, config, started, onClose }: { spec: OptionsSpec; config: AttentionConfig; started: (started: Started) => Promise<void>; onClose: () => void }) {
141
141
  const styles = useStyles();
142
142
  const paseo = usePaseo();
143
143
  const toast = useToast();
@@ -169,7 +169,8 @@ export function SessionOptions({ spec, config, started, onClose }: { spec: Optio
169
169
  setStarting(true);
170
170
  try {
171
171
  await spec.before?.();
172
- await started(await startSession(paseo, { itemKey, kind, target, prompt: prompt ?? data.prompt, config: config, fetchProviders: fetchProviders, checkout: data.checkout, profileId, workspaceId }));
172
+ const agentId = await startSession(paseo, { itemKey, kind, target, prompt: prompt ?? data.prompt, config: config, fetchProviders: fetchProviders, checkout: data.checkout, profileId, workspaceId });
173
+ await started({ agentId, itemKey, kind, target });
173
174
  onClose();
174
175
  } catch (error) {
175
176
  toast.error(`Starting the session failed: ${(error as Error).message}`);
package/client/ui.tsx CHANGED
@@ -294,7 +294,7 @@ export function useHover() {
294
294
  }
295
295
 
296
296
  // Calm by default: accent text on a subtle surface. Solid accent is for confirmations.
297
- // Busy: a spinner in place of the icon, and no second press while it runs.
297
+ // Busy: a spinner in place of the icon, and no second press while it runs. Pressed: a toggle, on or off, said as aria-pressed since React Native Web drops accessibilityState.
298
298
  export function Button({
299
299
  label,
300
300
  icon,
@@ -302,6 +302,7 @@ export function Button({
302
302
  variant = "plain",
303
303
  disabled,
304
304
  busy,
305
+ pressed,
305
306
  accessibilityLabel,
306
307
  }: {
307
308
  label?: string;
@@ -310,6 +311,7 @@ export function Button({
310
311
  variant?: Variant;
311
312
  disabled?: boolean;
312
313
  busy?: boolean;
314
+ pressed?: boolean;
313
315
  accessibilityLabel?: string;
314
316
  }) {
315
317
  const styles = useStyles();
@@ -321,6 +323,7 @@ export function Button({
321
323
  accessibilityRole="button"
322
324
  accessibilityLabel={accessibilityLabel ?? label ?? icon}
323
325
  accessibilityState={{ disabled: disabled || busy, busy }}
326
+ aria-pressed={pressed}
324
327
  disabled={disabled || busy}
325
328
  onPress={onPress}
326
329
  {...hover}
@@ -1,4 +1,5 @@
1
1
  import { useState } from "react";
2
+ import { openExternalUrl } from "@getpaseo/plugin/client";
2
3
  import { Text, View } from "react-native";
3
4
  import type { AgentSummary, WrapItem } from "../shared/attention";
4
5
  import { type ArchiveOutcome, type KeptRow, keptText, sheetLines, type UnsavedSession, unsavedWords } from "../shared/archive";
@@ -29,7 +30,22 @@ interface KeptProps {
29
30
  }
30
31
 
31
32
  // Finished or out-of-my-hands work whose Paseo sessions are all idle: the cleanup Doing owns [ATT-22].
32
- export function WrapUp({ items, onArchiveAll, kept, onArchiveWorktree, onDismissKept, ...row }: { items: WrapItem[]; onArchiveAll: () => Promise<void> } & RowProps & KeptProps) {
33
+ interface AskProps {
34
+ // Close as completed, with Undo, or Keep open until another PR merges under it [ATT-24].
35
+ onCloseIssue: (item: WrapItem) => void;
36
+ onKeepOpen: (item: WrapItem) => void;
37
+ }
38
+
39
+ export function WrapUp({
40
+ items,
41
+ onArchiveAll,
42
+ kept,
43
+ onArchiveWorktree,
44
+ onDismissKept,
45
+ onCloseIssue,
46
+ onKeepOpen,
47
+ ...row
48
+ }: { items: WrapItem[]; onArchiveAll: () => Promise<void> } & RowProps & KeptProps & AskProps) {
33
49
  const styles = useStyles();
34
50
  const clean = items.filter(cleanSingle);
35
51
  return (
@@ -53,9 +69,13 @@ export function WrapUp({ items, onArchiveAll, kept, onArchiveWorktree, onDismiss
53
69
  }
54
70
  />
55
71
  <CardList>
56
- {items.map((item, index) => (
57
- <WrapRow key={item.key} item={item} first={index === 0} {...row} />
58
- ))}
72
+ {items.map((item, index) =>
73
+ item.wrap.ask ? (
74
+ <AskRow key={item.key} item={item} first={index === 0} busy={row.busy} login={row.login} openSession={row.openAgent} onCloseIssue={onCloseIssue} onKeepOpen={onKeepOpen} />
75
+ ) : (
76
+ <WrapRow key={item.key} item={item} first={index === 0} {...row} />
77
+ ),
78
+ )}
59
79
  {kept.map((keptRow, index) => (
60
80
  <KeptWorktreeRow
61
81
  key={keptRow.workspaceId}
@@ -73,6 +93,33 @@ export function WrapUp({ items, onArchiveAll, kept, onArchiveWorktree, onDismiss
73
93
  );
74
94
  }
75
95
 
96
+ // An open issue whose PRs of mine all merged: "Close #12? #34 and #35 merged 2h ago", Close #12, or × to keep it open until
97
+ // another merges. A session open on the work waits for the usual row, which closing leaves behind [ATT-24].
98
+ function AskRow({
99
+ item,
100
+ first,
101
+ busy,
102
+ login,
103
+ openSession,
104
+ onCloseIssue,
105
+ onKeepOpen,
106
+ }: { item: WrapItem; first: boolean; busy: ReadonlySet<string>; login: string | null; openSession: (agentId: string) => void } & AskProps) {
107
+ const { sessions } = item.wrap;
108
+ const still = sessions.length > 1 ? ` · ${sessions.length} sessions still open` : sessions.length ? " · your session's still open" : "";
109
+ return (
110
+ <CardRow
111
+ first={first}
112
+ mark={stateMark(item)}
113
+ title={item.title}
114
+ meta={{ place: { repo: item.repo, number: item.number, login }, when: `Close #${item.number}? ${item.wrap.finish}${still}`, signals: [] }}
115
+ onOpen={() => (sessions[0] ? openSession(sessions[0].id) : void openExternalUrl(item.url))}
116
+ busy={wrapBusy(busy, item.key)}
117
+ primary={{ label: `Close #${item.number}`, accessibilityLabel: `Close #${item.number} as completed`, icon: "issueClosed", onPress: () => onCloseIssue(item) }}
118
+ secondary={[{ label: "Keep open", icon: "close", accessibilityLabel: `Keep #${item.number} open`, onPress: () => onKeepOpen(item) }]}
119
+ />
120
+ );
121
+ }
122
+
76
123
  // "merged by dave 2h ago · your session's still open": what finishing looked like, then the session it left behind [ATT-22].
77
124
  function wrapMeta({ wrap }: WrapItem): string {
78
125
  const still = wrap.review ? "your review session's still open" : wrap.sessions.length > 1 ? `${wrap.sessions.length} sessions still open` : "your session's still open";
@@ -77,14 +77,14 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
77
77
  |---|---|
78
78
  | Waiting for your reply | Open threads with a mention waiting on me [MEN-01] |
79
79
  | Answered | Issues and PRs I opened where a person commented in the conversation after me, within `mentionDays` (default 30), without mentioning me, and I haven't 👍'd it; opening a thread counts as my last word until I comment. Replies after mine on other people's threads count only with `followThreads` on (Settings → Replies → Follow threads I've commented on, off by default); then my comment must be among the thread's last 10. Reply and Acknowledge clear it, and so does Dismiss until someone comments again [ATT-16, ATT-17, MEN-02] |
80
- | Review requested | PRs requesting my review by name, not via a team [REV-01] |
80
+ | Review requested | PRs requesting my review by name, not via a team [REV-01]. One asked again after I reviewed it has a *review again* chip: GitHub drops my request once I review, so a request alongside a review of mine in `latestReviews` is a re-request, and a push without one doesn't list it [REV-02] |
81
81
  | CI failing | My PRs with failing checks [PRS-01] |
82
82
  | Changes requested | My PRs with requested changes or unresolved threads [PRS-02] |
83
83
  | Ready to merge | My approved PRs without conflicts or failing checks, that GitHub's rules let me merge [PRS-03, PRS-13] |
84
84
  | Needs upstream | My PRs with conflicts or an out-of-sync stack [UPS-01, UPS-02] |
85
85
  | Needs a reviewer | My PRs nobody has been asked to review, even while CI runs [PRS-12]. Only what GitHub records counts as asked: a pending request, an approval or requested changes. GitHub drops a reviewer's request once they review, so a review that only commented, by a person or a bot, leaves it here to re-request; the repo, not us, decides whose approval counts |
86
86
  | My drafts | My drafts, with their own state tags [PRS-05, PRS-06] |
87
- | Wrap up | First, the cleanup: finished or out-of-my-hands work whose unarchived Paseo sessions are all idle, including a review session on someone else's merged PR [ATT-22]. It takes merged, closed and handed-off items, mine or anyone's, including my own PRs I closed without merging ("closed 3h ago, not merged", from the live closed search, never listed in History) and my merged PRs from the same search, which stand in until History has them (`ownClosed` in `server/changes.ts`; History's entry wins) [FRESH-03], as far back as History and its ledger keep, with no age cutoff of its own; a stack or issue group enters only when everything its sessions serve is done, and counts once; one session never makes two rows. A busy session keeps its row out until idle. Newest finish first, each row saying what happened and what is still open: "merged by dave 2h ago · your session's still open", "merged by alice 1d ago · your review session's still open", "2 sessions still open", with an amber "unsaved changes" where a worktree has them. **Archive session** (plural for several) archives the item's agents and the sub-agents they started; a worktree goes too only when it's Paseo's and no other session lives in it, never a local checkout. A sub-agent still running or starting, or flagged for anything but finished or failed (a permission, say), keeps its session's row out, like a busy session; a finished or failed one Paseo still flags for attention doesn't (`subAgentBusy`), as nobody opens a sub-agent and reporting back is its parent's job. One idle session with nothing uncommitted or unpushed archives at once; unsaved or unknown work, or a terminal open in a worktree that goes, asks first in a sheet shaped like Paseo's own "Archive workspace" one: 'Archive "Split invoice PDF"?' when the worktree goes with it (else "Archive the session on #186?"), then each session's lines in Paseo's words ("Uncommitted changes: 2 files (+12 −3)", "1 unpushed commit", "Couldn't check for unsaved changes") and a muted "Closes terminals: dev, shell", with Open session and Archive; a terminal that opened after the sheet brings it back; the multi sheet notes "+1 sub-agent" under a session that has them; several sessions open a sheet listing each one's state with Open; archiving from there checks first too, and any unsaved work it finds gets the naming confirm. **Archive all clean · n** sits in the header with 2+ rows and archives every clean single-session row; it and single archives wait for each other like Got it and Mark all. Success acknowledges exactly the changes present at that moment, so they go to their week as cleared rather than History's unread notes; so does archiving a session Attention Span started in Paseo itself, for what others did up to then, once no session it started is left on that work; a failure keeps the row and says why, and a worktree that stayed after its sessions went keeps a row in Wrap up, uncounted, saying why, briefly, beside the archive mark ("Fix flaky test still in it", "dev server opened meanwhile", "Paseo: worktree is locked") with a button for the reason (Open session, Archive worktree, Try again) and × to dismiss; it goes once the worktree is archived anywhere, and keeps the horizon away until then. Until the session list has loaded, or when it fails, Wrap up isn't known: Doing says so instead of showing the horizon. There is no Undo: Paseo's SDK can't restore a workspace and its agents, so the dirty check and confirmation are the safeguard instead. Its rows count in Doing's and the sidebar's count, and keep the horizon away. |
87
+ | Wrap up | First, the cleanup: finished or out-of-my-hands work whose unarchived Paseo sessions are all idle, including a review session on someone else's merged PR [ATT-22]. It takes merged, closed and handed-off items, mine or anyone's, including my own PRs I closed without merging ("closed 3h ago, not merged", from the live closed search, never listed in History) and my merged PRs from the same search, which stand in until History has them (`ownClosed` in `server/changes.ts`; History's entry wins) [FRESH-03], as far back as History and its ledger keep, with no age cutoff of its own; a stack or issue group enters only when everything its sessions serve is done, and counts once; one session never makes two rows. A busy session keeps its row out until idle. Newest finish first, each row saying what happened and what is still open: "merged by dave 2h ago · your session's still open", "merged by alice 1d ago · your review session's still open", "2 sessions still open", with an amber "unsaved changes" where a worktree has them. **Archive session** (plural for several) archives the item's agents and the sub-agents they started; a worktree goes too only when it's Paseo's and no other session lives in it, never a local checkout. A sub-agent still running or starting, or flagged for anything but finished or failed (a permission, say), keeps its session's row out, like a busy session; a finished or failed one Paseo still flags for attention doesn't (`subAgentBusy`), as nobody opens a sub-agent and reporting back is its parent's job. One idle session with nothing uncommitted or unpushed archives at once; unsaved or unknown work, or a terminal open in a worktree that goes, asks first in a sheet shaped like Paseo's own "Archive workspace" one: 'Archive "Split invoice PDF"?' when the worktree goes with it (else "Archive the session on #186?"), then each session's lines in Paseo's words ("Uncommitted changes: 2 files (+12 −3)", "1 unpushed commit", "Couldn't check for unsaved changes") and a muted "Closes terminals: dev, shell", with Open session and Archive; a terminal that opened after the sheet brings it back; the multi sheet notes "+1 sub-agent" under a session that has them; several sessions open a sheet listing each one's state with Open; archiving from there checks first too, and any unsaved work it finds gets the naming confirm. **Archive all clean · n** sits in the header with 2+ rows and archives every clean single-session row; it and single archives wait for each other like Got it and Mark all. Success acknowledges exactly the changes present at that moment, so they go to their week as cleared rather than History's unread notes; so does archiving a session Attention Span started in Paseo itself, for what others did up to then, once no session it started is left on that work; a failure keeps the row and says why, and a worktree that stayed after its sessions went keeps a row in Wrap up, uncounted, saying why, briefly, beside the archive mark ("Fix flaky test still in it", "dev server opened meanwhile", "Paseo: worktree is locked") with a button for the reason (Open session, Archive worktree, Try again) and × to dismiss; it goes once the worktree is archived anywhere, and keeps the horizon away until then. Until the session list has loaded, or when it fails, Wrap up isn't known: Doing says so instead of showing the horizon. There is no Undo: Paseo's SDK can't restore a workspace and its agents, so the dirty check and confirmation are the safeguard instead. Its rows count in Doing's and the sidebar's count, and keep the horizon away. An open issue whose PRs of mine have all merged, with no PR open for it, gets a row too, with or without a session: "Close #12? #34 and #35 merged 2h ago", **Close #12** (as completed, no comment, Undo reopens) and × for Keep open, which lasts until another PR of mine merges under it (Undo too); its merged PRs' idle sessions join that row instead of making their own, and once it's closed they're the usual row. Archive all clean leaves it [ATT-24]. |
88
88
 
89
89
  **Nothing in Doing** shows a horizon instead of a list (`client/still.tsx`) [ATT-18], with "Nothing's on you. Enjoy the quiet." It follows the device's clock at fixed hours: a low sun in the morning (5–11), a high sun at midday (11–16), a setting sun in the evening (16–21), and a moon with a few stars at night, each in its own soft tint. It settles in on every arrival on the tab (the sky drifts up as it fades in, then its reflections, 700 ms; not with reduced motion), then holds still; when the hour changes while it's open, it crossfades. It shows only after a refresh that worked: before the first one there's a spinner, and after a failed one just the error. Items that are all dismissed count as clear; the "show them again" line sits faintly at the bottom. Wrap up's rows don't: the horizon waits until they're archived too [ATT-22]. Changed by others never touches Doing; it lives in History [HIS-07].
90
90
 
@@ -97,6 +97,7 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
97
97
  - **Handed over** [PRS-08]: my PRs assigned to someone else, and not to me, are left out. Mentions of me on them still count. A PR of mine with nobody assigned is mine.
98
98
  - **Changed by others** [HIS-07] (`server/changes.ts`) keeps a ledger of what others did, in `state.json`, by GitHub's node ids, which a transfer keeps. Only someone else's doing counts; my own actions and others' pushes don't. Merges, unmerged closes and issue closes come from live searches: `mergedBy`, the last close event's actor, and an issue's `stateReason`. A PR that left my hands before it ended counts as the handover, not the merge; one assigned to someone after it ended is still my merge, and a PR someone else has waits a refresh for its lookup rather than be called a merge. Handovers come from GitHub's assign and unassign events, which are separate, never one "handover": a PR is looked up when it's assigned to someone else and not me, once per change of its assignees; it left my hands with whichever came last of my removal and the new owner's assignment, so a PR I took myself off is mine until someone takes it, and an earlier round's removal doesn't name who took it this time; an issue when it leaves my assigned search since the last refresh that worked. Leaving the search proves nothing (search lag, a coverage change, its 50 results), so only an unassign event of me by someone else counts; one closed by then is left to its close note. So unassignments are noticed only for issues Attention Span has seen assigned to me; on the first run none count as gone. A PR seen closed unmerged is tracked; once it drops out of the closed search, as a reopen takes it out, a batch asks for its state and last reopen event. A reopen removes the old close from its week whoever did it, and only someone else's is a note; a merged one stops being tracked, and nothing older than the ledger's window is tracked. A first run tracks from then on, so old closes don't replay as new. A failed lookup, or one node in it GitHub failed on (anything but not found), is asked again on the next refresh. A PR handed over isn't listed under the finished issue it closed either; when a cleared handover's work comes back to me it stays in its week, marked returned, so my later work on it is mine again. Events are kept `historyWeeks` + 1 weeks, or `mentionDays` if longer; unread notes expire after `mentionDays` for History's top section.
99
99
  - **Wrap up** [ATT-22] (`shared/wrap-up.ts`, drawn by `client/wrap-up.tsx`) is assembled on the client from the sessions the screen and the sidebar already poll; the server archives and acknowledges. An item's identity is `memberKeys` in `shared/attention.ts`: its key, the PRs under it and the work a change note is about, spelled as GitHub spells them since Paseo's labels match exactly, and compared ignoring case (`shared/names.ts`, as all GitHub names are); Wrap up, archiving and acknowledging all use it. A finished item, reviewed PR, my own unmerged close, cleared change or unread change is a candidate; its sessions are the ones on any of its member keys. It enters when it has at least one unarchived session, every one is idle (not working and not needing me), none serves an item still in Doing or Waiting, and no session already belongs to another row. History lists a merged PR alone, as its branches are gone, so each live refresh remembers every open stack's and issue group's keys under each member (`groups` in `state.json`, kept as long as the ledger): a merged member whose remembered sibling is still open stays out, and so does its session. The screen freezes rows whose archive runs and Archive all clean while any row's archive runs (`shared/got-it.ts`). Archiving goes through `paseo.agents.ref(id).archive()`, sub-agents first (found by Paseo's `paseo.parent-agent-id` label, `subAgentsOf` in `shared/linked-sessions.ts`; one in another workspace is archived, its workspace left alone; archive lists every page of agents, archived ones too, so one under an archived sub-agent still counts, and a sub-agent that won't archive and stays open stops the archive before its session goes); a Paseo worktree is archived too, through `paseo.workspaces.archive`, which archives everything in it, only when every unarchived agent in it is being archived, and a local checkout never is. Workspaces are named as Paseo's sidebar names them: the title, else the branch. A worktree that stays is a `KeptRow` in `state.json` (`kept`) with its row's item; the `workspace.archived` hook forgets it, and remembers the workspace so an archive still running doesn't add it back, Dismiss forgets it, and Archive worktree or Try again runs the same checks on the worktree alone (`rpc.archiveWorktree`). Paseo closes a worktree's terminals when it archives it, so they're listed (`paseo.terminals.list`) right before archiving and named on the sheet; the confirm sends back the ids it named, and any other asks again. They're listed once more right before each worktree goes: one that opened while the sessions were being archived keeps its worktree, said in its kept row, as Paseo's SDK has no archive that checks and removes at once. Terminals that can't be listed don't keep the worktree, as Paseo would close them anyway. The plugin SDK says nothing of what a terminal runs, so an idle shell and a dev server are named alike. The dirty check reads Paseo's workspace snapshot and, for counts, `git status --porcelain`, `git diff --shortstat HEAD` for lines, and `git rev-list --count @{upstream}..HEAD` (with no upstream, `HEAD --not --remotes`) on the daemon host. Clean needs both answers: when either can't say, it's treated as dirty and the sheet says so (`unsavedOf` in `shared/archive.ts`, for the server and the screen alike). Agents and their status are listed again right before archiving, so a session that started working during the checks, or one that moved into the worktree, stops it. A session Attention Span started, archived in Paseo itself, is caught by the `agent.archived` hook in `index.server.ts` (`server/archived.ts`), even with the screen closed: once no other open session labelled with any key of its item's group is left, the group's changes up to the archive's `archivedAt` are acknowledged, so what others do later still shows. A sub-agent's archive, a restored session and a session without an item label acknowledge nothing; sessions linked only by their workspace neither acknowledge nor hold an acknowledgement back. Lists read every page, and a lookup that fails is tried again on the next hook event or list request, never taken as "none left"; tries are kept in memory, so an archive while the server isn't running, or one pending at a restart, isn't noticed, and Got it or Mark all clears its notes. A new list that brings other merged branches polls again at once, so a session linked by branch doesn't wait for the next round. When a session leaves the screen's 15-second poll (`useItemAgents` in `client/sessions.ts`, shared with the sidebar), the screen reads the server's view from memory first, so the notes acknowledged for it are cleared before its Wrap up row goes. Paseo's SDK has no `restoreWorkspace`, so there is no Undo; `server/archive.ts` confirms instead.
100
+ - **Close #12?** [ATT-24] (`classifyCloseAsks` in `server/classify.ts`): after History's searches, the issues my merged PRs refer to that History doesn't know closed (`mergedToLookUp` in `server/references.ts`, at most 100) are looked up, a batch per request, for their state and the open PRs GitHub links to them, anyone's. A merged PR is put under an issue as `issueFor` picks one, counting History's closed issues as issues so a PR that closed one isn't put under another it mentions. An issue that's open, with no linked PR open, is asked about (`asks` in `state.json`'s History); as History is fetched daily, each live refresh looks the asked issues up again (`askOff`, one batched request while any is asked; one that can't be looked up keeps asking); the view leaves out one with a PR of mine open under it in the live feed (a mention or answer on the issue alone doesn't count), one Next up knows has anyone's PR open, one the live lookup found closed or with a PR open, one whose latest merge is older than History's weeks, one kept open (`keptOpen`: the latest merge then, so a later one asks again; kept for History's weeks, so an ask missing from one fetch doesn't lose it) and one I just closed. Closing goes through `rpc.closeIssue`, its done item carrying the merged PRs with their branches, so a session linked by branch keeps its row, whether the issue is assigned to me or not; as History's search only finds closed issues assigned to me, it's kept in `closedAsks` for History's weeks, listed in History with its PRs under it rather than alone, and Undo forgets it; Next up's card gets a "PRs merged" pill (`prsMerged`).
100
101
 
101
102
  - **Dismiss** [ATT-08] hides an item until someone other than me comments, reviews or pushes, or its reason changes. My own actions and CI reruns don't bring it back.
102
103
  - **Behind base** [UPS-07] only matters when:
@@ -130,7 +131,7 @@ An agent icon (Tabler's `message-ai`, a speech bubble with "AI") marks every act
130
131
  |---|---|---|
131
132
  | Reply ↗ | Mention waiting | Opens the comment on GitHub [ATT-12] |
132
133
  | Acknowledge | Mention waiting | Lists every waiting comment in full, rendered as Markdown with Paseo's renderer (cut after whole blocks, up to about 4,000 characters), all ticked; 👍 on the ones I keep ticked (`addReaction`), which clears them [MEN-07]. Undo removes them. |
133
- | Review *(agent)* | Review requested | Session in a PR checkout using the review profile [SES-01]. For a stack, "Review stack": one session in a checkout of the stack's top, whose prompt lists every branch and asks for a review of only the PRs requesting mine, each against its own base, with their descriptions and recent comments as context [ATT-04] |
134
+ | Review *(agent)* | Review requested | Session in a PR checkout using the review profile [SES-01]. For a stack, "Review stack": one session in a checkout of the stack's top, whose prompt lists every branch and asks for a review of only the PRs requesting mine, each against its own base, with their descriptions and recent comments as context [ATT-04]. Asked again, it's "Review again": its stack entry carries when and on which commit I reviewed it (`latestReviews { commit { oid } }`, in the same search). A new session's context adds, per PR asked again, what I wrote in my reviews (asked for by my login, so others' can't crowd them out), the threads I'm in with their replies and whether they're resolved, and how to find the commits since: `git diff <reviewed>..<head>`, or the author's own commits and the merge's conflict resolutions when the base was merged in since, `git range-diff <reviewed>...<head>` after a rebase or force-push, ignoring commits that came with the base or a rebased parent, or the whole diff when the commit is gone; the built-in Review prompt asks about what changed and how each earlier comment was taken up. With a Review session still open, the button opens it, as for any session on an item [SES-03]; a new one gets the context above [REV-02] |
134
135
  | Fix CI / Address comments *(agent)* | CI failing / changes requested | Session with the failing log or unresolved threads in the prompt [SES-04] |
135
136
  | Rerun failed jobs | CI failing, in the sheet | `gh run rerun --failed` for each failing GitHub Actions run of the PR, or of every PR of mine in its stack. Its line, fetched when the sheet opens, says in one line how many failed, which (a matrix's jobs as one, "e2e ×3"; a job alone by its full name), and whether they were rerun before (`gh api …/runs/<id>`), in amber once they were, a hint they may not be flaky: "7 failed · lint, e2e ×3, unit ×2 · ↻ rerun once". Hovering it lists every check by full name; on phones it wraps to two lines instead. Other status checks can't be rerun from here, so they're dimmer. It can be pressed before the checks are in: the sheet closes, and it reruns once they are (`shared/checks.ts`) [PRS-09]. |
136
137
  | Update branch | Behind with no conflicts, not stacked | `updatePullRequestBranch` (rebase) [UPS-03] |
package/index.server.ts CHANGED
@@ -55,6 +55,7 @@ export default function contribute(server: PluginServerContext) {
55
55
  }).then(shown),
56
56
  );
57
57
  server.handle(rpc.dismissItem, ({ key }) => ready(() => attention.dismiss(key)).then(shown));
58
+ server.handle(rpc.keepOpen, ({ key, on }) => ready(() => attention.keepOpen(key, on)).then(shown));
58
59
  server.handle(rpc.undismissItem, ({ key }) => ready(() => attention.undismiss(key)).then(shown));
59
60
  server.handle(rpc.gotIt, ({ ids, on }) => ready(() => attention.gotIt(ids, on)).then(shown));
60
61
  server.handle(rpc.setHistoryFilter, ({ filter }) => ready(() => attention.setHistoryFilter(filter)).then(shown));
@@ -90,6 +91,7 @@ export default function contribute(server: PluginServerContext) {
90
91
  server.handle(rpc.setScopes, ({ scopes }) => ready(() => attention.setScopes(scopes)).then(() => ({ ok: true as const })));
91
92
  server.handle(rpc.setSources, ({ sources }) => ready(() => attention.setSources(sources)).then(() => ({ ok: true as const })));
92
93
  server.handle(rpc.setProjectFilter, ({ projects }) => ready(() => attention.setProjectFilter(projects)).then(() => ({ ok: true as const })));
94
+ server.handle(rpc.setUnclaimedByRepo, ({ on }) => ready(() => attention.setUnclaimedByRepo(on)).then(shown));
93
95
  server.handle(rpc.setNewIssueChoice, ({ repo, profileId }) => ready(() => attention.setNewIssueChoice(repo, profileId)).then(() => ({ ok: true as const })));
94
96
  server.handle(rpc.projectsAccess, () => ready(() => attention.projectsAccess(true)));
95
97
  server.handle(rpc.updateBranch, ({ key, target }) => act(key, () => updateBranch(target), chip("updating")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrioid/paseo-attention-span",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "For when your attention is spread thin: the GitHub issues and pull requests waiting on you, grouped by why, with one-tap Paseo sessions.",
5
5
  "license": "MIT",
6
6
  "repository": {