CodeNomad/packages
Pascal André dfc88b3572
fix(transcript): reveal omitted message parts in place instead of a copy-only footer (#890)
## Problem

A long native V2 agent turn is **one** assistant message containing
every text, thinking and tool-call part. Since #648 the transcript
rendered only the first 100 and last 100 parts of such a message and
showed `[Output truncated for rendering; copy to access the full
output]` at the **bottom** of the message:

- the hidden content is in the **middle**, so the footer reads as if the
ending were missing;
- nothing could be expanded — the only recovery was copying raw JSON;
- 200 parts is reached quickly by ordinary long agent turns.

## Change

- Display window raised to **1000 parts** (500 head + 500 tail). The
bound still exists because the transcript virtualizes whole messages:
one very long message otherwise mounts every part at once.
- Omitted parts render as a placeholder **at the exact gap** ("237 steps
hidden to keep this message responsive") with a **Show N more** button
that reveals the next 1000 parts in place. The copy-only footer is
removed.
- Reveal state is a reactive per-instance/message store in
`record-display-cache.ts`, read before the projection cache check, so
the message block, grouping signature, timeline and cleanup projections
stay consistent. It resets with the instance render caches.
- Technical groups and cleanup runs never span the gap (head/tail
grouped separately, breakers inserted in both transcript projections).
- Strings translated in all ten locales; styles in
`styles/messaging/hidden-message-parts.css`; AGENTS.md documents the
convention.

Part-level virtualization, which would remove the bound entirely, is
proposed separately.

## Validation

- `full-source-copy.test.ts` (real load → normalize → store →
`MessageSection` path): 1237 native text parts → exactly 1000 render,
placeholder between paragraph 0499 and 0737, no copy-only footer;
clicking the real button renders all 1237 in order.
- Unit: window boundaries, partial/complete reveal, projection cache
invalidation, instance reset.
- `tsc --noEmit` for `@codenomad/ui`.
2026-10-09 16:27:49 +02:00
..
cloudflare chore(release): prepare stable 0.20.1 (#842) 2026-10-03 15:47:14 +02:00
electron-app feat(remote-control): add Remote Control over OpenTunnel alongside direct access (#668) 2026-10-09 12:43:25 +02:00
remote-tunnel feat(remote-control): add Remote Control over OpenTunnel alongside direct access (#668) 2026-10-09 12:43:25 +02:00
server feat(remote-control): add Remote Control over OpenTunnel alongside direct access (#668) 2026-10-09 12:43:25 +02:00
tauri-app feat(remote-control): add Remote Control over OpenTunnel alongside direct access (#668) 2026-10-09 12:43:25 +02:00
ui fix(transcript): reveal omitted message parts in place instead of a copy-only footer (#890) 2026-10-09 16:27:49 +02:00