nexu-io/open-design · error · Error
Revision feedback is required
Error message
Revision feedback is required
What it means
A design-system revision job needs user feedback describing what to change. cleanFeedback trims and collapses runs of blank lines; if the result is empty the revision cannot be applied, so runRevision throws a plain Error that failJob records on the job. The job transitions to 'failed' with this message.
Source
Thrown at apps/daemon/src/design-systems/generation-jobs.ts:236
const files = designSystemId ? await listFiles(options.root, designSystemId) : [];
setStepMessage(job, 'register-files', `Registered ${files?.length ?? 0} files`);
});
await runStep(job, 'prepare-review', async () => {
await sleep(delayMs);
setStepMessage(job, 'prepare-review', 'Review workspace is ready');
});
completeJob(job, 'succeeded', 'Design system ready for review');
} catch (err) {
failJob(job, err instanceof Error ? err.message : String(err));
}
}
async function runRevision(job: MutableJob, input: DesignSystemRevisionInput): Promise<void> {
try {
const jobRoot = input.root ?? options.root;
markJob(job, 'running', 'Starting revision');
const feedback = cleanFeedback(input.feedback);
if (!feedback) throw new Error('Revision feedback is required');
let body = input.body;
let proposedBody = '';
await runStep(job, 'read-draft', async () => {
if (!body) {
body = await readExistingDesignSystem(jobRoot, input.designSystemId, {
idPrefix: 'user:',
}) ?? undefined;
}
if (!body) throw new Error('Editable design system not found');
setStepMessage(job, 'read-draft', `Loaded ${input.designSystemId}`);
});
await runStep(job, 'apply-feedback', async () => {
await sleep(delayMs);
proposedBody = applyRevisionToBody(body ?? '', {
feedback,
...(input.sectionTitle ? { sectionTitle: input.sectionTitle } : {}),
});
setStepMessage(job, 'apply-feedback', input.sectionTitle ? `Updated ${input.sectionTitle}` : 'Updated DESIGN.md');View on GitHub (pinned to 5be4028344)
Solutions
- Provide non-empty feedback text describing the desired change.
- Validate the feedback field in the UI before submitting the revision job.
- If automating, guard input.feedback with a trim().length check.
Example fix
// before
startRevision({ designSystemId, feedback: ' ' });
// after
startRevision({ designSystemId, feedback: 'Increase body font size to 18px' }); Defensive patterns
Strategy: validation
Validate before calling
function validateRevisionFeedback(feedback: string): string {
const trimmed = (feedback ?? '').trim().replace(/\n{3,}/g, '\n\n');
if (!trimmed) throw new Error('Revision feedback is required');
return trimmed;
}
validateRevisionFeedback(input.feedback); Type guard
function isNonEmptyFeedback(value: unknown): value is string {
return typeof value === 'string' && value.trim().length > 0;
} Try / catch
try {
await startRevision({ designSystemId, feedback });
} catch (err) {
if (err instanceof Error && /Revision feedback is required/i.test(err.message)) {
// prompt the user for feedback before retrying
} else throw err;
} Prevention
- Disable the Revise button until the feedback textarea has non-whitespace content.
- Trim and validate feedback on the client before submitting the revision job.
- For automated callers, assert input.feedback.trim().length > 0 before invoking the job.
When it happens
Trigger: Submitting a revision job whose input.feedback is empty, whitespace-only, or only newlines. The check at generation-jobs.ts:236 fires before any draft is read.
Common situations: UI bug dropping the textarea value before submit; user clicked 'Revise' without typing; programmatic caller passed an empty feedback string.
Related errors
- Editable design system not found
- Could not create revision
- Could not create token contract revision
- BAD_REQUEST
- BAD_REQUEST
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/5c13a7252bda8a22.
Report an issue: GitHub.