pi-odd-worktree 3.9.2 → 3.11.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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -40
  3. package/extensions/odd-worktree-tools.ts +1028 -17
  4. package/lib/gh-issues.js +65 -10
  5. package/lib/gh-prs.js +2011 -0
  6. package/lib/issue-preview.js +70 -4
  7. package/lib/issues-cache-store.js +4 -1
  8. package/lib/issues-section.js +346 -23
  9. package/lib/issues-view.js +116 -5
  10. package/lib/pr-preview.js +353 -0
  11. package/lib/prs-rail-store.js +317 -0
  12. package/lib/prs-view.js +2896 -0
  13. package/lib/user-prompt-card.js +477 -0
  14. package/package.json +1 -1
  15. package/tools/files-bridge.test.js +2 -2
  16. package/tools/files-command.test.js +1 -1
  17. package/tools/fixtures/gh-pr-connection-page.json +84 -0
  18. package/tools/fixtures/gh-pr-metadata.json +29 -0
  19. package/tools/fixtures/gh-pr-rail.json +61 -0
  20. package/tools/fixtures/gh-pr-search-page.json +82 -0
  21. package/tools/fixtures/gh-pr-view.json +159 -0
  22. package/tools/gh-issues.test.js +4 -2
  23. package/tools/gh-prs.test.js +1828 -0
  24. package/tools/issue-preview.test.js +119 -0
  25. package/tools/issues-cache-store.test.js +2 -2
  26. package/tools/issues-command.test.js +10 -3
  27. package/tools/issues-open-guard.test.js +15 -0
  28. package/tools/issues-section.test.js +618 -9
  29. package/tools/issues-view.test.js +297 -0
  30. package/tools/package-surface.test.js +21 -5
  31. package/tools/pr-preview.test.js +281 -0
  32. package/tools/prs-command.test.js +1280 -0
  33. package/tools/prs-rail-store.test.js +343 -0
  34. package/tools/prs-t10-safety.test.js +326 -0
  35. package/tools/prs-t12-safety.test.js +348 -0
  36. package/tools/prs-t13-independent.test.js +378 -0
  37. package/tools/prs-t14-safety.test.js +340 -0
  38. package/tools/prs-t15-independent.test.js +259 -0
  39. package/tools/prs-t18-safety.test.js +217 -0
  40. package/tools/prs-t7-safety.test.js +127 -0
  41. package/tools/prs-view.test.js +1462 -0
  42. package/tools/user-prompt-card.test.js +963 -0
@@ -0,0 +1,82 @@
1
+ {
2
+ "data": {
3
+ "search": {
4
+ "issueCount": 2,
5
+ "pageInfo": {
6
+ "hasNextPage": false,
7
+ "endCursor": "Y3Vyc29yOnYyOpK5MjAyNi0xMC0xOVQwODowMDowMFo"
8
+ },
9
+ "edges": [
10
+ {
11
+ "cursor": "Y3Vyc29yOnYyOpK5MjAyNi0xMC0xOVQwODowMDowMFo",
12
+ "node": {
13
+ "number": 87,
14
+ "title": "feat: the prs panel",
15
+ "state": "OPEN",
16
+ "isDraft": false,
17
+ "url": "https://github.com/jonasotoaguilar/herdr-gentle-shell/pull/87",
18
+ "createdAt": "2026-10-18T04:21:27Z",
19
+ "updatedAt": "2026-10-19T08:00:00Z",
20
+ "author": {
21
+ "login": "jonasotoaguilar"
22
+ },
23
+ "labels": {
24
+ "nodes": [
25
+ {
26
+ "name": "enhancement",
27
+ "color": "a2eeef",
28
+ "description": "New feature or request"
29
+ }
30
+ ]
31
+ },
32
+ "assignees": {
33
+ "nodes": [
34
+ {
35
+ "login": "octocat"
36
+ }
37
+ ]
38
+ },
39
+ "comments": {
40
+ "totalCount": 2
41
+ },
42
+ "reactionGroups": [
43
+ {
44
+ "content": "HEART",
45
+ "users": {
46
+ "totalCount": 3
47
+ }
48
+ }
49
+ ],
50
+ "reviewDecision": "REVIEW_REQUIRED"
51
+ }
52
+ },
53
+ {
54
+ "cursor": "Y3Vyc29yOnYyOpK5MjAyNi0xMC0xN1QwOTowMDowMFo",
55
+ "node": {
56
+ "number": 86,
57
+ "title": "fix: the rail count",
58
+ "state": "OPEN",
59
+ "isDraft": true,
60
+ "url": "https://github.com/jonasotoaguilar/herdr-gentle-shell/pull/86",
61
+ "createdAt": "2026-10-17T09:00:00Z",
62
+ "updatedAt": "2026-10-17T09:30:00Z",
63
+ "author": {
64
+ "login": "jonasotoaguilar"
65
+ },
66
+ "labels": {
67
+ "nodes": []
68
+ },
69
+ "assignees": {
70
+ "nodes": []
71
+ },
72
+ "comments": {
73
+ "totalCount": 0
74
+ },
75
+ "reactionGroups": [],
76
+ "reviewDecision": ""
77
+ }
78
+ }
79
+ ]
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,159 @@
1
+ {
2
+ "number": 87,
3
+ "title": "feat: the prs panel",
4
+ "state": "OPEN",
5
+ "isDraft": false,
6
+ "author": {
7
+ "id": "U_kgDOBXYt8A",
8
+ "is_bot": false,
9
+ "login": "jonasotoaguilar",
10
+ "name": "Jonathan Soto"
11
+ },
12
+ "assignees": [
13
+ {
14
+ "id": "U_kgDOBXYt8B",
15
+ "login": "octocat",
16
+ "name": "The Octocat"
17
+ }
18
+ ],
19
+ "labels": [
20
+ {
21
+ "color": "a2eeef",
22
+ "description": "New feature or request",
23
+ "name": "enhancement"
24
+ }
25
+ ],
26
+ "createdAt": "2026-10-18T04:21:27Z",
27
+ "updatedAt": "2026-10-19T08:00:00Z",
28
+ "comments": [
29
+ {
30
+ "id": "IC_kwDOA1",
31
+ "author": {
32
+ "login": "reviewer-one"
33
+ },
34
+ "authorAssociation": "MEMBER",
35
+ "createdAt": "2026-10-18T05:00:00Z",
36
+ "body": "Looks good to me",
37
+ "reactionGroups": [
38
+ {
39
+ "content": "THUMBS_UP",
40
+ "users": {
41
+ "totalCount": 2
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "id": "IC_kwDOA2",
48
+ "author": {
49
+ "login": "reviewer-two"
50
+ },
51
+ "authorAssociation": "CONTRIBUTOR",
52
+ "createdAt": "2026-10-19T06:00:00Z",
53
+ "body": "One question about the merge flow",
54
+ "reactionGroups": []
55
+ }
56
+ ],
57
+ "reactionGroups": [
58
+ {
59
+ "content": "HEART",
60
+ "users": {
61
+ "totalCount": 3
62
+ }
63
+ }
64
+ ],
65
+ "url": "https://github.com/jonasotoaguilar/herdr-gentle-shell/pull/87",
66
+ "body": "## Summary\n\nAdds the `/prs` panel.\n\nCloses #63\n\nRisk: item 1 (the merge is an irreversible effect)",
67
+ "baseRefName": "main",
68
+ "headRefName": "feat/prs-panel",
69
+ "headRepositoryOwner": {
70
+ "id": "O_kgDOA1",
71
+ "login": "jonasotoaguilar"
72
+ },
73
+ "additions": 412,
74
+ "deletions": 31,
75
+ "changedFiles": 9,
76
+ "commits": [
77
+ {
78
+ "oid": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678",
79
+ "committedDate": "2026-10-18T04:10:00Z",
80
+ "messageHeadline": "feat: scaffold the prs client"
81
+ },
82
+ {
83
+ "oid": "b2c3d4e5f60718293a4b5c6d7e8f90123456789",
84
+ "committedDate": "2026-10-19T07:30:00Z",
85
+ "messageHeadline": "test: pin the merge argv"
86
+ }
87
+ ],
88
+ "reviewDecision": "REVIEW_REQUIRED",
89
+ "reviewRequests": [
90
+ {
91
+ "requestedReviewer": {
92
+ "__typename": "User",
93
+ "login": "reviewer-two"
94
+ }
95
+ },
96
+ {
97
+ "requestedReviewer": {
98
+ "__typename": "Team",
99
+ "name": "core"
100
+ }
101
+ }
102
+ ],
103
+ "latestReviews": [
104
+ {
105
+ "author": {
106
+ "login": "reviewer-one"
107
+ },
108
+ "state": "APPROVED",
109
+ "submittedAt": "2026-10-19T06:30:00Z"
110
+ }
111
+ ],
112
+ "statusCheckRollup": [
113
+ {
114
+ "__typename": "CheckRun",
115
+ "name": "build",
116
+ "status": "COMPLETED",
117
+ "conclusion": "FAILURE"
118
+ },
119
+ {
120
+ "__typename": "CheckRun",
121
+ "name": "lint",
122
+ "status": "COMPLETED",
123
+ "conclusion": "SUCCESS"
124
+ },
125
+ {
126
+ "__typename": "CheckRun",
127
+ "name": "types",
128
+ "status": "COMPLETED",
129
+ "conclusion": "SKIPPED"
130
+ },
131
+ {
132
+ "__typename": "CheckRun",
133
+ "name": "tests",
134
+ "status": "IN_PROGRESS",
135
+ "conclusion": null
136
+ },
137
+ {
138
+ "__typename": "StatusContext",
139
+ "context": "ci/coverage",
140
+ "state": "SUCCESS"
141
+ }
142
+ ],
143
+ "mergeable": "MERGEABLE",
144
+ "mergeStateStatus": "BLOCKED",
145
+ "closingIssuesReferences": [
146
+ {
147
+ "number": 63,
148
+ "title": "linked issue"
149
+ },
150
+ {
151
+ "number": 63,
152
+ "title": "the same issue twice"
153
+ },
154
+ {
155
+ "number": 14,
156
+ "title": "another linked issue"
157
+ }
158
+ ]
159
+ }
@@ -1618,8 +1618,10 @@ describe('listRelatedIssues: one combined read of the three scoped views', () =>
1618
1618
  assert.equal(/timelineItems\(first:/.test(query), false,
1619
1619
  'never the oldest window: the marker names the newest pull request (S3)');
1620
1620
  // T9 (S8): the marker is a NUMBER, so the cross-referenced source carries it.
1621
- assert.ok(query.includes('... on PullRequest { number }'),
1622
- 'the pull-request source selection asks for its number');
1621
+ // S6/D29: and the REPOSITORY it belongs to, because a linked pull request is
1622
+ // identified by both — a same-numbered one elsewhere is not this marker.
1623
+ assert.ok(query.includes('... on PullRequest { number repository { nameWithOwner } }'),
1624
+ 'the pull-request source selection asks for its number and its repository');
1623
1625
  // T10 (S9): the row the rail caches is the panel\'s seed, so it carries the
1624
1626
  // assignees the first frame shows.
1625
1627
  assert.ok(query.includes('assignees(first: 10) { nodes { login } }'),