feat: [PRODUCT-608], [ENG-2210] add filter on sf nodes list#230
Merged
Conversation
37036d2 to
53a6501
Compare
Contributor
Greptile OverviewGreptile SummaryAdded filtering and pagination capabilities to the Key changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant CLI as sf nodes list
participant API as Nodes API
participant Filter as Filter Logic
participant Display as Display Logic
User->>CLI: sf nodes list --status pending running --limit 100
CLI->>API: client.nodes.list()
API-->>CLI: Return all nodes
CLI->>Filter: Apply status filter
Filter->>Filter: Check if options.status?.length
Filter->>Filter: Filter nodes by status (pending, running)
Filter-->>CLI: Return filteredNodes
CLI->>Display: Check output format
alt JSON output (--json)
Display->>User: JSON.stringify(filteredNodes)
else Verbose output (--verbose)
Display->>Display: Slice filteredNodes to limit
Display->>User: Render NodesVerboseDisplay
else Table output (default)
Display->>Display: createNodesTable(filteredNodes, limit)
Display->>User: Print table with limit message
Display->>User: Print "Found X nodes total" message
end
|
sf nodes listsf nodes list
sf nodes listsf nodes list
Member
Author
|
@greptileai review this again |
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.
Finishes and expands on #225