Repository navigation
fix(sdk): populate pane process/exit state in Window::info snapshots - #253
Open
mrmflis-hub wants to merge 1 commit into
Open
mrmflis-hub wants to merge 1 commit into
mrmflis-hub wants to merge 1 commit into
Conversation
Window::info()'s snapshot hard-coded PaneProcessState::Unknown for every listed pane, even though the daemon already serves the live per-pane details (running pid, dead flag, exit status/signal, start command, start path) that Pane::info()'s snapshot surfaces. Consumers polling the window-level snapshot could therefore never observe a pane exit, and no window-level caller could read a pane's working directory either. Decorate the window snapshot with one additional session-scoped list-panes probe using the same 18-field format the pane-scoped snapshot uses, reusing the existing details parser and state derivation: - a pane whose probe line reports dead gets Exited plus its exit state (status code, signal); - a running pane gets Running with its pid, start command, working directory, geometry, and lifecycle counters; - a pane whose line the probe cannot resolve keeps Unknown, so a pane that vanished mid-snapshot degrades exactly like the pane-scoped absent-slot snapshot; - an already-closed error from the probe degrades to the undecorated snapshot, matching the pane listing's own tolerance. Verified with the scripted transport test in window/tests.rs and end-to-end from a downstream app against a live Windows daemon (a cmd /c exit 3 pane now reports exit code 3 through Window::info). Signed-off-by: mrmflis-hub <mr.mflis@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Window::info()'s snapshot hard-coded PaneProcessState::Unknown for every listed pane, even though the daemon already serves the live per-pane details (running pid, dead flag, exit status/signal, start command, start path) that Pane::info()'s snapshot surfaces. Consumers polling the window-level snapshot could therefore never observe a pane exit, and no window-level caller could read a pane's working directory either.
Decorate the window snapshot with one additional session-scoped list-panes probe using the same 18-field format the pane-scoped snapshot uses, reusing the existing details parser and state derivation:
Verified with the scripted transport test in window/tests.rs and end-to-end from a downstream app against a live Windows daemon (a cmd /c exit 3 pane now reports exit code 3 through Window::info).