Read Kitty file ranges and placeholder runs as kitty does #101

Merged
natsukium merged 3 commits from fix/file-offsets into main 2026-10-12 01:14:04 +09:00
Owner

Two places where felis read Kitty graphics input differently from kitty:

  • t=f and t=t ignored S= and O= and read the whole file. kitty maps the named range for t=f, t=t and t=s alike and refuses a range past the end with EINVAL. The three methods now share one range check and one reader, and a refused temp file is still deleted.
  • A Unicode-placeholder cell with the default foreground borrowed the image id of the cell before it. kitty's screen_render_line_graphics reads the default color as id 0, which names no image. A cell that leaves out the id's high-byte diacritic now takes it from its run, and a run only continues while the cell's diacritics agree with it.

A third commit applies the formatting #94 merged without, since the flake check could not reach its remote builder.

Two places where felis read Kitty graphics input differently from kitty: - `t=f` and `t=t` ignored `S=` and `O=` and read the whole file. kitty maps the named range for `t=f`, `t=t` and `t=s` alike and refuses a range past the end with `EINVAL`. The three methods now share one range check and one reader, and a refused temp file is still deleted. - A Unicode-placeholder cell with the default foreground borrowed the image id of the cell before it. kitty's `screen_render_line_graphics` reads the default color as id 0, which names no image. A cell that leaves out the id's high-byte diacritic now takes it from its run, and a run only continues while the cell's diacritics agree with it. A third commit applies the formatting #94 merged without, since the flake check could not reach its remote builder.
The test landed unformatted while the flake check's treefmt build could
not reach its remote builder, so the check never ran on it.

Assisted-by: Claude Code
A default-foreground placeholder cell used to borrow the image id of
the cell before it, so text drawn after an image in the default color
could extend the image. kitty's screen_render_line_graphics reads the
default color as id 0, which names no image. The same function lets a
cell take the id's high byte from its run when it omits the third
diacritic, and only continues a run whose diacritics agree with it;
felis now follows both.

Assisted-by: Claude Code
daemon: read the S=/O= range of Kitty file transmissions
Some checks failed
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Has been cancelled
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m8s
fuzz / cargo fuzz smoke (per target) (pull_request) Has been cancelled
pr / nix flake check (pull_request) Has been cancelled
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
pr / wire schema is compatible with the base (pull_request) Has been cancelled
pr / frontend smoke (x86_64-linux) (pull_request) Has been cancelled
windows / detect relevant changes (pull_request) Has been cancelled
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
windows / cargo nextest (Windows) (pull_request) Has been cancelled
windows / frontend smoke (Windows) (pull_request) Has been cancelled
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been cancelled
windows / windows docs-only no-op (pull_request) Has been cancelled
93964bff27
t=f and t=t ignored S= and O= and read the whole file, so a producer
naming one image inside a larger file got the wrong bytes. kitty maps
the same range for t=f, t=t and t=s, and refuses one past the end with
EINVAL; the three methods now share one range check and reader. A
refused temp file is still deleted, since the producer handed it over.

Assisted-by: Claude Code
natsukium force-pushed fix/file-offsets from 93964bff27
Some checks failed
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Has been cancelled
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m8s
fuzz / cargo fuzz smoke (per target) (pull_request) Has been cancelled
pr / nix flake check (pull_request) Has been cancelled
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
pr / wire schema is compatible with the base (pull_request) Has been cancelled
pr / frontend smoke (x86_64-linux) (pull_request) Has been cancelled
windows / detect relevant changes (pull_request) Has been cancelled
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
windows / cargo nextest (Windows) (pull_request) Has been cancelled
windows / frontend smoke (Windows) (pull_request) Has been cancelled
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been cancelled
windows / windows docs-only no-op (pull_request) Has been cancelled
to 623a5a03aa
Some checks failed
bench / Criterion full-suite snapshot (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m8s
bench / Criterion regression gate (pull_request) Has been cancelled
fuzz / cargo fuzz smoke (per target) (pull_request) Has been cancelled
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
pr / nix flake check (pull_request) Has been cancelled
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
pr / wire schema is compatible with the base (pull_request) Has been cancelled
pr / frontend smoke (x86_64-linux) (pull_request) Has been cancelled
windows / detect relevant changes (pull_request) Has been cancelled
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
windows / cargo nextest (Windows) (pull_request) Has been cancelled
windows / frontend smoke (Windows) (pull_request) Has been cancelled
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been cancelled
windows / windows docs-only no-op (pull_request) Has been cancelled
2026-10-12 00:48:22 +09:00
Compare
natsukium force-pushed fix/file-offsets from 623a5a03aa
Some checks failed
bench / Criterion full-suite snapshot (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m8s
bench / Criterion regression gate (pull_request) Has been cancelled
fuzz / cargo fuzz smoke (per target) (pull_request) Has been cancelled
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
pr / nix flake check (pull_request) Has been cancelled
pr / cargo build / clippy / test / deny (pull_request) Has been cancelled
pr / wire schema is compatible with the base (pull_request) Has been cancelled
pr / frontend smoke (x86_64-linux) (pull_request) Has been cancelled
windows / detect relevant changes (pull_request) Has been cancelled
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
windows / cargo nextest (Windows) (pull_request) Has been cancelled
windows / frontend smoke (Windows) (pull_request) Has been cancelled
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been cancelled
windows / windows docs-only no-op (pull_request) Has been cancelled
to f67085e61a
All checks were successful
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 8s
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m7s
windows / cargo nextest (Windows) (pull_request) Successful in 4m11s
bench / Criterion regression gate (pull_request) Successful in 2m33s
windows / frontend smoke (Windows) (pull_request) Successful in 35s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
pr / nix flake check (pull_request) Successful in 39s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m31s
pr / wire schema is compatible with the base (pull_request) Successful in 2s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 38s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m49s
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
2026-10-12 00:52:29 +09:00
Compare
natsukium deleted branch fix/file-offsets 2026-10-12 01:14:04 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!101
No description provided.