feat(daemon): add server-side sorting for ListRuns and ListIssues#384
Open
feat(daemon): add server-side sorting for ListRuns and ListIssues#384
Conversation
Add sort_by and sort_order parameters to ListRunsRequest and ListIssuesRequest protobuf messages, enabling daemon-side sorting. Runs can be sorted by: updated_at (default), started_at, issue_id, status Issues can be sorted by: modified_at (default), id, title, status Both support ascending and descending order (descending is default). This removes the need for client-side sorting in TUI applications.
29c9e1a to
1f01510
Compare
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
sort_byandsort_orderparameters toListRunsRequestandListIssuesRequestin the protobuf APIIssue Reference
Closes orch-385
Changes
Proto Changes (
api/orch.proto)SortOrderenum withSORT_ORDER_UNSPECIFIED,SORT_ORDER_ASC,SORT_ORDER_DESCsort_byandsort_orderfields toListRunsRequestsort_byandsort_orderfields toListIssuesRequestHandler Changes (
internal/daemon/proto_handler.go)sortRuns()function supporting sort by:updated_at(default),started_at,issue_id,statussortIssues()function supporting sort by:modified_at(default),id,title,statushandleProtoListRuns()to callsortRuns()with request parametershandleProtoListIssues()to callsortIssues()with request parameters (replaces hardcoded ModifiedAt sort)Verification
Build passes
All daemon tests pass
Behavior
SORT_ORDER_DESC) when unspecifiedupdated_atfor runs andmodified_atfor issues