@andrioid/paseo-attention-span 0.4.14 → 0.6.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.
Files changed (56) hide show
  1. package/OVERVIEW.md +13 -5
  2. package/README.md +2 -2
  3. package/client/attention-screen.tsx +140 -143
  4. package/client/card.tsx +4 -2
  5. package/client/history.tsx +189 -0
  6. package/client/icons.ts +3 -1
  7. package/client/mark.ts +19 -0
  8. package/client/next-up.tsx +16 -2
  9. package/client/sessions.ts +50 -3
  10. package/client/still.tsx +70 -27
  11. package/client/ui.tsx +3 -3
  12. package/client/wrap-up.tsx +197 -0
  13. package/docs/architecture.md +17 -10
  14. package/docs/screenshots/desktop-dark-doing-acknowledge.png +0 -0
  15. package/docs/screenshots/desktop-dark-doing-clear.png +0 -0
  16. package/docs/screenshots/desktop-dark-doing-issue-sheet.png +0 -0
  17. package/docs/screenshots/desktop-dark-doing-reviewers.png +0 -0
  18. package/docs/screenshots/desktop-dark-doing-sheet.png +0 -0
  19. package/docs/screenshots/desktop-dark-doing-wrap-dirty.png +0 -0
  20. package/docs/screenshots/desktop-dark-doing-wrap-multi.png +0 -0
  21. package/docs/screenshots/desktop-dark-doing-wrap.png +0 -0
  22. package/docs/screenshots/desktop-dark-doing.png +0 -0
  23. package/docs/screenshots/desktop-dark-history-filtered.png +0 -0
  24. package/docs/screenshots/desktop-dark-history-groups.png +0 -0
  25. package/docs/screenshots/desktop-dark-history.png +0 -0
  26. package/docs/screenshots/desktop-dark-next-up-setup.png +0 -0
  27. package/docs/screenshots/desktop-dark-next-up.png +0 -0
  28. package/docs/screenshots/desktop-dark-settings.png +0 -0
  29. package/docs/screenshots/desktop-dark-setup.png +0 -0
  30. package/docs/screenshots/desktop-dark-waiting.png +0 -0
  31. package/docs/screenshots/phone-dark-doing.png +0 -0
  32. package/docs/screenshots/phone-dark-history.png +0 -0
  33. package/docs/screenshots/phone-light-next-up-filtered.png +0 -0
  34. package/index.client.tsx +6 -1
  35. package/index.server.ts +21 -2
  36. package/package.json +9 -3
  37. package/requirements.yaml +13 -9
  38. package/server/archive.ts +132 -0
  39. package/server/archived.ts +120 -0
  40. package/server/changes.ts +184 -26
  41. package/server/classify.ts +9 -2
  42. package/server/fixture.ts +71 -12
  43. package/server/github-types.ts +29 -5
  44. package/server/queries.ts +33 -7
  45. package/server/service.ts +90 -19
  46. package/server/store.ts +10 -3
  47. package/server/view.ts +14 -5
  48. package/shared/archive.ts +37 -0
  49. package/shared/attention.ts +85 -8
  50. package/shared/changes.ts +26 -11
  51. package/shared/got-it.ts +23 -0
  52. package/shared/history-report.ts +61 -0
  53. package/shared/rpc.ts +23 -4
  54. package/shared/still.ts +29 -7
  55. package/shared/wrap-up.ts +126 -0
  56. package/docs/screenshots/desktop-dark-history-reviewed.png +0 -0
@@ -0,0 +1,197 @@
1
+ import { useState } from "react";
2
+ import { Text, View } from "react-native";
3
+ import type { AgentSummary, WrapItem } from "../shared/attention";
4
+ import type { ArchiveOutcome, UnsavedSession } from "../shared/archive";
5
+ import { allWrapBusy, wrapBusy } from "../shared/got-it";
6
+ import { cleanSingle, sessionCleanliness, unsavedText } from "../shared/wrap-up";
7
+ import { CardList, CardRow } from "./card";
8
+ import { stateMark } from "./mark";
9
+ import { Modal } from "./sheet";
10
+ import { Button, KeepStyles, SectionHeader, TablerIcon, useStyles } from "./ui";
11
+
12
+ // Doing's Wrap up: finished or out-of-my-hands work whose sessions are still open, and archiving them [ATT-22]. The screen
13
+ // assembles the rows and runs the archive; these draw them and ask before archiving anything unsaved.
14
+
15
+ interface RowProps {
16
+ busy: ReadonlySet<string>;
17
+ login: string | null;
18
+ // Previews have made-up sessions: their snapshot is the answer, as there's no daemon to ask.
19
+ fixture: boolean;
20
+ openAgent: (agentId: string) => void;
21
+ onArchive: (item: WrapItem, confirm: boolean) => Promise<ArchiveOutcome | null>;
22
+ }
23
+
24
+ // Finished or out-of-my-hands work whose Paseo sessions are all idle: the cleanup Doing owns [ATT-22].
25
+ export function WrapUp({ items, onArchiveAll, ...row }: { items: WrapItem[]; onArchiveAll: () => Promise<void> } & RowProps) {
26
+ const styles = useStyles();
27
+ const clean = items.filter(cleanSingle);
28
+ return (
29
+ <View>
30
+ <SectionHeader
31
+ icon="archive"
32
+ title="Wrap up"
33
+ count={items.length}
34
+ action={
35
+ items.length > 1 && clean.length > 0 ? (
36
+ <View style={styles.overCard}>
37
+ <Button
38
+ label={`Archive all clean · ${clean.length}`}
39
+ icon="archive"
40
+ variant="ghost"
41
+ disabled={allWrapBusy(row.busy, items.map((item) => item.key))}
42
+ onPress={() => void onArchiveAll()}
43
+ />
44
+ </View>
45
+ ) : null
46
+ }
47
+ />
48
+ <CardList>
49
+ {items.map((item, index) => (
50
+ <WrapRow key={item.key} item={item} first={index === 0} {...row} />
51
+ ))}
52
+ </CardList>
53
+ </View>
54
+ );
55
+ }
56
+
57
+ // "merged by dave 2h ago · your session's still open": what finishing looked like, then the session it left behind [ATT-22].
58
+ function wrapMeta({ wrap }: WrapItem): string {
59
+ 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";
60
+ return `${wrap.finish} · ${still}`;
61
+ }
62
+
63
+ function WrapRow({ item, first, busy, login, fixture, openAgent: openSession, onArchive }: { item: WrapItem; first: boolean } & RowProps) {
64
+ const styles = useStyles();
65
+ const { sessions } = item.wrap;
66
+ const [sheet, setSheet] = useState<"multi" | "dirty" | null>(null);
67
+ const [unsaved, setUnsaved] = useState<UnsavedSession[]>([]);
68
+ const dirty = sessions.some((session) => sessionCleanliness(session) === "dirty");
69
+ const press = async () => {
70
+ if (sessions.length > 1) return setSheet("multi");
71
+ // A preview has no daemon to ask; its made-up snapshot is the answer. Elsewhere the server checks git too, so the sheet
72
+ // can name the files and commits it found.
73
+ if (sessionCleanliness(sessions[0]) !== "clean" && fixture) {
74
+ setUnsaved([dirtyFallback(sessions[0])]);
75
+ return setSheet("dirty");
76
+ }
77
+ const outcome = await onArchive(item, false);
78
+ if (outcome && !outcome.ok && outcome.reason === "unsaved") {
79
+ setUnsaved(outcome.sessions);
80
+ setSheet("dirty");
81
+ }
82
+ };
83
+ // The multi sheet asks the server first, like a single row; unsaved work it finds gets the confirm that names it [ATT-22].
84
+ const confirm = async (confirm: boolean) => {
85
+ const outcome = await onArchive(item, confirm);
86
+ if (outcome?.ok) return setSheet(null);
87
+ if (outcome && outcome.reason === "unsaved") {
88
+ setUnsaved(outcome.sessions);
89
+ setSheet("dirty");
90
+ }
91
+ };
92
+ return (
93
+ <CardRow
94
+ first={first}
95
+ mark={stateMark(item)}
96
+ title={item.title}
97
+ meta={{
98
+ place: { repo: item.repo, number: item.number, login },
99
+ when: wrapMeta(item),
100
+ signals: dirty ? [{ text: "unsaved changes", tone: "warn" }] : [],
101
+ }}
102
+ onOpen={() => (sessions.length > 1 ? setSheet("multi") : sessions[0] ? openSession(sessions[0].id) : undefined)}
103
+ busy={wrapBusy(busy, item.key)}
104
+ primary={{
105
+ label: sessions.length > 1 ? "Archive sessions" : "Archive session",
106
+ accessibilityLabel: `Archive the ${sessions.length > 1 ? "sessions" : "session"} on #${item.number}`,
107
+ icon: "archive",
108
+ onPress: () => void press(),
109
+ }}
110
+ secondary={[{ label: `Details for #${item.number}`, icon: "chevronRight", onPress: () => (sessions.length > 1 ? setSheet("multi") : sessions[0] ? openSession(sessions[0].id) : undefined) }]}
111
+ overlay={
112
+ sheet === "multi" ? (
113
+ <Modal title={`Sessions on #${item.number}`} open onOpenChange={(open) => (open ? null : setSheet(null))}>
114
+ <Modal.Content>
115
+ <KeepStyles styles={styles}>
116
+ <Text style={styles.muted}>
117
+ {item.title} · {item.wrap.finish}
118
+ </Text>
119
+ <View style={[styles.card, { backgroundColor: styles.c.surface2 }]}>
120
+ {sessions.map((session, index) => (
121
+ <View key={session.id} style={[styles.row, { paddingVertical: 10, paddingHorizontal: 12 }, index > 0 ? styles.divider : null]}>
122
+ <TablerIcon name="agent" size={16} />
123
+ <View style={{ flex: 1, gap: 2 }}>
124
+ <Text style={styles.text}>{session.title ?? "Session"}</Text>
125
+ <Text style={styles.muted}>{sessionStateText(session)}</Text>
126
+ </View>
127
+ <Button label="Open" variant="ghost" onPress={() => openSession(session.id)} />
128
+ </View>
129
+ ))}
130
+ </View>
131
+ <Text style={styles.muted}>
132
+ Archives {sessions.length} sessions. Their worktrees go too when nothing else lives in them
133
+ {sessions.some((session) => sessionCleanliness(session) === "unknown") ? "; the one that couldn't be checked may hold unsaved work" : ""}.
134
+ </Text>
135
+ <View style={[styles.row, { justifyContent: "flex-end" }]}>
136
+ <Button label="Cancel" onPress={() => setSheet(null)} />
137
+ <Button label={sessions.length === 2 ? "Archive both" : `Archive ${sessions.length}`} variant="danger" onPress={() => void confirm(false)} />
138
+ </View>
139
+ </KeepStyles>
140
+ </Modal.Content>
141
+ </Modal>
142
+ ) : sheet === "dirty" ? (
143
+ <Modal title={sessions.length > 1 ? `Archive the sessions on #${item.number}?` : `Archive the session on #${item.number}?`} open onOpenChange={(open) => (open ? null : setSheet(null))}>
144
+ <Modal.Content>
145
+ <KeepStyles styles={styles}>
146
+ {(unsaved.length ? unsaved : [dirtyFallback(sessions[0])]).map((info) => (
147
+ <View key={info.agentId} style={{ gap: 2 }}>
148
+ <Text style={styles.text}>{info.title ?? "Session"}</Text>
149
+ <Text style={{ color: styles.c.statusWarning, fontSize: 13 }}>
150
+ {info.unknown ? "Couldn't check for unsaved changes. Archiving may remove the worktree." : `Its worktree has ${unsavedTextFrom(info)}. Archiving may remove them.`}
151
+ </Text>
152
+ </View>
153
+ ))}
154
+ <View style={[styles.row, { justifyContent: "flex-end" }]}>
155
+ <Button label="Open session" icon="agent" variant="calm" onPress={() => openSession(unsaved[0]?.agentId ?? sessions[0].id)} />
156
+ <Button label="Archive anyway" variant="danger" onPress={() => void confirm(true)} />
157
+ </View>
158
+ </KeepStyles>
159
+ </Modal.Content>
160
+ </Modal>
161
+ ) : null
162
+ }
163
+ />
164
+ );
165
+ }
166
+
167
+ // What a session in Wrap up's multi sheet says about its worktree [ATT-22].
168
+ function sessionStateText(session: AgentSummary): string {
169
+ const state = sessionCleanliness(session);
170
+ if (state === "clean") return "idle · nothing unsaved";
171
+ if (state === "dirty") return `idle · ${unsavedText(session)}`;
172
+ return "idle · couldn't check for unsaved changes";
173
+ }
174
+
175
+ function dirtyFallback(session: AgentSummary | undefined): UnsavedSession {
176
+ const workspace = session?.workspace;
177
+ return session
178
+ ? {
179
+ agentId: session.id,
180
+ title: session.title,
181
+ ...(workspace?.branch ? { branch: workspace.branch } : {}),
182
+ ...(workspace?.dirtyFiles ? { files: workspace.dirtyFiles } : {}),
183
+ ...(workspace?.ahead ? { commits: workspace.ahead } : {}),
184
+ ...(sessionCleanliness(session) === "unknown" ? { unknown: true as const } : {}),
185
+ }
186
+ : { agentId: "", title: null, unknown: true };
187
+ }
188
+
189
+ // "2 uncommitted files and 1 unpushed commit on branch", from the archive check's git counts [ATT-22].
190
+ function unsavedTextFrom(info: UnsavedSession): string {
191
+ if (info.unknown) return "changes Paseo couldn't check";
192
+ const parts: string[] = [];
193
+ if (info.files) parts.push(`${info.files} uncommitted file${info.files === 1 ? "" : "s"}`);
194
+ if (info.commits) parts.push(`${info.commits} unpushed commit${info.commits === 1 ? "" : "s"}`);
195
+ const what = parts.join(" and ") || "unsaved changes";
196
+ return info.branch ? `${what} on ${info.branch}` : what;
197
+ }
@@ -40,7 +40,7 @@ flowchart LR
40
40
  - optional merge method per repo [PRS-04]
