Skip to content

Conversation

@neal-bpm
Copy link
Contributor

Describe your changes

Dispatchers can now search for riders based on which day of the week they made deliveries.
This helps with scheduling and identifying rider availability patterns.

  • Only considers deliveries from the last 7 days
  • Example: If today is Tuesday, searching active:monday finds riders who delivered yesterday (Monday)
  • Deliveries older than 7 days are not included
demo_454_rider_search.mov

Checklist before requesting a review

  • [X ] I have performed a self-review of my code
  • [X ] If it is a core feature, I have added tests.
  • [X ] Are there other PRs or Issues that I should link to here?
    Allow for searching riders based on activity in days of the week #454
  • [X ] Will this be part of a product update? If yes, please write one phrase
    about this update in the description above.

neel vinoth and others added 4 commits January 13, 2026 14:44
  through . Returns riders who had any delivery on that
  weekday within the last 7 days.

  - Add @weekdays map for ISO day numbers (1=Monday, 7=Sunday)
  - Implement weekday filter using exists subquery on campaigns
  Typing active:mon now suggests active:monday alongside active:month.

  - Add monday-sunday to @actives in Suggestions module
  - Add unit tests for Suggestions module (9 tests)
@mveytsman
Copy link
Member

I think this is the correct start but I think scoping to the past week isn't quite right. Like we're looking for people who generally ride on mondays.

I would default to a longer window but have it pair with the active:week / active:month filter so I can search for someone who's ridden on a monday this week/month that way

@neal-bpm
Copy link
Contributor Author

neal-bpm commented Jan 16, 2026

Hi @mveytsman ,
Thank you for your comments.
I am planning to increase the default scoping window for weekday search from default 7 days to 12 months.

Below are the possible results:
Given a rider who worked on a Monday 10 months ago
And has had no recent deliveries
When I search for active:monday
Then the rider should appear in the results

Given a rider who delivered on a Monday 3 weeks ago
And has had no deliveries in the last 7 days
When I search for active:monday active:month
Then the rider should appear in the results

Given a rider who delivered on a Monday 3 weeks ago
And has had no deliveries in the last 7 days
When I search for active:monday active:month active:week
Then the rider should not appear in the results
Because: active:week narrows the scope to 7 days, excluding the 3-week-old delivery

Please let me know if this approach makes sense and if there are any additional use cases to consider.

@mveytsman
Copy link
Member

We talked about this IRL but for posterity: I think this is almost right but we need some sort of threshhold. If I'm searching within year I want people who delivery on Mondays and I think just one monday is too low. There's some number where deliveries greater than that that tells us that this person is prone to delivering on mondays. Not sure how to calculate it though

@neal-bpm
Copy link
Contributor Author

I will explore couple of options which makes sense and share the PR for your review. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants