Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid encoding for category filter links from summary view #1051

Closed
2 tasks done
AgainPsychoX opened this issue May 1, 2024 · 1 comment · Fixed by ActivityWatch/aw-webui#566
Closed
2 tasks done

Comments

@AgainPsychoX
Copy link

AgainPsychoX commented May 1, 2024

  • I am on the latest ActivityWatch version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS name and version: Microsoft Windows [Version 10.0.19045.4291]

  • ActivityWatch version: v0.12.2 (rust)

Describe the bug

Using link to filter for category from summary view seems to navigate to invalid encoded path: plus (+) signs seems to be an issue. The same goes ampersand (&) character. I didn't test for other for now.

To Reproduce

  1. Launch the ActivityWatcher
  2. Create category with problematic character, like C/C++.
  3. Make up some activity so it's logged.
  4. Go to Activity > Summary > Top Categories.
  5. Click the created category.
    image
  6. You are navigated to .../view/summary?category=[...]>C%2FC%20%20, but no activity is shown ("no data").
    image

Expected behaviour

I expected to find the usual activity log breakdown etc.

Documentation

Whole issue seems to result from invalid URL encoding:

URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign or with %20.
(https://www.w3schools.com/tags/ref_urlencode.ASP)

Let me know if you need any logs or anything, but I don't think its applicable here.

Additional context

Workaround

Aside from obvious "just avoid problematic characters", you can still view activity using manual filter selection:
image

Link changes then to .../view/summary?category=Work>Programming>C%2FC%2B%2B, note the difference %20 and %2B for plus characters.

@AgainPsychoX AgainPsychoX changed the title Issues with plus (+) sign in the category name Invalid encoding for category filter links from summary view May 1, 2024
@BelKed
Copy link
Contributor

BelKed commented May 1, 2024

Verified, also happens on the beta version (v0.12.3b15)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants