fix(pty): process output alongside wake events - #2454
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PTY actor now processes wake, read, and write readiness in one cycle. Tests cover simultaneous readiness, and the changelog records reliable pane output for fresh background workspaces. ChangesPTY readiness handling
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PTYActor
participant WakeSource
participant PTY
WakeSource->>PTYActor: wake readiness
PTY->>PTYActor: read and write readiness
PTYActor->>WakeSource: drain wake notifications
PTYActor->>PTY: process reads and flush writes
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
65d8d06 to
1cb8565
Compare
Greptile SummaryThe PR fixes delayed output in background panes by handling PTY read and write readiness even when the actor wake descriptor is simultaneously ready.
Confidence Score: 5/5The PR appears safe to merge, with the simultaneous-readiness behavior covered by a deterministic regression test. The actor continues to drain wake notifications while now processing PTY readiness already returned by the same poll; lifecycle commands remain serialized through the next command-drain step, and no concrete contract violation or blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/pty/actor/unix.rs | Refactors poll readiness handling so wake notifications no longer suppress simultaneous PTY reads or writes, with focused regression coverage. |
| docs/next/CHANGELOG.md | Adds an accurate release note for reliable output from fresh background workspaces. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
P[Poll PTY and wake descriptors] --> W{Wake ready?}
W -->|Yes| D[Drain wake descriptor]
W -->|No| R
D --> R{PTY read ready and actor running?}
R -->|Yes| Read[Process PTY output]
R -->|No| X
Read --> X{PTY write ready and writes pending?}
X -->|Yes| Write[Flush pending input]
X -->|No| Loop[Continue actor loop]
Write --> Loop
Reviews (1): Last reviewed commit: "Merge branch 'master' into akbash/2449-n..." | Re-trigger Greptile
|
thanks akbash. reproduced #2449 on Herdr 0.8.0 with an 11-workspace/27-pane restored session. The reported screen symptoms reproduced, but an external side effect and syscall tracing confirmed that |
Summary
Checks
cargo test pty::actor::unix::tests -- --nocapturecargo clippy --all-targets --locked -- -D warningsjust windows-lintcargo nextest run --locked -E 'all() - test(live_server_holds_one_pty_master_fd_per_pane) - test(metadata_clear_only_without_ttl_does_not_extend_old_ttl)'(3248 passed; the handoff PID-discovery test fails identically on the base commit in this host, and the timing test passes in isolation)--no-focuspane surfaced command output in 321 ms while the active workspace remained unchangedrefs #2449