activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

Can't delete a view

Open sidharthpunathil opened this issue 2 years ago • 2 comments

I am not able to delete a view created using the create view button. image

Editing the name of the view will be nice.

OS: Linux arch Browser: Brave browser

sidharthpunathil avatar Jan 23 '22 13:01 sidharthpunathil

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Jan 23 '22 13:01 github-actions[bot]

Here's a full bug report:

  • [x] I am on the latest ActivityWatch version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • OS name and version: macOS Monterey 12.3
  • ActivityWatch version: v0.11.0 (also v0.11.0b1.dev+98fd120, which might just be the same version)

Describe the bug

As stated above, inability to delete an additional view, however I'm only able to reproduce this if I leave the ID field of the New View form empty. Only the Name is actually required by validation. You'll also note that the URL doesn't show the view (should be something like /activity/<hostname>/view/<view ID>).

To Reproduce

  1. Go to the ActivityWatch dashboard
  2. Click "New view"
  3. Give the view a name but not an ID.
  4. Add a visualization.
  5. Click "Edit view"
  6. Try to delete view.

Expected behavior

Don't allow a view to be created with a blank ID.

Documentation

Note the URL yet the "test" view is active. Screen Shot 2022-02-19 at 22 13 04

I don't see anything relevant in the logs for aw-server. (I think I was running with LOG_LEVEL=DEBUG, but I didn't actually see any debug logs in the testing output.)

Additional context

An ID should probably be required, or if it's left blank, we could slugify the name.


As a (rather poor) workaround, resetting the views back to default removes the "undeletable" view, as well as the rest, of course.

prplecake avatar Feb 20 '22 04:02 prplecake

This was fixed in https://github.com/ActivityWatch/aw-webui/pull/323

ErikBjare avatar Mar 25 '23 10:03 ErikBjare