Skip to content

Report missing required profile text fields as required - #12

Merged
andrewsokolov merged 1 commit into
masterfrom
fix/required-text-field-error
Oct 18, 2026
Merged

andrewsokolov merged 1 commit into
masterfrom
fix/required-text-field-error

Conversation

@andrewsokolov

Copy link
Copy Markdown
Contributor

Summary

Running extrabrain profiles actions create or extrabrain profiles create without --prompt failed with:

prompt must be text of at most 1000 characters

The prompt was missing, not too long. The shared text() check in src/profileCommands.service.ts used one message for both cases. It now reports prompt is required (or name is required, and so on) when a required field is absent, and keeps the length message for values that are too long. The exit code is still 2 (usage), and the CLI still sends no request.

Testing

  • Added a test that runs both commands without --prompt and checks for the is required message and that no request is sent.
  • npm run check: typecheck passes, 175 tests pass.
  • Ran against a local ExtraBrain gateway (npm run gateway -- --pro in the app repo):
    • Missing --prompt returns {"code":2,"message":"prompt is required"}.
    • A 1001-character prompt still returns the length message.

🤖 Generated with Claude Code

Creating a profile or profile action without --prompt failed with
"prompt must be text of at most 1000 characters", which points at the
wrong problem. The shared text check now reports "<field> is required"
when a required field is absent, and keeps the length message for
values that are too long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewsokolov
andrewsokolov merged commit eea7fa9 into master Oct 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant