Datasets tab: selection and the bulk bar; measures the bulk ceiling

Aperta
#2,626 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, python
Ambito
full-stack

Direzione di ricerca

Read the parent spec #2613 first, and check whether blocker #2623 has landed before starting. Locate the Django routes profile/<id>/dataset-names (ListNamesView) and profile/<id>/dataset-actions/<action>/check, plus the list view test_profile_owner_rule uses for its route lists; on the frontend find the datasets tab binding tested with vitest + happy-dom. The benchmark is modelled on benchmarks/tables_tab/*_cost.py. Done means the acceptance criteria pass: vitest selection tests, Django tests over dataset-names and …/check, headless Chrome walkthrough, and a stated ceiling in dataset_actions from the measurement.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

datasets Profile ready-for-agent

Parent

#2613 (spec: Profile dashboard datasets tab and the Dataset lifecycle)

What to build

Select Datasets and publish, unpublish or delete many at once. There is no bulk API route: parity is capability, and the API's single routes cover the same actions.

  • Selecting:
    • a checkbox per row ("Select ‹title›"), a tri-state header box for the page, Shift-click for ranges, and "Select this page" when the rows stack;
    • "Select all N matching datasets" fetches the names under the current filters through profile/<id>/dataset-names, on the ListNamesView base over the listing's matching set.
  • The selection is an explicit list of names in page memory, never in the URL. It survives paging, sorting and actions, is pruned of Datasets that left the list, and is cleared with a note on any filter change. It travels as one comma-joined field, because Django refuses more than 1,000 parameters.
  • The bulk bar is sticky, in a slot reserved while nothing is selected (a muted line), so the list does not jump on the first tick. It holds Publish…, Unpublish… and Delete…, collapsing into an "Actions" menu where the rows stack.
  • Bulk preflight: POST profile/<id>/dataset-actions/<action>/check. Left-out groups have singular and plural forms.
    • Publish leaves out drafts failing the gate (with the failed check) and Datasets already published. The aggregate member mix is information.
    • Unpublish leaves out drafts; the consequences are stated in the plural.
    • Delete: a plain confirmation only for at most 10 drafts; otherwise the count must be typed.
  • All or nothing: a stale preflight refuses the whole request; the dialog says "Nothing was changed" and re-runs the check. batch=<id> ties the log lines together.
  • One ceiling for bulk publish, unpublish and delete, measured here and checked before any Dataset is read.

Acceptance criteria

  • Row box, tri-state header, Shift ranges, "Select all N matching", pruning and the clear-with-note on a filter change (vitest + happy-dom)
  • The bulk bar's slot is reserved while empty, and the region does not move on the first tick
  • Each bulk preflight names its left-out groups correctly in singular and plural (e.g. 60 selected: 30 already published, 12 failing the gate, 18 publishable)
  • Bulk publish of an eligible set sets published_at on all of them in one transaction; if one becomes ineligible between preflight and execute, nothing is written
  • Bulk delete of 11 drafts, or of any set holding a published Dataset, needs the typed count, enforced by the server
  • Measurement: the ceiling for the three actions is measured with a benchmark beside the tables tab's (benchmarks/tables_tab/*_cost.py), timing the per-Dataset work locally. Delete includes one graph-store ASK: measure it against a local Fuseki if the name-hold ticket has not landed yet. The ceiling is set against the production request timeout (300 s when read on the host on 2026-10-02; re-read it or state that date) with a stated safety factor. The number goes in dataset_actions' ceilings and in the PR. Over the ceiling, the preflight reads no Dataset (assertNumQueries), and the dialog states the limit
  • The names route and the check route join test_profile_owner_rule's route lists
  • Checked in headless Chrome: selecting, "select all", the three bulk dialogs, a refused batch
  • Tested through the spec's seams: HTTP through Django's test client over dataset-names and …/check, and the datasets binding under vitest + happy-dom

Migrations and deploy

No migration, no deploy step.

Blocked by

  • #2623

🤖 Generated with Claude Code

Lingua principale
Python
Stelle
65
Fork
28
Merge medio
4g 7h
PR unite (30g)
25

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenEnergyPlatform/oeplatform

Tutte le issue di OpenEnergyPlatform/oeplatform

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.