Skip to content

feat(browser): saved views can be deleted - #959

Merged
ajslater merged 1 commit into
developfrom
feat/delete-saved-views
Sep 29, 2026
Merged

ajslater merged 1 commit into
developfrom
feat/delete-saved-views

Conversation

@ajslater

Copy link
Copy Markdown
Owner

What

Saved views can now be deleted from the browser settings drawer. Each view in the Load Saved View dropdown has a trash icon. Clicking it opens a Delete View confirm dialog that names the view.

Why

The owner-scoped DELETE /api/v4/browse/<collection>/saved-settings/<pk> endpoint and the deleteSavedSettings API client already existed, but nothing in the UI called them. A saved view could never be removed.

Changes

  • stores/browser.js: new deleteSavedSettings(pk) action. It reloads the list even when the delete fails, so a view already deleted in another tab drops out.
  • browser-settings-saved.vue:
    • An #item slot adds a trash button to each entry. @click.stop keeps the click from also loading the view, and the entry keeps Vuetify's default role="option".
    • The confirm dialog matches the existing Overwrite dialog. It sits outside the combobox so the menu closing can't unmount it.
  • NEWS.md: one Features line under v2.5.1.

No backend changes.

Tests

  • tests/test_saved_settings_delete.py: the first tests for the DELETE endpoint. It removes the view along with its filters and last-route rows. It returns 404 for another user's view, the unnamed current-settings row, and an unknown pk.
  • frontend/tests/unit/browser-saved-views-delete.test.js: covers the store action and the component. Clicking the trash icon opens the confirm dialog without loading the view; confirming deletes it. Mutation check: removing .stop fails the "doesn't load the view" test.
  • make fix, make lint, make ty clean. Full suites pass: pytest 1574 passed (1 xfailed), vitest 946 passed.
  • Checked in the running dev app:
    • elementFromPoint at each trash icon's center hits the button, not the list item.
    • Cancel sends no request; Delete sends DELETE …/saved-settings/<pk> → 204 and the list reloads.
    • Clicking a view's name still loads it.

Reviewer notes

  • NEWS puts this feature in the v2.5.1 section; move it if the release becomes 2.6.0.
  • After a saved view loads, the dropdown menu reopens. That was already happening on develop before this change and is being fixed separately.
  • make lint shows two basedpyright reportUnreachable warnings in codex/views/browser/annotate/cover.py. That file isn't touched here.

🤖 Generated with Claude Code

The saved-settings DELETE endpoint and API client already existed, but
nothing in the UI called them, so a saved view could never be removed.

Each saved view in the settings drawer's "Load Saved View" menu now has
a trash icon. It opens a "Delete View" confirm dialog naming the view;
the click is stopped so it doesn't also load the view. The dialog lives
outside the combobox so the menu closing can't unmount it. The item
slot keeps Vuetify's role="option" on each entry.

The new deleteSavedSettings store action reloads the list even when the
delete fails, so a view already deleted in another tab drops out.

Adds the first tests for the DELETE endpoint: it removes the view with
its filters and last-route rows, and 404s for another user's view, the
unnamed current-settings row, and an unknown pk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ajslater
ajslater merged commit e76ad66 into develop Sep 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant