Skip to content

fix(ui): ask before deleting a gene panel or a project - #1114

Merged
bmenten merged 1 commit into
mainfrom
fix/confirm-panel-and-project-delete
Nov 4, 2026
Merged

bmenten merged 1 commit into
mainfrom
fix/confirm-panel-and-project-delete

Conversation

@bmenten

@bmenten bmenten commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Closes UI-7 from docs/open-issues.md: a gene panel or a project is no longer deleted on one click.

What changed

  • Gene panels (GenePanelsPage, admins): Delete opens a confirmation, Delete gene panel PanelA v3. It says the panel goes with its genes, its regions and every archived version, and gives the source release when there is one (PanelApp 1.345). Only Delete panel in the dialog sends DELETE /api/panels/{id}.

  • Projects (ProjectsPage, at /projects and /admin/access/projects): Delete project opens a confirmation, Delete project X. It says no family or sample is deleted, then counts what the delete's cascade takes:

    • the families (and their samples) that lose their link to the project;
    • the families in no other project, which only administrators can open afterwards;
    • the members who lose the access the project gave them;
    • and that the review tags defined for the project are deleted with it.

    The page reads these counts from the project list it already holds. The page is admin-only, and an administrator's list holds every project, so no new read or endpoint was needed.

  • The dialog (components/ConfirmDeleteDialog.tsx) is built on the shared ModalDialog. Cancel, Escape and a backdrop click send nothing. Focus starts on Cancel, so Enter on the opened dialog cancels. While the request runs, the buttons are disabled and Escape does nothing. The request, its outcome message and its request audit are unchanged.

  • Styles. The family-deletion dialog's classes (admin-delete-family-*) are renamed confirm-delete-* and move from admin-families.css to the end of modals.css, which comes just before it in the cascade. DeleteFamilyDialog and the new dialog share them. The look is unchanged.

  • Docs. The user guide (Administration: gene panels, projects; golden fixture regenerated), handleiding ch. 15 (gene panels, a new Een project verwijderen item; HTML rebuilt), and the docs/testing.md rows of both page tests.

Change classification

Minor. This adds a confirmation step in two admin screens. Nothing about what is deleted, the endpoints, the audit, or any filter, scoring or decision rule changes.

Checks

  • Red first: the new and updated page tests failed on main (7 failures: no dialog, the request sent on the first click).
  • Frontend: npm run tsc and npm run lint clean. npx vitest run: 203 files, 2,788 tests passed, with no Errors or Unhandled lines. A later run of src/pages, src/components and src/styles, under a load average of 34 from other agents, failed two timing-sensitive tests in other pages. They were different tests on each run, and each file passed when run alone (FamilySmallVariantsPage, AdminRepeatLociPage, FamilyRepeatExpansionsPage, FamilyRoiMarkersPage).
  • check-test-catalogue.sh and check-handleiding-sync.sh: in sync. ruff check . clean.
  • Backend unchanged: the full unit, mypy, integration and end-to-end suites were not run. test_doc_test_references.py and test_deployment_config.py passed (67).
  • The dialogs were not checked in a browser. Their markup and classes are the family-deletion dialog's.

🤖 Generated with Claude Code

A gene panel and a project were deleted on one click. A panel takes its
genes, regions and whole version history with it; a project's delete
cascades to every family's and sample's link to it, to its members'
access and to the review tags defined for it, so a family in no other
project is left open to administrators only.

Both deletes now open a confirmation (ConfirmDeleteDialog, on the shared
ModalDialog) that says what goes, and only its confirming button sends
the request; Cancel, Escape and the backdrop send nothing, and focus
starts on Cancel. The panel's names the panel and its version (and the
PanelApp release); the project's counts the families and samples that
lose their link, the families in no other project, and the members, from
the project list the administrator-only page already holds. The request
and its audit are unchanged.

The family-deletion dialog's styles are renamed to confirm-delete-* and
moved to modals.css, shared by both dialogs. The user guide (with its
golden fixture) and handleiding chapter 15 say a deletion asks first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmenten
bmenten enabled auto-merge (squash) November 4, 2026 12:33
@bmenten
bmenten merged commit ca01f72 into main Nov 4, 2026
21 checks passed
@bmenten
bmenten deleted the fix/confirm-panel-and-project-delete branch November 4, 2026 12:40
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