pi-odd-worktree 3.11.2 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/extensions/odd-worktree-tools.ts +1175 -39
- package/lib/issues-view.js +21 -4
- package/lib/odd-group.js +655 -0
- package/lib/odd-listing.js +349 -0
- package/lib/odd-rail-model.js +150 -0
- package/lib/odd-rail-section.js +453 -0
- package/lib/odd-session.js +231 -0
- package/lib/odd-view.js +500 -46
- package/lib/prs-view.js +22 -4
- package/package.json +1 -1
- package/tools/commands.test.js +58 -0
- package/tools/issues-command.test.js +13 -2
- package/tools/issues-open-guard.test.js +7 -1
- package/tools/issues-section.test.js +11 -2
- package/tools/issues-view.test.js +46 -0
- package/tools/odd-group.test.js +950 -0
- package/tools/odd-listing.test.js +504 -0
- package/tools/odd-panel-wiring.test.js +1868 -0
- package/tools/odd-rail-model.test.js +184 -0
- package/tools/odd-rail-section.test.js +524 -0
- package/tools/odd-rail-wiring.test.js +572 -0
- package/tools/odd-session-wiring.test.js +419 -0
- package/tools/odd-session.test.js +282 -0
- package/tools/odd-view.test.js +407 -1
- package/tools/package-surface.test.js +22 -6
- package/tools/prs-command.test.js +1 -1
- package/tools/prs-view.test.js +82 -0
package/lib/issues-view.js
CHANGED
|
@@ -1197,6 +1197,22 @@ function createIssuesView(options = {}) {
|
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
+
// S10a (cross-bucket): every bucket stores its OWN copy of a row, so one write
|
|
1201
|
+
// that closed an issue closed it in every bucket that lists it. Marking only
|
|
1202
|
+
// the bucket on screen left the others painting the pre-write row — and the
|
|
1203
|
+
// pre-write count that row honored — until the reader happened to visit them.
|
|
1204
|
+
// The row keeps its new state where each bucket stores it, so the open-only
|
|
1205
|
+
// filter and every count follow it at once, and `invalidateLoadedPages` still
|
|
1206
|
+
// makes the next visit read GitHub's own answer.
|
|
1207
|
+
function markIssueStateEverywhere(number, nextState) {
|
|
1208
|
+
pages.forEach((page) => {
|
|
1209
|
+
if (!Array.isArray(page.issues)) return;
|
|
1210
|
+
page.issues.forEach((row) => {
|
|
1211
|
+
if (numOf(row) === number) row.state = nextState;
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1200
1216
|
// S21 (T17): a save that changed the VIEWER's own assignment changed which
|
|
1201
1217
|
// bucket holds the issue, and the answer says so (`self`). Only `assigned`
|
|
1202
1218
|
// moves: `mine` is authorship and `involved` excludes the viewer's own
|
|
@@ -2350,10 +2366,11 @@ function createIssuesView(options = {}) {
|
|
|
2350
2366
|
result = { ok: false, error: (err && err.message) || 'action failed' };
|
|
2351
2367
|
}
|
|
2352
2368
|
settleSave(result, () => {
|
|
2353
|
-
// S10a: the list is open-only, so a closed issue leaves
|
|
2354
|
-
//
|
|
2355
|
-
// and every count
|
|
2356
|
-
|
|
2369
|
+
// S10a: the list is open-only, so a closed issue leaves EVERY bucket that
|
|
2370
|
+
// lists it at once — not only the one on screen. The row keeps its new
|
|
2371
|
+
// state where it is stored, and the open-only filter and every count
|
|
2372
|
+
// follow it.
|
|
2373
|
+
markIssueStateEverywhere(number, 'closed');
|
|
2357
2374
|
const cached = details.get(number);
|
|
2358
2375
|
if (cached && cached.issue) cached.issue = { ...cached.issue, state: 'closed' };
|
|
2359
2376
|
state.mode = 'list';
|