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

fix: address review (claude): preserve diagnosis results

[._.]/ Adam Eivy6165f5cafac0
diff --git a/client/src/components/fableloom/LoomEditorialAutomation.jsx b/client/src/components/fableloom/LoomEditorialAutomation.jsx
index b33a760672..29324d6d50 100644
--- a/client/src/components/fableloom/LoomEditorialAutomation.jsx
+++ b/client/src/components/fableloom/LoomEditorialAutomation.jsx
@@ -196,7 +196,7 @@ export default function LoomEditorialAutomation({ loom, dirty, onLoomUpdate }) {
const findings = result?.type === 'autopilot' || shownRun?.status
? shownRun?.residualFindings || []
: review?.findings?.length ? review.findings : evaluation?.findings || [];
- const summary = review?.summary || evaluation?.summary || shownRun?.message;
+ const summary = shownRun?.message || review?.summary || evaluation?.summary;
const passed = result?.type === 'playtest'
? response?.passed
: shownRun?.status === 'completed' || diagnostics?.passed;
diff --git a/client/src/components/fableloom/LoomEditorialAutomation.test.jsx b/client/src/components/fableloom/LoomEditorialAutomation.test.jsx
index 7b8458cbc3..00facc3bd8 100644
--- a/client/src/components/fableloom/LoomEditorialAutomation.test.jsx
+++ b/client/src/components/fableloom/LoomEditorialAutomation.test.jsx
@@ -168,6 +168,22 @@ describe('LoomEditorialAutomation', () => {
);
});
+ it('keeps the decided pause explanation visible when cancellation lands during diagnosis', async () => {
+ api.getLoomEditorialAutopilotStatus.mockResolvedValue({
+ run: {
+ id: 'editorial-run-1', loomId: 'loom-1', status: 'canceled', round: 1, maxRounds: 1,
+ pauseReason: 'round-limit',
+ message: 'Editorial autopilot reached its 1-round limit with review findings still open.',
+ rounds: [], residualFindings: [],
+ lastReview: { summary: 'The story review still has open findings.', findings: [] },
+ },
+ });
+ renderPanel();
+
+ expect(await screen.findByText(/reached its 1-round limit with review findings still open/i))
+ .toBeInTheDocument();
+ });
+
it('blocks every mutating AI action while the series plan has unsaved edits', async () => {
renderPanel({ dirty: true });
diff --git a/server/services/fableLoom/editorialAutopilot.js b/server/services/fableLoom/editorialAutopilot.js
index ea8e482036..124a79295e 100644
--- a/server/services/fableLoom/editorialAutopilot.js
+++ b/server/services/fableLoom/editorialAutopilot.js
@@ -135,7 +135,7 @@ const terminalDiagnosis = async (run, outcome, { reason = null, error = null } =
const finishPaused = async (run, pauseReason, message) => {
const selfImprove = await terminalDiagnosis(run, 'paused', { reason: pauseReason });
- if (run.cancelRequested) return finishCanceled(run, { pauseReason, selfImprove });
+ if (run.cancelRequested) return finishCanceled(run, { pauseReason, message, selfImprove });
return touch(run, {
status: 'paused',
pauseReason,
@@ -150,6 +150,7 @@ const finishFailed = async (run, error) => {
const selfImprove = await terminalDiagnosis(run, 'failed', { reason: 'run-error', error });
if (run.cancelRequested) return finishCanceled(run, {
error: errorMessage(error),
+ message: errorMessage(error),
selfImprove,
});
return touch(run, {
diff --git a/server/services/fableLoom/editorialAutopilot.test.js b/server/services/fableLoom/editorialAutopilot.test.js
index 487b02e571..7057b2bb95 100644
--- a/server/services/fableLoom/editorialAutopilot.test.js
+++ b/server/services/fableLoom/editorialAutopilot.test.js
@@ -184,6 +184,7 @@ describe('FableLoom editorial autopilot', () => {
expect(finished).toMatchObject({
status: 'canceled',
error: providerError.message,
+ message: providerError.message,
selfImprove: null,
});
});
@@ -211,6 +212,7 @@ describe('FableLoom editorial autopilot', () => {
expect(finished).toMatchObject({
status: 'canceled',
pauseReason: 'round-limit',
+ message: 'Editorial autopilot reached its 1-round limit with review findings still open.',
selfImprove: null,
});
});
diff --git a/server/services/fableLoom/editorialSelfImprove.js b/server/services/fableLoom/editorialSelfImprove.js
index dc2ad180de..12283b8bee 100644
--- a/server/services/fableLoom/editorialSelfImprove.js
+++ b/server/services/fableLoom/editorialSelfImprove.js
@@ -113,12 +113,6 @@ export function buildFableLoomEditorialSelfImproveTask({ diagnosis, telemetry })
});
}
-const routeOptions = (run) => ({
- ...(run?.route?.providerId ? { providerDefault: run.route.providerId } : {}),
- ...(run?.route?.model ? { modelDefault: run.route.model } : {}),
- ...(run?.route?.effort ? { effortDefault: run.route.effort } : {}),
-});
-
/** Run one best-effort terminal diagnosis and file a task for PortOS defects. */
export async function runFableLoomEditorialSelfImprove(run, context = {}) {
if (!shouldDiagnoseFableLoomEditorial(run, context.outcome)) return null;
@@ -137,7 +131,10 @@ export async function runFableLoomEditorialSelfImprove(run, context = {}) {
maxPaths: telemetry.maxPaths,
telemetryJson: JSON.stringify(telemetry.rounds, null, 2),
}, {
- ...routeOptions(run),
+ // Keep the selected provider when available, but let this software-focused
+ // stage resolve its own heavy model instead of inheriting a story-writing
+ // model (modelDefault outranks stage tiers in stageRunner).
+ ...(run?.route?.providerId ? { providerDefault: run.route.providerId } : {}),
returnsJson: true,
source: SELF_IMPROVE_STAGE,
});
diff --git a/server/services/fableLoom/editorialSelfImprove.test.js b/server/services/fableLoom/editorialSelfImprove.test.js
index d502689280..285c099b23 100644
--- a/server/services/fableLoom/editorialSelfImprove.test.js
+++ b/server/services/fableLoom/editorialSelfImprove.test.js
@@ -125,7 +125,7 @@ describe('FableLoom editorial self-improvement', () => {
telemetryJson: expect.any(String),
}),
{
- providerDefault: 'writer', modelDefault: 'large', effortDefault: 'high',
+ providerDefault: 'writer',
returnsJson: true, source: 'fableloom-editorial-self-improve',
},
);