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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix([importer-retry-arcsummary-empty]): honor a cleared arc summary on issue-split retry
[._.]/ Adam Eivy0650c89443f8
diff --git a/client/src/pages/Importer.collapse.test.jsx b/client/src/pages/Importer.collapse.test.jsxindex 98d2fe5039..df4cf75518 100644--- a/client/src/pages/Importer.collapse.test.jsx+++ b/client/src/pages/Importer.collapse.test.jsx@@ -1,5 +1,27 @@import { describe, it, expect } from 'vitest';-import { collapseToSingleVolume } from './Importer.jsx';+import { collapseToSingleVolume, resolveRetryArcSummary } from './Importer.jsx';++describe('resolveRetryArcSummary', () => {+ it('uses the summary when present and non-empty', () => {+ expect(resolveRetryArcSummary({ summary: 'A real summary', logline: 'LG' })).toBe('A real summary');+ });++ it('falls back to the logline when the summary is ABSENT (null/undefined)', () => {+ expect(resolveRetryArcSummary({ logline: 'LG' })).toBe('LG');+ expect(resolveRetryArcSummary({ summary: null, logline: 'LG' })).toBe('LG');+ });++ it('honors an intentionally-cleared (empty-string) summary instead of substituting the logline', () => {+ // The bug this guards: `summary || logline` resent the logline as the+ // summary the user just cleared in Review. An empty string must win.+ expect(resolveRetryArcSummary({ summary: '', logline: 'LG' })).toBe('');+ });++ it('returns undefined when neither summary nor logline is set', () => {+ expect(resolveRetryArcSummary({})).toBeUndefined();+ expect(resolveRetryArcSummary(null)).toBeUndefined();+ });+});describe('collapseToSingleVolume', () => {const seasonsPreview = [diff --git a/client/src/pages/Importer.jsx b/client/src/pages/Importer.jsxindex 94f7e11439..d343bb9b16 100644--- a/client/src/pages/Importer.jsx+++ b/client/src/pages/Importer.jsx@@ -58,6 +58,17 @@ const pickArcFields = (arc) => {// zipped season text so the structural remap can't 400 on commit.const IMPORT_ISSUE_SYNOPSIS_MAX = 4000;+// Pick the arc summary to send when retrying the issue split. Follows the+// absent-vs-intentionally-empty rule: an ABSENT summary (null/undefined) falls+// back to the logline, but a present-but-EMPTY summary ('') is an intentional+// clear in the Review panel — return it as-is so the caller sends no+// arcSummary and the server fills its own synthetic fallback. A bare+// `summary || logline` would conflate the two and silently resend the logline+// as the summary the user just cleared.+export function resolveRetryArcSummary(arc) {+ return arc?.summary == null ? arc?.logline : arc.summary;+}+// Collapse the LLM's multi-season proposal into a SINGLE graphic-novel volume.// Every issue is pinned to volume 1; each season's logline/synopsis is folded// into the matching issue's synopsis (zipped by order) so the user's "the@@ -344,8 +355,10 @@ export default function Importer() {providerOverride: llmProvider,modelOverride: llmModel,};- const arcSummary = arcDraft?.summary || arcDraft?.logline || '';- if (arcSummary.trim()) payload.arcSummary = arcSummary;+ // See resolveRetryArcSummary: a cleared summary is honored (send none, let+ // the server synthesize) instead of silently falling back to the logline.+ const arcSummary = resolveRetryArcSummary(arcDraft);+ if (typeof arcSummary === 'string' && arcSummary.trim()) payload.arcSummary = arcSummary;// Round to an integer — the server schema is z.number().int(), so a// pasted/typed decimal like 2.5 would otherwise 400 with a confusing error.const tic = intake.targetIssueCount === '' ? null : Math.round(Number(intake.targetIssueCount));