RFC 0077 — Every match selected: a paged list's selection
Status: implemented (2026-11-29) · Target: 0.65.0 · builds on RFC 0012, RFC 0073 and RFC 0067 · see Decisions
Summary
select gives a table checkboxes, and the header's checkbox selects the
page. Over a paged list (a live page, or a plain array with perPage)
that's 25 of 340, and "send a reminder for every overdue invoice" means
paging through and ticking each page. This RFC lets the user take the
step every mail client has:
All 25 on this page are selected. Select all 340 that match
- A plain array: every row as searched and filtered, at once: the table has them.
- A paged list with
every(RFC 0073): the keys of every match, fetched page by page with the user's query, with the same progress, Cancel and Esc, and the same question aboveeveryLimit. - What the app gets is the same as today:
bind:selectedis keys,bulk(selected, clear)runs on them. Nothing new to handle for an app whose bulk action already takes ids. - The rows come too: the fetched rows are kept with the selection, so Copy of the selected rows and the foot's Selected line are over all 340, not only the ones on the page.
Motivation
- The list is filtered so it can be acted on. RFC 0069's filters and RFC 0070's views make "Overdue, Q3" one click; the next step is "remind them all", "mark them paid", "assign them to Ada". Today that's one page at a time, and a user who misses that the header's checkbox meant "this page" acts on 25 and thinks it was 340.
- The table already knows how to fetch them. RFC 0073 fetches every match for an export, page by page, with progress and a cancel. Selecting is the same fetch with a different end.
- The selection already spans pages, as keys (RFC 0012); what's missing is a way to fill it without paging, and the rows to copy and total once it's filled.
Current state (0.66, with RFC 0076)
selectandbind:selected: the selected rows' keys (key,idby default), kept across pages and searches. The header's checkbox selects or clears the page; ⌘A on a row selects the page. A bar above the table says "3 selected", with Clear andbulk(selected, clear).- A row that leaves a live page on the same query is dropped from the selection; from a plain array, a row that leaves the array.
- Copy on a selected row copies the selected rows that are loaded: on a paged list, the ones on this page. The foot's Selected line totals the same.
every,everyLimit(10,000),fetchEveryand the progress group (.fetching, Cancel, Esc) are RFC 0073's, used byallRows(),csvAll(), Copy table and Save as CSV….select="invoices"tells the assistant the keys (RFC 0013).
Design
The offer
When every row on the page is selected and the list has more matches than the page, the bar says so and offers the rest:
All 25 on this page are selected. Select all 340 that match Clear
- It shows on a plain array with more rows than
perPage(searched and filtered), and on a live page whosetotalis above its rows, only withevery: without it the table can't reach the other pages, and the bar stays as it is today. - Chosen, the bar says "All 340 that match are selected" with Clear. It keeps saying it while the selection is that set; one row unticked and it's "339 selected" again.
- ⌘A on a row selects the page, as now; pressed again with the page selected, it selects every match, as the offer does.
Every match, fetched
- A plain array: the searched, filtered rows (the table's
sorted) become the selection at once. - A live page with
every:fetchEvery(every, query), the same call Copy table makes, with the same progress ("Selecting rows… 100 of 340"), Cancel and Esc. AboveeveryLimitit asks first, with RFC 0073's words. Cancelled or failed, the selection is as it was; a failure says so in the bar's live region, as an export's does. - The keys join the selection: rows selected under another search before stay selected, as they do today across searches.
- A snapshot: a row that starts to match after the fetch isn't
selected; one that's deleted is dropped as today (from the page it's
on). The bar's count is the selection's, not the list's
total.
The rows, kept
The fetched rows are kept, by key, with the selection, until it's cleared or a row is unselected (then that row goes). With them:
- Copy on a selected row, and ⌘C, copy every selected row the table has (this page's, and the kept ones), in the list's order.
- The foot's Selected line totals the same rows.
- A row on the page replaces its kept copy, so a live change shows.
Rows selected one by one on other pages, before, are kept the same way from the page they were on, so Copy of a selection made over three pages copies all three pages' rows. (Today it copies this page's.)
For the app
Nothing new is needed: selected is keys, and bulk(selected, clear)
gets all 340. Two additions, for an app that wants them:
selectedRows(), an exported function: the selected rows the table has, as Copy takes them.selectEvery(): what the offer does, for an app's own button; resolves to the keys, ornullif the user cancelled.
The assistant hears the keys as now. Above 1,000 it's told the count and the first 1,000, so a note doesn't carry 10,000 ids.
Words
allOnPageSelected(n), selectEveryMatch(n), everyMatchSelected(n),
selectingRows(done, total), in words.js and the framework's
en/nb.
Implementation plan
ui/src/internal/every.js: nothing new;fetchEverytakeskeyOf.Table.svelte:keptRows(aMapby key, filled from the page as rows are selected and from a fetch),everyMatch(the selection equals the last fetched set), the offer in the bar,selectEvery()andselectedRows(), ⌘A twice. The fetch shares the export's progress and cancel.- Copy and the foot's Selected line read
selectedRows(). - The assistant's note capped at 1,000 keys.
- Tests: the offer's conditions (plain array, live page with and without
every, one page), fetch, cancel, failure,everyLimit, joining an earlier selection, the count after unticking, copy and totals across pages, ⌘A twice, the assistant's cap. - Docs:
table.md("Every match"), its words, the keyboard table, the skill, CHANGELOG, a gallery example.
Open questions
- Fetch the keys, or hand the app the query? An app with a bulk
command on the server could act on "every invoice where …" without the
table fetching 340 rows. Recommendation: fetch, in this RFC. It
keeps
bulkone shape, works with every existing bulk action and with RFC 0039's optimistic writes, and RFC 0073 already bounds it. A query-shaped selection is later, if an app's lists run pasteveryLimit. - Offer it without
every? A live page withouteverycan't reach the other pages. Recommendation: no offer;make:resourcehas passedeverysince RFC 0073, so the generated lists have it. - ⌘A twice? Recommendation: yes; it's how Finder and Mail widen a selection, and the first press keeps today's meaning.
- The assistant's cap. Recommendation: 1,000 keys and the count.
As built
Table.svelte:keptRows(aMapby key) keeps a live page's selected rows as they're seen and the fetched ones; an unselected row leaves it.selectedRows()reads a plain array's selected rows (as searched and sorted, then the ones the search leaves out), or the kept ones with this page's as they are now. Copy, ⌘C and the foot's Selected line read it.- The offer (
offerEvery) shows with the page selected, more matches than the page (sorted.length, or the page'stotal), not every match chosen, no fetch running, and a plain array orevery. The bar says "All 25 on this page are selected." while the selection is the page, and "All 340 that match are selected" while it's every match of a list longer than the page; else the count. selectEvery(): a plain array's keys at once; a live page's throughfetchMatches("select"), whichallRows()now shares (the progress group says "Selecting rows…" and "Selecting every match"). The keys and the query they match (matched, the query without its page) say whether the selection is still "all that match"; another search makes it a count.- ⌘A on a row: the page, then, with the offer showing, every match. A failure from the offer or ⌘A is a toast, "Couldn't select every match: …"; a cancel says nothing more than the export's.
- The assistant: past 1,000 keys the table sends the first 1,000 and
{ total }.assistant.selected(kind, ids, { total })in the runtime,totalon the shell's/__assistant/selected, andAssistants::selectcountingmore_selectedfrom it; the note keeps its 100 ids as before.AssistantClient::selected_of(inelyra::testing) for a test. - Words:
allOnPage,selectEveryMatch,everyMatchSelected,selecting,selectingLabel,selectFailed, inwords.jsanden/nb. - Tests:
ui/src/table-every-match.test.js(13), a runtime test oftotal, anda_selection_sent_in_part_says_how_many_there_are. The gallery'stable/selectexample (5 rows, 4 a page) shows the offer.
Decisions
Accepted 2026-11-29, with the open questions' recommendations:
- The table fetches the keys, through
every, as RFC 0073's export does;bulk(selected, clear)keeps its shape. A selection made of a query, for the server to act on, is later, if an app's lists run pasteveryLimit. - No offer without
every: a live page without it can't reach the other pages; the listsmake:resourcewrites have it. - ⌘A twice: the first press selects the page, as now; the second, with the page selected, every match.
- The assistant is told the count and at most 1,000 keys.
Not in this RFC
- A selection made of a query, sent to the server as one.
- Keeping the selection with
persist, or in a saved view. - Selecting within one group (RFC 0074) from its header: a group's rows on the page are selected by its checkbox today; across pages is later.
Alternatives considered
- The header's checkbox selects every match. Surprising when it fetches, and it hides the page/all difference the bar makes explicit.
- Keys only, no rows kept. Simpler, but Copy of the selection and the Selected total would keep covering only the page, which is the thing a user selecting 340 rows wants to copy.