worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

[Feature Request] wt list --watch

Open bswan0002 opened this issue 9 months ago • 9 comments

Would love a --watch flag on wt list that re-renders the table on an interval (e.g. every 3-5 seconds).

Main use case: keeping a dedicated terminal pane as a live dashboard while running multiple Claude Code agents in parallel. The 🤖/💬 markers make wt list a natural agent monitor, but re-running it manually breaks the flow.

watch -n 5 -c 'wt list --full' works as a stopgap but flickers and doesn't leverage the existing progressive rendering.

Similar tool gwq supports gwq status --watch, so there is prior art in the space.

bswan0002 avatar Feb 21 '26 21:02 bswan0002

Thanks for the suggestion! This is a feature request rather than a bug, so I'll leave it for a maintainer to evaluate and prioritize.

worktrunk-bot avatar Feb 21 '26 21:02 worktrunk-bot

with --no-progressive and a watchexec (or similar), do we get the same result?

I think the idea is cool, but I'm not sure there's much we can do that is more granular than just that; can we do more than just poll?

max-sixty avatar Feb 22 '26 04:02 max-sixty

with --no-progressive and a watchexec (or similar), do we get the same result?

watchexec doesn't work for CI status, and ideally the check on CI status would poll at a longer interval vs agent status to avoid spamming network requests while keeping agent status more responsive. Can also be a bit clunky setting up watchexec depending on worktree path config, whereas wt already knows what files to watch.

bswan0002 avatar Feb 22 '26 19:02 bswan0002

watchexec doesn't work for CI status

can I ask why not?

ideally the check on CI status would poll at a longer interval vs agent status to avoid spamming network requests while keeping agent status more responsive.

totally — we already cache this for 30-60s (IIRC) to avoid GitHub rate limits!

max-sixty avatar Feb 22 '26 20:02 max-sixty

watchexec doesn't work for CI status

can I ask why not?

If there is no update to local filesystem but there is an update to remote CI status, watchexec wouldn't fire.

ideally the check on CI status would poll at a longer interval vs agent status to avoid spamming network requests while keeping agent status more responsive.

totally — we already cache this for 30-60s (IIRC) to avoid GitHub rate limits!

Nice!

With your feedback I got Claude to write me a script that I think should get the desired functionality. I'll test it out at work tomorrow and report back here with a snippet + any additional notes after playing around with it some.

I appreciate your responsiveness :)

bswan0002 avatar Feb 22 '26 21:02 bswan0002

A couple of tips that may help with the watch script:

  • --no-progressive disables the progressive rendering (it's a hidden flag). Without it, wt list auto-enables progressive mode on a TTY, which would cause the table to redraw mid-render. If the script is piping output, progressive is already disabled automatically, but --no-progressive makes it explicit.
  • --format=json gives structured output if the script needs to parse status programmatically rather than re-rendering the table.

Looking forward to hearing how it works out.

worktrunk-bot avatar Feb 22 '26 22:02 worktrunk-bot

great @bswan0002! let us know

(also forgive @worktrunk-bot for their intrusion, will iterate some more on when it should jump in...)

max-sixty avatar Feb 22 '26 22:02 max-sixty

you're correct that watchexec isn't sufficient, but check out https://github.com/sachaos/viddy

max-sixty avatar Feb 23 '26 01:02 max-sixty

I'll close for now, but if anyone has build something cool with viddy or similar, and we could encapsulate it in a wt list --watch, then I'd be up for adding. the main contribution would be "I've used this a lot over the past few weeks and it's great"

worktrunk-bot avatar Apr 29 '26 19:04 worktrunk-bot