@gentbajko/slopify 4.5.0 → 4.5.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.
@@ -13,7 +13,7 @@ import { channelById, projectChannels, setProjectChannel } from "../../slices/ch
13
13
  import { withProjectControl } from "../../slices/control/lock.js";
14
14
  import { stagesWithEta } from "../../slices/eta/view.js";
15
15
  import { sampleProjectIds } from "../../slices/onboarding/sample.js";
16
- import { videoActivity } from "../../slices/rebuild/activity.js";
16
+ import { imagesActivity, videoActivity } from "../../slices/rebuild/activity.js";
17
17
  import { projectHolds } from "../../slices/reviews/holds.js";
18
18
  import { adoptBaseline } from "../../slices/revisions/adopt.js";
19
19
  import { currentRevisionId } from "../../slices/revisions/repo.js";
@@ -143,9 +143,13 @@ export function projectRoutes(deps) {
143
143
  ...(stopped ? { stopped: true } : {}),
144
144
  },
145
145
  stages: stagesWithEta(deps.db, stagesOf(deps.db, project.id), project.config, deps.clock.now()).map((stage) => {
146
- if (stage.kind !== "video" || stage.state !== "running")
146
+ if (stage.state !== "running")
147
147
  return stage;
148
- const activity = videoActivity(deps.db, project.id);
148
+ const activity = stage.kind === "video"
149
+ ? videoActivity(deps.db, project.id)
150
+ : stage.kind === "images"
151
+ ? imagesActivity(deps.db, project.id)
152
+ : undefined;
149
153
  return activity === undefined ? stage : { ...stage, activity };
150
154
  }),
151
155
  outputs: outputsOf(deps.db, project.id),
@@ -0,0 +1,11 @@
1
+ # Slopify 4.5.1
2
+
3
+ Released 18 November 2026.
4
+
5
+ The Images step now counts its pictures and their checks apart, so a video of 240 pictures no longer reads "259 of 496".
6
+
7
+ ## Pictures and checks counted once each
8
+
9
+ - **With the picture check on, the Images row says "234 of 240 pictures · 43 of 240 checked"** on the project page, in the run's step list and under Home's pictures. Before, every picture and every check counted as one step together, so 240 pictures showed as about 496.
10
+ - **The time left still covers both:** the drawing and the checking still to do.
11
+ - **Without the picture check,** the row says only how many pictures are drawn.
@@ -1,4 +1,10 @@
1
1
  [
2
+ {
3
+ "id": "4.5.1",
4
+ "title": "Slopify 4.5.1",
5
+ "version": "4.5.1",
6
+ "date": "2026-11-18"
7
+ },
2
8
  {
3
9
  "id": "4.5.0",
4
10
  "title": "Slopify 4.5.0",
@@ -11,21 +11,54 @@ function counted(rows, match) {
11
11
  return undefined;
12
12
  return { done: own.filter((row) => row.state === "done").length, total: own.length };
13
13
  }
14
- export function videoActivity(db, projectId) {
14
+ // The current version's steps of one stage.
15
+ function stageRows(db, projectId, kind) {
15
16
  const head = currentRevisionId(db, projectId);
16
17
  if (head === undefined)
17
18
  return undefined;
18
- const rows = db
19
+ return db
19
20
  .prepare(`SELECT r.work_key AS key, w.state AS state, w.progress_current AS current, w.progress_total AS total
20
21
  FROM revision_work_reservations r JOIN revision_work w ON w.id = r.work_id
21
- WHERE r.revision_id = ? AND w.project_id = ? AND w.kind = 'video'`)
22
- .all(head, projectId)
22
+ WHERE r.revision_id = ? AND w.project_id = ? AND w.kind = ?`)
23
+ .all(head, projectId, kind)
23
24
  .map((row) => ({
24
25
  key: String(row.key),
25
26
  state: String(row.state),
26
27
  current: typeof row.current === "number" ? row.current : null,
27
28
  total: typeof row.total === "number" ? row.total : null,
28
29
  }));
30
+ }
31
+ // What a running Images stage is doing. With the picture check on, each picture is a step and
32
+ // its check another, so the stage's own count read "259 of 496" for 240 pictures. Counted
33
+ // apart, each once: "240 of 240 pictures · 33 of 240 checked". Writing the scenes comes
34
+ // before any picture, and keeps the stage's own count.
35
+ export function imagesActivity(db, projectId) {
36
+ const rows = stageRows(db, projectId, "images");
37
+ if (rows === undefined)
38
+ return undefined;
39
+ const tally = (match) => {
40
+ const own = rows.filter((row) => match.test(row.key));
41
+ return { done: own.filter((row) => row.state === "done").length, total: own.length };
42
+ };
43
+ const pictures = tally(/^image:/);
44
+ if (pictures.total === 0)
45
+ return undefined;
46
+ const checks = tally(/^review:image:/);
47
+ const parts = [
48
+ { noun: "pictures", ...pictures },
49
+ ...(checks.total === 0 ? [] : [{ noun: "checked", ...checks }]),
50
+ ];
51
+ return {
52
+ label: checks.total === 0 ? "drawing the pictures" : "drawing and checking the pictures",
53
+ done: pictures.done + checks.done,
54
+ total: pictures.total + checks.total,
55
+ parts,
56
+ };
57
+ }
58
+ export function videoActivity(db, projectId) {
59
+ const rows = stageRows(db, projectId, "video");
60
+ if (rows === undefined)
61
+ return undefined;
29
62
  const running = (key) => rows.find((row) => row.key === key && row.state === "running");
30
63
  const percent = (label, row) => {
31
64
  const value = percentOf(row);