New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653703 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner:
Closed: Sep 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Swarming polymer UI doesn't load in the background

Project Member Reported by s...@google.com, Oct 6 2016

Issue description

When you load a tab with the polymer UI in the background, it doesn't actually load anything useful until you tab into it.

For example, go to any polymer page like newui/botlist and ctrl+click or middle click some bot. I have Chrome set to open these new tabs in the background rather than stealing focus. Wait some time for the tab strip at the top to indicate the page has finished loading, then tab into it. For a split second you'll see the notice that you need to sign in to see anything useful before the polymer UI actually begins to renders any information about the bot.

Oftentimes I'll open several tabs in the background and then tab through them, and with the polymer UI I have to wait for each one to start loading only after I tab into it.

Is there any way for the polymer UI to render the page regardless of whether the tab is in the foreground or not?
 
Cc: borenet@chromium.org
I can look into this.  I think the magic incantation may be "Service Worker", but I'll let you know what it will take.  
Cc: -kjlubick@chromium.org
Owner: kjlubick@chromium.org
Status: Assigned (was: Untriaged)
It does not appear to be automatic-tab-discarding, which some internet sources said might be the case.  I disabled it and the problem still persists.  It might be because some Polymer elements/utils wait until an animation frame to load.
Project Member

Comment 4 by sheriffbot@chromium.org, Oct 7 2016

Labels: Hotlist-Google
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/external/github.com/luci/luci-py.git/+/39e913eeed7f17dc3147c588ec7cb85125742056

commit 39e913eeed7f17dc3147c588ec7cb85125742056
Author: kjlubick <kjlubick@google.com>
Date: Fri Oct 07 18:03:15 2016

Fix background page loading

You should now be able to open pages in a new tab
and they will start loading.

I was able to get rid of the popup that would happen
sometimes by being a bit more patient on the auth
library to load its thing.

The main culprit was the fact that we were waiting until
the auth-signin's attached phase to do anything, which
apparently requires tab focus.  The ready phase can fire
while the tab is still hidden, so we use that instead.

I also made the token "offline", seems to have helped with
more consistent credential management by the
google-signin-aware element.  It may have been unnecessary,
but it works nonetheless.

BUG= 653703 

Review-Url: https://codereview.chromium.org/2401763003

[modify] https://crrev.com/39e913eeed7f17dc3147c588ec7cb85125742056/appengine/swarming/elements/build/elements.html
[modify] https://crrev.com/39e913eeed7f17dc3147c588ec7cb85125742056/appengine/swarming/elements/res/imp/common/auth-signin.html
[modify] https://crrev.com/39e913eeed7f17dc3147c588ec7cb85125742056/appengine/swarming/elements/res/imp/taskpage/task-page.html

The fix was easier than I feared.  Apparently the attached lifecycle happens after the tab is focused on, so we use the ready instead.
Status: Fixed (was: Assigned)
This is live.  If the problem persists, please reopen the bug.
Labels: Pri-3 Type-Bug-Regression
Status: Available (was: Fixed)
I think this is happening again.  The pages load relatively quickly, so it's not a huge issue, but worth looking at anyway.

Comment 9 by kjlubick@google.com, Jul 25 2017

Components: Infra>Platform>Swarming>WebUI
Components: -Infra>Platform>Swarming
Project Member

Comment 11 by sheriffbot@chromium.org, Jul 25

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Restrict-View-Google -Hotlist-Recharge-Cold
Status: Assigned (was: Untriaged)
Removing RVG since there's nothing confidential here.
Status: WontFix (was: Assigned)
This is hard to fix in the current Polymer UI, but the WebComponents UI should properly load in the background.

I think it boils down to Polymer 1 doing something on window.requestAnimationFrame(), which happen until a tab is seen.  This may be browser-specific (e.g. Chrome).

Sign in to add a comment