@andrioid/paseo-attention-span 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OVERVIEW.md +11 -7
- package/client/attention-screen.tsx +182 -79
- package/client/card.tsx +5 -15
- package/client/coverage-settings.tsx +35 -4
- package/client/feedback.tsx +151 -0
- package/client/host.ts +8 -0
- package/client/icons.ts +3 -2
- package/client/next-up.tsx +29 -45
- package/client/session-menu.ts +18 -26
- package/client/sessions.ts +5 -2
- package/client/sheet.tsx +17 -72
- package/client/ui.tsx +0 -49
- package/docs/architecture.md +188 -0
- package/docs/screenshots/desktop-dark-doing-acknowledge.png +0 -0
- package/docs/screenshots/desktop-dark-doing-issue-sheet.png +0 -0
- package/docs/screenshots/desktop-dark-doing-reviewers.png +0 -0
- package/docs/screenshots/desktop-dark-doing-sheet.png +0 -0
- package/docs/screenshots/desktop-dark-doing-too-long.png +0 -0
- package/docs/screenshots/desktop-dark-doing.png +0 -0
- package/docs/screenshots/desktop-dark-history-reviewed.png +0 -0
- package/docs/screenshots/desktop-dark-history.png +0 -0
- package/docs/screenshots/desktop-dark-next-up-code-repo.png +0 -0
- package/docs/screenshots/desktop-dark-next-up.png +0 -0
- package/docs/screenshots/desktop-dark-settings.png +0 -0
- package/docs/screenshots/desktop-dark-setup.png +0 -0
- package/docs/screenshots/desktop-dark-waiting.png +0 -0
- package/docs/screenshots/phone-dark-doing.png +0 -0
- package/docs/screenshots/phone-light-next-up-filtered.png +0 -0
- package/index.client.tsx +15 -5
- package/index.server.ts +28 -2
- package/package.json +16 -2
- package/requirements.yaml +128 -0
- package/server/actions.ts +31 -1
- package/server/classify.ts +150 -52
- package/server/feedback.ts +38 -0
- package/server/fixture.ts +48 -16
- package/server/github-types.ts +15 -2
- package/server/queries.ts +15 -4
- package/server/rules.ts +119 -0
- package/server/service.ts +15 -3
- package/server/setup.ts +3 -3
- package/server/store.ts +5 -0
- package/shared/attention.ts +36 -2
- package/shared/config.ts +3 -0
- package/shared/feedback.ts +91 -0
- package/shared/rpc.ts +12 -1
- package/shared/setup.ts +2 -0
package/shared/rpc.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineRpc } from "@getpaseo/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { AttentionView, ItemDetails, Target } from "./attention";
|
|
3
|
+
import type { AttentionView, ItemDetails, ReviewerChoices, Target } from "./attention";
|
|
4
4
|
import { SessionKind } from "./config";
|
|
5
5
|
import type { ConfigStatus, CoverageCheck, SetupStatus } from "./setup";
|
|
6
|
+
import type { FeedbackInfo } from "./feedback";
|
|
6
7
|
|
|
7
8
|
// Both sides are this plugin, so the types are checked by TypeScript, not repeated as schemas.
|
|
8
9
|
const view = z.custom<AttentionView>();
|
|
@@ -25,6 +26,8 @@ export const checkCoverage = defineRpc({ name: "config.check-coverage", input: z
|
|
|
25
26
|
export const setCoverage = defineRpc({ name: "config.set-coverage", input: z.object({ orgs: z.array(z.string()), repos: z.array(z.string()) }), output: done });
|
|
26
27
|
// Where Next up looks, chosen in settings [NXT-04]; orgs are picked from the ones I belong to.
|
|
27
28
|
export const setNextUpSources = defineRpc({ name: "config.set-next-up", input: z.object({ mine: z.boolean(), orgs: z.array(z.string()), repos: z.array(z.string()) }), output: done });
|
|
29
|
+
// Replies on others' threads without a tag, from settings [ATT-17].
|
|
30
|
+
export const setFollowThreads = defineRpc({ name: "config.set-follow-threads", input: z.object({ on: z.boolean() }), output: done });
|
|
28
31
|
export const myOrgs = defineRpc({ name: "config.my-orgs", input: z.object({}), output: z.object({ orgs: z.array(z.string()) }) });
|
|
29
32
|
// Remember the scopes and sources ticked in Next up's filter [NXT-03, NXT-09].
|
|
30
33
|
export const setScopes = defineRpc({ name: "next-up.scopes", input: z.object({ scopes: z.array(z.string()) }), output: done });
|
|
@@ -43,6 +46,8 @@ export const reopenIssue = defineRpc({ name: "issue.reopen", input: z.object({ k
|
|
|
43
46
|
// `ready: false` and `on: false` are the Undo of each.
|
|
44
47
|
export const setReady = defineRpc({ name: "pr.ready", input: z.object({ key: z.string(), target, ready: z.boolean() }), output: view });
|
|
45
48
|
export const setAutoMerge = defineRpc({ name: "pr.auto-merge", input: z.object({ key: z.string(), target, on: z.boolean() }), output: view });
|
|
49
|
+
// Ask people or teams ("org/slug") to review; `on: false` withdraws them for Undo [PRS-12].
|
|
50
|
+
export const requestReviewers = defineRpc({ name: "pr.request-reviewers", input: z.object({ key: z.string(), target, reviewers: z.array(z.string()), on: z.boolean() }), output: view });
|
|
46
51
|
export const react = defineRpc({ name: "comment.react", input: z.object({ key: z.string(), subjectIds: z.array(z.string()), on: z.boolean() }), output: view });
|
|
47
52
|
export const rerunFailed = defineRpc({ name: "checks.rerun", input: z.object({ key: z.string(), repo: z.string(), runIds: z.array(z.number()) }), output: view });
|
|
48
53
|
|
|
@@ -53,6 +58,9 @@ export const itemDetails = defineRpc({
|
|
|
53
58
|
output: z.custom<ItemDetails>(),
|
|
54
59
|
});
|
|
55
60
|
|
|
61
|
+
// Who the reviewer picker offers, fetched when it opens [PRS-12].
|
|
62
|
+
export const reviewerChoices = defineRpc({ name: "pr.reviewer-choices", input: z.object({ target }), output: z.custom<ReviewerChoices>() });
|
|
63
|
+
|
|
56
64
|
// The branch a session on an issue starts from, when its code lives in another repo [SES-07].
|
|
57
65
|
export const defaultBranch = defineRpc({ name: "repo.default-branch", input: z.object({ repo: z.string() }), output: z.object({ name: z.string().nullable() }) });
|
|
58
66
|
|
|
@@ -62,3 +70,6 @@ export const sessionContext = defineRpc({
|
|
|
62
70
|
input: z.object({ kind: SessionKind, target }),
|
|
63
71
|
output: z.object({ context: z.string() }),
|
|
64
72
|
});
|
|
73
|
+
|
|
74
|
+
// Where a feedback session runs and the version it reports [FB-01].
|
|
75
|
+
export const feedbackInfo = defineRpc({ name: "feedback.info", input: z.object({}), output: z.custom<FeedbackInfo>() });
|
package/shared/setup.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface ConfigStatus {
|
|
|
7
7
|
repos: string[];
|
|
8
8
|
// Where Next up looks; none chosen falls back to `orgs` and `repos`, then my Paseo projects [NXT-04, NXT-08].
|
|
9
9
|
nextUp: { mine: boolean; orgs: string[]; repos: string[] };
|
|
10
|
+
// Replies on others' threads count without a tag [ATT-17].
|
|
11
|
+
followThreads: boolean;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export interface SetupStatus {
|