Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
RFC 0055: menus that change
RFC 0056: the framework's own words
RFC 0057: rata upgrade
RFC 0058: @elyra/charts
RFC 0059: all of WireCharts
RFC 0060: exporting a chart
RFC 0061: zoom
RFC 0062: printing
RFC 0063: linked charts
RFC 0064: report pages
RFC 0065: marks
RFC 0066: taking a table out
RFC 0067: totals
RFC 0068: columns the user picks
RFC 0069: filters
RFC 0070: saved views
RFC 0071: lists over Laravel
RFC 0072: targets
RFC 0073: every row out
RFC 0074: grouped rows
RFC 0075: pinned columns
RFC 0076: views on the server
RFC 0077: every match selected
RFC 0078: editing in the table
RFC 0079: many cells at once
RFC 0080: a value for the selected rows
RFC 0081: a new row in the table
RFC 0082: a related record in a cell
RFC 0083: a filter by a related record
RFC 0084: one write for many rows
RFC 0085: the keys shown
RFC 0086: many rows in Laravel
RFC 0087: many rows deleted
RFC 0088: the trash
Release notes
Changelog
Elyra
RFC 0074 — Grouped rows and subtotals

RFC 0074 — Grouped rows and subtotals

Status: implemented (2026-11-29) · Target: 0.65.0 · builds on RFC 0067, RFC 0070 and RFC 0071 · see Decisions

Summary

RFC 0067 gave a table its totals, one line for every row, and left "grouped rows and subtotals" for later. A business list is read in groups more often than not: the invoices by customer, the hours by project, the orders by status, each with its own sum. Today the app sorts by the column and the user adds it up in their head, or exports to a spreadsheet to make a pivot.

This RFC lets a Table group its rows by a column:

<Table
  rows={invoices}
  bind:query
  group="customer"
  columns={["number", "customer", "due", { key: "amount", align: "end", total: "sum" }]}
  label="Invoices"
/>
  • group (a column's key, or query.group, the user's choice): the rows in runs of the same value, each under a header row, "Ada Lovelace · 4 invoices", and a column's total for each group on that header.
  • The user groups from a column's header (its menu: Group by Customer, Don't group) when the column is groupable, and a group is collapsed or expanded by its header (a click, ←/→).
  • A paged list sends group in its query; the command orders by it first and answers each group's count and totals in the page's groups, so a group cut by the page still says its own whole. make:resource's commands and Laravel's elyraList answer it.
  • Saved views keep the grouping (RFC 0070); print and Report print the groups with their subtotals; the CSV stays the rows.

Motivation

  • Subtotals are what a list is read for. "How much does each customer owe" is the question an invoice list answers; a total of everything is the second question.
  • A sort is not a group. Sorted by customer, the rows are together, but where one customer ends and what they add up to is the reader's work, and over 25 rows a page it's guesswork.
  • The spreadsheet is the workaround. RFC 0066 made the export good enough that users reach for it to group, which is a sign the table should.
  • A paged list can't do it alone. Grouping a page in the browser gives a group's sum over the rows on the page; a customer with invoices on two pages has two wrong subtotals. The server has to say it, as it says the totals since RFC 0071.

Current state (0.64, and RFC 0073)

  • Table has columns with total (RFC 0067): a foot line over every row (rows), the page's totals from the server (a live page), or "This page"; and a line for the selected rows. totalsOf(rows, cols) in internal/totals.js computes them.
  • query carries search, sort, direction, page, filters; views (RFC 0070) keep filters, search, sort, direction and columns.
  • Page<T> has totals: Option<BTreeMap<String, f64>> (RFC 0071). make:resource's index command and elyraList answer it from the model's allowed totals.
  • Rows are <tr>s in one <tbody>; ↑/↓ move between them, Space looks, Enter opens.

Design

group

group is a column's key. The table's own group prop is the app's choice; query.group, when set, is the user's and wins (it's what a view keeps, and what a paged command gets). null or "" is not grouped.

The rows are ordered by the group's value first (in the sort's direction if the sort is the group's column, else ascending), then by the sort. A group is a run of equal values: equal as plainOf compares them, so a date groups by the day, and an empty value is its own group, last, named "(None)".

What's drawn

Each group is a <tbody> with a header row:

▾ Ada Lovelace · 4 invoices                       12 400,50
    2041   Ada Lovelace   2026-11-05             10 000,00
    …
▸ Grace Hopper · 2 invoices                          860,00
  • The header spans the columns up to the first with a total; from there, each column with a total has the group's in its cell, in the column's format and alignment. The group's name is the value through the column's format (what the cells show), its count with the table's words.groupCount(n) ("4 rows"; the app's labels say "invoices").
  • Collapsed, a group is its header alone. A click on it, or ←/→ on it, folds and unfolds it; Alt+ click folds every group. Folded groups are kept with the widths under persist, by value.
  • The grouping column stays where it is, shown, unless the user hides it: hiding it is fine, the header says it.
  • The foot's total is unchanged: every row.

Keyboard and ARIA

The table stays a table, not a treegrid: each <tbody> is a row group, and its header row is a <tr> with a <th scope="rowgroup"> holding a <button aria-expanded>. ↑/↓ move through the headers and the rows alike; ← on a row goes to its group's header, ←/→ on a header fold and unfold it. Grouping and folding are said in the table's live region ("Grouped by Customer, 12 groups").

Selection

With select, a group's header has a checkbox for its rows (on the page, as the table's own "select all" is). Selected rows' totals stay the foot's second line.

The user's grouping

A column with groupable (or groupable on the table: every column, or a list of keys) gets Group by {column} in its header's menu (the one choosable opens, and a right click on the header), and the grouped column's menu Don't group. The choice writes query.group, so a view saves it (group in a view, RFC 0070), a route can carry it, and a paged command gets it.

