Hard truncation silently drops content
Aliases: maxlength clip · paste clipping · swallowed overflow
What it is
A hard truncation such as maxlength refuses further writes at the cap. Extra characters vanish: the tail of a paste, leftover words from speech, a still-composing IME syllable—often with no explanation. That is silent hard truncation. People believe the whole passage went in; what is submitted is a stump. The issue is the fate of overflow, not when a counter appears, and not which unit is counted.
Why it happens
Truncation sits on the input channel and skips confirmation. Two hundred words on the clipboard and a 140-unit slot drop the last sixty in the paste event; the clipboard still holds them, so nobody compares. Speech and IME composition buffers are worse: candidates never reach the screen before the length gate eats them, and even the memory of “I typed that” is weak. Silence is the condition that the UI still looks normal—no error, no “at limit,” caret still blinking. People take “what I see in the slot” as the whole; the stump is treated as the finished piece. The hard gate is meant to protect a backend length; without telling, protection becomes data loss.
Studying it
Paste text longer than the cap into a hard-truncated slot, ask immediately whether all of it went in, and diff the slot against the source. Factors: whether “N units clipped” appears, whether clipping is on paste or per key, whether IME composition is gated. Outcomes: detection rate, stump-submit rate, whether the tail can be recovered elsewhere. Do not test only English whitespace tokens: missing characters in unspaced scripts are harder to see. Logs whose mean length sits exactly on the cap are often clipped pastes, not people writing to the line.
Where it stops holding
One-time codes and fixed-length IDs need a hard gate; extra digits are illegal. Silence is still poor, but what is lost is not a recoverable sentence. When a backend hard limit cannot be lifted, the front end should at least keep the unwritten tail somewhere copyable. In collaborative editing, another person’s insert can overflow the cap and truncation deletes words the user did not type, scrambling blame. If the undo stack treats truncation as ordinary input, undo will not bring the eaten tail back.
Applying it
- Stop writing at the cap, but say that it is full at once, and keep the rejected tail (paste remainder) copyable.
- Do not silently clip a long paste to the first N units; either refuse the whole paste and leave the clipboard, or take the first N and surface the remainder.
- Make undo return to the pre-truncation intent, not merely the last legal character.
- Verify by pasting an obviously overlong article and asking whether the content is there. “Yes” while the slot holds a stump is silent loss. Repeat with speech and CJK composition.