Repository navigation
feat: add window_title to shpool list --json - #441
GeoffChurch wants to merge 2 commits into
Conversation
d52638e to
4baf484
Compare
|
I think you'll need to pull in shpool-vterm 0.2.7 (shell-pool/shpool-vterm#12) |
4baf484 to
68a0920
Compare
ethanpailes
left a comment
There was a problem hiding this comment.
I'd like to take a different approach to avoid double-storing the same data.
| status, | ||
| shell_pid: session.child_pid, | ||
| attachments: lifecycle_state.attachment.into_iter().collect(), | ||
| window_title: session.window_title.get(), |
There was a problem hiding this comment.
It seems a bit strange to store the title persistantly in the session struct. I would think it would be better to always dynamically fetch it from the term impl.
| /// whenever the window title changes, and read by `handle_list`. Kept out of | ||
| /// `inner` for the same reason as [`SessionLifecycleState::attachment`]. | ||
| #[derive(Debug, Default)] | ||
| pub struct SessionWindowTitle { |
There was a problem hiding this comment.
same thing, I don't think we should reify this in a data structure like this
|
|
||
| loop { | ||
| let mut do_reattach = false; | ||
| crossbeam_channel::select! { |
There was a problem hiding this comment.
I think the right approach would be to have this shell to client channel expose another channel rpc called fetch_metadata or something like that. For now we would just return the title and session name, but we could extend it with other things in the future. That would prevent having to think about invalidation logic. The list handler could issue all the requests up front so all the shell threads could work in paralell and then gather the answers in a second phase.
Issue Link
Discussion #440
AI Policy Ack
ack
Drafted with vibes, edited and tested with meat
This PR was:
Description
Adds
window_titleto the output ofshpool list --json:The use case is letting downstream tools show the user the window titles of their sessions. Many processes (shells, coding assistants, etc) send status information to the window title, which is traditionally visible in a terminal window/tab but in shpool is inaccessible without attaching to the session.
This change exposes the current title through
shpool list --jsonwithout attaching.