Repository navigation
fix(cli): keep error lines from hard-wrapping mid-command - #150
Merged
allenhutchison merged 1 commit intoOct 28, 2026
Merged
Conversation
Error lines now soft-wrap by default, so a long credentials path cannot fold `Run 'pepper login' first.` across two lines. The not-logged-in test pins the console width and a long home path instead of depending on the temp path. Signed-off-by: Niladri Das <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Vycari Review (shadow)Shadow round 1 on 94e7b43. This comment is non-gating and needs no response: it is collected to measure agreement with the current reviewer. The round's verdict is the Vycari Review (shadow) check run. Open: P0 0 · P1 0 · P2 0 · confirmed fixed 0 · withdrawn 0 Judge's notes Incomplete: 1 stage call(s) failed (hunter:general). No candidate findings were raised. No open findings this round. |
allenhutchison
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human overview
Error lines hard-wrapped at the terminal width, so a long credentials path could split
Run 'pepper login' first.and break a copied command. This soft-wraps error lines by default and rewrites the not-logged-in test to pin the console width and a long home path instead of depending on the ambient temp path. Fixes #108.AI reviewer
What changed
src/pepper_cli/render.py:error()now defaultssoft_wrap=True, so Rich does not insert newlines into an error line. The docstring records that the old fold point depended on the length of an interpolated path.src/pepper_cli/cli.py:_emit_error()defaultssoft_wrap=True. This is the path_creds_or_failand_load_or_erroruse, so the not-logged-in message is covered alongside directrender.error()calls.tests/test_cli_research.py:test_not_logged_insetsCOLUMNS=80and a 120-characterHOMEandUSERPROFILE, so the wrap condition is deterministic and independent of the ambient temp path. It assertspepper loginstays contiguous and the line has no interior newline.Existing explicit
soft_wrap=Truecall sites were left alone to keep the diff to the three reported files.Invariants
/api/v1call, wire model,# MIRROR:comment, or stream frame changes.Verification
assert 4 == 0from four interior newlines with a long home andCOLUMNS=80. It passes after the change.uv run ruff format --check: 119 files already formatted.uv run ruff check: All checks passed.uv run ty check src/pepper_cli/: All checks passed.uv run pytest: 2,485 passed, 2 skipped. The remaining warnings are an existing Textual thread-teardown warning, unrelated to this change.uv run pytest --cov --cov-report=json:coverage-summary.json, then the coverage adapter and ratchet: 95.066 percent line coverage against the 88 percent floor.Deferred
soft_wrap=Truearguments at other error call sites are now redundant. They were left out of this diff per review scope; a separate cleanup can remove them.Checklist (repo-specific)
uv run ruff format --checkanduv run ruff checkclean (no new lint ignores)uv run ty check src/pepper_cli/cleanuv run pytestpasses; coverage floor in.claude/maintainerd.jsonnot lowered/api/v1usage, wire model, or stream frame changed.SKILL.md: not applicable, no command, flag, or rendered output shape changed; only stderr line folding changed.

Confidence Score: 5/5
The PR appears safe to merge.Summary
Error messages now default to
soft_wrap=True, keeping long paths and suggested commands free of inserted newlines.Reviews (1) · Last reviewed commit: "fix(cli): keep error lines from hard-wra..." · Reviewed by Greptile