Skip to content

feat: add window_title to shpool list --json - #441

Open
GeoffChurch wants to merge 1 commit into
shell-pool:masterfrom
GeoffChurch:session-titles
Open

GeoffChurch wants to merge 1 commit into
shell-pool:masterfrom
GeoffChurch:session-titles

Conversation

@GeoffChurch

Copy link
Copy Markdown
Contributor

Issue Link

Discussion #440

AI Policy Ack

ack

Drafted with vibes, edited and tested with meat

This PR was:

  • mostly or completely vibe coded
  • mostly or completely meat coded
  • bit of both

Description

Adds window_title to the output of shpool list --json:

{
  "sessions": [
    {
      "name": "djt-miner",
      "started_at_unix_ms": 1790885744638,
      "last_connected_at_unix_ms": 1791385820043,
      "last_disconnected_at_unix_ms": 1791383990390,
      "status": "Disconnected",
      "shell_pid": 51725,
      "attachments": [],
      "window_title": "Coins mined: 23.203 ($0.00032). Level: patriot"
    }
  ]
}

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 --json without attaching.

@GeoffChurch
GeoffChurch force-pushed the session-titles branch 2 times, most recently from d52638e to 4baf484 Compare October 7, 2026 17:31
@ethanpailes

ethanpailes commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

I think you'll need to pull in shpool-vterm 0.2.7 (shell-pool/shpool-vterm#12)

Comment thread Cargo.toml Outdated

@ethanpailes ethanpailes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to take a different approach to avoid double-storing the same data.

Comment thread libshpool/src/daemon/server.rs Outdated
Comment thread libshpool/src/daemon/shell.rs Outdated
Comment thread libshpool/src/daemon/shell.rs
@ethanpailes

Copy link
Copy Markdown
Contributor

I just bumped the shpool-vterm version to 0.2.8, so you should be able to rebase and impl

.collect()
};
let (mut sessions, replies): (Vec<Session>, Vec<Reply>) =
sessions.context("collecting running session metadata")?.into_iter().unzip();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we unzip here only to zip back together below. That seems a bit goofy. Let's just keep the tuples together.

fn handle_fetch_metadata(
spool: &dyn session_restore::SessionSpool,
request: Result<MetadataRequest, crossbeam_channel::RecvError>,
requests: &mut crossbeam_channel::Receiver<MetadataRequest>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Draining other incoming requests immediately seems overly complicated. Let's just handled one at a time and use the top level dispatch loops for all incoming requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants