activitywatch
activitywatch copied to clipboard
Can't delete a view
I am not able to delete a view created using the create view button.
Editing the name of the view will be nice.
OS: Linux arch Browser: Brave browser
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! 🙏
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
- Go to the ActivityWatch dashboard
- Click "New view"
- Give the view a name but not an ID.
- Add a visualization.
- Click "Edit view"
- 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.
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.
This was fixed in https://github.com/ActivityWatch/aw-webui/pull/323