question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show desktop notification on rerun if tab is inactive.

See original GitHub issue

Problem

  1. User calls streamlit run foo.py
  2. A browser tab shows up with the foo.py app in it
  3. User ctrl-c’s out of the server, but leaves the tab open.
  4. User changes tab, works on something else for hours.
  5. User wants to go back to working on foo.py. So she calls streamlit run foo.py

…and then nothing happens. No new browser tab opens, because the tab from (1) is already connected to the new Streamlit server. And the existing tab doesn’t come to the top. So the user has no idea where the app loaded.

Solution

Show a notification at step (4), saying:

App yourscript.py is ready. Click here to see it.

On click, the browser with the Streamlit tab comes to the front and the tab becomes active.

Config

This behavior should be configurable with:

[browser]
showNotificationIfTabInactive = false

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asainicommented, Apr 23, 2021

@brendalf: We really appreciate your interest in contributing to Streamlit.

Notifications in Streamlit are part of our longer term roadmap so I see this work fitting as a feature in that project. However, this is not a highly requested feature and the broader Notifications project is further down in the list of our priorities.

I think that this project involves a decent amount of Product and design cycles, and we don’t have the bandwidth to support this work as of today. I’ll close this issue for now and re-open when we decide to work on Notifications. Thanks!

@tvst : FYI, I’ve added this feature and the description to the overall Notifications project.

1reaction
vdonatocommented, Apr 20, 2021

Hey @brendalf, I don’t think anyone is currently working on this, but it also seems that we’re not entirely sure whether we want to do this. I can surface this to our product team to see if we can get a decision as to whether or not this is something we’d like to add.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Chrome desktop notifications only when tab is inactive
Save this question. Show activity on this post. I'm currently using the following code to show Desktop notifications in Google Chrome:
Read more >
Display web notifications only when the browser window/tab is ...
The most important feature is that the notification will be displayed regardless of which tab or window is focused.
Read more >
Turn off Automatic Updates to Boost Performance - Tableau
It's possible to enter an invalid state when automatic updates are turned off. When this happens, the view is desaturated and invalid commands...
Read more >
Foreground and background processing—Help
When background processing is disabled, tools execute in the foreground, and you must wait for the process to finish before you can use...
Read more >
Use notifications to get alerts - Computer - Google Chrome Help
Select View site information Lock . Next to Notifications, select Allow from the drop down menu. ... If you receive notifications from a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found