A paged list

query.group goes to the command with the rest. The command orders by the group's column first, then its sort, so a group's rows are together across pages, and answers, in the page:

"groups": { "Ada Lovelace": { "count": 4, "totals": { "amount": 12400.5 } }, … }

for the groups on that page, keyed by the value as text. The table uses them for the headers: a group cut by the page says its whole ("Ada Lovelace · 4 invoices", 2 of them here). Without groups in the answer, the header says the page's own, marked "(this page)", as RFC 0067's foot does.

  • Page<T> gets groups: Option<BTreeMap<String, Group>>, Group { count: u64, totals: Option<BTreeMap<String, f64>> }, null when not grouped.
  • make:resource's index command takes group among its allowed sort columns, orders by it first, and answers groups with a GROUP BY over the same filtered query, limited to the page's values.
  • elyraList takes a groups allowlist ('groups' => ['customer', 'status']) and does the same with Eloquent.

Print, Report and the CSV

On paper, every group is unfolded, with its header and subtotals (RFC 0062). A Report keeps a group's header with its first rows across a page break. The CSV and Copy table are the rows, as RFC 0066 makes them, ordered as grouped, without the subtotal lines: a spreadsheet's own grouping does that, and lines that aren't rows break its sums.

Implementation plan

  1. ui/src/internal/groups.js: groupsOf(rows, col, { sort, direction, cols, number }) — runs, names, counts and totals; the order. Tested alone.
  2. Table.svelte: group and groupable, query.group, a <tbody> per group with its header, folding, keys, selection per group, the header menu's items, the words (en, nb); groups from a page.
  3. views.js: group in a view and in queryOf/matches.
  4. substrate/elyra: Page.groups and Group; elyra::db: a group_totals helper over a filtered query.
  5. make:resource: group in the index command and its tests; the views pass groupable on the filterable columns.
  6. The Laravel package: groups in elyraList, its test, and the CI step's list test.
  7. Docs: table.md (Grouped rows), models.md, backend.md, resources.md, the skills; the CHANGELOG; the roadmap.

Open questions

  1. One level of grouping, or nested? Recommendation: one. Two levels (customer, then month) is a pivot, which the export serves; one level covers the lists apps have, and group can become a list later without breaking.
  2. Subtotals on the group's header, or a line under each group? Recommendation: the header: it's read first, it's there when the group is folded, and a folded list of headers is the summary the user wanted. A line under each doubles the rows.
  3. The paged list's groups from the server, in this RFC? Recommendation: yes. Without them a paged list's subtotals are wrong without saying so, which is RFC 0071's reason for server totals; both servers are ours to change.
  4. Subtotal lines in the CSV? Recommendation: no: the CSV is rows. A spreadsheet groups and sums them itself, and extra lines break its SUM.
  5. Group by a value the table doesn't show (a column the app doesn't list)? Recommendation: no: a group is a column's, so its name has the column's label and format.

As built

  • internal/groups.js: groupKey, inGroupOrder, runsOf, wholesOf and groupsOf, plain functions. Text is ordered as the locale reads it, numerically (9 before 10).
  • The header's menu is the runtime's context menu, on a right click or Shift+F10 on a header: Group by {column} for a groupable column, Don't group while grouped, and Columns… with choosable. A header that has neither opens the Columns menu, as in 0.63.
  • A group's name is a column's option label when its filter has options ("Yes", not "true"), else the value through format.
  • Folds are kept under persist in a key of their own, elyra-ui.table.{persist}.groups, by the column grouped by; a table that isn't grouped reads nothing. While the window prints (beforeprint) and in a Report, every group is unfolded.
  • Query::paginate_grouped(db, page, per_page, column) in elyra::db: the group's order, then the query's, and a COUNT per group on the page (an empty text counts with NULL). The key is the row's JSON value as text, a whole float without its .0, as JavaScript writes it. Its groups have no totals: make:resource's commands have none; the Laravel package's do.
  • elyraList's groups answers one GROUP BY over the page's values, with the controller's totals per group; the key is the value as the row's JSON has it (a date cast to Carbon is its ISO string, on both sides).
  • make:resource: group in {Model}Query (local and --backend), checked against SORTABLE; the view marks each filtered column groupable: true; the printed elyraList call has 'groups'.
  • Checked: against a real Laravel app (a group the page cuts says its count and its sum, 960 over two customers, one on the page), and in the browser smoke test (a header's Group by Active, the group sent, "Yes · 130 rows" over a page of 25, then Don't group).

Decisions

Accepted 2026-11-29, with every recommendation:

  1. One level of grouping; group can become a list later.
  2. A group's subtotals on its header, there when it's folded.
  3. A paged list's groups from the server (Page.groups), in make:resource's commands and elyraList, in this RFC.
  4. The CSV and Copy table are rows, without subtotal lines.
  5. A group is a shown column's, with its label and format.

Not in this RFC

  • Nested groups, and grouping by an expression (a month of a date).
  • Groups as a chart (the subtotals as @elyra/charts' columns): the app has the rows and groupsOf.
  • Drag a column to a group bar, as some data grids do: the header's menu is the one way, and the keys reach it.

Alternatives considered

  • Group the page in the browser. Simple, and wrong over a paged list: a group's sum would be the page's, a cut group would read as two.
  • A treegrid (role="treegrid"). The rows aren't a tree, and a treegrid's keys (every cell a stop) are a larger change for screen reader users than a <tbody> per group with a header, which tables have had for decades.
  • Subtotals as the foot of each <tbody>. Read last, gone when the group is folded; see question 2.