Skip to content

Honour q on the last chunk of a kitty transmission, bump to 2.0.5 - #164

Merged
tomlm merged 2 commits into
mainfrom
tomlm/kitty-quiet-last-chunk
Oct 6, 2026
Merged

tomlm merged 2 commits into
mainfrom
tomlm/kitty-quiet-last-chunk

Conversation

@tomlm

@tomlm tomlm commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • A kitty continuation chunk may carry "only the m and optionally q keys", and notcurses relies on that: its first chunk has no q and its last chunk says q=2. XTerm.NET read the quiet level from the first chunk only, so it sent OK to a client that had asked for no reply. Once notcurses exited, that reply reached the shell as typed input: Gi=13871133;OK at the prompt after notcurses-info.
  • New KittyTransmission.ApplyContinuation takes q from a later chunk, and the reply sent when the image completes follows it.
  • Bumps version to 2.0.5.

Tests

  • Quiet_on_the_last_chunk_silences_the_reply replays notcurses' chunk pattern. Without the fix it fails with exactly ESC _Gi=31;OK ESC \.
  • A_chunked_transmission_without_quiet_still_replies checks that OK still comes when no chunk sets q.
  • Full suite: 2237 passed, 1 skipped.

🤖 Generated with Claude Code

tomlm and others added 2 commits October 6, 2026 16:14
Continuation chunks may carry "only the m and optionally q keys", and
notcurses uses exactly that: its first chunk names no q and its last says
q=2. The quiet level was read from the first chunk alone, so XTerm.NET
answered OK to a client that had asked for silence -- and once notcurses
exited, the reply reached the shell as typed input ("Gi=13871133;OK" at
the prompt after notcurses-info).

A continuation chunk's q now updates the transmission's quiet level, and
the reply sent on completion follows it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tomlm
tomlm merged commit a682ccd into main Oct 6, 2026
4 checks passed
@tomlm
tomlm deleted the tomlm/kitty-quiet-last-chunk branch October 6, 2026 23:24
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Perf comparison — this change, against its base

3 run(s) of each side, alternating on one machine. Allocation is a count and is gated exactly. Time is a measurement, so its gate is derived from the spread this job just observed in itself rather than fixed in advance.

corpus bytes/char gen0/Mchar ns/char Δ time noise gate
scroll-ascii 0.00 → 0.00 0.00 → 0.00 3.38 → 3.38 -0.0% ±3% 8%
sgr-churn 0.00 → 0.00 0.00 → 0.00 8.97 → 9.08 +1.2% ±1% 4%
truecolor 0.00 → 0.00 0.00 → 0.00 9.99 → 10.15 +1.6% ±4% 13%
alt-redraw 0.00 → 0.00 0.00 → 0.00 14.35 → 14.42 +0.5% ±1% 4%
unicode 7.66 → 7.66 0.45 → 0.45 35.00 → 34.93 -0.2% ±2% 5%
flood 0.00 → 0.00 0.00 → 0.00 95.26 → 95.14 -0.1% ±0% 4%

Each corpus is gated at max(4%, 3 × its own noise). A wide noise column means this runner was busy and the timing half of the table should be read as advisory; the allocation half is exact either way.

assemblies measured
  • base: XTerm.NET 2.0.4.0 mvid:edd04189-f427-47d9-a741-050e80dc445b
  • head: XTerm.NET 2.0.5.0 mvid:8698ccc0-dc90-4700-8dd3-726e4b5fc26d

Perf comparison — cumulative, everything since 2.0.3

3 run(s) of each side, alternating on one machine. Allocation is a count and is gated exactly. Time is a measurement, so its gate is derived from the spread this job just observed in itself rather than fixed in advance.

corpus bytes/char gen0/Mchar ns/char Δ time noise gate
scroll-ascii 0.00 → 0.00 0.00 → 0.00 3.38 → 3.38 +0.2% ±1% 5%
sgr-churn 0.00 → 0.00 0.00 → 0.00 9.01 → 9.08 +0.7% ±1% 5%
truecolor 0.00 → 0.00 0.00 → 0.00 10.11 → 10.15 +0.4% ±4% 11%
alt-redraw 0.00 → 0.00 0.00 → 0.00 14.39 → 14.42 +0.2% ±1% 5%
unicode 7.66 → 7.66 0.45 → 0.45 35.82 → 34.93 -2.5% ±6% 18%
flood 0.00 → 0.00 0.00 → 0.00 95.46 → 95.14 -0.3% ±2% 6%

Each corpus is gated at max(5%, 3 × its own noise). A wide noise column means this runner was busy and the timing half of the table should be read as advisory; the allocation half is exact either way.

assemblies measured
  • base: XTerm.NET 2.0.3.0 mvid:9ba0ce98-0d1e-4424-8aa1-9ab012cdc07a
  • head: XTerm.NET 2.0.5.0 mvid:8698ccc0-dc90-4700-8dd3-726e4b5fc26d

tomlm added a commit to tomlm/Iciclecreek.Avalonia.Terminal that referenced this pull request Oct 6, 2026
Picks up the kitty quiet-level fix (tomlm/XTerm.NET#164): no stray OK
reply at the shell prompt after notcurses exits.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tomlm added a commit to tomlm/Iciclecreek.Avalonia.Terminal that referenced this pull request Oct 6, 2026
#176)

* Draw block elements and sextants as rectangles snapped to the cell

Half blocks, eighths, quadrants, shades (U+2580-259F) and sextants
(U+1FB00-1FB3B) were drawn from the font. A glyph keeps the font's
metrics, not the cell's, so neighbouring blocks overlapped by a fraction
or left a hairline between them: seams through every picture notcurses
draws out of them (notcurses-info's blitter samples), where Windows
Terminal draws them solid. Fonts without sextants showed boxes.

BlockGlyphs maps each to rectangles in 24ths of a cell (the unit that
holds both eighths and thirds). The classic renderer gives block cells
runs of their own, drawn as fills; the Skia renderer branches per cell.
Every edge is snapped against the cell's own snapped edges, the same
arithmetic as backgrounds, so shapes meet their neighbours on one pixel.
Shades fill at 25/50/75% of the foreground.

Checked with Skia renders at 7x14, 8x15 and 10x21 cells: no partially
covered pixels in either renderer, and the two renderers identical. The
sextant mapping was checked against all 60 UnicodeData names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Draw the smooth-mosaic wedges, triangles and extra eighths too

notcurses-info stacks the U+1FB3C..1FB67 wedges into shapes two rows
tall. Drawn from the font, the upper glyph stopped a few pixels short of
its cell's bottom, so a background-coloured band ran through every shape.

BlockGlyphs now also covers U+1FB3C..1FB8B: the 44 wedges as polygons
(extracted mechanically from WezTerm's customglyph.rs, which defines each
by its Unicode name), the U+1FB68..1FB6F triangles meeting at the centre,
and the U+1FB70..1FB8B eighths Block Elements lacked. Polygon vertices are
snapped with the same arithmetic as rectangle edges, so straight sides
meet their neighbours and only the diagonal is antialiased.

Checked with Skia renders of notcurses-info's pairs at 10x21 cells: white
coverage continues across the row boundary, mirrored top and bottom, in
both renderers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Bump version to 4.0.5

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Update XTerm.NET to 2.0.5

Picks up the kitty quiet-level fix (tomlm/XTerm.NET#164): no stray OK
reply at the shell prompt after notcurses exits.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant