pub fn code_preview(code: &str) -> String
Create a code preview (first N bytes, with ellipsis if truncated).
Truncates at a valid UTF-8 char boundary to avoid panics on multibyte characters.