CodeWhale icon indicating copy to clipboard operation
CodeWhale copied to clipboard

Ctrl+O pager: output truncated with `...` and closes immediately while typing

Open SparkofSpike opened this issue 4 months ago • 3 comments

Description

Two related Ctrl+O pager bugs in v0.9.0.

Bug A — output truncated: Turn detail ends with ... mid-sentence. Pressing c to copy confirms the data itself is truncated, not just the rendered view — the raw pager body is incomplete.

Bug B — pager flashes and closes: When the composer has text (not empty), pressing Ctrl+O opens the pager briefly then closes it instantly. Only works when composer is empty.

Steps to reproduce

Bug A:

  1. Ensure composer is empty (see Bug B)
  2. Open any turn detail with Ctrl+O
  3. Scroll to bottom with j/k — content ends with ...
  4. Press c to copy → paste elsewhere → confirms data is truncated

Bug B:

  1. Type anything in the composer
  2. Press Ctrl+O
  3. Pager flashes briefly then closes immediately

Expected behavior

  • Pager shows complete turn details without truncation
  • Ctrl+O opens and stays open regardless of composer state

Actual behavior

  • Final result section is cut off with ..., raw data is incomplete
  • Pager rejects Ctrl+O when input is not empty

Impact

Happens on every Ctrl+O open. Blocks reviewing full turn details.

Environment

  • OS: Windows 11
  • codewhale version: 0.9.0 (d167c07c9628)
  • Install method: npm
  • codewhale doctor summary: Provider: deepseek, Model: deepseek-v4-pro, Terminal: legacy Windows console host (low_motion + bracketed_paste=false)
  • Model/provider: deepseek-v4-pro / DeepSeek
  • Terminal app: Windows Terminal
  • Shell: PowerShell

SparkofSpike avatar Jul 17 '26 18:07 SparkofSpike

Thanks @SparkofSpike for the report.

This issue is staying open for maintainer triage. CodeWhale gets better because people bring us real edge cases from real machines, providers, regions, and workflows.

If you can add a reproduction, logs, version output, screenshots, or the provider/model involved, that makes it much easier for us to verify and harvest the fix. Maintainers may comment /lgtmi to mark recurring issue reporters as approved so this intake note is skipped next time.

github-actions[bot] avatar Jul 17 '26 18:07 github-actions[bot]

Thanks, @SparkofSpike — both symptoms are specific enough to act on. I’ve added this to the v0.9.1 workdown and will cover the stored pager body as well as the composer-key routing path so the fix is regression-tested rather than only visually patched. We’ll preserve your report credit if it lands in the release.

Hmbown avatar Jul 17 '26 20:07 Hmbown

The fix is now public in draft PR #4498 at exact head 2883f95d14028b7de8abd59c5e0957cf3f664175. It removes the Ctrl+O/composer routing collision, preserves the complete final result in the pager/copy body, keeps the external editor on Ctrl+Shift+O, and includes regression coverage plus @SparkofSpike credit. Local focused gates and the locked TUI binary check pass; GitHub CI is running.

Hmbown avatar Jul 17 '26 21:07 Hmbown