Improve querying UX when dealing with long-running, slow queries
- Dominant language
- Clojure
- Stars
- 49.3k
- Forks
- 6.8k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 653
Description
Many of our customers and users often have to write and run queries that can take upwards of 5–10 minutes to complete. There are two inherent problems in these situations:
1. I can't really do anything else in Metabase until the query finishes, unless I open another browser tab.
2. If I accidentally navigate away before the query finishes, I'll have to start waiting all over again.
There are some really simple solutions, e.g.:
- Just use browser tabs if you want to run multiple slow queries. Maybe we could add a Favicon badge to indicate when a query is done running, the way that GitHub indicates when tests have passed on a PR.
- Add a blocking "are you sure you want to navigate away" modal when a query is running; maybe only show it after a query has been running for > 30 seconds or if we know the avg. execution time is > 1 minute.
More involved possible solutions, which could complicate things quite a bit:
- In the native query editor, add the ability to have multiple tabs for multiple queries.
- If you navigate away from the editor, and then come back, your tabs could be preserved, allowing you to start one or more queries, then go off and do something else in MB, and then come back.
- Could also add in-app toast notifications to let folks know when their queries are done. (And/or repurpose the Activity Feed?)
Contributor guide
Research direction
Start with the native query editor and trace how long-running queries behave when users navigate away or open another tab. Compare the proposed favicon, navigation-warning, preserved-tab, and toast-notification approaches before selecting a focused scope. Done should include a defined multi-query or completion-notification experience, but the issue does not identify files or tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100