Skip to content

feat: add --sort flag for custom output sorting - #40

Merged
josephschmitt merged 1 commit into
mainfrom
feat/sort-flag
Feb 13, 2026
Merged

feat: add --sort flag for custom output sorting#40
josephschmitt merged 1 commit into
mainfrom
feat/sort-flag

Conversation

@josephschmitt

Copy link
Copy Markdown
Owner

Summary

  • Adds --sort flag with options: alpha, priority (default), label
  • Adds --sort-direction flag with options: asc, desc (default)
  • Moves presentation sorting from discover package to main, leaving discover with deterministic path-only sort
  • Default behavior is unchanged (priority descending)

Test plan

  • Unit tests for sortProjects() covering all 6 sort/direction combinations
  • Integration tests: TestCLI_SortAlpha, TestCLI_SortPriorityAsc, TestCLI_SortLabel, TestCLI_SortAlphaDesc
  • Invalid value tests: TestCLI_SortInvalidValue, TestCLI_SortDirectionInvalidValue
  • Existing TestCLI_PrioritySorting still passes (default behavior preserved)
  • All pre-push hooks pass (build, lint, test)

🤖 Generated with Claude Code
via Happy

Add --sort flag (alpha, priority, label) and --sort-direction flag
(asc, desc) to control how project results are ordered. Default remains
priority descending to preserve existing behavior.

Move presentation sorting from discover package to main, leaving
discover with a deterministic path-only sort. This separates concerns:
discovery finds projects, main handles presentation.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@josephschmitt
josephschmitt merged commit cce6ac5 into main Feb 13, 2026
5 checks passed
@josephschmitt
josephschmitt deleted the feat/sort-flag branch February 13, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant