Skip to content

Commit 3c5459a

Browse files
committed
fix(#745): bare slash command guidance adds newline before hint; claw issue/pr/commit etc now have non-null hint
1 parent 92e053a commit 3c5459a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ROADMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7655,3 +7655,5 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
76557655
743. **`claw plugins help --output-format json` returned `error_kind:"unknown_plugins_action"` with `hint:null` instead of the usage envelope (`action:"help", status:"ok", unexpected:null, usage:{...}`) that `agents help`, `mcp help`, and `skills help` all emit — schema drift within the same command family (ROADMAP #420)** — dogfooded 2026-05-26 on `2036f0bd`. Fix: (a) added `Some("help" | "-h" | "--help")` arm to `handle_plugins_slash_command` returning a text usage message (text path parity); (b) added early-return JSON help envelope in `print_plugins` JSON path matching shape of agents/mcp help: `{action:"help", kind:"plugin", status:"ok", unexpected:null, usage:{direct_cli, slash_command}}`. Source: Jobdori dogfood on `2036f0bd`, 2026-05-26.
76567656

76577657
744. **ROADMAP #741 has no regression test: `claw config list/show/bogus --output-format json hint` field could silently regress to null** — confirmed by gaebal-gajae on `2036f0bd`. Pattern same as #736→#737 and #740→#742: implementation fix without a pinning test. Fix: add `config_unsupported_section_json_hint_741` test iterating `[list, show, bogus, help]` and asserting `kind:config`, `status:error`, `error_kind:unsupported_config_section`, `hint` is non-empty string, `supported_sections[]` is non-empty. Source: gaebal-gajae dogfood on `2036f0bd`, 2026-05-26.
7658+
7659+
745. **`claw issue --output-format json` and all other direct-CLI slash commands (pr, commit, etc.) returned `hint: null` — the `bare_slash_command_guidance` message strings had no `\n` separator between short error and remediation text, so `split_error_hint` couldn't populate the hint field** — dogfooded 2026-05-26 on `92e053a1`. The #738 fix added `\n` to the `--resume SESSION /cmd` path but missed the direct-CLI path (e.g. `claw issue`, `claw pr`). The `bare_slash_command_guidance` function formats two message variants: resume-supported and non-resume; both lacked `\n`. Fix: add `\n` before the remediation text in both format strings. Source: Jobdori dogfood on `92e053a1`, 2026-05-26.

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,13 +1407,14 @@ fn bare_slash_command_guidance(command_name: &str) -> Option<String> {
14071407
let slash_command = slash_command_specs()
14081408
.iter()
14091409
.find(|spec| spec.name == command_name)?;
1410+
// #745: newline before remediation text so split_error_hint populates hint field
14101411
let guidance = if slash_command.resume_supported {
14111412
format!(
1412-
"`claw {command_name}` is a slash command. Use `claw --resume SESSION.jsonl /{command_name}` or start `claw` and run `/{command_name}`."
1413+
"`claw {command_name}` is a slash command.\nUse `claw --resume SESSION.jsonl /{command_name}` or start `claw` and run `/{command_name}`."
14131414
)
14141415
} else {
14151416
format!(
1416-
"`claw {command_name}` is a slash command. Start `claw` and run `/{command_name}` inside the REPL."
1417+
"`claw {command_name}` is a slash command.\nStart `claw` and run `/{command_name}` inside the REPL."
14171418
)
14181419
};
14191420
Some(guidance)

0 commit comments

Comments
 (0)