Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (claude): fingerprint panel description for page-turn staleness; route splash flag through isSplashPage

Adam Eivybaae1650c632
diff --git a/server/lib/editorial/comicPacing.js b/server/lib/editorial/comicPacing.js
index 6ac3087ec7..255f5843d6 100644
--- a/server/lib/editorial/comicPacing.js
+++ b/server/lib/editorial/comicPacing.js
@@ -71,7 +71,7 @@ export function summarizeComicPages(pages) {
return {
pageNumber: pos.pageNumber,
panelCount: panels.length,
- isSplash: panels.length === 1,
+ isSplash: isSplashPage(page),
side: pos.side,
spread: pos.spread,
beginsSpread: pos.beginsSpread,
diff --git a/server/services/pipeline/editorial/checkRunner.js b/server/services/pipeline/editorial/checkRunner.js
index 7fe9ccfbfd..3d55440e8f 100644
--- a/server/services/pipeline/editorial/checkRunner.js
+++ b/server/services/pipeline/editorial/checkRunner.js
@@ -147,18 +147,23 @@ function projectStoryboardContinuity(storyboardScenes) {
}));
}
-// Project the loaded issues down to the lettering-relevant comic content the check
-// analyzes, via the registry's shared `comicLetteringIssues` (so the fingerprint
-// can't drift from what `run` reads). Keeps ONLY caption/dialogue/SFX — the fields
-// `panelLetteringMetrics` consumes — so the hash is stable across image renders and
-// description edits that don't change lettering. PAGE GROUPING is preserved (not
-// flattened): the check reports per-page totals and page/panel locations, so moving
-// panels between pages must change the hash even when the lettering text is identical.
+// Project the loaded issues down to the comic content the `comicScript`-source
+// checks analyze, via the registry's shared `comicLetteringIssues` (so the
+// fingerprint can't drift from what the checks read). The `comicScript` token is
+// shared: the lettering check (#1313) reads caption/dialogue/SFX, and the
+// page-turn check (#1314) additionally reads each panel's `description`. The
+// fingerprint must cover the UNION of fields any comic check reads off the token,
+// so it includes `description` too — otherwise a description-only edit would leave
+// a page-turn finding falsely fresh. (It also stays stable across image renders —
+// `panel.imageJobId` etc. are never projected.) PAGE GROUPING is preserved (not
+// flattened): the checks report per-page totals/locations and panel-count rhythm,
+// so moving panels between pages must change the hash even when text is identical.
function projectComicLetteringContent(issues) {
return comicLetteringIssues(issues).map(({ number, pages }) => ({
number,
pages: pages.map((p) => ({
panels: (Array.isArray(p?.panels) ? p.panels : []).map((panel) => ({
+ description: typeof panel?.description === 'string' ? panel.description : '',
caption: typeof panel?.caption === 'string' ? panel.caption : '',
dialogue: Array.isArray(panel?.dialogue) ? panel.dialogue : [],
sfx: typeof panel?.sfx === 'string' ? panel.sfx : '',
diff --git a/server/services/pipeline/editorial/checkRunner.test.js b/server/services/pipeline/editorial/checkRunner.test.js
index 8700233361..5ba2263645 100644
--- a/server/services/pipeline/editorial/checkRunner.test.js
+++ b/server/services/pipeline/editorial/checkRunner.test.js
@@ -500,6 +500,37 @@ describe('getReviewWithStaleness (#1345)', () => {
expect(review.comments.find((c) => c.checkId === 'visual.shot-continuity').stale).toBe(false);
});
+ it('stales a comic.page-turn-beats finding when a panel description changes (#1314 projection)', async () => {
+ // The comicScript fingerprint is shared by the lettering (#1313) and page-turn
+ // (#1314) checks. page-turn reads each panel's `description` (lettering does
+ // not), so the projection must include `description` — else a description-only
+ // edit leaves a page-turn finding falsely fresh.
+ const comicIssue = (desc) => [{
+ id: 'i1', seriesId: 's1', number: 1,
+ stages: { comicPages: { pages: [
+ { panels: [{ description: desc, caption: '', dialogue: [], sfx: '' }] },
+ { panels: [{ description: 'b1', caption: '', dialogue: [], sfx: '' }, { description: 'b2', caption: '', dialogue: [], sfx: '' }] },
+ ] } },
+ }];
+ issuesState = comicIssue('a reveal on the wrong page');
+ // The page-turn check is the only LLM check we want firing here; the shared
+ // runStagedLLM mock returns a finding for whatever stage it's called with.
+ const onlyPageTurn = {
+ pipelineEditorialChecks: {
+ checks: Object.fromEntries(
+ listChecks().filter((c) => c.id !== 'comic.page-turn-beats').map((c) => [c.id, { enabled: false }]),
+ ),
+ },
+ };
+ const { findings } = await runEditorialChecks('s1', { settings: onlyPageTurn });
+ reviewState = { comments: findings.map((f) => ({ ...f, status: 'open' })) };
+ expect(reviewState.comments.find((c) => c.checkId === 'comic.page-turn-beats')).toBeTruthy();
+ // Only a panel description changed — panel counts/lettering identical.
+ issuesState = comicIssue('a reveal moved to a reveal-safe page');
+ const review = await getReviewWithStaleness('s1');
+ expect(review.comments.find((c) => c.checkId === 'comic.page-turn-beats').stale).toBe(true);
+ });
+
it('keeps a scene finding fresh when the manuscript changes (reverseOutline-only source)', async () => {
outlineState = { scenes: [{ id: 'scene-001', issueNumber: 1, heading: 'Talking heads', anchorQuote: 'q', components: { narrative: false, action: false, dialogue: true } }] };
await seedReviewFromRun();