41
41
  - `codeRepos`: where an issue repo's code lives, for issues kept in their own repo [SES-07]
42
42
  - `nextUp`: where unclaimed issues come from (`mine`, `orgs`, `repos`, set in Settings) and the org issue fields for priority, effort and scope [NXT-04]
43
- - `state.json`: dismissals [ATT-08], what others did to my work, with which notes I've cleared [ATT-21, HIS-06], the scopes, sources and project statuses ticked in Next up's filter [NXT-03, NXT-09], my Paseo projects' GitHub repos [NXT-08], the update put off with Not now [UPD-01] and the last fetch of each feed, so the screen shows instantly after a restart [PRIV-01].
43
+ - `state.json`: dismissals [ATT-08], what others did to my work, with which notes I've cleared or an archive acknowledged [HIS-06, HIS-07, ATT-22], Reviewed and Changed by others shown in History's weeks [HIS-07], the scopes, sources and project statuses ticked in Next up's filter [NXT-03, NXT-09], my Paseo projects' GitHub repos [NXT-08], the update put off with Not now [UPD-01] and the last fetch of each feed, so the screen shows instantly after a restart [PRIV-01].
44
44
 
45
45
  ## Tabs
46
46
 
@@ -48,7 +48,7 @@ The tabs tell the story of my work, left to right: what I finished, what needs m
48
48
 
49
49
  | Tab | Shows |
50
50
  |---|---|
