Skip to content

docs: CLI copy sweep — de-internalize help, truncate approval input echo (#102) - #104

Merged
ajianaz merged 2 commits into
developfrom
docs/cli-copy-sweep
Sep 19, 2026
Merged

ajianaz merged 2 commits into
developfrom
docs/cli-copy-sweep

Conversation

@ajianaz

@ajianaz ajianaz commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

What

CLI copy sweep (user-facing only — no core behavior changes):

  • De-internalized help text: epic-code tags (E5, B3, B1) removed from the resume / sessions / chat help lines (kept issue #55 — genuinely useful cross-reference). Internal code comments untouched.
  • Approval input preview: input: echo now truncates to head 400 + tail 400 chars (… (+N more chars)… in the middle) instead of dumping the full payload. Head AND tail are kept by design (round-1 cora MAJOR): a head-only cut could hide a dangerous path/command suffix beyond the preview from the human approver; keeping both ends preserves the fail-closed posture. UTF-8-safe on char boundaries; short scalars (paths, commands — the security-relevant values) stay fully visible.
  • REPL notice: resolving interrupted turn, pc=Planning… → resolving the interrupted turn… (no internal program counter in user chat).
  • Empty state: no sessions in <path> (dir does not exist) now ends with — start one with: tole chat (value → action).

Why

Issue #102, from the 2026-09-19 UX audit (live E2E + source sweep): internal epic codes leaked into public --help (OSS users don't know what E5/B1/B3 are), a large write_file input flooded the terminal before the y/N question, and the REPL exposed debug-speak.

Changes

  • tole-cli/src/main.rs: 3 help doc-comments, 1 REPL notice, 1 empty-state line (wildcard bind replaces the now-unused mid)
  • tole-cli/src/approver.rs: INPUT_PREVIEW_HEAD/TAIL (400/400) + input_preview() (head+tail middle-elision) + 2 new unit tests (input_preview_short_input_passes_through, input_preview_long_input_truncates_middle_keeps_both_ends incl. multi-byte + pass-through edge)

Testing

  • cargo fmt --all / cargo clippy --workspace --all-targets -- -D warnings / cargo test --workspace ✅ (exit 0; both new tests green)
  • cora review --staged round 1: 1 MAJOR (head-only truncation could hide dangerous input) → fixed with the head+tail design → round 2: ✅ No issues found
  • No changes outside tole-cli; core crate untouched (mobile profile unaffected)

Closes #102

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 16413f3 into develop Sep 19, 2026
16 checks passed
@ajianaz
ajianaz deleted the docs/cli-copy-sweep branch September 19, 2026 05:49
ajianaz added a commit that referenced this pull request Sep 28, 2026
Resolves crates/tole-cli/src/main.rs: the scan-3 wave evolved the Mcp
arm (plan-mode filter, loud-bail for pre/posttool hooks) while this
branch added the Acp arm — both kept; the Acp arm gains the same
loud-bail rule for unwired hooks and threads host.plan_mode through
run_acp/open_session (plan-mode serves a read-only registry).

Also takes develop's newer chat help copy (CLI copy sweep #104).
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.

UX: CLI copy sweep — de-internalize help text, truncate approval input echo, friendlier REPL notices

1 participant