Skip to content

Allow filtering workflows to only running, & add dashboard links #2607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 30, 2025

Conversation

emma-sg
Copy link
Member

@emma-sg emma-sg commented May 13, 2025

Closes #2527
Closes #2682

Changes

  • Adds backend support for filtering workflows by running state
  • Adds "Schedule" filter, replacing "All", "Scheduled", and "No Schedule" tabs
  • Persists filter and sort state in URL search params, allowing for linking to a specific filter
  • Updates SearchParamsController with a more flexible API
    • Renames set method to update
    • Adds new set and delete methods that mirror the ones on URLSearchParams
  • Adds deep links to dashboard

Testing

Since this PR involves both frontend and backend changes, you'll need to run the backend locally (or deploy this on dev) to test this out.

  1. Start a crawl
  2. Navigate to the dashboard. Once the crawl has moved past the "starting" phase, verify that the dashboard shows that there's (at least) one running crawl.
  3. Click the "→" button next to the "X Crawls Running", and verify that it takes you to the crawling page with the "Show Only Running" filter enabled
  4. Click on various other filters (All, Scheduled, etc), and verify that the list and URL update to match
  5. Switch between different sorting modes, and verify that the list and URL update to match
  6. Using your browser's back and forward buttons, verify that the filters and sorting update when navigating
  7. On an org with more than one page of workflows, verify that:
    1. You can navigate through multiple pages of workflows and use filters
    2. Filters don't interfere with each other
    3. Changing filters and sorting resets the page back to the first page
  8. Reload the page with some filters and sorting settings set, and verify that the same filters and sorting settings are applied

Screenshots

Workflow List Filter Dashboard Section
workflow filters dashboard full
workflow filter detail dashboard detail
Filters & sorting in URLs
url 1
url 2
Screen.Recording.2025-06-23.at.11.58.08.PM.mov

emma-sg added 6 commits May 13, 2025 18:16
- renames `set` method to `update`
- adds `set` and `delete` methods that mirror `URLSearchParams` methods
- add "running" filter
- persist these filters in url search params
- add link to running workflows
- remove dt/dd formatting so that underlines can be rendered
- use tabular numbers in overview
@emma-sg emma-sg requested review from SuaYoo, tw4l and ikreymer May 13, 2025 22:53
@emma-sg emma-sg self-assigned this May 13, 2025
@emma-sg emma-sg added front end Requires front end dev work back end Requires back end dev work labels May 13, 2025
@emma-sg emma-sg changed the title Allow filtering workflows to only running, & add dashboard link Allow filtering workflows to only running, & add dashboard links May 13, 2025
- add more dashboard links as well
SuaYoo
SuaYoo previously requested changes May 14, 2025
Co-authored-by: sua yoo <sua@suayoo.com>
@emma-sg emma-sg requested a review from SuaYoo May 14, 2025 01:05
@emma-sg emma-sg requested a review from SuaYoo May 14, 2025 17:37
@emma-sg emma-sg marked this pull request as draft May 27, 2025 18:03
@emma-sg emma-sg marked this pull request as ready for review June 24, 2025 00:09
SuaYoo

This comment was marked as resolved.

@emma-sg
Copy link
Member Author

emma-sg commented Jun 27, 2025

Good catches, thanks! These should both be fixed as of e095877.

Screen.Recording.2025-06-26.at.11.00.00.PM.mov

@emma-sg emma-sg requested a review from SuaYoo June 27, 2025 03:01
@tw4l
Copy link
Member

tw4l commented Jun 30, 2025

Looks great! Only thing I've noticed (admittedly an edge case) is that if someone enters/pastes a URL into the browser nav bar with a page number higher than the number of real pages, they end up in a bit of a weird state:

Screenshot 2025-06-30 at 12 41 15 PM

Might be better to just send them to the last page that does have content and update the URL accordingly?

Otherwise everything appears to be working perfectly, and these are great improvements! Well done :)

@emma-sg
Copy link
Member Author

emma-sg commented Jun 30, 2025

Only thing I've noticed (admittedly an edge case) is that if someone enters/pastes a URL into the browser nav bar with a page number higher than the number of real pages, they end up in a bit of a weird state

Good catch, added an extra clamping check in 31c941e to address this.

Copy link
Member

@SuaYoo SuaYoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Once thing I noticed is that the dashboard "View All" button for crawls feels a bit inconsistent when running crawls is 0 and waiting is >0 (as opposed to Collections, where "View all" is always next to the total)

Screenshot 2025-06-30 at 10 53 20 AM

Not a blocker, just wanted to note for later--I think we can address this later since this is due to how existing dashboard stats are grouped and organized.

@emma-sg emma-sg merged commit 1cfdb97 into main Jun 30, 2025
27 checks passed
@emma-sg emma-sg deleted the add-only-running-crawl-filter branch June 30, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back end Requires back end dev work front end Requires front end dev work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Deep link into workflow list [Feature]: Display running crawls in dashboard
3 participants