51
- | History | The last `historyWeeks` (default 4) by week, newest first, in the device's time zone: issues assigned to me that closed, with the PRs that closed them, and my other merged PRs [HIS-01]. Per week, a collapsed "Reviewed · n" lists others' merged PRs I reviewed [HIS-02], and a collapsed "Closed or handed off · n" my PRs someone else closed without merging and work taken out of my hands, each in the same words as Changed by others, with no week copy [HIS-06]; each opens on its own, a chevron saying which are open. A PR that left my hands isn't listed as done even once its new owner merges it. A PR of mine someone else merged says so: "merged 2h ago by dave", with its copied line unchanged; under the issue it closed, its row in the sheet says "merged by dave" [HIS-05]. The copy icon on a week's heading copies its finished items, not the reviews, as a Markdown list of links; an issue and the PRs that closed it are one line, linking the issue; an issue closed as not planned isn't copied, and PRs that referred to it are listed on their own [HIS-03]. Each card has a plain chip (bug, feature or task) for what kind of work it was, and each copied line leads with its emoji: 🐞, 🚀 or 🔧; a PR of none of those leads with 🔀 and has no chip, an issue of none leads with nothing [HIS-04]. The first of these that names a kind decides: the issue type, the labels (bug beats feature beats task), a Conventional Commit title prefix (`fix:` bug, `feat:` feature, `chore:`, `refactor:`, `docs:`, `build:`, `ci:`, `test:`, `perf:`, `style:` task). Types and labels match only as whole names, ignoring case, emoji and wrappers like `type:` or `kind/`, so "bug", "Type: Bug 🐞" and "kind/bug" count but "not a bug" and "bug bash" don't. Until History is fetched again, what I just finished uses the issue type and title only. |
51
+ | History | The last `historyWeeks` (default 4) by week, newest first, in the device's time zone [HIS-01]; which items each week shows and copies is `shared/history-report.ts`, drawn by `client/history.tsx`. Above the weeks, **Changed by others** lists the unread notes, newest first: my PR merged or closed unmerged by someone else, an issue assigned to me closed by someone else as completed or not planned, a PR of mine reopened by someone else after Attention Span saw it closed, my PR or issue taken over or handed on, or me unassigned from an issue. Each is a row in the same words ("merged by dave 2h ago", "closed by alice 6h ago as completed", "reopened by bob 1h ago", "phil took over", "bob unassigned you 8d ago"), its tile showing what happened [HIS-07]. **Got it**, an icon-only check in the main action's style, clears one (Undo brings it back); with two or more, a ghost **✓ Mark all as read** clears the notes on screen, one Undo bringing them all back, and the two wait for each other in `shared/got-it.ts`. A note about work already in Doing's Wrap up waits there instead, because archiving it is the acknowledgement; unread notes expire after `mentionDays` (default 30). They never count in Doing's count, the sidebar's or the horizon, and the History tab shows a green dot and says "unread changes" to screen readers while any is unread. **Filter** between the notes and the weeks opens a sheet, *Show in each week*: Finished (always, disabled), Reviewed and Changed by others, both off at first and remembered in `state.json`; the button reads "Filter · n" in green when on. With Reviewed on, each week shows a labelled **Reviewed** list of others' merged PRs I reviewed [HIS-02]; with Changed by others on, a labelled list of its cleared notes that aren't already finished work, like a PR closed unmerged, a handover or a reopen [HIS-06, HIS-07]. These replace the old collapsed disclosures. Each week's count is its finished items. A PR of mine someone else merged says so: "merged 2h ago by dave", with its copied line unchanged; under the issue it closed, its row in the sheet says "merged by dave" [HIS-05]. An issue someone else closed says "closed 6h ago by alice" too. A merge or issue close the live refresh sees fills its week at once, before History's daily fetch; when the fetch catches up, its richer card takes the live one's place [HIS-07]. A PR that left my hands isn't listed as done even once its new owner merges it; a handover cleared into a week stays there if the work comes back to me, but doesn't hide what I later finish [HIS-06]. The copy icon on a week's heading copies what's shown as Markdown lists of links, per kind: Finished, plus Reviewed when shown, separated by `## Finished` and `## Reviewed` headings; never Changed by others; an issue and the PRs that closed it are one line, linking the issue; an issue closed as not planned isn't copied, and PRs that referred to it are listed on their own [HIS-03]. Each card has a plain chip (bug, feature or task) for what kind of work it was, and each copied line leads with its emoji: 🐞, 🚀 or 🔧; a PR of none of those leads with 🔀 and has no chip, an issue of none leads with nothing [HIS-04]. The first of these that names a kind decides: the issue type, the labels (bug beats feature beats task), a Conventional Commit title prefix (`fix:` bug, `feat:` feature, `chore:`, `refactor:`, `docs:`, `build:`, `ci:`, `test:`, `perf:`, `style:` task). Types and labels match only as whole names, ignoring case, emoji and wrappers like `type:` or `kind/`, so "bug", "Type: Bug 🐞" and "kind/bug" count but "not a bug" and "bug bash" don't. Until History is fetched again, what I just finished uses the issue type and title only. |
52
52
  | Doing | The sections below |
53
53
  | Waiting | My work where someone else has the next move [WAI-01]: *Waiting for review* (while GitHub records a review as owed: a pending request, or an approval or requested changes; or approved but blocked by a repo rule [PRS-13]), *Waiting for the reviewer* (after I replied or pushed), *CI running*, *Questions I asked* (threads where my comment is the last from a person, bots don't count, and my comments since someone else last spoke ask something: a question mark outside quotes, code and links, read from GitHub's rendered comments (`bodyHTML`) so code and links count however they were written; a statement, tagged or not, waits on nobody and isn't listed): on my own issues however old, on others' only while my comment is within `mentionDays` [ATT-11]. Each shows who it waits on, never a guess [WAI-02]: on a PR, the reviewers currently requested and, after I replied, whoever requested changes, but nobody when a repo rule blocks it; on a question, the people and teams my comments since the last answer tag, read from GitHub's rendered comments (`bodyHTML`), where only real accounts and teams I can see are linked, never in code; tags in quotes don't count, and only the last 10 comments are read. Waiting groups it all by who it waits on, not by those reasons [WAI-01]: one group per person or team (a person tagged with other capitals is one), whoever blocks the most items first, ties by whose oldest item has waited longest, then requested bots, who can't be nudged, and last *Not on a person* for work nobody is on record for. In each group, work with a session that needs me leads, then one that's working, then the rest, oldest first; a finished session I've seen doesn't lift it. Work waiting on several is under each, saying "also waiting on" the rest, and counts once in the tab. Each card says why it waits (review, re-review or question; nothing where its chips say, like approved, blocked by repo rules, or CI running) and since when. A group's **Copy list** copies its items oldest first as a Markdown list, each line led by why and how long ("- Review 2h: [title](url)"), for a nudge; a requested bot gets none [WAI-03]. My PRs in Doing that wait on people or teams I asked, approved or not, are listed here too, under each of them [PRS-15]. Once something has waited `waitingTooLongDays` (default 3), its age turns amber with ⌛ and says so on hover, but only where a nudge is fair: not while CI fails or runs, nor with conflicts, changes to make or a reply I owe (`nudgeable` in `server/rules.ts`) [ATT-11]. In Doing, one person shows by name, several by picture, named on hover and in the sheet. |
54
54
  | Next up | *Assigned to you* [NXT-06], then *Unclaimed* [NXT-01] |
@@ -63,7 +63,11 @@ Screenshots, from the preview's made-up data, are in [screenshots/](screenshots/
63
63
 
64
64
  | Doing | History | Next up (phone) |
65
65
  |---|---|---|
66
- | ![Doing](screenshots/desktop-dark-doing.png) | ![History](screenshots/desktop-dark-history-reviewed.png) | ![Next up](screenshots/phone-light-next-up-filtered.png) |
66
+ | ![Doing](screenshots/desktop-dark-doing.png) | ![History](screenshots/desktop-dark-history.png) | ![Next up](screenshots/phone-light-next-up-filtered.png) |
67
+
68
+ | Doing, Wrap up | History, both lists | History on a phone |
69
+ |---|---|---|
70
+ | ![Wrap up](screenshots/desktop-dark-doing-wrap.png) | ![Reviewed and changes](screenshots/desktop-dark-history-groups.png) | ![History](screenshots/phone-dark-history.png) |
67
71
 
68
72
  ### Doing
69
73
 
@@ -80,9 +84,9 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
80
84
  | Needs upstream | My PRs with conflicts or an out-of-sync stack [UPS-01, UPS-02] |
81
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 |
82
86
  | My drafts | My drafts, with their own state tags [PRS-05, PRS-06] |
83
- | Changed by others | Notes, not work: someone else merged my PR, closed it without merging, took over or handed on my PR or an issue assigned to me, or unassigned me from one. One row per event, newest first, its tile showing what happened (merged green, closed red, handed over or unassigned amber) and its meta saying it in words: "merged by dave 2h ago", "closed by alice 1d ago, not merged", "phil took over 5h ago" (the same person took me off and assigned themselves), "dave handed it to carol 2d ago" (the one named is who took me off it, else, on a PR nobody had, who assigned the new owner), "bob unassigned you 3d ago"; without a name where GitHub has none. **Got it** clears a row (Undo brings it back); it has no Dismiss and nothing to start. Rows sit outside issue and stack grouping, don't count toward Doing's count or the sidebar's, and keep Doing from showing the horizon until cleared. Within `mentionDays` (default 30), so a first run catches up that far. A handover's row goes away if the work is mine again before Got it [ATT-21] |
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), 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; a worktree goes too only when it's Paseo's and nothing else lives in it, never a local checkout. One idle session with nothing uncommitted or unpushed archives at once; unsaved or unknown work asks first in a sheet naming it ("2 uncommitted files and 1 unpushed commit on split-invoice-pdf", or "Couldn't check for unsaved changes") with Open session and Archive anyway; 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 wouldn't go after its sessions did is said in an error toast. 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. |
84
88
 
