CodeNomad/packages
Pascal André df7c507aa9
feat(ui): collapse pasted text in chat history (#407)
## Summary
- Collapse intact placeholder-backed long pasted text blocks by default
in user message history for readability.
- Keep pasted content fully visible to the model; this is a display-only
history treatment.
- Persist pasted-text collapse metadata across optimistic message
replacement and app reloads.
- Fall back to normal plain-text history rendering when the
placeholder-backed pasted structure has been edited or is no longer
intact before send.

Fixes #266

## Behavior
When a user submits a prompt containing an intact long pasted block from
the existing pasted-text placeholder flow, the full pasted text is still
sent to the model unchanged, but the chat history renders that pasted
section as a collapsed expandable block.

This applies to the existing placeholder-backed long-paste flow only. If
the pasted placeholder structure is broken before submission, the
message renders in history as normal plain text with no collapse
metadata.

## Verification
- `npx tsx --test
"packages/ui/src/components/prompt-input/submitPrompt.test.ts"
"packages/ui/src/lib/prompt-display-metadata.test.ts"
"packages/ui/src/stores/message-prompt-display.test.ts"`
- `npm run typecheck --workspace @codenomad/ui`
- `npm run build --workspace @codenomad/ui`
- `npm run build --workspace @codenomad/tauri-app`

## Local desktop verification
- Built executable:
`packages/tauri-app/target/release/codenomad-tauri.exe`
- Built installer:
`packages/tauri-app/target/release/bundle/nsis/CodeNomad_0.15.0_x64-setup.exe`
- Launched the built Tauri executable locally and confirmed startup
succeeded.

<img width="487" height="129" alt="image"
src="https://github.com/user-attachments/assets/6c3d670c-b049-4fa7-bc8b-c69d0fb3ca25"
/>
2026-06-07 17:17:27 +01:00
..
cloudflare Minimum version to 0.17.0 2026-06-04 21:07:53 +01:00
electron-app Bump version to 0.17.0 2026-06-04 21:05:56 +01:00
opencode-plugin Bump version to 0.17.0 2026-06-04 21:05:56 +01:00
server Bump version to 0.17.0 2026-06-04 21:05:56 +01:00
tauri-app Bump version to 0.17.0 2026-06-04 21:05:56 +01:00
ui feat(ui): collapse pasted text in chat history (#407) 2026-06-07 17:17:27 +01:00