Skip to content

Conversation

@dydx
Copy link
Owner

@dydx dydx commented May 19, 2025

Summary

  • Replaced hours-based filtering with flexible startTime/endTime parameters for events commands
  • Added shared time parsing utilities for consistent date/time handling
  • Updated documentation and tests to reflect the new interface

Changes

This PR refactors the time filtering mechanism in the events list and events search commands:

Previous behavior

./vico-cli events list --hours 24
./vico-cli events search --field birdName "Cardinal" --hours 12

New behavior

./vico-cli events list --startTime "2025-05-17 00:00:00" --endTime "2025-05-18 00:00:00"
./vico-cli events search --field birdName "Cardinal" --startTime "2025-05-17 12:00:00" --endTime "2025-05-18 00:00:00"

Benefits

  • More precise time range control for event queries
  • Ability to query specific time windows (not just "last N hours")
  • Consistent time handling across commands
  • Better user experience for complex time-based queries

Test plan

  • Test events list with custom time ranges
  • Test events search with custom time ranges
  • Verify default time range behavior (last 24 hours)
  • Update TESTING.md acceptance tests
  • Manual testing of edge cases (invalid dates, out-of-order times)

🤖 Generated with Claude Code

dydx and others added 2 commits May 18, 2025 20:22
Replace hours-based filtering with flexible startTime/endTime parameters
for both events list and search commands. Add shared time parsing
utilities and update documentation to reflect new interface.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Apply gofmt to ensure consistent code formatting and pass CI checks.
Changes include aligning variable declarations, fixing string literals,
and removing extra whitespace.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dydx dydx merged commit 3506b73 into main May 19, 2025
2 checks passed
@dydx dydx deleted the joshs/time-filter-refactoring branch May 19, 2025 00:28
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.

2 participants