fix(viewer): preserve semantic response chunks - #184
Conversation
Keep Last Response transcript-only so terminal history is never presented as one reply. Store raw message sources for lossless double-click or double-tap copy with visible feedback.
There was a problem hiding this comment.
Pull request overview
Preserves semantic response boundaries in the Response Viewer by attaching raw transcript text to each rendered response node and enabling lossless whole-chunk copy via a double-click/double-tap gesture, while removing the misleading terminal-buffer fallback for “Last Response”.
Changes:
- Removed terminal-buffer fallback for Last Response and left the existing empty-state message when the structured transcript is empty.
- Stored raw transcript source (
_codemanCopyText) on the owning response DOM node and added dblclick-based whole-chunk copy with feedback + gesture filtering. - Added a focused test suite covering empty transcript behavior and chunk-copy source selection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/response-viewer.test.ts | Adds regression tests for empty transcript handling and whole-chunk copy behavior. |
| src/web/public/styles.css | Adds copy-feedback animation and touch-action: manipulation for the response viewer / messages. |
| src/web/public/app.js | Implements semantic chunk copy, stores raw source on nodes, and removes terminal fallback from Last Response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const body = document.getElementById('responseViewerBody'); | ||
| body._codemanCopyText = lastResponse; | ||
| if (lastResponse) { |
| setInterval: vi.fn(), | ||
| clearInterval: vi.fn(), | ||
| setTimeout, | ||
| clearTimeout, | ||
| requestAnimationFrame: vi.fn(), |
Ark0N
commented
Aug 5, 2026
Hi Lior, closing this one as part of a cleanup of the seventeen PRs currently open from you. The full explanation is in #173, and I would rather you read that one than this note, because it is the honest version and it is not a dismissal of your work. The short form: sixteen PRs opened in a single day, roughly 42,000 added lines in total, landing mostly on the same few files (nine touch Going forward, please keep no more than three open PRs at a time, each one a single behavior change that stands on its own, with a test that fails on master and passes with the fix. #214 and #215, merged today, are good models. If this particular change fixes something that genuinely annoys you in daily use, it is a good candidate to be the first one you reopen on its own, rebased on current master. I will review it properly. Thanks for the effort you put in, and sorry to close it this way. |
Summary
Make the response viewer preserve semantic reply boundaries and support lossless whole-chunk copy on desktop and mobile.
Changes
Behavior
Validation
npx vitest run --config config/vitest.config.ts test/response-viewer.test.tsnpm run check:frontend-syntaxnpm run buildScope
This PR does not add click-to-collapse for response messages. That interaction was discussed but is not implemented in the audited change set and should be reviewed independently from copy/source correctness.