quadwork 1.3.0 → 1.5.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 (93) hide show
  1. package/README.md +189 -82
  2. package/bin/quadwork.js +82 -0
  3. package/out/404.html +1 -1
  4. package/out/__next.__PAGE__.txt +3 -3
  5. package/out/__next._full.txt +12 -12
  6. package/out/__next._head.txt +4 -4
  7. package/out/__next._index.txt +6 -6
  8. package/out/__next._tree.txt +2 -2
  9. package/out/_next/static/chunks/{134b1p_egmf1c.js → 0-y13tz~pmpno.js} +1 -1
  10. package/out/_next/static/chunks/{0swlbn4q4u71z.js → 0.9m84as-sc_r.js} +14 -14
  11. package/out/_next/static/chunks/05.po0c1knrbu.css +2 -0
  12. package/out/_next/static/chunks/084lff9v4p_vh.js +1 -0
  13. package/out/_next/static/chunks/{0md7hgvwnovzq.js → 0e.ktwt1nyj...js} +1 -1
  14. package/out/_next/static/chunks/{0e~ue9ca5zrep.js → 0za4cvk8.n0-y.js} +1 -1
  15. package/out/_next/static/chunks/17y2walb2um9w.js +1 -0
  16. package/out/_not-found/__next._full.txt +11 -11
  17. package/out/_not-found/__next._head.txt +4 -4
  18. package/out/_not-found/__next._index.txt +6 -6
  19. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  20. package/out/_not-found/__next._not-found.txt +3 -3
  21. package/out/_not-found/__next._tree.txt +2 -2
  22. package/out/_not-found.html +1 -1
  23. package/out/_not-found.txt +11 -11
  24. package/out/app-shell/__next._full.txt +11 -11
  25. package/out/app-shell/__next._head.txt +4 -4
  26. package/out/app-shell/__next._index.txt +6 -6
  27. package/out/app-shell/__next._tree.txt +2 -2
  28. package/out/app-shell/__next.app-shell.__PAGE__.txt +2 -2
  29. package/out/app-shell/__next.app-shell.txt +3 -3
  30. package/out/app-shell.html +1 -1
  31. package/out/app-shell.txt +11 -11
  32. package/out/index.html +1 -1
  33. package/out/index.txt +12 -12
  34. package/out/project/_/__next._full.txt +12 -12
  35. package/out/project/_/__next._head.txt +4 -4
  36. package/out/project/_/__next._index.txt +6 -6
  37. package/out/project/_/__next._tree.txt +2 -2
  38. package/out/project/_/__next.project.$d$id.__PAGE__.txt +3 -3
  39. package/out/project/_/__next.project.$d$id.txt +3 -3
  40. package/out/project/_/__next.project.txt +3 -3
  41. package/out/project/_/memory/__next._full.txt +12 -12
  42. package/out/project/_/memory/__next._head.txt +4 -4
  43. package/out/project/_/memory/__next._index.txt +6 -6
  44. package/out/project/_/memory/__next._tree.txt +2 -2
  45. package/out/project/_/memory/__next.project.$d$id.memory.__PAGE__.txt +3 -3
  46. package/out/project/_/memory/__next.project.$d$id.memory.txt +3 -3
  47. package/out/project/_/memory/__next.project.$d$id.txt +3 -3
  48. package/out/project/_/memory/__next.project.txt +3 -3
  49. package/out/project/_/memory.html +1 -1
  50. package/out/project/_/memory.txt +12 -12
  51. package/out/project/_/queue/__next._full.txt +12 -12
  52. package/out/project/_/queue/__next._head.txt +4 -4
  53. package/out/project/_/queue/__next._index.txt +6 -6
  54. package/out/project/_/queue/__next._tree.txt +2 -2
  55. package/out/project/_/queue/__next.project.$d$id.queue.__PAGE__.txt +3 -3
  56. package/out/project/_/queue/__next.project.$d$id.queue.txt +3 -3
  57. package/out/project/_/queue/__next.project.$d$id.txt +3 -3
  58. package/out/project/_/queue/__next.project.txt +3 -3
  59. package/out/project/_/queue.html +1 -1
  60. package/out/project/_/queue.txt +12 -12
  61. package/out/project/_.html +1 -1
  62. package/out/project/_.txt +12 -12
  63. package/out/settings/__next._full.txt +12 -12
  64. package/out/settings/__next._head.txt +4 -4
  65. package/out/settings/__next._index.txt +6 -6
  66. package/out/settings/__next._tree.txt +2 -2
  67. package/out/settings/__next.settings.__PAGE__.txt +3 -3
  68. package/out/settings/__next.settings.txt +3 -3
  69. package/out/settings.html +1 -1
  70. package/out/settings.txt +12 -12
  71. package/out/setup/__next._full.txt +12 -12
  72. package/out/setup/__next._head.txt +4 -4
  73. package/out/setup/__next._index.txt +6 -6
  74. package/out/setup/__next._tree.txt +2 -2
  75. package/out/setup/__next.setup.__PAGE__.txt +3 -3
  76. package/out/setup/__next.setup.txt +3 -3
  77. package/out/setup.html +1 -1
  78. package/out/setup.txt +12 -12
  79. package/package.json +5 -2
  80. package/server/index.js +274 -12
  81. package/server/queue-watcher.js +47 -10
  82. package/server/queue-watcher.test.js +64 -0
  83. package/server/routes.batchProgress.test.js +94 -0
  84. package/server/routes.js +752 -33
  85. package/server/routes.parseActiveBatch.test.js +88 -0
  86. package/server/routes.telegramBridge.test.js +70 -0
  87. package/templates/CLAUDE.md +0 -1
  88. package/out/_next/static/chunks/06mbme.sc_26-.css +0 -2
  89. package/out/_next/static/chunks/0caq73v0knw_w.js +0 -1
  90. package/out/_next/static/chunks/0omuxbg.tg-il.js +0 -1
  91. /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → OzDK1Fplm2eUu23bzILlU}/_buildManifest.js +0 -0
  92. /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → OzDK1Fplm2eUu23bzILlU}/_clientMiddlewareManifest.js +0 -0
  93. /package/out/_next/static/{na3L7KeOGKGsbamYVibRj → OzDK1Fplm2eUu23bzILlU}/_ssgManifest.js +0 -0
@@ -0,0 +1,94 @@
1
+ // #350 / quadwork#350: batch-progress no-linked-PR row builder +
2
+ // summarizer tests. Plain node:assert script — run with
3
+ // `node server/routes.batchProgress.test.js`.
4
+
5
+ const assert = require("node:assert/strict");
6
+ const { buildNoPrRow, summarizeItems } = require("./routes");
7
+
8
+ // 1) #350 regression fixture: CLOSED issue with no linked PR
9
+ // must render as 100% complete, not 0% queued.
10
+ {
11
+ const issue = {
12
+ number: 336,
13
+ title: "superseded by #338",
14
+ state: "CLOSED",
15
+ url: "https://github.com/realproject7/quadwork/issues/336",
16
+ };
17
+ const row = buildNoPrRow(issue);
18
+ assert.equal(row.status, "closed", "CLOSED with no PR → status=closed");
19
+ assert.equal(row.progress, 100, "CLOSED with no PR → 100%");
20
+ assert.match(row.label, /Closed.*✓/, "label has Closed and ✓ marker");
21
+ assert.equal(row.issue_number, 336);
22
+ assert.equal(row.url, issue.url);
23
+ }
24
+
25
+ // 2) OPEN issue with no linked PR still renders as queued.
26
+ {
27
+ const issue = {
28
+ number: 400,
29
+ title: "still open",
30
+ state: "OPEN",
31
+ url: "https://github.com/realproject7/quadwork/issues/400",
32
+ };
33
+ const row = buildNoPrRow(issue);
34
+ assert.equal(row.status, "queued", "OPEN with no PR → queued");
35
+ assert.equal(row.progress, 0);
36
+ assert.equal(row.label, "Issue · queued");
37
+ }
38
+
39
+ // 3) summarizeItems with a mix of merged and closed-without-PR:
40
+ // should count both toward the complete total, label "complete"
41
+ // when closed > 0.
42
+ {
43
+ const items = [
44
+ { status: "merged" },
45
+ { status: "merged" },
46
+ { status: "merged" },
47
+ { status: "merged" },
48
+ { status: "merged" },
49
+ { status: "closed" },
50
+ { status: "closed" },
51
+ ];
52
+ const out = summarizeItems(items);
53
+ assert.equal(out, "7/7 complete", "mixed merged+closed → X/N complete");
54
+ }
55
+
56
+ // 4) summarizeItems with only merged items keeps the classic
57
+ // "X/N merged" wording (no behavior change for PR-only batches).
58
+ {
59
+ const items = [
60
+ { status: "merged" },
61
+ { status: "merged" },
62
+ { status: "merged" },
63
+ ];
64
+ assert.equal(summarizeItems(items), "3/3 merged");
65
+ }
66
+
67
+ // 5) summarizeItems with a queued + closed mix: done count is
68
+ // closed only, queued surfaces in the detail tail.
69
+ {
70
+ const items = [
71
+ { status: "closed" },
72
+ { status: "queued" },
73
+ { status: "queued" },
74
+ ];
75
+ assert.equal(summarizeItems(items), "1/3 complete · 2 queued");
76
+ }
77
+
78
+ // 6) summarizeItems with in-flight PR states still tallies them
79
+ // in the detail tail and keeps the done count at merged-only.
80
+ {
81
+ const items = [
82
+ { status: "merged" },
83
+ { status: "ready" },
84
+ { status: "approved1" },
85
+ { status: "in_review" },
86
+ { status: "queued" },
87
+ ];
88
+ assert.equal(
89
+ summarizeItems(items),
90
+ "1/5 merged · 1 ready to merge · 1 needs 2nd approval · 1 in review · 1 queued",
91
+ );
92
+ }
93
+
94
+ console.log("routes.batchProgress.test.js: all assertions passed (6 cases)");