Queue OSC 7501 reports and prompt starts as ordered grid effects #115
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!115
Loading…
Reference in a new issue
No description provided.
Delete branch "grid/osc7501-effects"
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?
Third step of #67. The grid now turns OSC 7501 into typed effects, kept in byte-stream order, for the daemon to apply. The grid itself stores no records. The daemon ignores the new effects for now, so nothing changes for users yet.
What changes
PtyEffect::ProgramStatus(Report | Clear)is queued for each OSC 7501 report or clear that BEL or ST actually terminated.OscEndfrom #110.?goes unanswered for now. A reply advertises support, and that should wait until the records are visible over IPC.PtyEffect::PromptStartedis queued for an OSC 133Athat is notk=s, on either screen. The daemon will expire working and blocked records on it.HardReset; its doc now says it also ends the records.report working; OSC 133 Adifferently fromOSC 133 A; report working.Bounded without drops
Reports and prompt starts must never be dropped: the daemon's records have to match what the program sent. Instead, the queue is bounded by yielding:
STATUS_OUTBOX_YIELD), the grid asks the parser to yield.advance_until_yieldstops, and the daemon's parse thread waits until the session task has drained. This is the same mechanism a full APC queue uses.To support this, the first commit widens
advance_until_yieldso it also checks for a yield after any byte that can end an OSC. That includes the byte after an ESC that left an OSC, since that byte is where an ST-terminated OSC now dispatches.advanceitself is unchanged.Also:
Reportis boxed inside the effect, so the other effect variants stay small.Tests
advance_until_yieldstops after an OSC ended by BEL, by ST, or by ST split across chunks. It also stops on the byte that both interrupts one OSC and opens the next. It never checks for a yield after bytes outside a string.?gets no replyA:k=sand B/C/D queue nothing, while anAon the alternate screen still countsHardReset7501;Asequences.build_sinkfed 192 reports pauses three times and delivers every report.run→Some(0), which loops forever.just checkpasses.