nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] Paste confirmation shows character count, not line count

Open addyCooks opened this issue 2 months ago • 1 comments

Description

After pasting into the composer, the placeholder shown is always [Paste #N: X chars] a character count. For a multi-line paste, which is the common case (pasting a code block, a log, a stack trace), a line count would tell the user more at a glance than a character count.

Parent: #907

Steps to Reproduce

  1. Copy a multi-line block of code.
  2. Paste it into the composer.
  3. Look at the placeholder text.

Expected Behavior

For a multi-line paste, something like [Paste #1: 7 lines].

Actual Behavior

Always [Paste #1: 157 chars], regardless of how many lines were pasted.

Recording

Image

Root Cause

source/utils/paste-utils.ts formatPasteDisplayText always formats as `[Paste #${ordinal}: ${size} chars]`, where size is pastedText.length.

Suggested Fix

Show line count instead of (or alongside) character count when the pasted text spans more than one line.

Additional Context

  • [x] I have searched existing issues to ensure this is not a duplicate
  • [x] I can reproduce this issue consistently
  • [x] This issue occurs on the latest main

addyCooks avatar Sep 13 '26 20:09 addyCooks

Hey @akramcodez, I’m interested in working on this... could you assign this to me?

addyCooks avatar Sep 13 '26 20:09 addyCooks