fix(editor): populate char-cell ghost blocks from temporary blocks - #75
Merged
Conversation
In char-cell (TUI) rendering, removed/replaced diff lines are shown as ghost rows interleaved by `DisplayLattice`, which reads them from `CharCellState::temporary_blocks`. But `RenderState::layout_temporary_blocks` only ever laid the incoming `TemporaryBlock`s into the GUI block tree (`reset_temporary_block`) — nothing populated the char-cell ghost list outside of tests, so a TUI diff body rendered zero ghost (removed) lines. Wire it up: when the render state is in char-cell mode, translate the temporary blocks via the existing `CharCellTemporaryBlock::from_temporary_block` and store them with `set_temporary_blocks`, instead of the GUI block-tree path (char-cell rendering does not consult that tree). Fixes `diff_pipeline_computes_added_lines_and_ghost_blocks`. warp_editor render/char-cell suite 74/0; tui_file_edits_view 7/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gDYSHa4oDvQbfungWwG1h
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4. Fixes the last "diff pipeline" serial failure.
Problem
In char-cell (TUI) rendering, removed/replaced diff lines render as ghost rows that
DisplayLatticereads fromCharCellState::temporary_blocks. ButRenderState::layout_temporary_blocksonly laid incomingTemporaryBlocks into the GUI block tree (reset_temporary_block) — nothing populated the char-cell ghost list outside tests. So a TUI diff body rendered zero removed/ghost lines (display_lattice().ghosts()was always empty).Fix
When the render state is in char-cell mode, translate the temporary blocks via the existing
CharCellTemporaryBlock::from_temporary_blockand store them withset_temporary_blocks, instead of the GUI block-tree path (char-cell rendering doesn't consult that tree).Result
diff_pipeline_computes_added_lines_and_ghost_blockspasses (1 ghost, content"old\n",insert_beforeline 1).warp_editorrender/char-cell suite 74/0;tui_file_edits_view7/0.🤖 Generated with Claude Code