@andrioid/paseo-attention-span 0.4.12 β†’ 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/OVERVIEW.md CHANGED
@@ -18,6 +18,8 @@ When there's nothing in it, you get a quiet horizon that follows the time of day
18
18
 
19
19
  Mentions only count while the person is still waiting for you. Reply or react and it's gone. On your own issues and PRs, a new comment from the last 30 days shows up under **Answered** even if it doesn't tag you. On other people's threads only tags count. The point is to pick out the signal, and most of what happens in threads you once commented on isn't. If you do want those replies, turn on **Follow threads I've commented on** in Settings. Team mentions are left out entirely, because "@everyone-in-backend" is not really a question for *me*. And if something's just an FYI, dismiss it. It stays gone until something new happens on it.
20
20
 
21
+ Sometimes other people move your work without asking: they merge your PR, close it, take it over, or unassign you from an issue. None of that is something to do, so it doesn't count, but it shouldn't happen behind your back either. Each one gets a line at the bottom of Doing, like "merged by dave 2h ago" or "phil took over", until you tap **Got it**.
22
+
21
23
  Every item has one main button that matches why it's there: Reply, Review, Fix CI, Merge. Open the item and you get every action, each with a line saying what it'll do. I wanted buttons you can press without wondering what's about to happen to your repo.
22
24
 
