Repository navigation
Conversation
Selecting mouse text in the kernel console (the default terminal window, a kernel shell session behind /dev/vtfb1) repainted every cell black-on-grey (`SELECT_FG`/`SELECT_BG`). That destroys exactly what a selection must keep: fastfetch's logo is coloured `#` glyphs, its palette strip is ANSI *backgrounds*, and the key/value lines are coloured, so a flat fill turned the logo into dark blocks and the strip into one bar. There were two causes, and the flat colour was only one of them: * the VT emulator (compat stdout, ANSI art) drew pixels straight into the shadow buffer and never entered the console's cell model. A selection then repainted those cells from the model, where the character was still a space, and erased the art it was highlighting. `FramebufferWriter::draw_cell` now records VT cells (character/fg/bg) in the same model the shell writes, and the model gained the per-cell background (`grid_bg`) it needed. * the paint itself passed one fg/bg pair for the whole range. It is now a background-only wash mirroring `pagh-terminal`'s `resolve_style` (60% of the accent 0x3DAEE9 into the cell's own bg, glyph fg byte-identical), and clearing restores glyph, fg and bg from the model. `drivers::cell_wash` is the pure arithmetic (host property P69). A drag that starts in the top visible row and reaches the bottom visible row is promoted to an Area (every row full width) by `shell::selection_math`, so a whole-output selection no longer copies char-clipped first/last rows; a drag inside a few rows stays char-granular. `Ctrl+A` on an empty input line selects the whole visible area. `paint_diff` still paints only changed cells per mouse move. Verified by P69 (wash laws + area policy), the in-QEMU `console::selection is a background wash, area covers all rows` routine (fg preserved, distinct ANSI backgrounds stay distinct, full rows, clear restores pixels byte-identically), and live desktop evidence under `kselect-evidence/` (real compositor + pagh-terminal window + `lxrun` ANSI program).
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.
kernel: mouse selection is a background wash; area drag covers all rows (no graying / logo erasure)
User report: selecting over lxrun/fastfetch output in the DEFAULT terminal window (kernel-session behind
/dev/vtfb1) turned coloured#logo glyphs into dark blocks, the ANSI palette strip into one flat bar, and every coloured key/value grey.Two root causes (both fixed)
drivers::vt(compat stdout / ANSI art) drew pixels straight into the shadow buffer, whilepaint_cell_selectedrepainted fromFramebufferWriter::gridwhere those cells were still spaces → selection erased the art.draw_cellnow records VT cells (char/fg/bg) in the same model the shell writes; model gained per-cellgrid_bg.SELECT_FG=0x000000/SELECT_BG=0xCCCCCC). Now a background-only wash mirroring the clientresolve_style: 60% accent0x3DAEE9into the cell's own bg, glyph fg byte-identical; clear restores glyph/fg/bg from the model.SELECT_FG/SELECT_BGdeleted.Whole-area
selection_math::{covers_visible_rows, promoted_columns}: a top-row→bottom-row drag promotes to Area (every row full width); inside-row drags stay char-granular.select_area(rows,cols);Ctrl+Aon an empty input line selects the whole visible area. Incrementalpaint_diffkept (one full-grid paint on the promoting move).Tests / gates (all green, commit 1254998)
host_tests.py913 passed / 0 failed (p69: 8 proptests + 2 unit oncell_wash/selection_math).console::selection is a background wash, area covers all rowsPASS;e2e.py selftest130 routines / 0 failed / 1 skipped (pre-existing NVMe), BOOTID verified.Live evidence (real desktop + shipped terminal window, PS/2-injected, real pointer drag)
Uglyph cores byte-identical red/yellow/cyan/green/blue/magenta 30→30; 0 px old#CCCCCC; washed palette strip 16 distinct cells; whole-area bbox (105,49,1223,724) = top row + full width + last text row; Ctrl+Y paste reads the same VT cells; no panic.fastfetchpass 14/14 checks: logo/key-value colours preserved under the wash, 0 flat grey, paste works.kselect-evidence/{before,after,fastfetch-before,fastfetch-after,paste}.png,live-checks.json,fastfetch-live-checks.json, selftest serial. (Untracked artifacts.)Known limitations (documented)
paint_celluses global bg notcell_bg(adjacent, out of scope); transparent-console wash fills explicit bg (untested live).