Repository navigation
[CTX-1272] feat(runtime): lock kitty graphics as the default image path (#2131) - #2166
Conversation
…th (#2131) Yazi selects its image driver off the honest child environment plus query answers: with no known brand it sends the KGP support probe and reads Unknown{kgp, sixel} off the replies, mapping (true, false) to KgpOld. Bitty answers every clause (a=q OK, non-zero 16t cell probe from #2148, honest Bitty XTVERSION, sixel-free DA1, themed OSC 11), so kitty is selected with no manual flags; the KgpOld wire flow (a=T/C=1/q=2/z=-1 display, a=d/d=A erase) paints and clears. Pin that contract with yazi-exact regression tests: the full detect battery in terminal_queries plus the end-to-end display/erase flow in kitty_images_present. Chafa stays name-gated upstream (1.18.3 sends no KGP probe even with --probe=on; verified empirically): bitty cannot force kitty output without spoofing another terminal identity, so the bitty-side fix is to keep advertising bitty itself (TERM_PROGRAM=bitty, sanitized outer fingerprints) and let query-based detectors select kitty. Refresh the stale CTX-0194 rationale, which predates kitty support, to match. Sixel honesty is unchanged: DA1 claims no sixel, sixel DCS stays ignored, symbols fallback untouched. Upstream recognition requests (chafa bitty rule per ghostty #296 precedent, yazi bitty Brand) are follow-ups, not this PR.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review requested (CTX-1272 render leftovers, 2/2). Scope: yazi-exact detection battery plus KgpOld end-to-end (tests), CTX-0194 doc refresh for kitty support; no behavior change to parsers, present, or env values. CI watch running; do NOT merge from this session -- merge decision stays with the commander.
Priority: P1 | Area: render | Labels: feat, P1, area:render | Milestone: 0.0.24 | Task: CTX-1272
Closes #2131.
Summary
Yazi selects its image driver off the honest child environment plus query answers: with no known brand it sends the KGP support probe and reads
Unknown { kgp, sixel }off the replies, mapping(true, false)to KgpOld. Bitty answers every clause (a=qOK, non-zero 16t cell probe from #2148, honestBittyXTVERSION, sixel-free DA1, themed OSC 11), so kitty is selected with no manual flags; the KgpOld wire flow (a=T/C=1/q=2/z=-1display,a=d,d=Aerase) paints and clears. This PR pins that contract with yazi-exact regression tests, and refreshes the stale CTX-0194 rationale which predates kitty support.Chafa stays name-gated upstream (1.18.3 sends no KGP probe even with
--probe=on; verified empirically against a pty): bitty cannot force kitty output without spoofing another terminal identity, so the bitty-side fix keeps advertising bitty itself (TERM_PROGRAM=bitty, sanitized outer fingerprints) and lets query-based detectors select kitty. Sixel honesty is unchanged: DA1 claims no sixel, sixel DCS stays ignored, symbols fallback untouched.Follow-ups (not this PR): upstream recognition requests -- chafa bitty rule (ghostty #296 precedent) and/or the XTVERSION-gated
a=qprobe (chafa#349 middle path), yazi bittyBrandmapping to Kgp.Verification
yazi_probe_battery_reports_kitty_capable(terminal_queries): yazi exact detect bytes -> assertsGi=31;OK, honestBittyXTVERSION, non-zero 16t, exact?6cDA1, themed OSC 11 background.yazi_kgpold_display_paints_and_erases(kitty_images_present): yazi-exacta=Tchunks store+place,q=2suppresses replies,C=1holds cursor, tick paints (last_frame_images == 1, non-zero headless pixels),a=d,d=Aclears placements.TERM=xterm-kitty/TERM_PROGRAM=ghosttywith identical probes -- name gate confirmed; yazi detect+display flow verified headless against Runtime.cargo fmt --checkclean;cargo clippy --workspace --all-targets --locked -- -D warningsclean;cargo test -p bitty-runtime --lib1003 passed;terminal_queries+kitty_images_present+kitty_queriessuites pass;cargo check --target x86_64-pc-windows-gnu --workspace --all-targetsclean;cargo +1.85 checkclean for touched crates (no let-chains).just ci-local(Quality gates, both shards) green first run: 3522 + 3579 passed. Local recipe notes: needed-P ubuntu-24.04=bitty-act:latest(recipe still mapsubuntu-latestwhile the workflow pinsubuntu-24.04) and sccache GHA disable.recording/headed-2131-33/staged-runbook.sh, gitignored): owner desktop busy, never disturbed -- yazi preview + chafa renders + btop scrollback check reserved for a free desktop. Headless pixels plus exact-bytes tests cover the same paths.