mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-10-21 05:06:37 +00:00
## Summary #890 replaced the copy-only footer for **omitted message parts**. A second display bound from #648 remained: every rendered text block was cut at 10,000 characters with "[Output truncated for rendering; copy to access the full output]". Long subagent reports, assistant prose and tool outputs could only be read by copying, even though the model received everything. **Now:** a truncated block shows its prefix, then at the exact cut a localized line, "N more characters hidden to keep this message responsive", with **Show all**. Above a ¼ MB remainder the button reads **Show 250,000 more**. It reveals the rest in place. - **Reveal state** sits next to #890's part reveals (`record-display-cache`), keyed by instance/message/part/section. It survives virtualization and session switches and resets with the instance. - **Reading position** is held while the text grows. Tool outputs grow inside their own pane, and focus moves to the revealed text. - **Copy, search and speech** keep reading native content. ## Bounds (from measured Chromium render cost) | Content | Shown before reveal | |---|---| | Prose: text parts, compaction summaries, subagent prompts/reports, skills | 50,000 chars (was 10,000) | | Tool output: shell, read, write, diffs, edit/patch, execute, webfetch, inputs, errors | 10,000 chars (unchanged) | | Each reveal step | up to 250,000 chars | | Syntax highlighting | off above 100,000 chars | ## Implementation - **Where bounding happens:** it moved from each renderer into the rendering components: `renderMarkdown` (with a `codeLanguage` option), `renderDiff` and a new `BoundedText`. They use a pure window helper (`lib/render-text-window.ts`) that cuts on nearby line breaks and never splits a surrogate pair. - **New pieces:** - `components/hidden-text.tsx`; - shared `reveal-focus.ts` (also used by #890's reveal); - `transcript-alignment.ts`, which holds the reveal point through the list's existing `alignElement`. - **Removed:** the dead `renderAnsi` path and the copy-only Markdown source button (with its now-unused i18n key). - **Docs:** `dev-docs/TEXT_DISPLAY_BOUNDS.md`; `AGENTS.md` extends the hidden-parts bullet. ## Validation - Unit tests: - `render-text-window`; - `record-display-cache` / instance store. - New `reveal-truncated-text` browser suite: - reveal in place; - anchor held while following the bottom; - tool pane reveal; - persistence across scrolling and session switches. - Updated suites: `full-source-copy`, `markdown-latest-request`, `mission-primitives`, `render-cost`. - 31 relevant browser files, run one at a time: 459 pass, 1 opt-in skip. UI typecheck clean. - Known follow-up: reasoning text keeps its own silent 10,000-character cut. Oversized files touched: `message-block.tsx` (~1,963 lines), `tool-call.tsx` (~998), `message-item.tsx` (~828), `tool-call/renderers/task.tsx` (~581). An independent gatekeeper review will be published before the admin merge. |
||
|---|---|---|
| .. | ||
| cloudflare | ||
| electron-app | ||
| remote-tunnel | ||
| server | ||
| tauri-app | ||
| ui | ||