Apply hide and favorite to all selected sessions#203
Merged
Conversation
Space-selection already drives bulk launching. Route the hide (h) and favorite (*) actions through the same marked set so a whole selection can be hidden or starred in one keystroke. With no selection, both keys still act on the cursor session. Batch target state is deterministic: hide the set if any member is visible (else unhide), favorite the eligible set if any member is not a favorite (else unfavorite). Hidden sessions are skipped when favoriting, and a bulk hide drops those sessions from favorites. Config is written once per batch. Closes #196 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
What
With one or more sessions marked using
Space, the hide (h) and favorite (*) actions now apply to the whole selection instead of only the cursor session. With no selection active, both keys behave exactly as before.Closes #196
Why
Space-selection already drives bulk launching (
L), buthand*only ever touchedsessionList.Selected()(the cursor row). Cleaning up a long list or starring a related group meant repeating the keystroke and re-navigating each time.How
handleHideSessionandhandleToggleFavoritenow checkSelectionCount()and route tohandleBulkHide/handleBulkFavoritewhen a selection exists.Tests
Added unit tests in
internal/tui: bulk hide, unhide when all hidden, mixed-visibility hide, favorite-removal on hide, bulk favorite, unfavorite when all favorited, and skip-hidden favorite. Existing single-session behavior is unchanged and still covered.go build ./...,go vet ./...,go test ./... -count=1,golangci-lint run, andgofumpt -l .all clean.