ActivityWatch / ActivityWatch/activitywatch

[UI]: launching on tray icon doesn't check for existing tabs or PWA

Đang mở
#1,063 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
stale type: bug
Ngôn ngữ chính
Python
Star
18.9k
Fork
1k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
28

Mô tả

- [x] I am on the [**latest beta v0.12.3b19**](https://github.com/ActivityWatch/activitywatch/releases/tag/v0.12.3b19) ActivityWatch version.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.

- **OS name and version**: Windows 10 LTSC 2021 (version 21H2) x64 EN
- **ActivityWatch version**: 0.12.3b**19**
- **Browser**: [Ungoogled Chromium 125.0.6422.113](https://github.com/macchrome/winchrome/releases/tag/v125.6422.113-M125.0.6422.113-r1287751-Win64) x64

## Describe the bug

As being seen in browser's omnibox, AW supports turning into [Progressive Web App](https://en.m.wikipedia.org/wiki/Progressive_web_app).

The problem is that the tray icon can't open AW as PWA - it still opens it as browser tab, whether PWA or browser tab has been already opened or not.

The same with browser tabs - double-clicking tray icon always opens new AW tab, even if it's tab has been already opened.

## To Reproduce

1. Open any of AW's pages;
1. Double-click AW's tray icon: **NOK** - new AW browser tab opens instead of activating existing one;
1. Leave one AW tab (close others) and install it's PWA;
1. Double-click AW's tray icon: **NOK** - AW PWA window isn't being activated, and new browser tab opens instead;
1. Close AW's PWA and all it's browser tab and repeat step 2: **NOK** - AW still opens in new browser tab.

## Expected behavior

I suggest the following behavior on double-clicking AW tray icon:

| PWA installed | AW tab opened | PWA launched | Action |
| --- | --- | --- | --- |
| \- | \- | \- | New browser tab will be opened |
| \- | + | \- | Browser tab will be activated. If there are several opened tabs, the latter will be activated |
| + | \- | \- | PWA will be launched |
| + | + | \- | Browser tab will be activated. If there are several opened tabs, the latter will be activated |
| + | \- | + | PWA window will be activated |
| + | + | + | PWA window will be activated |

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.