85
- **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. Changed by others notes don't: the horizon waits until they're cleared [ATT-21].
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].
86
90
 
87
91
  ## Rules
88
92
 
@@ -91,7 +95,9 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
91
95
  - **Answers** [ATT-16]: on an issue a PR of mine closes, an answer leads the item like a mention does. From the issue itself only what's on me counts; its PRs say how the work is going.
92
96
  - **Mentions** [MEN-01..06]: a thread counts when a person @-mentioned me after my last comment, review or reaction there. Team mentions are ignored. A bot counts only when it opened a thread I need to resolve, and is marked with 🤖. The quote on a card is cut around the mention, so it's shown as plain text: links keep their text, Markdown marks and quoted replies go.
93
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.
94
- - **Changed by others** [ATT-21] (`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, issue closes and others' pushes don't. Merges and closes come from the live `ended` search: `mergedBy`, or the last close event's actor. 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 stays silent. So unassignments are noticed only for issues Attention Span has seen assigned to me; on the first run none count as gone. 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. Events are kept `historyWeeks` + 1 weeks, or `mentionDays` if longer.
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
+ - **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; 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()`; a Paseo worktree is archived too only when every unarchived agent in it is being archived, and a local checkout never is. The dirty check reads Paseo's workspace snapshot and, for counts, `git status --porcelain` 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. 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. 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
+
95
101
  - **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.
96
102
  - **Behind base** [UPS-07] only matters when:
97
103
  1. the PR conflicts with its base,
@@ -188,18 +194,19 @@ One GraphQL request per search, sent in parallel. GitHub runs the searches in on
188
194
  - `is:issue is:open assignee:@me`
189
195
  - `is:open involves:@me updated:>=<30 days ago> sort:updated-desc`, 100 at most, issues and PRs with their last 10 conversation comments, as for mentions (for Answered and fresh questions) [ATT-16]
190
196
  - `is:issue is:open author:@me commenter:@me sort:updated-desc`, 50 at most, no date limit, the same fields (questions on my own issues nobody answered, however old) [ATT-11]
191
- - `is:pr is:closed author:@me closed:>=<30 days ago> sort:updated-desc`, 50 at most, with `mergedBy`, the last close event's actor and assignees (Changed by others) [ATT-21]
197
+ - `is:pr is:closed author:@me closed:>=<30 days ago> sort:updated-desc`, 50 at most, with `mergedBy`, the last close event's actor and assignees [HIS-07]
198
+ - `is:issue is:closed assignee:@me closed:>=<30 days ago> sort:updated-desc`, 50 at most, with `stateReason` and the last close event's actor (an issue someone else closed) [HIS-07]
192
199
  - `is:issue is:open no:assignee` (Next up, with issue type and field values, and projects when the login may read them [NXT-12]; one request per source [NXT-09], skipped when there's nowhere to look [NXT-08]). "My repos" needs my login, taken from the last fetch or asked once with `viewer { login }`
193
200
 
194
201
  Once my PRs and both issue searches are back, one batched **details** request asks for `Ref.compare` behind counts for my PRs, the open issues their descriptions refer to (at most 100), and the option order and colors of org issue fields when Next up needs them [NXT-02, NXT-10]. The other searches carry on meanwhile.
195
202
 
196
- Then, only for PRs whose assignees changed to someone else and issues that left my assigned search, one request per 20 asks for their last 30 assign and unassign events (`assignmentsQuery`) [ATT-21]; usually none.
203
+ Then, only for PRs whose assignees changed to someone else and issues that left my assigned search, one request per 20 asks for their last 30 assign and unassign events (`assignmentsQuery`) [HIS-07]; and one per 20 for tracked closed PRs that left the closed search asks their state and last reopen event (`reopenQuery`) [HIS-07]; usually none.
197
204
 
198
- A live refresh is 9 requests and about 85 points, of the 5,000 GitHub allows per hour. Points depend on how much a query asks for, not how many requests carry it; my PRs (34) and review requests (20) cost the most.
205
+ A live refresh is 10 requests and about 87 points, of the 5,000 GitHub allows per hour. Points depend on how much a query asks for, not how many requests carry it; my PRs (34) and review requests (20) cost the most.
199
206
 
200
207
  ### History
201
208
 
202
- One request with three searches, each from the Monday `historyWeeks` back: `is:pr is:merged author:@me` (with `mergedBy` [HIS-05]), `is:pr is:merged reviewed-by:@me -author:@me`, `is:issue is:closed assignee:@me`, and the viewer's login. Each result brings up to 20 label names, and issues their type [HIS-04]. About 4 points, mostly the label lists.
209
+ One request with three searches, each from the Monday `historyWeeks` back: `is:pr is:merged author:@me` (with `mergedBy` [HIS-05]), `is:pr is:merged reviewed-by:@me -author:@me` (with `mergedBy` [HIS-02]), `is:issue is:closed assignee:@me` (with the last close event's actor [HIS-07]), and the viewer's login. Each result brings up to 20 label names, and issues their type [HIS-04]. About 4 points, mostly the label lists.
203
210
 
204
211
  Every search is scoped to the configured orgs and repos; Next up's unclaimed issues as described under Next up.
205
212
 
package/index.client.tsx CHANGED
@@ -6,11 +6,16 @@ import { CoverageSettings } from "./client/coverage-settings";
6
6
  import { useAttention } from "./client/data";
7
7
  import { returnFromFeedback } from "./client/feedback";
8
8
  import { ICONS } from "./client/icons";
9
+ import { useItemAgents } from "./client/sessions";
10
+ import { doingCount, wrapItems } from "./shared/wrap-up";
9
11
 
10
12
  // The count, visible from anywhere in Paseo [ATT-09].
11
13
  function SidebarItem({ theme, currentScreen, openScreen }: PluginSidebarItemProps) {
12
14
  const { data } = useAttention();
13
- const count = data?.count ?? 0;
15
+ // Wrap up's rows need the sessions, which live in Paseo [ATT-09, ATT-22].
16
+ const agents = useItemAgents();
17
+ const wrap = data ? wrapItems(data, data.fixtureAgents ?? agents.data ?? []) : [];
18
+ const count = data ? doingCount(data, wrap) : 0;
14
19
  return (
15
20
  <SidebarRow
16
21
  icon={ICONS.logo}
package/index.server.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  unclaimIssue,
15
15
  updateBranch,
16
16
  } from "./server/actions";
17
+ import { ArchivedInPaseo } from "./server/archived";
17
18
  import { defaultBranch, sessionContext } from "./server/context";
18
19
  import { itemDetails } from "./server/details";
19
20
  import { feedbackInfo } from "./server/feedback";
@@ -29,6 +30,7 @@ import * as rpc from "./shared/rpc";
29
30
  export default function contribute(server: PluginServerContext) {
30
31
  const attention = new AttentionService();
31
32
  const updates = new UpdateCheck();
33
+ const archived = new ArchivedInPaseo({ groupKeysOf: (itemKey) => attention.groupKeysOf(itemKey), acknowledge: (keys, upTo) => attention.acknowledge(keys, upTo) });
32
34
  const started = attention.start().catch((error) => console.error("Attention Span failed to start:", error));
33
35
  const ready = <T>(work: () => Promise<T>) => started.then(work);
34
36
 
@@ -37,10 +39,27 @@ export default function contribute(server: PluginServerContext) {
37
39
  const chip = (text: string, tone: Chip["tone"] = "neutral", icon?: Chip["icon"]): Change => ({ kind: "chip", chip: { text, tone, ...(icon ? { icon } : {}) } });
38
40
 
39
41
  // The app asks for the list on load and every few minutes; its Paseo connection lets refreshes see my projects [NXT-08].
40
- server.handle(rpc.getAttention, ({ refresh }, { paseo }) => ready(() => (attention.connect(paseo), attention.get(refresh))));
42
+ server.handle(rpc.getAttention, ({ refresh, cached }, { paseo }) =>
43
+ ready(() => {
44
+ attention.connect(paseo);
45
+ if (archived.waiting) void archived.notice(paseo);
46
+ return attention.get(refresh, cached);
47
+ }),
48
+ );
41
49
  server.handle(rpc.dismissItem, ({ key }) => ready(() => attention.dismiss(key)));
42
50
  server.handle(rpc.undismissItem, ({ key }) => ready(() => attention.undismiss(key)));
43
- server.handle(rpc.gotIt, ({ id, on }) => ready(() => attention.gotIt(id, on)));
51
+ server.handle(rpc.gotIt, ({ ids, on }) => ready(() => attention.gotIt(ids, on)));
52
+ server.handle(rpc.setHistoryFilter, ({ filter }) => ready(() => attention.setHistoryFilter(filter)));
53
+ // A session Attention Span started, archived in Paseo itself, even with Attention Span closed [HIS-07, ATT-22]. Each
54
+ // event, and each request for the list, also tries again the ones that failed, as both bring a Paseo connection.
55
+ server.on("agent.archived", ({ agent, archivedAt }, { paseo }) => {
56
+ const event = { agentId: agent.id, parentAgentId: agent.parentAgentId, archivedAt };
57
+ void ready(() => archived.notice(paseo, event));
58
+ });
59
+ server.on("agent.turn_ended", (_event, { paseo }) => {
60
+ if (archived.waiting) void ready(() => archived.notice(paseo));
61
+ });
62
+ server.handle(rpc.archiveSessions, ({ targets, confirm }, { paseo }) => ready(() => attention.archive(paseo, targets, confirm)));
44
63
  server.handle(rpc.restoreDismissed, () => ready(() => attention.restoreDismissed()));
45
64
  server.handle(rpc.setCodeRepo, ({ issueRepo, codeRepo }) => ready(() => attention.setCodeRepo(issueRepo, codeRepo)));
46
65
  server.handle(rpc.setupStatus, () => setupStatus());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrioid/paseo-attention-span",
3
- "version": "0.4.14",
3
+ "version": "0.6.0",
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": {
@@ -24,15 +24,21 @@
24
24
  "assets/",
25
25
  "requirements.yaml",
26
26
  "docs/architecture.md",
27
+ "docs/screenshots/desktop-dark-doing.png",
28
+ "docs/screenshots/desktop-dark-doing-wrap.png",
29
+ "docs/screenshots/desktop-dark-doing-wrap-dirty.png",
30
+ "docs/screenshots/desktop-dark-doing-wrap-multi.png",
27
31
  "docs/screenshots/desktop-dark-doing-clear.png",
32
+ "docs/screenshots/desktop-dark-next-up-setup.png",
28
33
  "docs/screenshots/desktop-dark-doing-acknowledge.png",
29
34
  "docs/screenshots/desktop-dark-doing-issue-sheet.png",
30
35
  "docs/screenshots/desktop-dark-doing-reviewers.png",
31
36
  "docs/screenshots/desktop-dark-doing-sheet.png",
32
37
  "docs/screenshots/desktop-dark-waiting-too-long.png",
33
- "docs/screenshots/desktop-dark-doing.png",
34
- "docs/screenshots/desktop-dark-history-reviewed.png",
35
38
  "docs/screenshots/desktop-dark-history.png",
39
+ "docs/screenshots/desktop-dark-history-filtered.png",
40
+ "docs/screenshots/desktop-dark-history-groups.png",
41
+ "docs/screenshots/phone-dark-history.png",
36
42
  "docs/screenshots/desktop-dark-next-up-code-repo.png",
37
43
  "docs/screenshots/desktop-dark-next-up.png",
38
44
  "docs/screenshots/desktop-dark-settings.png",
package/requirements.yaml CHANGED
@@ -18,7 +18,7 @@ functional:
18
18
  SET-01: see what's missing and how to fix it when Attention Span can't load, along with what it covers and which projects and agent it will use; so that getting started doesn't end at an error.
19
19
  attention:
20
20
  As a developer, I can:
21
- ATT-01: see in one place the open issues and pull requests that need me; so that I don't depend on noisy GitHub notifications.
21
+ ATT-01: see in one place the open issues and pull requests that need me, and the finished work whose Paseo sessions should be put away; so that I don't depend on noisy GitHub notifications and leftover sessions don't pile up.
22
22
  ATT-02: see why each item needs me, with items grouped by that reason; so that I know what to do about an item at a glance.
23
23
  ATT-03: see an issue and the pull requests that resolve it as one item, led by the issue; so that related work isn't scattered across the list.
24
24
  ATT-04: see any stack of dependent pull requests as one item, whoever opened them, with a session on any of its pull requests shown on it and, where my review is requested, one review for the whole stack; so that a stack is handled as the single change it is.
@@ -26,7 +26,7 @@ functional:
26
26
  ATT-06: open an item for more detail and every action, each saying what it will do; so that the list stays minimal by default and pressing a button makes sense.
27
27
  ATT-07: see whether an item already has a Paseo session and what its agent is doing; so that I don't start duplicate work.
28
28
  ATT-08: dismiss an item until something new happens on it; so that FYIs stop taking up space.
29
- ATT-09: notice how many items need me from anywhere in Paseo; so that I don't have to open Attention Span to check.
29
+ ATT-09: notice from anywhere in Paseo how many items need me, including finished work waiting to be wrapped up; so that I don't have to open Attention Span to check.
30
30
  ATT-11: see in Waiting which work has waited on others for too long, marked on its age and explained when I point at it, only where a nudge is fair (not while the next step is mine or CI is still running), and on my own issues however long ago that was; so that stalled work gets nudged, while Doing keeps only what I can act on.
31
31
  ATT-12: open any item on GitHub; so that I can do what Attention Span doesn't cover.
32
32
  ATT-13: tell at a glance which actions start an agent session and which change GitHub right away; so that I know what a tap will do.
@@ -34,10 +34,10 @@ functional:
34
34
  ATT-15: copy any item's GitHub link; so that I can share it without opening GitHub.
35
35
  ATT-16: see recent comments without a mention on issues and pull requests I opened, until I reply, react or dismiss them; so that answers to my questions don't get lost, while other people's threads stay out unless someone tags me.
36
36
  ATT-17: choose to follow threads I've commented on, so recent replies after mine there show without a tag, off by default; so that surfacing other people's threads is my choice, and the list stays signal, not noise.
37
- ATT-18: see a calm, restful scene in Doing when nothing needs me, only once a refresh has confirmed it; so that a clear list feels like rest rather than a blank page, and calm never stands in for a check that failed or hasn't run.
37
+ ATT-18: see a calm, restful scene in Doing when nothing needs me and no finished work waits to be wrapped up, only once a refresh has confirmed it; so that a clear list feels like rest rather than a blank page, and calm never stands in for a check that failed or hasn't run.
38
38
  ATT-19: tell at a glance what each person shown on an item is to it: someone I'm waiting on, who opened it, or whose comments are left to address, with an icon by their picture and the meaning in words when I point at it; so that a face and a time never leave me guessing.
39
39
  ATT-20: tell which item a card is on every tab by its number first, then its repository with the repository's name standing out from its owner, which my own repositories leave out; so that cards from several repositories scan without reading each one in full.
40
- ATT-21: see in Doing, below the work and not in its count, when someone else merged my PR, closed it without merging, took over or handed on my PR or an issue assigned to me, or unassigned me from one, each in a line like "merged by dave 2h ago" or "phil took over", until I tap Got it; so that I learn when others move my work without it changing what I have to do.
40
+ ATT-22: wrap up finished or out-of-my-hands work whose Paseo sessions are still open, archiving them safely: checking for unsaved changes first, keeping worktrees shared with anything else, and acknowledging what others did once it succeeds; so that leftover sessions get cleaned up without losing work or resurfacing old changes.
41
41
  mentions:
42
42
  As a developer, I can:
43
43
  MEN-01: see open threads where a person mentioned me and is still waiting for my response; so that I only hear about mentions when someone is waiting for me.
@@ -80,12 +80,12 @@ functional:
80
80
  As a developer, I can:
81
81
  SES-01: start a Paseo session for an item in one step, with defaults suited to why it needs me; so that acting on an item takes no setup.
82
82
  SES-02: choose the workspace, agent profile, and prompt before a session starts; so that I can adjust when the defaults don't fit.
83
- SES-03: open an item's existing session from the item whatever state it is in, including one started on any of its pull requests, and start another only on purpose; so that work on an item stays in one place.
83
+ SES-03: open an item's existing session from the item whatever state it is in, including one started on any of its pull requests and on finished work until I archive it, and start another only on purpose; so that work on an item stays in one place.
84
84
  SES-04: start a session that already has the item's context, such as failing checks or unresolved comments; so that the agent starts informed.
85
85
  SES-05: start sessions in my local checkout of the item's repository without configuring paths; so that new repositories work without setup.
86
86
  SES-06: start sessions even when no agent profiles are configured; so that Attention Span works before I've set anything up.
87
87
  SES-07: start a session on an issue in the repository its code lives in, chosen right there the first time; so that issues kept in a separate repository work without editing files.
88
- SES-08: see sessions started outside Attention Span on the item of the pull request their workspace is linked to, or of the session whose worktree they share, as "Continue session"; so that I don't start duplicate work.
88
+ SES-08: see sessions started outside Attention Span on the item of the pull request their workspace is linked to, or of the session whose worktree they share, as "Continue session", including finished work in Wrap up; so that I don't start duplicate work and can clean up what I left open.
89
89
  SES-09: tell sessions reviewing someone else's pull request from work on my own in Paseo's sidebar, by a name like "Review PR 123: title"; so that I know which kind of work a workspace holds.
90
90
  next_up:
91
91
  As a developer, I can:
@@ -101,19 +101,23 @@ functional:
101
101
  NXT-10: see on each issue its repository, its projects with their status, and its priority, effort and scope at a glance, each a pill whose icon says what it is, named in words when I point at it and in the sheet, with status and priority softly in the color GitHub has for them (none for gray, and the top two priorities warm and accent where the org colored none), and whether an open pull request already closes it and by whom; so that I can judge whether to pick it up without opening it.
102
102
  NXT-11: close an issue from Next up as completed or not planned, with an optional comment, and undo it; so that work that's done or won't be done stops being suggested.
103
103
  NXT-12: see which open GitHub projects my Next up issues are on, and where on each board, once my gh login may read projects, with Settings saying the one command that allows it until then; so that I know whether work is planned or just an idea, without Next up breaking for anyone who hasn't allowed it.
104
+ NXT-13: see a calm scene in Next up when it has nothing at all to show, pointing me to Settings, plainly when it has nowhere to look and quietly when it found nothing to pick up, the latter only once a refresh has confirmed it; so that an empty Next up says how to fill it rather than looking broken.
104
105
  waiting:
105
106
  As a developer, I can:
106
107
  WAI-01: see my work that is waiting on others, grouped by who it waits on with whoever blocks the most first, bots after people, and work no person holds up last, each group with work that has an active session first, and each card saying why it waits and for how long, including my pull requests in Doing that wait on whom I asked, where a pull request waits for review only once someone has been asked, and a thread only once my last words ask a question; so that I know that work is tracked and who is blocking me most.
107
108
  WAI-02: see who my waiting work waits on: reviewers I asked, reviewers who asked for changes and people I tagged in my unanswered question, and nobody where none of those apply; so that I know whom to nudge without guessing.
108
109
  WAI-03: copy the list of my work waiting on one person or team, oldest first, each line a Markdown link led by why and for how long, like "Review 2h: [title](link)"; so that nudging them is one paste they can skim.
110
+ WAI-04: see a calm scene in Waiting when nothing waits on anyone, only once a refresh has confirmed it; so that being blocked by nobody feels like rest rather than a blank page.
109
111
  history:
110
112
  As a developer, I can:
111
113
  HIS-01: see the issues and pull requests I finished, grouped by week; so that I can tell others what I got done.
112
- HIS-02: see pull requests I reviewed that merged, apart from my own work; so that I can tell others what I got done.
113
- HIS-03: copy a week's finished work as a Markdown list of links, and the pull requests I reviewed that week as a list of their own; so that reporting progress is one paste.
114
+ HIS-02: see pull requests I reviewed that merged, under Reviewed in each week when I turn that on; so that I can tell others what I got done.
115
+ HIS-03: copy a week's shown work as Markdown lists, its finished work and, when shown, the pull requests I reviewed, never changes by others; so that reporting progress is one paste.
114
116
  HIS-04: see what kind of work each finished item was, bug, feature or task, from its issue type, else its labels, else a Conventional Commit title like "fix: …", on its card and leading its copied line like "- 🐞 [title](link)", with PRs of no kind led by 🔀 and issues closed as not planned left out of the copy; so that a busy week's report skims at a glance in any repo.
115
117
  HIS-05: see who merged a PR of mine when it wasn't me, as "merged 2h ago by dave", with its copied line unchanged; so that I know when someone else shipped my work.
116
- HIS-06: see each week's PRs of mine that someone else closed without merging, and work taken out of my hands, apart under "Closed or handed off" and out of the week's copy, even once its new owner merges it; so that my report doesn't claim work that left my hands, and I can still see where it went.
118
+ HIS-06: see each week's work that left my hands under Changed by others when that is shown, out of the week's copy, even once its new owner merges it, and keep it there when the work comes back to me after I've cleared it; so that my report doesn't claim work that wasn't mine.
119
+ HIS-07: see at the top of History, unread, when someone else merged or closed my pull request, closed an issue assigned to me, reopened a pull request I had seen closed, took over or handed on my work, or unassigned me, with a dot on the tab while any is unread and Got it or Mark all as read to clear them; so that I learn when others move my work without it changing what I have to do.
120
+ HIS-08: see a calm scene in History when I've finished nothing in its weeks and nothing is unread, only once a refresh has confirmed it; so that an empty History reads as a start rather than a blank page.
117
121
  feedback:
118
122
  As a developer, I can:
119
123
  FB-01: tell the Attention Span project what to improve from the bottom of any tab, picking a problem, an idea or that I like it, with an agent that asks until it's clear, checks it against what's planned and already reported, and files it as an issue or a discussion, saying which and why, only once I approve the draft; so that feedback costs a minute and lands where it can be acted on or talked through.