No way to notify a scope to refresh when the data has been updated (like events)

Bug #1376258 reported by Kyle Nitzsche
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
The Savilerow project
Incomplete
Wishlist
Kyle Nitzsche
unity-scopes-api (Ubuntu)
Invalid
Undecided
Unassigned
unity-scopes-shell (Ubuntu)
Confirmed
High
Paweł Stołowski

Bug Description

One can launch an app from a scope preview and use the app to change something displayed in the original scope.

For example, the Dashboard scope includes a Tasks section and the Tasks preview opens the Tasks app.

If you add a task in the Tasks app and then swipe from the right to return the preview from which you launched Tasks, and then press the left facing chevron in the header to return to the scope, the task you just added does not display: what displays is the original (stale) scope view and tasks.

Expectation: the scope surfacing view show show up-to-date information especially in the case where you launched the app from the scope as described above.

Revision history for this message
Michi Henning (michihenning) wrote :

I don't think that's a bug in unity-scopes-api because the shell is responsible for refreshing the results if they may have been invalidated. I've added unity-scopes-shell to the project list.

Changed in unity-scopes-api (Ubuntu):
status: New → Invalid
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

I didn't find "left facing chevron in the header" that Kyle describe (maybe the app changed since it's some days already), but similar test failed indeed.

Kyle: would you mind update the procedure to reproduce ?

I think we need a mechanism that: when the underlying event db have some change, it send out notification.
The event scope subscribe the notification and refresh upon such notification comes !

Changed in savilerow:
importance: Undecided → Wishlist
summary: - going back to scope does not refresh it
+ No way to notify a scope to refresh when the data has been updated (like
+ events)
Changed in savilerow:
status: New → Incomplete
assignee: nobody → Kyle Nitzsche (knitzsche)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

We currently have a dbus signal which any backend can send to the shell to forcefully refresh given scope. This is however considered a temporary solution, because it doesn't know of aggregated scopes, so if B is aggregated by A, and refreshing of B is requested, it won't refresh A. We should either consider a new mechanism for that, or - if DBUS signal is good enough - make unity-scopes-shell smart about aggregated scopes (child scopes list will probably help).

Changed in unity-scopes-shell (Ubuntu):
importance: Undecided → High
assignee: nobody → Pawel Stolowski (stolowski)
status: New → Confirmed
Revision history for this message
Michael Weimann (m982) wrote :

Pawel Stolowski what's the dbus command to refresh a specific scope?

Revision history for this message
Michael Weimann (m982) wrote :

Michi Henning I think this is more a feature request than a bug. I'm wondering about how to file a feature request? Blueprints are disable for the unity-scopes-api and unity-scopes-shell projects. Is there any preferred way for this?

Revision history for this message
Michi Henning (michihenning) wrote :

No need for blueprints. This bug is sufficient to discuss the feature request.

If anywhere, this issue needs to be solved outside unity-scopes-api because scopes, by design, are stateless. Any actions required to cause a refresh must come from somewhere outside unity-scopes-api.

Revision history for this message
Michael Weimann (m982) wrote :

Okay, here are my thoughts about it. I can imagine two refresh scenarios:

a) Background data changed (Tasks example from the bug description)
I think this point is clear. There should be a way.

b) Results fetched by a scope have an expiration date
Some concrete examples are: Exchange rates or stock quotes. As an user, I want to see the current values. As a developer I may know the update times and set an expiration date of five minutes for instance. When the user navigates to the scope and the result is expired it should refresh without any required action like "pull to refresh".

A more technical use case could be a scope that displays application/hardware monitoring states. The backend monitoring reports a system failure and the scope displays "everything fine", because I didn' refresh it manually.

Revision history for this message
Michi Henning (michihenning) wrote :

There is a ResultsTtlType for the scope ini file that can be set to None, Small, Medium, or Large. With None, I would expect the shell to refresh whenever I return to the scope.

Revision history for this message
Michael Weimann (m982) wrote :

Michi Henning thanks for the info. With this b) from my comment before is lapsed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.