Relationships
↔ sibling #3577#3576 [nit] swamp issue bug/feature/security: --title without --body is silently ignored
Opened by gklijs · 10/17/2026· Shipped 10/19/2026
Severity: nit (DX only). Nothing is submitted incorrectly — the commands error out before submission — but the flag is silently ignored and the error message contradicts the input.
Environment
* swamp 20261014.121640.0-sha.c5d1db96
* Linux (WSL2), bashProblem
swamp issue bug, feature, and security document --title as "skips editor for title", but supplying --title without --body does not use it:
$ swamp issue bug --title "probe" --json
{
"error": "Interactive mode is not available with --json. Use --title and --body options."
}The error tells the user to "use --title and --body options" even though --title was already provided. In interactive (non-JSON) mode the editor opens with an empty Title section and the supplied --title is dropped entirely, with no warning.
This is inconsistent with swamp issue edit, which supports title-only edits (src/cli/commands/issue_edit.ts):
} else if (options.title && !options.body) {
title = options.title;
body = current.body;Cause
src/cli/commands/issue_bug.ts:183-193 (same at issue_feature.ts:177 and issue_security.ts:183):
if (options.title && options.body) {
title = options.title;
body = options.body;
} else if (options.body && !options.title) {
throw new UserError("--body requires --title to be specified");
} else {
// opens the editor (or errors in --json mode)
}There is no branch for "title provided, body omitted", so it falls through to the editor path (or the --json interactive error).
Expected
One of:
* Reject it symmetrically with the inverse guard, e.g. `UserError("--title requires --body to be specified")`.
* Honour `--title` and only collect the body (open the editor for the body with the title pre-filled).
* At minimum, do not report that `--title` was missing when it was supplied.Suggested fix
Add a branch before the editor fallback:
} else if (options.title && !options.body) {
throw new UserError("--title requires --body to be specified (or omit --title to open the editor)");
}and make the --json error name the specific missing flag.
Related to #3542 (empty option values / !== undefined guards in these same files).
Reproduction (all paths error before any issue is created; nothing was submitted)
swamp issue bug --title "probe" --json
swamp issue feature --title "probe" --json
swamp issue security --title "probe" --jsonShipped
Click a lifecycle step above to view its details.
stack72 commented 10/19/2026, 1:50:39 PM
Thanks @gklijs for reporting this! We shipped: Fix two issue-CLI input nits from the same reporter. #3576: issue bug/feature/security with --title but no --body now opens the editor with the title pre-filled (log mode) or names the missing --body (--json), instead of dropping the title and saying --title is missing. #3577: issue search rejects an invalid --type, --status or --limit locally with issue-edit-style messages instead of surfacing raw HTTP 400s. data list --type keeps accepting any value (free-form tag) but its help matches data search. The manual's issue search --type list gains platform via a separate swamp-club docs PR.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.