@gentbajko/slopify 4.3.0 → 4.3.2

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.
@@ -0,0 +1,13 @@
1
+ # Slopify 4.3.1
2
+
3
+ Released 9 November 2026.
4
+
5
+ Updating Slopify is now a thing you can see, not a thing you go looking for.
6
+
7
+ ## The update has its own button
8
+
9
+ - **It sits in the rail, under Assistant and above Help, and it is always there** — not a row at the foot of the Help menu, which is where it used to hide. Whether there is a new version is a question people ask of the app, not of its help.
10
+ - **Under the word is the version you are running.** No menu to open, no About page to find.
11
+ - **A version ready to install stands under that in green,** `→ 4.3.2`, with the whole button in the accent's ink, as a waiting update always looked. One press installs it; the button says so before you press, on it and to a screen reader: installing restarts Slopify, and anything running finishes first.
12
+ - **The arrow turns while it looks.** A check used to give nothing back until it had an answer, so a press felt like nothing happened. Now the button turns, says "Checking for updates…", and takes no second press until it is done. It stays still where the system asks for less motion.
13
+ - **On a phone** the same button sits in the top bar between Search and Help, with the versions left off, where there is no room for them; Settings → About still carries them in full.
@@ -0,0 +1,16 @@
1
+ # Slopify 4.3.2
2
+
3
+ Released 9 November 2026.
4
+
5
+ Two fixes: the settings screen opens again, and a video with many images gets scenes worth drawing.
6
+
7
+ ## Edit settings opens again
8
+
9
+ - **It crashed on every project in 4.3.1**, with `createHash is not a function` and nothing to do but Try again. The form read the count of names you carry from Settings → Voices → Name pronunciations, and the code it read it from also stamps the list's version by hashing — which a browser cannot do. It now reads the count from the parser alone.
10
+ - **A check keeps it from coming back.** The web build's imports are walked from the router, and anything that reaches a Node built-in for its values fails the suite rather than the screen.
11
+
12
+ ## Scenes are written a batch at a time
13
+
14
+ - **Every image's scene came from one request.** Asked for twelve the model spent about 42 words on each; asked for 240 it rationed them down to 18, and the first thing it dropped was the material, light and colour an image is drawn from. "Broken towers of dark stone, collapsed palaces and scorched fields under a smoke-heavy sky" became "a demon lunges at an adventurer", and the pictures came out pale and simple while the prompts, the model and the settings were untouched.
15
+ - **Scenes are now written sixteen at a time,** each call reading only the stretch of the article its own pictures are shown over, and each image waiting on the batch that writes its scene. No answer is long enough to be worth compressing.
16
+ - **A short video is unchanged** — one batch, the same single step it always had.
@@ -1,4 +1,16 @@
1
1
  [
2
+ {
3
+ "id": "4.3.2",
4
+ "title": "Slopify 4.3.2",
5
+ "version": "4.3.2",
6
+ "date": "2026-11-09"
7
+ },
8
+ {
9
+ "id": "4.3.1",
10
+ "title": "Slopify 4.3.1",
11
+ "version": "4.3.1",
12
+ "date": "2026-11-09"
13
+ },
2
14
  {
3
15
  "id": "4.3.0",
4
16
  "title": "Slopify 4.3.0",
@@ -88,6 +88,44 @@ export function pictureKind(body, name) {
88
88
  // The count is written on a line of its own so the answer can be checked against it when the
89
89
  // call runs (`sceneCountOf`), from the saved request alone.
90
90
  const countLine = /^Pictures: (\d+)$/m;
91
+ // How many scenes one call writes. A model asked for a long list rations its answer: every
92
+ // scene it writes is a clause instead of two sentences, and what it drops first is the
93
+ // material, light and colour an image is drawn from. Twelve scenes came back at about 42
94
+ // words each; 240 in one answer came back at 18, and the pictures went flat. So the scenes
95
+ // are written a batch at a time, each call reading only the stretch of the article its own
96
+ // pictures cover.
97
+ export const scenesPerCall = 16;
98
+ // The pictures in batches, in slideshow order: [0..15], [16..31], and so on.
99
+ export function sceneBatches(items, size = scenesPerCall) {
100
+ const batches = [];
101
+ for (let at = 0; at < items.length; at += size)
102
+ batches.push([...items.slice(at, at + size)]);
103
+ return batches;
104
+ }
105
+ // The stretch of the article each batch reads, split on paragraph breaks and shared out in
106
+ // proportion to how many pictures each batch holds, so batch N covers the part of the article
107
+ // its pictures are shown over. A short article that cannot be split gives every batch the
108
+ // whole of it, which is what a single call always did.
109
+ export function sceneArticleSlices(article, counts) {
110
+ const total = counts.reduce((sum, count) => sum + count, 0);
111
+ const paragraphs = article.split(/\n\s*\n/).filter((one) => one.trim() !== "");
112
+ if (total === 0)
113
+ return [];
114
+ if (paragraphs.length < counts.length)
115
+ return counts.map(() => article);
116
+ const slices = [];
117
+ let taken = 0;
118
+ let done = 0;
119
+ for (const [index, count] of counts.entries()) {
120
+ done += count;
121
+ const upto = index === counts.length - 1
122
+ ? paragraphs.length
123
+ : Math.max(taken + 1, Math.round((done / total) * paragraphs.length));
124
+ slices.push(paragraphs.slice(taken, upto).join("\n\n"));
125
+ taken = upto;
126
+ }
127
+ return slices;
128
+ }
91
129
  // The thumbnails' scenes come after the images', one per thumbnail, when the thumbnail
92
130
  // prompt asks for one with `{{Scene}}`. They are not tied to a stretch of the article: each is
93
131
  // the moment that would make someone click, a different one for each thumbnail.
@@ -82,7 +82,7 @@ function buildEach(plain) {
82
82
  ...thumbnail,
83
83
  ...documentRecipes(context, text, thumbnail),
84
84
  ...visualAssets(context, visualRecipes(context.config, context.content, audio.mediaFingerprint, captions?.fingerprint ?? null, (images) => editPlan(context, exports, youtube, images, audio.cards ?? []), drawnFrom, timing === undefined ? null : resourceIdentity(context, timing), withLines(masterPlan(context, audio.levels, "video"), linePlan(context, timing)), scenes, appearance, (text) => fillPrompt(context, text, "image"))),
85
- ...(scenes === undefined ? [] : [scenes.recipe]),
85
+ ...(scenes === undefined ? [] : scenes.recipes),
86
86
  ...(thumbnailScened === undefined ? [] : [thumbnailScened.recipe]),
87
87
  ...(appearance === undefined ? [] : [appearance.recipe]),
88
88
  ]);
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { withLanguage } from "../../kernel/ports/languages.js";
3
3
  import { subjectOf, thumbnailCountOf } from "../admission/model.js";
4
- import { pictureKind, sceneMessages, usesScene, usesSlopifyScene, wantsSceneDetails, } from "../images/scenes.js";
4
+ import { pictureKind, sceneArticleSlices, sceneBatches, sceneMessages, scenesPerCall, usesScene, usesSlopifyScene, wantsSceneDetails, } from "../images/scenes.js";
5
5
  import { recipe, selectedReference, } from "./recipe-model.js";
6
6
  import { llmInput, llmInputFingerprint } from "./recipe-text.js";
7
7
  export const imageScenesKey = "images:scenes";
@@ -71,26 +71,51 @@ export function imageScenes(context, text) {
71
71
  }
72
72
  if (keys.length === 0)
73
73
  return undefined;
74
- const messages = withLanguage(sceneMessages({
75
- title: subjectOf(config),
76
- article: text.pictureText ?? "",
77
- pictures,
78
- ...(details ? { details } : {}),
79
- }), config.language);
80
- const value = recipe(context, imageScenesKey, "images", text.pictureText === null
81
- ? {
82
- kind: "deferred",
83
- version: 1,
84
- operation: "image-scenes",
85
- template: [llmInputFingerprint(context, messages), text.article.fingerprint],
86
- }
87
- : llmInput(context, messages), [text.article.key]);
88
- const saved = text.pictureText === null ? undefined : savedScenes(context, value, keys.length);
74
+ const batches = sceneBatches(pictures);
75
+ const slices = sceneArticleSlices(text.pictureText ?? "", batches.map((batch) => batch.length));
76
+ const recipes = batches.map((batch, index) => {
77
+ const messages = withLanguage(sceneMessages({
78
+ title: subjectOf(config),
79
+ article: slices[index] ?? text.pictureText ?? "",
80
+ pictures: batch,
81
+ ...(details ? { details } : {}),
82
+ }), config.language);
83
+ // The first batch keeps the bare key, so a run with one batch has the step it always had.
84
+ const key = index === 0 ? imageScenesKey : `${imageScenesKey}:${String(index)}`;
85
+ return recipe(context, key, "images", text.pictureText === null
86
+ ? {
87
+ kind: "deferred",
88
+ version: 1,
89
+ operation: "image-scenes",
90
+ template: [llmInputFingerprint(context, messages), text.article.fingerprint],
91
+ }
92
+ : llmInput(context, messages), [text.article.key]);
93
+ });
94
+ // Every batch has to have answered before any image can take its scene: a missing one
95
+ // leaves the images waiting as deferred requests, exactly as one unanswered call did.
96
+ const saved = text.pictureText === null
97
+ ? undefined
98
+ : batches.reduce((carried, batch, index) => {
99
+ if (carried === undefined)
100
+ return undefined;
101
+ const one = savedScenes(context, recipes[index], batch.length);
102
+ if (one === undefined)
103
+ return undefined;
104
+ return {
105
+ scenes: [...carried.scenes, ...one.scenes],
106
+ details: [
107
+ ...carried.details,
108
+ ...(one.details ?? batch.map(() => ({}))),
109
+ ],
110
+ any: carried.any || one.details !== undefined,
111
+ };
112
+ }, { scenes: [], details: [], any: false });
89
113
  return {
90
- recipe: value,
114
+ recipes,
115
+ recipeFor: (at) => recipes[Math.min(Math.floor(at / scenesPerCall), recipes.length - 1)],
91
116
  keys,
92
117
  scenes: saved?.scenes,
93
- ...(saved?.details === undefined ? {} : { details: saved.details }),
118
+ ...(saved?.any === true ? { details: saved.details } : {}),
94
119
  legacy,
95
120
  };
96
121
  }
@@ -181,7 +181,7 @@ function sceneImage(config, content, key, body, scenes, at, reference, appearanc
181
181
  version: 1,
182
182
  operation: "image-scene",
183
183
  template: [
184
- scenes.recipe.fingerprint,
184
+ scenes.recipeFor(at).fingerprint,
185
185
  at,
186
186
  config.images?.provider ?? null,
187
187
  config.images?.model ?? null,
@@ -201,7 +201,7 @@ function sceneImage(config, content, key, body, scenes, at, reference, appearanc
201
201
  ...(reference === undefined ? {} : { reference: reference.input }),
202
202
  ...castField(castFor(config, prompt)),
203
203
  }, [
204
- scenes.recipe.key,
204
+ scenes.recipeFor(at).key,
205
205
  ...wait.dependsOn,
206
206
  ...(reference === undefined ? [] : [reference.key]),
207
207
  ...keyed.dependsOn,
@@ -203,7 +203,7 @@ function checkAnswer(piece, answer) {
203
203
  ? `The AI model's description had no words a narrator could say. Use Try again; if it keeps happening, choose another model in ${editSettings.writer}, or turn off Describe tables and figures in ${editSettings.narration}.`
204
204
  : undefined;
205
205
  // Scenes from the article: one scene per image, as many as the request lists.
206
- if ((piece.key === imageScenesKey || piece.key === thumbnailScenesKey) &&
206
+ if ((piece.key.startsWith(imageScenesKey) || piece.key === thumbnailScenesKey) &&
207
207
  piece.input.kind === "llm") {
208
208
  const checked = checkScenes(answer.text, sceneCountOf(piece.input.messages) ?? 0);
209
209
  return checked.ok ? undefined : checked.reason;
@@ -245,7 +245,7 @@ function attributionSource(messages) {
245
245
  return messages.at(-1)?.content ?? "";
246
246
  }
247
247
  async function publishText(deps, context, piece, answer) {
248
- if ((piece.key === imageScenesKey || piece.key === thumbnailScenesKey) &&
248
+ if ((piece.key.startsWith(imageScenesKey) || piece.key === thumbnailScenesKey) &&
249
249
  piece.input.kind === "llm") {
250
250
  const checked = checkScenes(answer.text, sceneCountOf(piece.input.messages) ?? 0);
251
251
  if (!checked.ok)