grid: implement DECCARA and DECRARA #210

Merged
natsukium merged 2 commits from feat/deccara-decrara-188 into main 2026-09-08 00:54:43 +09:00
Owner

Fixes #188.

Implements the rectangular attribute-change operations DECCARA (CSI ... $r) and DECRARA
(CSI ... $t) in felis-grid: DECCARA sets the listed SGR attributes over the rectangle,
DECRARA toggles (reverses) them. Both honor DECSACE — the rectangle vs. stream selection
mode — and resolve their coordinates through the active margins and origin mode, matching
the existing rectangular ops (DECFRA/DECERA/DECCRA).

Coverage: insta snapshots per operation, the DECSACE stream/rectangle distinction, and the
margin/origin-mode cases, plus proptests alongside the existing rectangular-op properties.

Doc cascade: docs/reference/protocols/support-matrix.md and
docs/reference/protocols/vt-compliance.md flip DECCARA/DECRARA to supported, and
CHANGELOG.md records the user-visible addition.

Verified: just check green (fmt, clippy, nextest, deny, proto-compat); reviewed by pi luna

  • pi sol; docs proofread by Gemini gemini-3.8-flash-high

Follow-ups

  • #209 test: DECCARA/DECRARA attribute vocabulary mostly unpinned

Deferred

  • esctest baseline ratchet — esctest2 ships no DECCARA/DECRARA cases, so there is nothing
    to ratchet; the floor stays at 491.
  • DECSACE reset on DECSTR / RIS — pre-existing behavior untouched by this issue's
    criteria; the field was already persisted across resets for the DECRQSS round-trip.
  • test: DECRARA proptest only exercises the on-to-off toggle direction — the XOR-vs-clear
    property this proptest fails to distinguish is already pinned by the paired snapshot
    test (deccara/decrara_reverses_listed_attributes_in_rectangle, which does exercise
    both toggle directions); strengthening the proptest itself is incremental hardening the
    acceptance criteria do not require.
Fixes #188. Implements the rectangular attribute-change operations DECCARA (CSI ... $r) and DECRARA (CSI ... $t) in `felis-grid`: DECCARA sets the listed SGR attributes over the rectangle, DECRARA toggles (reverses) them. Both honor DECSACE — the rectangle vs. stream selection mode — and resolve their coordinates through the active margins and origin mode, matching the existing rectangular ops (DECFRA/DECERA/DECCRA). Coverage: insta snapshots per operation, the DECSACE stream/rectangle distinction, and the margin/origin-mode cases, plus proptests alongside the existing rectangular-op properties. Doc cascade: `docs/reference/protocols/support-matrix.md` and `docs/reference/protocols/vt-compliance.md` flip DECCARA/DECRARA to supported, and `CHANGELOG.md` records the user-visible addition. Verified: just check green (fmt, clippy, nextest, deny, proto-compat); reviewed by pi luna + pi sol; docs proofread by Gemini gemini-3.8-flash-high ## Follow-ups - #209 test: DECCARA/DECRARA attribute vocabulary mostly unpinned ## Deferred - esctest baseline ratchet — esctest2 ships no DECCARA/DECRARA cases, so there is nothing to ratchet; the floor stays at 491. - DECSACE reset on DECSTR / RIS — pre-existing behavior untouched by this issue's criteria; the field was already persisted across resets for the DECRQSS round-trip. - test: DECRARA proptest only exercises the on-to-off toggle direction — the XOR-vs-clear property this proptest fails to distinguish is already pinned by the paired snapshot test (`deccara/decrara_reverses_listed_attributes_in_rectangle`, which does exercise both toggle directions); strengthening the proptest itself is incremental hardening the acceptance criteria do not require.
The rectangular-editing family was complete except for the attribute
pair, which left a program no way to restyle an area it had already
drawn: the alternative is redrawing the text under a new pen, which
loses whatever the cells carried.

Both operations merge into the cells rather than replacing the pen, so
colors, hyperlinks and the DECSCA / SPA protection bits survive; the
reachable set is xterm's ALL_ATTRS. DECSACE stops being inert with
them: it was already parsed and stored for the DECRQSS round-trip, and
it is the extent selector these two — and only these two — branch on.

Refs #188
docs: record DECCARA / DECRARA support
All checks were successful
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 53s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m33s
pr / nix flake check (pull_request) Successful in 32s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m2s
pr / wire schema is compatible with the base (pull_request) Successful in 8s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 52s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Successful in 4m43s
windows / frontend smoke (Windows) (pull_request) Successful in 1m58s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 14s
fuzz / cargo fuzz nightly long-run (push) Has been skipped
darwin / detect relevant changes (push) Successful in 3s
darwin / darwin docs-only no-op (push) Has been skipped
darwin / build felis (aarch64-darwin) (push) Successful in 13s
fuzz / cargo fuzz smoke (per target) (push) Successful in 1m8s
pr / nix flake check (push) Successful in 5s
pr / cargo build / clippy / test / deny (push) Successful in 2m9s
pr / wire schema is compatible with the base (push) Successful in 15s
pr / frontend smoke (x86_64-linux) (push) Successful in 6s
windows / detect relevant changes (push) Successful in 3s
windows / windows docs-only no-op (push) Has been skipped
pr / publish felis (x86_64-linux) (push) Successful in 11s
windows / cargo clippy (Windows cross) (push) Successful in 13s
windows / cargo nextest (Windows) (push) Successful in 4m6s
windows / frontend smoke (Windows) (push) Successful in 2m3s
windows / package felis (x86_64-pc-windows-msvc) (push) Successful in 2m45s
da9290985e
The support matrix carried the pair as the family's one unimplemented
row, and the compliance page still told readers DECSACE was inert.

Refs #188
natsukium deleted branch feat/deccara-decrara-188 2026-09-08 00:54:43 +09:00
Sign in to join this conversation.
No description provided.