23
25
  ![An item's actions](docs/screenshots/desktop-dark-doing-sheet.png)
@@ -75,7 +77,7 @@ Some orgs keep issues in a separate repo from the code. When that happens, the f
75
77
 
76
78
  The issues and PRs you finished in recent weeks, grouped by week, plus the PRs you reviewed that got merged. Reviews are work too, even if nobody counts them.
77
79
 
78
- There's a copy button per week that gives you a Markdown list of links, each led by what kind of work it was: 🐞 bug, πŸš€ feature, πŸ”§ task, or πŸ”€ for a PR that's none of those. The kind comes from the issue type, else the labels, else a title like "fix: …", so it works whether or not your repos use issue types. Cards show it too. Issues closed as not planned stay out of the list. That's my standup prep now, and it takes about four seconds.
80
+ There's a copy button per week that gives you a Markdown list of links, each led by what kind of work it was: 🐞 bug, πŸš€ feature, πŸ”§ task, or πŸ”€ for a PR that's none of those. The kind comes from the issue type, else the labels, else a title like "fix: …", so it works whether or not your repos use issue types. Cards show it too. Issues closed as not planned stay out of the list. A PR someone else merged says who, and work that left your hands (a PR someone closed or took over, an issue you were taken off) sits apart under **Closed or handed off**, out of the list, even if its new owner merges it later. That's my standup prep now, and it takes about four seconds.
79
81
 
80
82
  ![History](docs/screenshots/desktop-dark-history.png)
81
83
 
@@ -7,6 +7,7 @@ import { Pressable, ScrollView, Text, View } from "react-native";
7
7
  import { type ActionId, type AgentSummary, type AttentionView, type Chip, checkoutPr, type FailingChecks, type Item, itemSessions, liftActive, looseSessions, type NextUpIssue, ownStack, type PersonRole, type Reviewer, type Section, type SectionId, SECTIONS, type SubRow, TAB_FEED, type TabId, type Target, type WaitingGroup, type WaitingOn } from "../shared/attention";
8
8
  import { type AttentionConfig, nextUpSources, type SessionKind } from "../shared/config";
9
9
  import { failingList, groupLabel, rerunHistory, summarizeRerun } from "../shared/checks";
10
+ import { changeText } from "../shared/changes";
10
11
  import { ago, linkList } from "../shared/format";
11
12
  import { isClear } from "../shared/still";
12
13
  import { workEmoji } from "../shared/work";
@@ -21,12 +22,12 @@ import { NumberText, PlaceText } from "./entity";
21
22
  import { NextUpList } from "./next-up";
22
23
  import { Still } from "./still";
23
24
  import { agentSignal, sessionEntry, startAnotherEntry } from "./session-menu";
24
- import { ActionSheet, DETAILS_STALE_MS, DetailLines, type DetailsQuery, detailsKey, FadeIn, Modal, type SheetEntry, useArrived, usePrefetchOnRest } from "./sheet";
25
+ import { ActionSheet, DETAILS_STALE_MS, DetailLines, type DetailsQuery, detailsKey, FadeIn, githubEntry, Modal, type SheetEntry, useArrived, usePrefetchOnRest } from "./sheet";
25
26
  import { FeedbackAsk, FeedbackLine, type FeedbackScreen, FeedbackSheet } from "./feedback";
26
27
  import { branchWorkspaces, type FetchProviders, findCheckout, githubProjects, itemAgents, listProfiles, noProjectMessage, resolveAgentConfig, startSession } from "./sessions";
27
28
  import { SetupChecklist } from "./setup";
28
29
  import { UpdateNotice } from "./update";
29
- import { Avatar, Button, Hint, KeepStyles, LINE_HEIGHT, Loading, Meta, mix, SectionHeader, SpinningIcon, StylesProvider, TablerIcon, Toggle, useCopy, useHover, useStrongText, useStyles } from "./ui";
30
+ import { Avatar, Button, Disclosure, Hint, KeepStyles, LINE_HEIGHT, Loading, Meta, mix, SectionHeader, SpinningIcon, StylesProvider, TablerIcon, Toggle, useCopy, useHover, useStrongText, useStyles } from "./ui";
30
31
 
31
32
  // The agent icon marks every action that starts an agent session; the rest act on GitHub right away [ATT-13].
32
33
  const ACTION_ICONS: Record<ActionId, IconName> = {
@@ -45,6 +46,7 @@ const ACTION_ICONS: Record<ActionId, IconName> = {
45
46
  merge: "merge",
46
47
  close: "close",
47
48
  start: "agent",
49
+ got_it: "check",
48
50
  };
49
51
 
50
52
  function actionLabel(action: ActionId, item: Item): string {
@@ -66,6 +68,7 @@ function actionLabel(action: ActionId, item: Item): string {
66
68
  merge: "Merge",
67
69
  close: "Close draft",
68
70
  start: "Start",
71
+ got_it: "Got it",
69
72
  }[action];
70
73
  }
71
74
 
@@ -96,6 +99,7 @@ function actionDetail(action: Exclude<ActionId, "rerun">, item: Item): string {
96
99
  merge: `Merges ${pr} into ${base} (${target.mergeMethod}) now`,
97
100
  close: `Closes ${pr}. A comment is posted only if you write one`,
98
101
  start: "An agent reads the issue and proposes a plan",
102
+ got_it: "Clears this note. Nothing changes on GitHub",
99
103
  }[action];
100
104
  }
101
105
 
@@ -179,8 +183,10 @@ const SECTION_ICONS: Record<SectionId, IconName> = {
179
183
  wait_reviewer: "replyArrow",
180
184
  wait_ci: "clock",
181
185
  wait_answer: "reply",
186
+ changed: "team",
182
187
  done: "merge",
183
188
  reviewed: "review",
189
+ handed_off: "userShare",
184
190
  };
185
191
 
186
192
  const TABS: { id: TabId; label: string; icon: IconName }[] = [
@@ -247,6 +253,7 @@ function AttentionList({
247
253
  const dismiss = useRpc(rpc.dismissItem);
248
254
  const undismiss = useRpc(rpc.undismissItem);
249
255
  const restore = useRpc(rpc.restoreDismissed);
256
+ const gotIt = useRpc(rpc.gotIt);
250
257
  const saveScopes = useRpc(rpc.setScopes);
251
258
  const saveSources = useRpc(rpc.setSources);
252
259
  const saveProjects = useRpc(rpc.setProjectFilter);
@@ -397,6 +404,11 @@ function AttentionList({
397
404
  const session = ACTION_SESSION[action];
398
405
  const { target } = item;
399
406
  if (action === "reply") return void openExternalUrl(item.person?.url ?? item.url);
407
+ // [ATT-21]
408
+ if (action === "got_it" && item.change) {
409
+ const { id } = item.change;
410
+ return change(item.key, "Got it", () => gotIt({ id, on: true }), `Cleared the note on β€œ${item.title}”`, () => gotIt({ id, on: false }));
411
+ }
400
412
  if (session) return void startWithDefaults(item.key, session, target);
401
413
  if (action === "update") change(item.key, "Update", () => update({ key: item.key, target }), `Updating PR ${target.number} with ${target.baseRefName}`);
402
414
  // [PRS-11]
@@ -625,7 +637,14 @@ interface Actions {
625
637
  }
626
638
 
627
639
  // What the card is: open, draft, merged or closed. Urgency stays in the chips and section headers.
640
+ // A note on what someone else did shows what happened instead; its words say it too, so color isn't the only sign [ATT-21].
628
641
  function stateMark(item: Item): CardProps["mark"] {
642
+ if (item.change) {
643
+ const kind = item.change.kind;
644
+ if (kind === "merged") return { icon: "merge", tone: "good" };
645
+ if (kind === "closed") return { icon: "prClosed", tone: "bad" };
646
+ return { icon: kind === "unassigned" ? "userMinus" : "userShare", tone: "warn" };
647
+ }
629
648
  if (item.closedAt) return item.kind === "pr" ? { icon: "merge", tone: "good" } : { icon: "issueClosed", tone: item.chips.length ? "neutral" : "good" };
630
649
  if (item.kind === "issue") return { icon: "issue", tone: "good" };
631
650
  return item.draft ? { icon: "draft", tone: "neutral" } : { icon: "pr", tone: "good" };
@@ -711,7 +730,11 @@ function ItemRow({ item, first, actions, group }: { item: Item; first: boolean;
711
730
  title={item.title}
712
731
  meta={{
713
732
  place: { repo: item.repo, number: item.number, login: actions.login },
714
- when: item.closedAt ? `${item.kind === "pr" ? "merged" : "closed"} ${ago(item.closedAt)} ago` : undefined,
733
+ when: item.change
734
+ ? changeText(item.change)
735
+ : item.closedAt
736
+ ? `${item.kind === "pr" ? "merged" : "closed"} ${ago(item.closedAt)} ago${item.mergedBy ? ` by ${item.mergedBy}` : ""}`
737
+ : undefined,
715
738
  signals: chips,
716
739
  }}
717
740
  extra={
@@ -735,7 +758,7 @@ function ItemRow({ item, first, actions, group }: { item: Item; first: boolean;
735
758
  : undefined
736
759
  }
737
760
  secondary={[
738
- only ? { label: only.label, icon: only.icon, onPress: only.onPress } : { label: `Details for #${item.number}`, icon: "chevronRight", onPress: open },
761
+ only ? { label: only.label, accessibilityLabel: only.accessibilityLabel, icon: only.icon, onPress: only.onPress } : { label: `Details for #${item.number}`, icon: "chevronRight", onPress: open },
739
762
  // History is where I report from, so its cards copy their link in one tap [ATT-15].
740
763
  ...(history ? [{ label: `Copy link to #${item.number}`, icon: "copy" as const, onPress: () => copy(item.url, `Copied link to #${item.number}`) }] : []),
741
764
  ]}
@@ -872,18 +895,13 @@ function sheetEntries(
872
895
  entries.push({ key: action, icon: ACTION_ICONS[action], label, detail: actionDetail(action, item), housekeeping: action === "close", onPress: () => onPerform(action) });
873
896
  }
874
897
  }
875
- // Anything Attention Span doesn't cover [ATT-12], and its link to share [ATT-15].
876
- entries.push({
877
- key: "github",
878
- icon: "github",
879
- label: `Open ${item.kind === "issue" ? "issue" : "PR"} on GitHub`,
880
- detail: `${item.repo}#${item.number}`,
881
- onPress: close(() => void openExternalUrl(item.url)),
882
- copy: { text: item.url, label: `Copy link to #${item.number}`, done: `Copied link to #${item.number}` },
883
- });
884
- // Nothing's left to start on once it's merged or closed.
885
- if (!item.closedAt) entries.push(startAnotherEntry(sessions.length > 0, withOptions("Start session", fallbackKind(item))));
886
- if (inDoing) entries.push({ key: "dismiss", icon: "dismiss", label: "Dismiss", detail: "Hides it until something new happens on it", housekeeping: true, onPress: close(() => actions.dismiss(item)) });
898
+ // Anything Attention Span doesn't cover [ATT-12], with an issue's PR beside it: the one its actions apply to, or in
899
+ // History, where an issue is its own target, the first of the PRs that closed it.
900
+ const pr = targetUrl(item) && item.target.kind === "pr" ? item.target : item.kind === "issue" && item.children[0] ? item.children[0] : undefined;
901
+ entries.push(githubEntry(item, (url) => close(() => void openExternalUrl(url))(), pr));
902
+ // Nothing's left to start on once it's merged or closed, or out of my hands; a note is cleared with Got it, not dismissed [ATT-21].
903
+ if (!item.closedAt && !item.change) entries.push(startAnotherEntry(sessions.length > 0, withOptions("Start session", fallbackKind(item))));
904
+ if (inDoing && !item.change) entries.push({ key: "dismiss", icon: "dismiss", label: "Dismiss", detail: "Hides it until something new happens on it", housekeeping: true, onPress: close(() => actions.dismiss(item)) });
887
905
  return entries;
888
906
  }
889
907
 
@@ -1178,7 +1196,9 @@ function Waiting({ groups, actions }: { groups: WaitingGroup[]; actions: Actions
1178
1196
  count={items.length}
1179
1197
  action={
1180
1198
  who && !who.bot ? (
1181
- <Button icon="copy" label={styles.compact ? undefined : "Copy list"} variant="ghost" accessibilityLabel={`Copy what waits on ${who.login}`} onPress={() => nudge(who.login)} />
1199
+ <View style={styles.overCard}>
1200
+ <Button icon="markdown" variant="ghost" accessibilityLabel={`Copy what waits on ${who.login}`} onPress={() => nudge(who.login)} />
1201
+ </View>
1182
1202
  ) : null
1183
1203
  }
1184
1204
  />
@@ -1206,11 +1226,13 @@ function weekLabel(monday: Date): string {
1206
1226
  }
1207
1227
 
1208
1228
  // What I finished, by week, with reviews tucked away per week [HIS-01, HIS-02].
1209
- // A week copies as a list of links to paste into a report, each led by its kind; reviews stay out of it [HIS-03, HIS-04].
1229
+ // A week copies as a list of links to paste into a report, each led by its kind; its reviews copy as a list of their own [HIS-03, HIS-04].
1210
1230
  function History({ items, actions }: { items: Item[]; actions: Actions }) {
1211
1231
  const styles = useStyles();
1212
1232
  const copy = useCopy();
1213
- const [open, setOpen] = useState<string | null>(null);
1233
+ // Groups opened, as "<week>:<group>"; each opens on its own.
1234
+ const [open, setOpen] = useState<ReadonlySet<string>>(new Set());
1235
+ const toggle = (id: string) => setOpen((now) => (now.has(id) ? new Set([...now].filter((other) => other !== id)) : new Set([...now, id])));
1214
1236
  if (items.length === 0) return <Text style={styles.text}>Nothing finished in this period.</Text>;
1215
1237
  const weeks = new Map<number, Item[]>();
1216
1238
  for (const item of items) {
@@ -1221,6 +1243,8 @@ function History({ items, actions }: { items: Item[]; actions: Actions }) {
1221
1243
  for (const [week, all] of [...weeks].sort((a, b) => b[0] - a[0])) {
1222
1244
  const done = all.filter((item) => item.section === "done").sort((a, b) => b.closedAt!.localeCompare(a.closedAt!));
1223
1245
  const reviewed = all.filter((item) => item.section === "reviewed");
1246
+ // Out of the week's copy: it wasn't my finished work [HIS-06].
1247
+ const handed = all.filter((item) => item.section === "handed_off").sort((a, b) => b.closedAt!.localeCompare(a.closedAt!));
1224
1248
  // What was done, each led by its kind; not planned issues stay on screen but out of the report [HIS-03, HIS-04].
1225
1249
  const copied = done.filter((item) => !item.notPlanned);
1226
1250
  const label = weekLabel(new Date(week));
@@ -1232,27 +1256,50 @@ function History({ items, actions }: { items: Item[]; actions: Actions }) {
1232
1256
  count={done.length}
1233
1257
  action={
1234
1258
  copied.length > 0 ? (
1235
- <Button
1236
- icon="copy"
1237
- variant="ghost"
1238
- accessibilityLabel={`Copy links from ${label}`}
1239
- onPress={() =>
1240
- copy(
1241
- linkList(copied.map((item) => ({ title: item.title, url: item.url, mark: workEmoji(item) }))),
1242
- `Copied ${copied.length} link${copied.length === 1 ? "" : "s"} from ${label}`,
1243
- )
1244
- }
1245
- />
1259
+ <View style={styles.overCard}>
1260
+ <Button
1261
+ icon="markdown"
1262
+ variant="ghost"
1263
+ accessibilityLabel={`Copy links from ${label}`}
1264
+ onPress={() =>
1265
+ copy(
1266
+ linkList(copied.map((item) => ({ title: item.title, url: item.url, mark: workEmoji(item) }))),
1267
+ `Copied ${copied.length} link${copied.length === 1 ? "" : "s"} from ${label}`,
1268
+ )
1269
+ }
1270
+ />
1271
+ </View>
1246
1272
  ) : null
1247
1273
  }
1248
1274
  />
1249
1275
  {done.length > 0 ? <Card items={done} actions={actions} /> : null}
1250
1276
  {reviewed.length > 0 ? (
1251
1277
  <View style={{ gap: 8 }}>
1252
- <View style={styles.wrap}>
1253
- <Toggle label={`Reviewed (${reviewed.length})`} active={open === label} onPress={() => setOpen(open === label ? null : label)} />
1278
+ {/* Its copy lines up under the week's, at the right edge, like every Markdown copy. */}
1279
+ <View style={styles.row}>
1280
+ <Disclosure label="Reviewed" count={reviewed.length} open={open.has(`${label}:reviewed`)} onPress={() => toggle(`${label}:reviewed`)} />
1281
+ <View style={{ flex: 1 }} />
1282
+ <View style={styles.overCard}>
1283
+ <Button
1284
+ icon="markdown"
1285
+ variant="ghost"
1286
+ accessibilityLabel={`Copy reviewed links from ${label}`}
1287
+ onPress={() =>
1288
+ copy(
1289
+ linkList(reviewed.map((item) => ({ title: item.title, url: item.url, mark: workEmoji(item) }))),
1290
+ `Copied ${reviewed.length} reviewed link${reviewed.length === 1 ? "" : "s"} from ${label}`,
1291
+ )
1292
+ }
1293
+ />
1294
+ </View>
1254
1295
  </View>
1255
- {open === label ? <Card items={reviewed} actions={actions} /> : null}
1296
+ {open.has(`${label}:reviewed`) ? <Card items={reviewed} actions={actions} /> : null}
1297
+ </View>
1298
+ ) : null}
1299
+ {handed.length > 0 ? (
1300
+ <View style={{ gap: 8 }}>
1301
+ <Disclosure label="Closed or handed off" count={handed.length} open={open.has(`${label}:handed`)} onPress={() => toggle(`${label}:handed`)} />
1302
+ {open.has(`${label}:handed`) ? <Card items={handed} actions={actions} /> : null}
1256
1303
  </View>
1257
1304
  ) : null}
1258
1305
  </View>,
@@ -1279,7 +1326,7 @@ function StackLine({ rows, merged, links = false, target }: { rows: SubRow[]; me
1279
1326
  {row.title}
1280
1327
  </Text>
1281
1328
  <View style={[styles.wrap, { columnGap: 10, rowGap: 2 }]}>
1282
- <Meta lead={<NumberText number={row.number} />} facts={[]} chips={row.chips} />
1329
+ <Meta lead={<NumberText number={row.number} />} facts={merged && row.mergedBy ? [`merged by ${row.mergedBy}`] : []} chips={row.chips} />
1283
1330
  {row.key === target ? <Text style={{ color: styles.action, fontSize: 12, fontWeight: "600" }}>actions apply here</Text> : null}
1284
1331
  </View>
1285
1332
  </View>
package/client/icons.ts CHANGED
@@ -19,6 +19,8 @@ export const ICONS = {
19
19
  play: { 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=\"M7 4v16l13-8z\"/></svg>" },
20
20
  github: { 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=\"M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2c2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2a4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6c-.6.6-.6 1.2-.5 2V21\"/></svg>" },
21
21
  copy: { 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=\"M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z\"/><path d=\"M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1\"/></g></svg>" },
22
+ // Copies a Markdown list, where "copy" copies a bare link.
23
+ markdown: { 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 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/><path d=\"M7 15V9l2 2l2-2v6m3-2l2 2l2-2m-2 2V9\"/></g></svg>" },
22
24
  dismiss: { 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=\"M10.585 10.587a2 2 0 0 0 2.829 2.828\"/><path d=\"M16.681 16.673A8.7 8.7 0 0 1 12 18q-5.4 0-9-6q1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6q-1 1.665-2.138 2.87M3 3l18 18\"/></g></svg>" },
23
25
  // The plugin's logo in one colour, for the sidebar (assets/logo.svg).
24
26
  logo: { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"207 195 585 585\" fill=\"currentColor\"><path d=\"M 562.9 297.9 C 577.2 309.5 586.1 323.3 595.5 338.9 C 599.6 345.7 603.7 352.3 607.9 358.9 C 624.5 384.8 640.6 410.9 656.4 437.3 C 659.6 442.7 662.8 448.1 666.1 453.4 C 667.3 455.5 668.6 457.6 669.8 459.7 C 670.4 460.6 670.9 461.5 671.5 462.5 C 673 465 674.5 467.5 676 470 C 675.7 470.7 675.3 471.3 675 472 C 673.8 470.7 672.5 469.4 671.2 468.1 C 640.6 436.7 605.7 416.8 561.3 415 C 497.3 414.6 443.8 453.2 399 495 C 397.6 496.3 396.2 497.6 394.8 498.9 C 384.5 508.6 374.3 518.3 365 529 C 362.7 531.3 360.3 533.7 358 536 C 355.7 538.7 353.3 541.3 351 544 C 349.4 545.8 347.8 547.5 346.1 549.3 C 342 553.8 338.1 558.5 334.3 563.2 C 331.9 566.1 329.5 568.8 327 571.5 C 322.9 575.9 319.1 580.5 315.3 585.1 C 312.8 588.2 310.2 591.3 307.6 594.3 C 302.9 599.9 298.4 605.5 293.9 611.3 C 290.7 615.4 287.4 619.4 284 623.5 C 279.8 628.6 275.6 633.8 271.5 639 C 248.5 668.5 248.5 668.5 241 671 C 234.5 671.8 229.5 671.7 223.5 668.9 C 219.1 665.2 215.8 661.5 214 656 C 213.3 646.3 216.7 639.9 222.3 632.2 C 223.4 630.8 224.5 629.3 225.6 627.8 C 226.7 626.2 227.8 624.6 229 623 C 231.3 619.7 233.6 616.5 235.9 613.2 C 237.1 611.5 238.2 609.8 239.4 608.1 C 240 607.3 240.6 606.4 241.2 605.6 C 243 603 244.8 600.4 246.6 597.8 C 252 590.2 257.3 582.5 262.6 574.8 C 267.3 568 272 561.3 276.7 554.7 C 282.5 546.5 288.2 538.2 293.9 530 C 297.3 525.1 300.6 520.3 304 515.5 C 305.3 513.6 306.7 511.7 308 509.7 C 364 429.2 364 429.2 366 426.4 C 367.3 424.5 368.7 422.5 370 420.6 C 373.3 415.8 376.7 411 380 406.2 C 388.5 394.1 396.9 381.8 405.2 369.6 C 408 365.5 410.8 361.5 413.6 357.4 C 418.2 350.7 422.7 343.9 427.2 337.1 C 428.4 335.4 429.6 333.6 430.8 331.8 C 432.7 328.9 434.6 326.1 436.5 323.2 C 450.8 302 470.3 287 495.6 281.4 C 520.2 278.3 542.9 282.9 562.9 297.9 Z\"/><path d=\"M 576.8 472.7 C 577.6 472.7 577.6 472.7 581.9 472.7 C 593.2 472.8 603.9 473.3 615 476 C 616.6 476.4 618.2 476.8 619.8 477.2 C 653.1 486.3 682.9 506.7 704 534 C 705.2 535.5 706.4 537 707.7 538.5 C 718.6 552.2 728.7 566.7 739 581 C 740.1 582.5 741.2 584 742.3 585.5 C 748.6 594.2 754.8 602.9 761 611.7 C 765.2 617.8 769.6 623.8 774 629.8 C 781.8 640.7 785.2 647.6 784 661 C 780.2 671 774.4 678.5 765 683.4 C 752.7 689 740.9 689.6 728 685 C 708.8 676.4 695.5 661.4 683 645 C 682.2 644 681.4 642.9 680.5 641.8 C 673.5 632.7 666.7 623.4 660 614 C 657.8 611 655.7 608 653.5 605 C 652.4 603.5 651.4 602 650.3 600.5 C 648.1 597.5 645.9 594.4 643.6 591.4 C 638.8 584.6 633.9 577.9 629.1 571.1 C 610.5 545.1 610.5 545.1 601 535 C 600 533.7 598.9 532.4 597.8 531.1 C 584 516.2 567 505.1 548 498 C 547 497.6 546 497.2 545 496.8 C 532.1 492.2 519.1 491.7 505.6 491.9 C 504.2 491.9 502.8 491.9 501.3 491.9 C 497.9 491.9 494.4 492 491 492 C 499.6 483.4 519 480.2 530.6 477.6 C 531.6 477.3 532.6 477.1 533.6 476.9 C 548 473.7 562 472.6 576.8 472.7 Z\"/><path fill-rule=\"evenodd\" d=\"M 510 543 C 510.5 543.2 510.5 543.2 512.8 544.3 C 530.3 552.9 543.5 569.8 550.4 587.8 C 553.3 597 554.3 605.2 554.3 614.8 C 554.3 615.9 554.3 617 554.4 618.1 C 554.4 639.1 544.4 657.2 530.3 672.2 C 524.8 677.5 518.7 681.3 512 685 C 511.2 685.5 511.2 685.5 506.9 687.8 C 488.9 695.8 468.4 696.2 449.7 689.9 C 427.8 681.2 412.1 665.9 402.5 644.6 C 395.2 626.6 394.4 606.4 401 588 C 404.9 578.8 409.5 570.6 416 563 C 416.9 561.9 417.8 560.7 418.7 559.5 C 442.5 534.3 479.1 528.1 510 543 Z M 465.2 570.6 C 471.2 574.4 474.4 578.4 477 585 C 477.5 591.4 476.9 596.2 474 602 C 468.5 607.4 464.9 609.9 457.2 610.3 C 452.1 610.2 448.4 609.8 444 607 C 436.8 599.4 435.5 596.1 435.6 585.8 C 436.2 580.3 438 577.8 442 574 C 450.1 569 456.1 567.2 465.2 570.6 Z\"/></svg>" },
@@ -49,6 +51,11 @@ export const ICONS = {
49
51
  chevronRight: { 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=\"m9 6l6 6l-6 6\"/></svg>" },
50
52
  plus: { 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=\"M12 5v14m-7-7h14\"/></svg>" },
51
53
  check: { 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 12l5 5L20 7\"/></svg>" },
54
+ // Tabler git-pull-request-closed, user-share, user-minus and chevron-down: what others did to my work [ATT-21, HIS-06].
55
+ prClosed: { 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=\"M4 18a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0m12 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0M6 8v8m12-5v5M16 4l4 4m0-4l-4 4\"/></svg>" },
56
+ userShare: { 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-4h3m3 7l5-5m0 4.5V17h-4.5\"/></svg>" },
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
+ 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>" },
52
59
  // Tabler message-ai: marks actions that start or continue an agent session.
53
60
  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>" },
54
61
  } as const;
@@ -20,7 +20,7 @@ import type { IconName } from "./icons";
20
20
  import type { FetchDetails } from "./attention-screen";
21
21
  import { CardList, CardRow, type Tone } from "./card";
22
22
  import { sessionEntry, startAnotherEntry } from "./session-menu";
23
- import { ActionSheet, DETAILS_STALE_MS, DetailLines, type DetailsQuery, detailsKey, Modal, type SheetEntry, usePrefetchOnRest } from "./sheet";
23
+ import { ActionSheet, DETAILS_STALE_MS, DetailLines, type DetailsQuery, detailsKey, githubEntry, Modal, type SheetEntry, usePrefetchOnRest } from "./sheet";
24
24
  import { githubColor, IssuePills, PlaceText } from "./entity";
25
25
  import { Button, KeepStyles, Meta, SectionHeader, TablerIcon, useHover, useStyles } from "./ui";
26
26
 
@@ -395,7 +395,8 @@ function IssueSheet({
395
395
  claim
396
396
  ? { key: "claim", icon: "claim", label: "Claim", detail: "Assigns you, without starting a session", onPress: close(() => onClaim(issue, true)) }
397
397
  : { key: "unclaim", icon: "unclaim", label: "Unclaim", detail: "Removes you as assignee, so it goes back to Unclaimed", housekeeping: true, onPress: close(() => onClaim(issue, false)) },
398
- { key: "github", icon: "github", label: "Open issue on GitHub", detail: `${issue.repo}#${issue.number}`, onPress: close(() => void openExternalUrl(issue.url)) },
398
+ // Someone's PR open against it sits beside the issue [ATT-12].
399
+ githubEntry({ kind: "issue", ...issue }, (url) => close(() => void openExternalUrl(url))(), issue.openPrs[0]),
399
400
  ...(sessions.length ? [startAnotherEntry(true, withOptions)] : []),
400
401
  // Giving it up or closing it sits apart, below the work [ATT-06].
401
402
  { key: "close", icon: "issueClosed", label: "Close issue", detail: "Asks first: as completed or not planned, with an optional comment", housekeeping: true, onPress: close(onCloseIssue) },
package/client/sheet.tsx CHANGED
@@ -22,12 +22,17 @@ export interface SheetEntry {
22
22
  detailNode?: ReactNode;
23
23
  // Said on hover, and to screen readers, for a line that can't show everything [ATT-19].
24
24
  hint?: string;
25
+ // What screen readers say in place of the label, where the label alone doesn't say what it opens.
26
+ accessibilityLabel?: string;
25
27
  // A line that changes while the sheet is open, so screen readers say it when it does.
26
28
  live?: boolean;
27
29
  disabled?: boolean;
28
30
  onPress: () => void;
29
31
  // A copy icon at the end of the line, so copying adds no line to the sheet [ATT-15].
30
32
  copy?: { text: string; label: string; done: string };
33
+ // A second half with the same weight, like an issue's PR beside the issue: side by side, or one above the other on
34
+ // phones, so neither half is cut short [ATT-12].
35
+ beside?: Pick<SheetEntry, "icon" | "label" | "detail" | "accessibilityLabel" | "onPress" | "copy">;
31
36
  // A running session's state at the end of the line: the line opens it [SES-03, ATT-07].
32
37
  badge?: Chip;
33
38
  // Muted, for a line that's there on purpose but rarely wanted, like starting another session.
@@ -72,32 +77,59 @@ function EntryGroup({ entries }: { entries: SheetEntry[] }) {
72
77
  const INNER_RADIUS = 11;
73
78
 
74
79
  function Entry({ entry, first, last }: { entry: SheetEntry; first: boolean; last: boolean }) {
80
+ const styles = useStyles();
81
+ const beside = entry.beside;
82
+ const stacked = !!beside && styles.compact;
83
+ const line = first ? null : { borderTopWidth: 1, borderTopColor: styles.c.surface1 };
84
+ if (!beside) {
85
+ return (
86
+ <View style={[styles.row, { gap: 0, alignItems: "stretch" }, line]}>
87
+ <Half entry={entry} corners={{ topLeft: first, bottomLeft: last, topRight: first, bottomRight: last }} />
88
+ </View>
89
+ );
90
+ }
91
+ // Two halves: side by side with a short divider, or on phones one above the other with a line like the sheet's own.
92
+ return (
93
+ <View style={[stacked ? null : [styles.row, { gap: 0, alignItems: "stretch" }], line]}>
94
+ <Half entry={entry} corners={stacked ? { topLeft: first, topRight: first } : { topLeft: first, bottomLeft: last }} />
95
+ {stacked ? (
96
+ <View style={{ height: 1, backgroundColor: styles.c.surface1 }} />
97
+ ) : (
98
+ <View style={{ width: 1, marginVertical: 8, backgroundColor: styles.c.border }} />
99
+ )}
100
+ <Half entry={{ key: `${entry.key}-beside`, ...beside }} corners={stacked ? { bottomLeft: last, bottomRight: last } : { topRight: first, bottomRight: last }} />
101
+ </View>
102
+ );
103
+ }
104
+
105
+ // A line's pressable part and its copy icon. The pressed and hovered fill follows the block's rounded corners where it
106
+ // touches them; the copy icon has its own fill at the right.
107
+ function Half({ entry, corners }: { entry: SheetEntry; corners: { topLeft?: boolean; bottomLeft?: boolean; topRight?: boolean; bottomRight?: boolean } }) {
75
108
  const styles = useStyles();
76
109
  const { hovered, hover } = useHover();
77
110
  const copy = useCopy();
78
111
  const muted = styles.c.foregroundMuted;
79
112
  const dim = entry.disabled || entry.quiet;
80
- // The pressed and hovered fill follows the block's rounded corners; the copy icon has its own at the right.
81
- const corners = {
82
- borderTopLeftRadius: first ? INNER_RADIUS : 0,
83
- borderBottomLeftRadius: last ? INNER_RADIUS : 0,
84
- borderTopRightRadius: first && !entry.copy ? INNER_RADIUS : 0,
85
- borderBottomRightRadius: last && !entry.copy ? INNER_RADIUS : 0,
113
+ const radius = {
114
+ borderTopLeftRadius: corners.topLeft ? INNER_RADIUS : 0,
115
+ borderBottomLeftRadius: corners.bottomLeft ? INNER_RADIUS : 0,
116
+ borderTopRightRadius: corners.topRight && !entry.copy ? INNER_RADIUS : 0,
117
+ borderBottomRightRadius: corners.bottomRight && !entry.copy ? INNER_RADIUS : 0,
86
118
  };
87
119
  const detail = entry.detailNode ?? (entry.detail ? <Text style={styles.muted}>{entry.detail}</Text> : null);
88
120
  return (
89
- <View style={[styles.row, { gap: 0, alignItems: "stretch" }, first ? null : { borderTopWidth: 1, borderTopColor: styles.c.surface1 }]}>
121
+ <View style={[styles.row, { flex: 1, gap: 0, alignItems: "stretch", minWidth: 0 }]}>
90
122
  <Pressable
91
123
  accessibilityRole="button"
92
124
  // The button's name is all a screen reader says of it, so a hint goes in it too.
93
- accessibilityLabel={entry.hint ? `${entry.label}. ${entry.hint}` : entry.label}
125
+ accessibilityLabel={[entry.accessibilityLabel ?? entry.label, entry.hint].filter(Boolean).join(". ")}
94
126
  accessibilityState={{ disabled: !!entry.disabled }}
95
127
  disabled={entry.disabled}
96
128
  onPress={entry.onPress}
97
129
  {...hover}
98
130
  style={({ pressed }) => [
99
131
  styles.row,
100
- corners,
132
+ radius,
101
133
  { flex: 1, alignItems: "flex-start", paddingVertical: 10, paddingHorizontal: 12, backgroundColor: pressed || hovered ? styles.c.border : "transparent" },
102
134
  ]}
103
135
  >
@@ -129,6 +161,39 @@ function Entry({ entry, first, last }: { entry: SheetEntry; first: boolean; last
129
161
  );
130
162
  }
131
163
 
164
+ // The line that opens an item on GitHub, for anything Attention Span doesn't cover [ATT-12], with its link to share [ATT-15].
165
+ // An issue with a PR has the PR beside it, with the same weight, so reaching the PR doesn't mean going through the issue;
166
+ // in a stack it's the PR the actions apply to, and says where it sits.
167
+ export function githubEntry(
168
+ item: { kind: "pr" | "issue"; repo: string; number: number; url: string },
169
+ onOpen: (url: string) => void,
170
+ pr?: { number: number; url: string; stack?: { number: number }[] },
171
+ ): SheetEntry {
172
+ const copy = (number: number, url: string) => ({ text: url, label: `Copy link to #${number}`, done: `Copied link to #${number}` });
173
+ if (!pr || item.kind !== "issue") {
174
+ return { key: "github", icon: "github", label: `Open ${item.kind === "issue" ? "issue" : "PR"} on GitHub`, detail: `${item.repo}#${item.number}`, onPress: () => onOpen(item.url), copy: copy(item.number, item.url) };
175
+ }
176
+ // The repo is on the sheet's top line already, so each half says only its number.
177
+ const place = pr.stack && pr.stack.length > 1 ? pr.stack.findIndex((p) => p.number === pr.number) : -1;
178
+ return {
179
+ key: "github",
180
+ icon: "github",
181
+ label: "Open issue",
182
+ detail: `#${item.number}`,
183
+ accessibilityLabel: `Open issue #${item.number} on GitHub`,
184
+ onPress: () => onOpen(item.url),
185
+ copy: copy(item.number, item.url),
186
+ beside: {
187
+ icon: "github",
188
+ label: "Open PR",
189
+ detail: place >= 0 ? `#${pr.number} Β· ${place + 1} of ${pr.stack!.length}` : `#${pr.number}`,
190
+ accessibilityLabel: `Open PR #${pr.number} on GitHub${place >= 0 ? `, ${place + 1} of ${pr.stack!.length} in its stack` : ""}`,
191
+ onPress: () => onOpen(pr.url),
192
+ copy: copy(pr.number, pr.url),
193
+ },
194
+ };
195
+ }
196
+
132
197
  // A state as a pill on a soft tint of its tone.
133
198
  function Badge(chip: Chip) {
134
199
  const styles = useStyles();
package/client/ui.tsx CHANGED
@@ -29,6 +29,8 @@ export function makeStyles(theme: Theme, compact: boolean) {
29
29
  danger: { color: c.statusDanger, fontSize: 13 },
30
30
  title: { color: c.foreground, fontSize: 16, fontWeight: "600" as const, flexShrink: 1 },
31
31
  card: { backgroundColor: c.surface1, borderRadius: 12, borderWidth: 1, borderColor: c.border, overflow: "hidden" as const },
32
+ // Over a card, lines a button up with its cards' last column: their padding plus the card's border.
33
+ overCard: { marginRight: (compact ? 12 : 16) + 1 },
32
34
  item: { padding: compact ? 12 : 16, gap: 10, flexDirection: "row" as const, alignItems: "flex-start" as const },
33
35
  divider: { borderTopWidth: 1, borderTopColor: c.border },
34
36
  body: { flex: 1, gap: 6, minWidth: 0 },
@@ -355,6 +357,21 @@ export function SectionHeader({ icon, title, count, action }: { icon: IconName |
355
357
  );
356
358
  }
357
359
 
360
+ // A group that opens in place, like a week's reviews in History: a chevron, its name and count. Each opens on its own, so
361
+ // they don't read as a choice between them [HIS-02, HIS-06].
362
+ export function Disclosure({ label, count, open, onPress }: { label: string; count: number; open: boolean; onPress: () => void }) {
363
+ const styles = useStyles();
364
+ return (
365
+ <Pressable accessibilityRole="button" accessibilityLabel={`${label}, ${count}`} accessibilityState={{ expanded: open }} onPress={onPress} hitSlop={6} style={[styles.row, { gap: 6, paddingVertical: 4 }]}>
366
+ <TablerIcon name={open ? "chevronDown" : "chevronRight"} size={14} />
367
+ <Text style={{ color: styles.c.foreground, fontSize: 13, fontWeight: "600" }}>
368
+ {label}
369
+ <Text style={{ color: styles.c.foregroundMuted, fontWeight: "400" }}> Β· {count}</Text>
370
+ </Text>
371
+ </Pressable>
372
+ );
373
+ }
374
+
358
375
  // Copy text and say so, since an icon-only button gives no other sign it worked.
359
376
  export function useCopy() {
360
377
  const toast = useToast();
@@ -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], 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 [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].
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]. 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: 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. |
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] |
@@ -80,8 +80,9 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
80
80
  | Needs upstream | My PRs with conflicts or an out-of-sync stack [UPS-01, UPS-02] |
81
81
  | 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
82
  | 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] |
83
84
 
84
- **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.
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].
85
86
 
86
87
  ## Rules
87
88
 
@@ -89,7 +90,8 @@ Top to bottom. Each item appears once, under its most urgent reason [ATT-02]. `s
89
90
  - **One item per stack** [ATT-04]: a stack is followed through base/head branch names, among my PRs and others' PRs requesting my review, whoever opened them; a PR from a fork never parents another. Only PRs those two searches return can be joined, so a PR in the stack that's neither mine nor asking for my review is left out. The item is led by the stack's bottom PR, with the rest listed beneath. My PRs in it are decided by their bottom PR, as before; others' PRs asking for my review add one Review for all of them, or a reply when one mentions me. Where a stack has both, its section is the more urgent of the two and it offers both, that one's actions first. GitHub actions act on my PRs, from my bottom one; a stack only asking for my review is never grouped under an issue. Sessions on any PR in the stack show on its item [SES-03, SES-08].
90
91
  - **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.
91
92
  - **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.
92
- - **Handed over** [PRS-08]: my PRs assigned to someone else, and not to me, are left out. Mentions of me on them still count.
93
+ - **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.
93
95
  - **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.
94
96
  - **Behind base** [UPS-07] only matters when:
95
97
  1. the PR conflicts with its base,
@@ -113,7 +115,7 @@ Projects are extra, so they never cost the searches they ride on (`server/projec
113
115
  A card shows its main action and β€Ί. Tapping the card or β€Ί opens its **sheet**, a bottom sheet on phones and a dialog on desktop [ATT-06]. When the sheet would hold a single action, as on Waiting and History cards where it's only Open PR (or issue) on GitHub, the card shows that action instead of β€Ί; tapping the card still opens the sheet. History cards also have a copy icon that copies the item's URL [ATT-15]. Top to bottom, the sheet has:
114
116
 
115
117
  1. **What the card knows:** repo#number, its chips, the full quote and the full stack. Each PR in the stack opens on GitHub, so an issue's PRs are a tap away [ATT-12]. On an issue, the PR its actions apply to is tinted in the stack and says "actions apply here", and its chips are said once, on its row: the top keeps only what the row doesn't say [ATT-04].
116
- 2. **Every action,** each with a line saying what it will do, in one list, with what takes the item off my list or gives it up (Dismiss, Unclaim, Close issue, Close PR) apart below the work, icons quiet. A session action's line asks first: it ends in "…" and opens Options, since the card's button is the one-tap start [SES-01, SES-02]. Once a session of that kind runs, the line opens it instead and shows its state as a badge (working, idle, needs you, failed) [SES-03, ATT-07]. Then Open issue or Open PR on GitHub [ATT-12], with a copy icon at its end that copies the URL without adding a line [ATT-15], a muted "Start a session…" ("Start another session…" once there is one) for a session with no action preset [SES-02], and Dismiss [ATT-08].
118
+ 2. **Every action,** each with a line saying what it will do, in one list, with what takes the item off my list or gives it up (Dismiss, Unclaim, Close issue, Close PR) apart below the work, icons quiet. A session action's line asks first: it ends in "…" and opens Options, since the card's button is the one-tap start [SES-01, SES-02]. Once a session of that kind runs, the line opens it instead and shows its state as a badge (working, idle, needs you, failed) [SES-03, ATT-07]. Then Open issue or Open PR on GitHub [ATT-12], with a copy icon at its end that copies the URL without adding a line [ATT-15]. An issue with a PR splits that line in two halves of the same weight, "Open issue #90" and "Open PR #103 Β· 1 of 2", each with its own copy icon, side by side on desktop and one above the other on phones: the PR is the one its actions apply to (in Next up, the first open PR against it), so reaching it doesn't mean going through the issue on GitHub. Then a muted "Start a session…" ("Start another session…" once there is one) for a session with no action preset [SES-02], and Dismiss [ATT-08].
117
119
  3. **What's fetched when it opens,** in one GraphQL request, so the refresh stays as light as before [GH-01]: the PR's size, led by its number on an issue's sheet ("PR #103 Β· +149 βˆ’15 Β· 5 files"), and the linked issue or PRs, leaving out PRs the stack already shows. It comes last so the actions don't move when it arrives. The description isn't shown; making sense of it takes GitHub anyway.
118
120
 
119
121
  An agent icon (Tabler's `message-ai`, a speech bubble with "AI") marks every action that starts or continues an agent session, marked *(agent)* below; the rest change GitHub right away [ATT-13]. GitHub actions don't ask first, apart from Merge and Close. Instead an Undo row appears, where GitHub can take it back, until I switch tabs [ATT-14].
@@ -186,15 +188,18 @@ One GraphQL request per search, sent in parallel. GitHub runs the searches in on
186
188
  - `is:issue is:open assignee:@me`
187
189
  - `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]
188
190
  - `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]
189
192
  - `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 }`
190
193
 
191
194
  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.
192
195
 
193
- A live refresh is 8 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.
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.
197
+
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.
194
199
 
195
200
  ### History
196
201
 
197
- One request with three searches, each from the Monday `historyWeeks` back: `is:pr is:merged author:@me`, `is:pr is:merged reviewed-by:@me -author:@me`, `is:issue is:closed assignee:@me`. Each result brings up to 20 label names, and issues their type [HIS-04]. About 4 points, mostly the label lists.
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.
198
203
 
199
204
  Every search is scoped to the configured orgs and repos; Next up's unclaimed issues as described under Next up.
200
205
 
package/index.server.ts CHANGED
@@ -40,6 +40,7 @@ export default function contribute(server: PluginServerContext) {
40
40
  server.handle(rpc.getAttention, ({ refresh }, { paseo }) => ready(() => (attention.connect(paseo), attention.get(refresh))));
41
41
  server.handle(rpc.dismissItem, ({ key }) => ready(() => attention.dismiss(key)));
42
42
  server.handle(rpc.undismissItem, ({ key }) => ready(() => attention.undismiss(key)));
43
+ server.handle(rpc.gotIt, ({ id, on }) => ready(() => attention.gotIt(id, on)));
43
44
  server.handle(rpc.restoreDismissed, () => ready(() => attention.restoreDismissed()));
44
45
  server.handle(rpc.setCodeRepo, ({ issueRepo, codeRepo }) => ready(() => attention.setCodeRepo(issueRepo, codeRepo)));
45
46
  server.handle(rpc.setupStatus, () => setupStatus());