-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: order tasks in order of interest, namely failed, successful, then cached #9353
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
61bbde3
to
27b81b3
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
.iter() | ||
// note we can't use the default Ord impl because | ||
// we want failed tasks first | ||
.sorted_by_key(|task| match task.result() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non blocking TODO for myself (or anyone else), but we should try to insert tasks as they finish in this order instead of sorting it on every render.
Merge activity
|
Currently, when running tasks using the new UI, turbo inserts passed / failed tasks below cached tasks (in order of completion) meaning the stuff users probably want to see (failed things) end up at the bottom of the list or off screen. This change attempts to improve that by inserting those items in front of the list of cached tasks. That way cached tasks (likely the least interesting) end up last and preceded by successful tasks and then failed tasks. This assumes that users will more interested in failed tasks than successful ones but I am also open to ordering just the failed / successful task in order of completion instead.
In practice this means if running turbo in a large project with
--continue
where the majority of tasks are and will remain cached between runs, then the things that are 'interesting' will usually be close to the user's cursor.It also 'fixes' the case where viewing a task that is completed jumps past the cached tasks and you have to traverse back through them all to get to the top again.