Summary
Space-selection already lets you mark several sessions and launch them all at once with L. Make the hide (h) and favorite (*) actions honor that same selection so you can hide or star a batch in one keystroke instead of one session at a time.
Problem
handleHideSession and handleToggleFavorite operate only on the cursor session returned by sessionList.Selected(). When you have marked ten sessions with Space, pressing h or * still affects just the highlighted row. Cleaning up a long list (hiding a burst of throwaway sessions, or starring a related group) means repeating the keystroke and re-navigating each time. Other list-driven terminal tools apply bulk operations across the whole marked set, and dispatch already has the selection model in place for launching.
Proposed solution
When a multi-selection is active, route h and * through the marked set instead of the cursor:
- If one or more sessions are selected (the same set used by
L), apply the toggle to every selected session.
- Choose a single target state for the batch so the action is predictable. For hide: if any selected session is currently visible, hide the whole set; otherwise unhide the whole set. For favorite: if any selected session is not a favorite, favorite the whole set; otherwise unfavorite it.
- Keep the existing rule that hiding a favorited session also removes it from favorites, applied per session.
- When no sessions are selected, behavior is unchanged (act on the cursor session).
- Persist the updated hidden and favorite sets to config once per batch, not once per session.
- After a bulk hide, clear the selection and reload the list so hidden rows drop out.
Acceptance criteria
Technical notes
- Handlers live in
internal/tui/model.go (handleHideSession, handleToggleFavorite); the selection set is managed by internal/tui/components/sessionlist.go.
- Config persistence uses
HiddenSessions and FavoriteSessions in internal/config/config.go.
go build ./..., go test ./... -count=1, go vet ./..., then mage preflight.
Summary
Space-selection already lets you mark several sessions and launch them all at once with
L. Make the hide (h) and favorite (*) actions honor that same selection so you can hide or star a batch in one keystroke instead of one session at a time.Problem
handleHideSessionandhandleToggleFavoriteoperate only on the cursor session returned bysessionList.Selected(). When you have marked ten sessions with Space, pressinghor*still affects just the highlighted row. Cleaning up a long list (hiding a burst of throwaway sessions, or starring a related group) means repeating the keystroke and re-navigating each time. Other list-driven terminal tools apply bulk operations across the whole marked set, and dispatch already has the selection model in place for launching.Proposed solution
When a multi-selection is active, route
hand*through the marked set instead of the cursor:L), apply the toggle to every selected session.Acceptance criteria
hhides (or unhides) all of them and writes config once.*favorites (or unfavorites) all of them and writes config once.hand*still act on the cursor session exactly as before.Technical notes
internal/tui/model.go(handleHideSession,handleToggleFavorite); the selection set is managed byinternal/tui/components/sessionlist.go.HiddenSessionsandFavoriteSessionsininternal/config/config.go.go build ./...,go test ./... -count=1,go vet ./..., thenmage preflight.