Repository navigation
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed commit 3de039e89fedff6d3ac8cc056011caed08a81e8f. One P2 completeness finding is attached inline: code-row metadata is discarded before the final terminal writer, which can still insert hard newlines into copied code. The owner consolidation and removal of duplicate prefix logic are reasonable. Existing hard wrapping is explicitly distinguished from a regression introduced here. Current CI passed; the local evidence is an isolated renderer/writer probe, not a full CLI rerun or native clipboard test.
Settled assistant replies prefixed every scrollback row with a literal `█ ` gutter. Terminal selection copies written cells, so commands copied from a reply came out as `█ git status` and did not run when pasted. Mark only the first body row with `● ` (same `theme.success` colour) and indent continuation rows with two plain spaces, matching the first-row marker convention used by tool cells. Layout width and colours are unchanged; the live `LiveFramedCell` gutter is out of scope. Refs matrixorigin#1142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two-space continuation prefix still leaked into copied code: a heredoc terminator became ` EOF` and no longer closed the heredoc, and indentation-sensitive code gained an extra indent. The Markdown renderer now marks code-block rows as verbatim, and settled assistant replies write those rows at column 0 without any prefix, so a selected block matches its source exactly. Prose rows keep the `● ` first-row marker and two-space indent. Tests compare the whole copied block instead of trimmed rows. Refs matrixorigin#1142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reply that is a single command still rendered as `● git status`, so copying that row included the marker. Settled prose rows now carry only a two-space indent and no glyph; code-block rows stay verbatim. Reply boundaries remain visible through the surrounding user, tool, and turn summary rows. Closes matrixorigin#1142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3de039e to
2da7484
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approve. Deep-reviewed all 6 commits (5675499..ded8061) vs main: no Critical/Important findings. cargo test -p astra-cli --lib -- tui:: 2027 passed, 0 failed; git diff --check clean. Multi-page scrollback preservation, verbatim code rows, and Zellij/full-height flow-then-reserve paths are covered by vt100-emulation tests.
Merge Queue Status
This pull request spent 1 minute 11 seconds in the queue, with no time running CI. ReasonPull request #1143 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
Capability assessment: N/A: CLI/TUI scrollback presentation only; no capability, runtime-profile, or server API contract changes.
Summary
Copying a settled assistant reply could include written gutter glyphs. Removing the glyphs alone still left a second problem: the final terminal writer inserted hard line breaks inside long code lines, changing quoted commands and heredoc content at narrow widths.
Settled prose now uses plain-space indentation. Code rows start at column zero and retain their existing Markdown row classification through lazy history preparation, budget deferral, trust-boundary pushback, shutdown draining, and the final writer. Code uses terminal soft wrapping instead of application-inserted hard breaks. The writer accounts for physical rows at the current terminal width, including wide characters, combining text, and default tab stops. Zellij writes content before reserving the composer, so multi-page code remains intact after repaint and subsequent replies. A full-height input area uses the same flow to retain output in native scrollback.
Related issue
Closes #1142
Change type
User and compatibility impact
Architecture and complexity delta
MarkdownRowrepresentation through the existing assistant/history/writer pipeline; no parallel renderer or additional row-policy state.take_history_batchimplementation and its implementation-only tests; replacement tests exercise the production queue and actual writer bytes.Verification
cargo test --locked -p astra-cli --lib tui:: -- --test-threads=1: 2027 passed, 1 pre-existing ignored.cargo clippy --locked -p astra-cli --all-targets -- -D warnings: passed.cargo fmt --all -- --check: passed.cargo audit --no-fetch --db <fresh task-owned RustSec DB>: passed under repository policy; four existing allowed warnings. Rust dependencies and audit policy are unchanged by this PR.35befbe2) broader TUI TSan run passed its 2024 assertions but exited 66 with two Tokio I/O reports. Both reproduce in the unchanged browser-login fixture in isolation, outside the copy pipeline; the same function pair is reported upstream. This broader run is retained as a limitation, not described as race-clean; no suppressions were used.2da7484a6) live-model CI: 17/18 passed;agent_workspace_evidence_chainfailed its finaltext_contains("2024")assertion despite passing tool/event assertions. That failure remains unclassified and is not claimed fixed by this presentation-only change. Fresh CI is pending.Final checklist