Conversation
The bulk bar gains "Add to dataset…", "Remove from dataset…" and "Delete…" (red, last), all through the table action service and the one action dialog #2564 built. Bulk delete lists every Table in a scrollable, focusable list with the published ones marked, and counts what deleting breaks instead of repeating it per Table: how many are published, reviewed or in review, under an active embargo, which Datasets lose how many of them (other people's by owner), and the knowledge-graph links that stop resolving. _delete_consequences now returns the per-Dataset counts and the review counts, in three queries instead of five. The typed count and the failed drops named in a lasting warning were already the service's; they are now tested through the bulk preflight and the joined `tables` field. Bulk Dataset actions: which Tables are already in the chosen Dataset (add) or not in it (remove) depends on the choice, so choosing re-asks the bulk preflight with the whole selection (`selection`) and swaps only the preview, the footer and a status line, never the select. A closed select fires `change` on each arrow key, so the request waits until the choice has rested (delay 400 ms) and a newer one replaces an older one; checked in headless Chrome: focus stays on the select, three quick arrow presses send one request. A confirmation sent before the re-check came back is refused whole and the dialog re-run, as before. Ceilings: adding to and removing from a Dataset take at most 2,500 Tables, measured with the new benchmarks/tables_tab/dataset_cost.py (worst 6.8 ms per Table at 500 KB of metadata, about 17 s for 2,500 against the host's 300 s); every measured account (2,068 Tables at most) fits one request. The ceiling message names actions in words ("Adding to a dataset takes at most ..."). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From review. The Dataset re-check waits 400 ms before it is sent, and
Confirm is only disabled once it is, so a confirmation in that window
posted names checked against the previous choice. The preview now carries
the Dataset it was checked against (`previewed`); a confirmation naming
another one writes nothing and gets the dialog checked against the one
sent, with a notice.
A dialog re-run after a refusal (409) or an unusable parameter (400) is
checked against the whole selection again, and the 400 keeps the chosen
Dataset, so the Tables left out before are still named.
A bulk dialog states its action's ceiling before it is reached ("Delete
takes at most 50 tables at a time."), as the issue asks, not only once it
is exceeded. Preflight.dataset_title replaces three copies of the same
template expression.
Tests: no more assertions on classes or attributes; the log's batch field
is matched by name; `text()` moved to modelview/tests/html.py beside
`element_markup`; the joined-field helpers no longer shadow the
repeated-field ones. benchmarks/tables_tab/README.md documents
dataset_cost.py.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2565. Slice 13 of spec #2551.
What it does
The bulk bar gains Add to dataset…, Remove from dataset… and Delete… (red, last; the Organization actions of #2568 go before it). All three run through the table action service and the one action dialog from #2564. The selection still travels as one comma-joined
tablesfield, and the bulk preflight is still a POST (login:table-action-check).Bulk delete
_delete_consequencesnow returns per-Dataset counts and review counts, in 3 queries instead of 5, constant in the batch size (tested at 2 and 20).TYPED_COUNT_ABOVE) and the failed drops named in a lasting warning were already the service's (Tables tab: delete a Table from the row, including published ones #2562). They are now tested through the bulk route.Bulk Dataset add/remove
selection).changeon each arrow key, so the request waits until the choice has rested (delay:400ms), and a newer request replaces an older one (hx-sync).previewed). A confirmation sent inside that delay names another Dataset: it writes nothing and gets the dialog checked against the Dataset sent.Ceilings (
CEILINGS, reasoning beside the constant, stated in every bulk dialog before they are reached and again when exceeded):benchmarks/tables_tab/dataset_cost.py(local Postgres 14, three rounds, batches of 100/400/1,000), per Table:At the worst 6.8 ms, 2,500 Tables take about 17 s against production's 300 s (
Timeout 300/socket-timeout=300): a safety factor of about 17. 2,500 rather than publish's 1,000 is a choice: it makes "select all" on the largest account (2,068 Tables) followed by "Add to dataset" a single request.Ceiling messages now name the action in words ("Adding to a dataset takes at most …"), not by its identifier.
No migration, no deploy step.
Checked
login+base.tests.test_views+modelview+api.tests.test_datasets_api+api.tests.test_table_actions_api: 719 green.LightImportTest, which cannot find the isolated-settings module in its subprocess. Run on a private OEDB.login/tests/test_tables_bulk_delete_datasets.py.For the maintainer
ds_wind), as Tables tab: delete a Table from the row, including published ones #2562's row dialog does, while the Dataset chooser shows titles. Switching the consequences to titles is a small follow-up if wanted.others_datasetshas two shapes:(owner, name, count)for delete,(owner, name)for unpublish. Unpublish was left as it was. Unifying them would touch Tables tab: selection, bulk bar and bulk publish/unpublish #2564's tests.subjectof Tables tab: selection, bulk bar and bulk publish/unpublish #2564.🤖 Generated with Claude Code