Hide already registered clients in thv client setup#3889
Merged
JAORMX merged 8 commits intostacklok:mainfrom Mar 11, 2026
Merged
Hide already registered clients in thv client setup#3889JAORMX merged 8 commits intostacklok:mainfrom
thv client setup#3889JAORMX merged 8 commits intostacklok:mainfrom
Conversation
When selecting clients in `thv client setup`, clients that are already registered for all selected groups are now filtered out of the selection list. If all installed clients are already registered, the command exits with a clear message instead of showing an empty list. Closes stacklok#1308 Signed-off-by: carlos <21148423+carlos-gn@users.noreply.github.com>
8931db6 to
fea2308
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3889 +/- ##
==========================================
- Coverage 68.59% 68.53% -0.06%
==========================================
Files 447 448 +1
Lines 45691 45709 +18
==========================================
- Hits 31340 31328 -12
- Misses 11934 11962 +28
- Partials 2417 2419 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
hi @eleftherias pls let me know if makes sense to keep this PR open |
Member
|
Hi @carlos-gn, thanks for the reminder. This slipped through our review process, we'll look at it in the next few days. Apologies for the delay. |
JAORMX
approved these changes
Mar 11, 2026
Collaborator
JAORMX
left a comment
There was a problem hiding this comment.
Nice work! The filtering logic is correct and well-tested. A few minor cleanup items (use slices.Contains, move the sentinel error to pkg/client/, deduplicate the group-collection logic) will be addressed in a follow-up PR.
JAORMX
added a commit
that referenced
this pull request
Mar 11, 2026
Follow-up to #3889 with four mechanical refactors (no behavior change): - Replace hand-rolled loop with slices.Contains in isClientRegisteredInAllGroups - Move ErrAllClientsRegistered sentinel from cmd/thv/app/ui/ to pkg/client/ - Extract selectedGroups() helper to deduplicate map-to-slice logic - Add bounds check on group indices before indexing m.Groups Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
JAORMX
added a commit
that referenced
this pull request
Mar 11, 2026
Follow-up to #3889 with four mechanical refactors (no behavior change): - Replace hand-rolled loop with slices.Contains in isClientRegisteredInAllGroups - Move ErrAllClientsRegistered sentinel from cmd/thv/app/ui/ to pkg/client/ - Extract selectedGroups() helper to deduplicate map-to-slice logic - Add bounds check on group indices before indexing m.Groups Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JAORMX
added a commit
that referenced
this pull request
Mar 12, 2026
Follow-up to #3889 with four mechanical refactors (no behavior change): - Replace hand-rolled loop with slices.Contains in isClientRegisteredInAllGroups - Move ErrAllClientsRegistered sentinel from cmd/thv/app/ui/ to pkg/client/ - Extract selectedGroups() helper to deduplicate map-to-slice logic - Add bounds check on group indices before indexing m.Groups Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.
Summary
thv client setupCloses #1308
Test plan
FilterClientsAlreadyRegisteredcovering all edge casessetupModel.Updateverifying group-to-client transition filtering🤖 Generated with Claude Code