Repository navigation
terminal: whole-area selection (client-rendered), no graying - #181
Merged
Merged
Conversation
Selecting lxrun's fastfetch output was ragged: `SelectionMode::Char` clips the first row at the press column and the last row at the release column, so a whole-window drag dropped the logo's left columns and the palette strip's right columns. The renderer already washes only the background (there is no `selection_fg` path left — `resolve_style` lerps `bg` and leaves `fg` byte-identical), so the remaining defect is the selection geometry, not the paint. Add `SelectionMode::Area`: row-granular selection where every picked row is taken across its full width. `Screen::select_all_view()` selects the whole visible output area in one call (`pagh-terminal --select all`), and a live drag that touches both the first and the last visible row is promoted to it (`promote_selection_to_area`), snapping the anchor to column 0 and the focus to the last column. A drag that stays inside the view keeps character granularity, so ordinary word/paragraph selection is unchanged. Regression tests: area geometry and promotion (both drag directions), a renderer test over a fastfetch-shaped block asserting every background is washed while every glyph colour stays byte-identical, a wash-oracle test on the real fastfetch fixture across the whole 100x30 grid, and a live compositor drag from the first to the last cell asserting the whole area is washed (including the blank rows under the output) and that at least three glyph colours survive — the "graying" regression.
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.
terminal (client-rendered): whole-area selection, no graying / logo erasure
Companion to the kernel-session selection wash (separate PR). This fixes the client-rendered terminal path (demo / pipe-shell / headless snapshot); the default kernel-session blit path is fixed kernel-side.
Verified first
render.rs::resolve_style()already washes background only (bg.lerp(theme.selection, SELECTION_BG_MIX)), noselection_fgwrite path remains — the graying half was already fixed in dev. The remaining defect was selection geometry.Change
SelectionMode::Area— row-granular: every picked row selected across its full width (Char mode clips first/last rows at press/release columns, wrong for a fastfetch-shaped block).Screen::select_all_view()— one-shot whole visible output area.Screen::drag_covers_whole_view()+promote_selection_to_area()— a drag spanning every visible row promotes to Area (columns ignored, works upward too); a drag inside a few rows keeps Char granularity.--select allfor headless/evidence frames.Tests / gates
cargo test --package pagh-terminal(inside crate): 196 passed / 0 failed. New: area keeps full rows, select_all covers whole area, whole-view drag promotes both directions, whole-area keeps every glyph colour, render_png wash oracle over whole grid, selection_live real compositor+client drag.cargo fmt --checkclean.Evidence
lxrun-select-evidence.png/-before.png— fastfetch logo + coloured keys/values, whole-area wash, glyph colours intact.lxrun-select-evidence-live.png/-live-before.png— live compositor 1280×800 whole-window drag.(Untracked artifacts.)