tokio-rs / console

a debugger for async rust!
MIT License
3.65k stars 143 forks source link

console: filter tasks list #131

Open hawkw opened 3 years ago

hawkw commented 3 years ago

It would be nice to be able to filter which tasks are displayed in the tasks list.

Some ways we might want to filter the tasks list:

Since we would want to allow filtering on different columns in the task list, we would need some UI for selecting which column is being filtered on, as well as for writing the actual filter. Here's a simple proposal:

Questions:

Most of these questions are things we can punt on for an MVP implementation, especially if we only allow a single filter at a time. But, we'll want to figure them out eventually.

UI inspiration:

hawkw commented 3 years ago

I marked this as E-hard because a complete, full-featured filtering implementation is going to be a big pile of work (see the "questions" section above). However, an initial MVP where there's only one active filter at a time is probably relatively easy...

seanmonstar commented 3 years ago

There's also other things we'd probably want to be able to "enter" dynamically, like rewinding to a certain spot, or changing a config value, etc.

hawkw commented 3 years ago

There's also other things we'd probably want to be able to "enter" dynamically, like rewinding to a certain spot, or changing a config value, etc.

Yeah, it would make sense to have stuff like text boxes and other UI components eventually be general-purpose...

zaharidichev commented 3 years ago

Would it make sense to split the task up a bit and start with an implementation of a filter query box that we can bring up with some kind of a key combination and just fiture out a filtering syntax that incorporates the column(s) that we are filtering by. Someting like: polls > 1;target=="tokio::task". When that works, we can think of a way to make it easier to populate the columns we filter on by using the UI.