[v0.1/Protocol] Implement in-band resize notify (?2048) #189
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#189
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implement in-band resize notification, DEC private mode
?2048: while a program has set the mode, the terminal pushesCSI 48 ; <rows> ; <cols> ; <height_px> ; <width_px> tto the PTY whenever the session geometry changes, and answersthe set with one immediate report so the program learns the current size without a separate query.
#181 recorded the stance: adopt. felis's geometry is daemon-owned and changes from several directions a program
cannot observe (window resize,
sessions retarget, a second attached client), which is exactly the case in-bandnotification serves better than SIGWINCH alone. Window-size reporting stays out:
CSI 14/15/16 tremain stubbed0;0and XTWINOPS stays a non-goal —?2048is a notification the program opts into, not a query that leaks hostgeometry.
Where
crates/felis-grid/src/sink.rs: the mode set/reset arm beside2031 => self.color_scheme_notify = on, plus theDECRQM report in
crates/felis-grid/src/editing.rs(the2031arm there is the model).crates/felis-grid/src/lib.rs: the mode flag and its accessor, mirroringcolor_scheme_notify().crates/felis-daemon/src/serve/session_task.rs: emit the report on every effective geometry change while the mode isset, and once on the set itself. The color-scheme notify path (around the
color_scheme_notify()call site) is theplumbing template. The pixel axes report
0where the daemon has no window extents, matching theCSI 14 tstub.Tests
crates/felis-grid/tests/snapshot_csi.rs: the immediate report on set, no report while unset, and DECRQM reportingthe mode.
crates/felis-daemon/src/serve/session_task.rs's test module: a resize while the mode is set writesone report to the PTY; the same resize with the mode unset writes nothing.
Cascade
docs/reference/protocols/support-matrix.md(row flips to✅),docs/reference/protocols/vt-compliance.md"Reporting and queries", the landscape stance line from #181, and
CHANGELOG.md(a new sequence programs can rely on).Split from #181.