* fix(backend): keep action fields mapped to inputs in workspace exports
Export redaction emptied every sensitive formula field, including ones that only
point at an input or previous step, so imported email actions lost their mappings.
* fix(backend): keep mapped HTTP rows on export and only for known data providers
Header, query and form rows mapped to inputs were still blanked, and any get('<text>')
was kept even when the text was not a data path.
* feat: introduce User-backed workspace identities
Replaces workspace core.Agent subjects with identities stored as Django
Users, so permissions, execution and attribution use the same record.
- User.objects and WorkspaceUser.objects are human-only; permission and
identity code opts in through objects_and_identities. is_human and
is_identity classify a user at runtime.
- Login, tokens, seats, notification recipients, personal views and
last-admin checks stay human-only. Roles, teams and field grants work
for identities unchanged.
- Agent applications run as an identity, never as a person. Every shared
tool rechecks the identity's authority on each call, and MCP refuses a
tool that skips that boundary.
- Migrations add the profile metadata and index, remove the Agent model
and delete or clear legacy Agent data: trash entries, role assignments,
team memberships, integration authorizations and run-as bindings.
- Rename the management API, UI, events and feature flag to identity.
Squashed and rebased onto develop; the previous history is kept on
backup/6556-before-develop-rebase.
* refactor: remove generic subject options endpoint
* refactor: simplify identity selection and Agent run-as options
* feat: distinguish identity notification senders
* fix: restrict identity bindings to identity managers
* docs: record users and identities verification
* fix: restore snapshots as the person restoring
A restore checked the snapshot creator's permission and used the creator
to decide whether an Agent keeps its identity binding. It now checks the
person restoring, passed to the import as `restored_by`. `copied_by` stays
unset on restore, so credential checks keyed on it behave as on develop.
Restoring a snapshot whose creator was deleted works again. The copy rule
for identity bindings covers Agent run-as only; a copied Local Baserow
integration keeps its authorized subject.
* fix: leave settings pages the user may not open
A settings route without a permitted tab rendered an empty page, as the
Identities page did with its feature flag off. It now opens the first
page the user may see.
* fix: renumber the legacy Agent cleanup migrations
Develop added agent 0016 and integrations 0043, so the migrations that
clear legacy Agent run-as bindings and integration authorizations move to
agent 0017 and integrations 0044.
* test(agent): run the trigger self-event test as an identity
The test added on develop created a `core.Agent`, which this branch
removes. It now uses an identity user as the Agent's run-as subject.
* perf: load user types once per batched permission check
* refactor: state the stored subjects in each subject type
* fix: give every user a profile
* fix: keep identity attribution on rows copied in their workspace
* refactor: give people and identities their own subject type
UserSubjectType stays the type both are registered and stored under. It forwards what differs to HumanSubjectType and IdentitySubjectType, so get_specific_type is the only place in subject code that inspects the user type. The registry returns the specific type on request and get_by_model keeps returning the stored type, which never reads the profile.
An identity's membership is checked in one query instead of two.
* fix: keep the roles of identities when a database is duplicated
The role import read subjects through the model's default manager, which only returns people, so duplicating or restoring a database failed when an identity held a role on it. It now resolves the subject through the subject registry.
A subject that no longer exists is skipped instead of failing the whole duplicate or restore.
* refactor: look up a subject type from its content type in one place
* fix: reload a cached token whose profile is incomplete
A token cached by the previous release has a profile without the user type, which reads as not a person, so its requests were refused until the entry expired. The token cache now treats it as a miss, with the check the user cache already used.
* refactor: check the user type once where the check was repeated
The MCP endpoint loader, the personal view permission manager and the identity trash type each asked the same question several times. The rule that an identity is never selected by email moves from the team handler to the identity subject type.
* refactor: leave trashed workspaces out of the identity membership manager
WorkspaceUser.objects_and_identities was named after objects but also returned memberships of trashed workspaces, so callers filtered them by hand. It now follows the existing pair: it leaves trashed workspaces out, and objects_and_identities_and_trash includes them, as objects_and_trash does for people.
* test: state the behaviour of every user type
The table fails when a user type is added and says what has to be decided first. An unknown type is checked to be denied.
* refactor: refuse to say whether a stored user subject is interactive
The answer differs between a person and an identity, so reading it from the stored type would be wrong for one of them. It now raises and points to the specific type.
* refactor: lock the person in membership writes instead of checking the type
Leaving a workspace, removing a member and adding a user lock the user through the people manager, which refuses an identity or an unknown type in the same query. Nothing adds an identity through add_user_to_workspace, so its branch for identities goes. The last admin check compares the membership with the people who are admin, which needs no type check.
* test: leave no rows behind in the legacy authorization migration test
The test left an integration that pointed at a user that didn't exist and a workspace, in the database the migration tests share. Tests that ran after it then failed on the foreign key or on the workspace id. It now uses a real user and empties the two tables.
* docs: describe the subject types and compare the Subject table alternative
ADR 013 is shorter and states that people and identities each have a specific subject type under the stored auth.User type. It compares shared User storage with a Subject table that users and identities would both point to.
* chore: run the legacy run-as cleanup after the agent actions migration
Develop added agent migration 0017, so the cleanup becomes 0018 and depends on it.
* test: leave no rows behind in the legacy agent migration tests
Like the legacy authorization test, these left a workspace in the database the migration tests share, which a later test that creates workspaces with fixed ids collides with.
* fix: write and read the workspace role of an identity in one place
The role assignment API wrote the role of an identity through the membership update of people, which told every member of the workspace about it and stored Builder as MEMBER, while the identities API stored BUILDER and returned the stored value. Both now write through the identity handler, which stores the role like the role of a person, and the role is read with the resolver the workspace members use.
* fix: take no row lock in the membership writes of a person
Leaving a workspace locked the user before the membership while removing or updating a member locks the membership first, so the two could deadlock. The user type never changes and these operations refuse an identity, so the lock protected nothing: they now only check that the user is a person. Leaving no longer locks the admin memberships and removing a member no longer checks for the last admin, as before identities.
* fix: find an identity by its name only in the subject options
The search also matched the email and username, which for an identity hold an internal key, so searching a part of that key returned every identity.
* chore: run the identity migrations after the new ones on develop
Develop added core 0138, integrations 0044 and enterprise 0073, so the identity migrations become core 0139 and 0140, integrations 0045 and enterprise 0074 and depend on them.
* fix: keep the identity of a copied integration only for identity managers
A duplicated application or a restored snapshot kept the identity its Local Baserow integration acts as, without checking the person who made the copy. Restoring a snapshot could so bring back a binding an admin had removed. The copy now keeps the identity only when that person may bind identities, as the Agent application already did, and is otherwise authorized as that person.
* docs: follow the renumbered migrations and the copy rule in the test plan
The test plan named the identity migrations and their tests by their old numbers and still said a copied integration keeps its subject.
* test(agent): run the row trigger tests as an identity
The row trigger tests added on develop created a `core.Agent`, which this
branch removes. They now use an identity user as the Agent's run-as
subject, and the e2e fixture creates it through the identities endpoint.
* docs: add ADR 015 for encrypting stored secrets
Records why secrets sent to other services are encrypted with a dedicated key and one shared field.
* docs: keep ADR 015 to decisions, without implementation details
* docs: add a developer guide for encrypted secrets and update ADR 015
Unreadable secrets now stay stored and are never sent, and adopters need the field's usage, limits and required tests.
* docs: add diagrams to the encrypted secrets guide
* docs: stage key changes in the encrypted secrets guide
Services not yet restarted can't read what new ones write unless the new key is a fallback first.
* docs: flag expression updates, raw SQL and db defaults on encrypted fields
They skip the field's encryption, so adopters must review them separately.
* docs: cover rollout of released columns and damaged values in the secrets guide
Old processes read ciphertext as the secret during a deploy, and damaged values now count as encrypted.
* fix(core): sanitize service sample data in exports and templates
* fix(core): preserve workflow metadata in exported samples
* test(database): preserve status in sanitized button samples
* Added semantic search vector indexing
* Introduced incompatible state
* Covered template scenarios
* Set data_schema in local baserow ingration
* Check if field is still enabled when updating
* Update docs about env var hash change
* Added enterprise query test
* Fixed index name
* v1 of the ADR
* fix: admins can no longer be locked out of databases, tables or views
* ADMIN direct role assignments take priority at their level, and at their descendants.
* fix: lock inherited admins in the new share dialog and show admin explanations in full
* Rename backend node types
* Rename backend trigger service types
* Rename frontend node types
* Rename frontend service types
* Rename CorePeriodicServiceForm to match the service type
* Rename node test fixtures method names
* Update skill and document naming convention
* Rename some imports after rebase
* test: bring Kuma eval baseline and dataset updates from #6006
* test: harden assistant evals and tool contracts
Add production-replay datasets, resilient eval execution and comparison UI, a committed baseline, and broad tool contract and chain coverage on top of the runtime behavior changes.
* test: align tool contracts with #6006 list_tables and permission output
* fix: restore the eval runner results tab and pin it structurally
The Results tab shipped unable to execute: the closing brace of usageCell
was dropped, renderResults read an undeclared totals, the cost cell still
called the old four-argument usageCell, and a second pane clear wiped the
dataset errors appended just above it. Two tests covered the tab by
asserting substrings of the page, so all four passed against dead script.
Check the page structurally instead, with a small tokenizer, because the
backend CI image has no JavaScript engine and a node-based test would
silently skip there. Replace the sampled tool-visibility assertions with
the full routed-tool map, so adding a tool has to state its reach rather
than inherit one.
* test: score eval checks against the call that actually ran
An incomplete cross-mode call is answered with a re-call redirect, so the first create_workflows call can hold a pre-switch guess rather than the arguments that executed. Score the executed call instead, recognising the redirect through the router's own helper in both its retry and tool-result forms.
* test: score the update_row target from the database, not the first draft
The check read row_id out of the recorded create_workflows arguments,
which are the model's raw output. When those arguments fail validation
the toolset's argument-repair agent fixes them and the tool runs with the
repaired payload, so a workflow that correctly names its row still scored
as missing one. Measured over ten repetitions this produced one false
failure; the trace shows execute_tool succeeding and a fix_agent span
right behind it.
Read the persisted service instead, like the neighbouring trigger and
action checks already do.
* test: check saved values in the prod-replay evals
Replay checks now verify the form collects the order fields, the page was inspected, the requested tables have rows, ISO week numbers and signed amounts are correct for seeded rows, no broken formula is left behind, and all 30 employee rows carry typed values.
* fix: compare eval results only across the same case population
A baseline captured on an older dataset version ran a different set of cases, so its means are not comparable. The Results tab now requires the experiment and baseline to share a dataset version and says when they do not.
* test: expect Kuma to ask when an implied app table is missing
#6006 decided that a request to show records refers to workspace data, so Kuma asks where the projects come from instead of inventing a table. The eval had been flipped to expect building; restore the ask expectation while the explicit example-app case still builds.
* test: accept date subtraction as a correct date-difference answer
Subtracting two date fields returns a duration (verified: 5 days for 2026-01-01 to 2026-01-06), so an answer that subtracts the dates is correct even when it does not name date_diff. Retrieval rarely surfaces the reference-guide passage for date_diff, which made this case fail three times in four on an accurate answer.
* test: expect Kuma to offer a sample-data table when app records are missing
When no table holds the records an app should show, Kuma should create nothing and ask, offering a table with sample data among the next steps.
* test: accept a plain-text question when Kuma must ask
ask_user only records a question for the final answer, so a run that asks in its reply and builds nothing behaves the same for the user. The ask checks still require that nothing was created.
* test: match docs keywords through Markdown emphasis
Answers bold feature names, so '**File** field' missed 'file field'. Keyword matching now ignores emphasis markers, and the OCR case accepts 'AI prompt', the field type's name in the product.
* chore: recapture the Kuma eval baseline on the final stack
Three repetitions of all 122 cases on 3ca6497591 with Groq GPT-OSS 120B (harness v5): 355/366 passed. Docs 192/192, core 9/9, database 61/63, builder 55/60, automation 20/21, prod-replay 18/21.
* chore: drop an import the develop rebase left unused
* test: expect docs search in every mode
* test: require complete tracker and employee replay data
* fix: compare Kuma eval results using recorded cases and checks
* fix: correct Kuma eval scoring and preserve baseline runs
* test: reuse the seeded user in Kuma builder contracts
* test: isolate async docs-search database fixtures
Create users and workspaces in synchronous pytest fixtures so their writes stay inside the rollback transaction. Async setup previously used a separate autocommit connection and leaked users, causing later data-sync tests to fail on duplicate usernames.
Remove the global async-safety bypass, enforce Django's guard locally, and keep the real database hybrid test synchronous around its async tool call.
Verified the seeded two-test reproduction fails before and passes after with no leaked users. All 71 focused tests and 1,742 broader tests pass; one existing test is skipped. Scoped pre-commit checks pass.
* docs: update Builder eval count after rebase
* fix: grade saved assistant results and preserve eval errors
* feat: make assistant routing stateful and intent-aware
Add compacted action memory, mutation reconciliation, grounded final-answer validation, deferred cross-mode routing, and ask_user intent handling. Keep the eval platform and broad contract suites in the dependent layer.
* fix: reconcile only the field settings a request actually stated
FieldItemCreate defaults every type-specific setting, so a request that
named a field without mentioning its settings looked identical to one
demanding those defaults. Reusing a populated table then reported them as
mismatches, and next_steps told the model not to claim completion until
it resolved each one through update_fields: rounding every number,
clamping every rating, dropping the time off every date and nulling
select columns that nobody asked to change.
Compare a setting only when the request stated it, and report missing
fields with the same restraint. Duplicate requests now compare on stated
settings too, since pydantic equality ignores which fields were set and
stated-ness has become load-bearing.
Expose routed_tool_names so the child branch can pin every tool's reach.
* refactor: name the mode redirect instead of matching its wording
The retry text that asks the model to re-issue a routed call is protocol,
and consumers were recognising it by searching for two of its phrases.
Expose it as mode_redirect_message and is_mode_redirect so a reworded
message cannot silently turn routing protocol back into a tool failure.
* refactor: treat a run's own identical workflow request as answered
Reusing an exact-name workflow always returned next_steps saying the
model could not verify trigger or action configuration and must not claim
completion, including when this run had just built that workflow from the
same request. Record what each call created against the request that
created it, and stay quiet when a reused workflow matches it exactly. A
workflow the run did not create, or one re-requested with different
configuration, keeps the warning.
This removes a wrong signal and aligns the automation reconciler with the
database one, which already returns nothing when reuse satisfies the
request. It is not the cause of the request-limit aborts measured on this
branch: repeating the case with this change left the retry loop intact.
* fix: stop discarding generated formulas whose ids came back as text
The formula agent answers in JSON, so its object keys are always text,
while the fields to resolve are keyed by integer field id. Every returned
formula therefore failed `field_id not in remaining` and was skipped
without recording feedback, so three identical attempts produced
"Failed to generate any valid formulas after 3 attempts. Feedback:" with
nothing after it.
The agent had generated a correct formula each time. Losing it made
create_workflows report formula_errors, which the model read as a failed
creation: in a measured run it built the same workflow four times under
suffixed names, and each attempt spent a tool call plus three formula
sub-agent requests until the run hit its request limit.
Match ids by their text form, and report an id that matches nothing so a
retry can act on it instead of repeating the same answer.
* fix: reject a blank row id on row actions
A node type's required fields were checked with `is None`, so an empty
string satisfied them. An update_row or delete_row node built with
row_id="" passed validation and produced a workflow that names no row to
act on, which the model then reported as a completed automation.
Judge only text as empty: a row action with no field values still creates
or clears a row, so an empty values list stays valid.
* fix: say that a row action needs to name its row
The row_id description read only "Row ID", so the model routinely omitted
it on update_row after a row trigger and the call was rejected for a
missing required field. State the requirement, and name the triggering
row as the usual answer after a row trigger.
The partial-update model keeps the old wording: patching a node's values
without restating its target is a legitimate request.
* fix: verify assistant completion and preserve partial results
* fix: distinguish documentation from assistant completion claims
* fix: limit assistant completion checks to direct assertions
* chore: refresh Kuma evaluation baseline
* chore: add Kuma routing changelog entry
* fix: ground Kuma requests and preserve Builder updates
* fix: retrieve assistant documentation from bounded passages
* test: verify Kuma saved state and record exhausted runs
* fix: finish requested Kuma work and retain grounded partial answers
* fix: require a knowledge base for docs evals
* chore: refresh Kuma evaluation baseline
* fix: complete routed assistant actions and verify saved automation mappings
* fix: keep mode routing outside tool error retries
* fix: infer page parameters and retain eval execution failures
* fix: clarify assistant prerequisites and preserve model settings
* fix: retain partial docs evidence and clarify workflow inputs
* fix: isolate eval identities and strengthen main-agent reasoning
* fix: retain default reasoning and trust available action tools
* fix: clarify schema completeness and new page prerequisites
* fix: default unspecified landing-page links to the existing home page
* fix: resolve lookup and default options before requesting clarification
* fix: verify saved Slack reminder configuration in evals
* fix: report incomplete sample row generation to the main agent
* fix: allow negated documentation descriptions in completion checks
* fix: recognize descriptive retention statements in completion checks
* fix: reject invalid assistant row links without clearing them
* fix: accept equivalent per-view wording in documentation evals
* fix: execute complete cross-mode tool calls without deferring them
* fix: preserve native Groq GPT-OSS reasoning history
* fix: accept equivalent address-answer negation in docs evals
* fix: use high reasoning for Groq orchestration and docs
* fix: check newly requested apps in Builder evals
* fix: scope deeper reasoning to documentation synthesis
* fix: constrain Groq documentation synthesis output
* chore: move Kuma eval baseline and dataset updates to #6007
The eval baseline, datasets, run reporting, and their tests move to the eval PR. The harness keeps the routing adaptations this PR's API changes require.
* fix: accept automation formulas keyed by the described field name
Row actions request formulas keyed by field id with the field's name in the description, but the automation formula prompt said keys are field names. When the model answered with the name, all three attempts failed as an unknown field id, so the mapping was lost and Kuma recreated the workflow. Accept a unique described name as the field's key, and tell the model to copy keys exactly.
* fix: clarify Kuma's ask, build, and tool-argument rules
Live evals failed consistently on four instructions: a bare 'create an app for my team' was built without asking, an imperative formula request was answered with instructions, a shared header was created with an application_id the tool does not take, and a request for an example app asked before creating its sample data. Row batches also missed the requested total. Each tool or intent rule now states the expected behaviour.
* fix: search Kuma docs with the user's own words
A rewritten docs question can drop the concern that decides the relevant page: 'Where is the save button in Baserow?' retrieved Builder button docs, while the user's 'I don't want to lose my work' points to automatic saving. Retrieval and synthesis now also see the user's message. The data-backed app rule also says that a described layout is not a request for sample records.
* fix: ask before inventing the records an app should show
When no table holds the records an app should display, Kuma must create nothing and ask whether to create a table with sample data, agree on its fields first, or use data the user points to. Live evals showed Kuma skipping the table lookup and creating a new database; the data-backed app rule and create_builders now state this directly.
* fix: state the missing-records choices where Kuma looks for the table
list_tables results now say to create nothing and offer a sample-data table, agreeing on fields first, or existing data, and name the example or demo app exception, so the decision is made with the lookup result in view.
* fix: report the running row total when Kuma creates rows in batches
Row creation is split into batches of at most 20, and the model had to keep its own running total: asked for 30 rows it created 28, 33, 35, or 36 while answering that it added 30. Each create call now returns total_rows_created for the table.
* fix: keep loaded row tools available after a mode switch
Row tools were only exposed in database mode and have no route back, so create_rows_in_table_N failed as an unknown tool after Kuma switched to application or automation mode. They exist only after an explicit load_row_tools in the same message, so they now stay available in every mode.
* fix: keep remembered tool data from acting as Kuma instructions
The verified_prior_actions block carries names and values from earlier tool calls into the system prompt, and some of that text can be written by other workspace members. Escape < and > so stored text cannot close the block, label it as data never to be followed, and remember row counts and IDs instead of the cell values row tools wrote.
* fix: let Kuma change whether a record selector allows multiple rows
record_selector updates reused the input_text converter, which never mapped multiple, so the unsupported-property check rejected the whole update and Kuma offered to recreate the element.
* fix: clear Kuma's reasoning bubble after a rejected answer
pydantic-ai emits no event when the output validator rejects a text answer, so a printed tool call or an unverified 'I've created...' stayed in the bubble with the retry appended. The bubble now resets when the next model response starts after a rejected one.
* fix: answer and keep the turn when Kuma runs out of output retries
The output retry budget is shared across a run, so a fourth rejected answer raised UnexpectedModelBehavior: the user saw an error and the turn's history was dropped although tools had already changed data. Catch it outside the telemetry trace, which still records the failure, reply that changes may already have been made, and save the captured run so the next turn sees them.
* fix: stop treating how-to steps as unverified change claims
A bare 'Set up ...' step, 'Created rows appear ...' and the 'Created on'/'Created by' field names were read as completion claims, so how-to answers were retried. Bare 'set up' now needs a 'Done' or 'Successfully' lead-in, and more present-tense descriptions are recognised; passive claims such as 'Updated rows have been saved.' are still retried.
* chore: remove the sample-row permission branch that can no longer fire
Row tools now return permission denials as results instead of raising them, so this except in _create_sample_rows was unreachable.
* fix: give the knowledge base sync enough time to re-embed after upgrading
Passage chunking makes the first sync re-embed every document in one transaction. Measured with the bundled CPU embedder, that took 172 s for the website export and about 456 s including dev docs, beyond Celery's default 300 s soft limit, so the sync would roll back on every deploy and the new index would never land. The task now has its own 30 minute limit.
* docs: describe row tools, row-write memory and the fallback answer after review
* fix: let Kuma search the docs in every mode on pydantic-ai 2.50
pydantic-ai 2.50 refuses a call to a deferred tool until tool search reveals
it, so docs questions asked outside explain mode cost an extra model request.
search_user_docs is now active in every mode. The eval harness no longer
counts that refusal as a tool error, like unknown-tool exploration.
* fix: address Kuma routing review feedback
* refactor: centralize Kuma model-specific configuration
* feat: add columns layout to grouped grid views
* test: strengthen Columns layout coverage
* fix: remove doubled vertical border on group column spans
The group-by divider already draws a full-height line at each level
boundary, so the span's own border-right rendered a second adjacent
line in the body but not in the header.
* chore: renumber group_by_layout migration after rebase
Develop added 0221 and 0222 in the meantime, so the branch migration
forked the graph into two leaf nodes.
* refactor: rename banner group layout to section
* feat: compact realtime history into audience summaries
* test: cover retention guard and replay refresh reasons
Adds the settings-import test for a non-positive retention window, pins the
refresh_reason of three replay refusals, and names the per-row channel group
as the summary growth driver.
* feat: support grouped row ordering
* fix: use existing endpoints without modifications
* fix: make grouped row moves reliable and optimistic
* address feedback
* fix: use TipTap Markdown for rich text fields
* fix: escape markdown at line starts only and skip saves without edits
* perf: skip the preview markdown round-trip when no empty paragraphs are possible
* fix: address feedback; add docs
* fix: copilot feedback
* fix: copy one cell, paste in edit mode in another one
* feat: show per-group aggregations in grouped grid views
Each group header shows the column's configured Summarize value computed
over that group's rows, column-aligned at every depth, visible whether
the group is collapsed or expanded. Reuses the footer aggregation config
and display components, and an interactive per-group picker that sets the
shared column aggregation. Gated behind the group_by_aggregations frontend
flag; backend returns values via the existing group-by-data response.
Not included (follow-up): realtime/live updates, performance and caching,
and consolidating the group-by-data and aggregations endpoints into one
request for grouped views.
* refactor: de-duplicate Decimal NaN handling in grid aggregations
Extract the repeated Decimal("NaN") -> "NaN" JSON-safety hack into a single
json_safe_aggregation_value helper, reused by the group-by per-group and totals
aggregations and the authed/public footer aggregation endpoints.
* fix: address copilot feedback on group-by aggregations
- Only show the "+ Summarize" picker for unconfigured columns; a configured
column with no per-group value (e.g. distribution) now renders nothing
instead of looking unconfigured.
- Document the aggregations_only and include_totals query params and the
optional top-level aggregations field in the group-by-data OpenAPI schema.
- Mark row_count, sibling_index and row_offset optional (omitted in the lean
aggregations_only mode).
* fix: de-flake replay-events last-seen-expired test
The test assumed RealtimeEvent id 1 never exists, but the id sequence isn't
reset between transactional tests, so the recorded event got id 1 when the
test ran first on an xdist worker and replay succeeded. Capture the real id,
delete it to simulate retention, and replay from it.
* feat: live, consolidated group aggregation updates
Group-header aggregation values and the footer total now update live and in
place on any change (cell edit, row create/delete, realtime), with no spinner.
In grouped mode they come from a single group-by-data request (aggregations_only
+ include_totals); the standalone /aggregations/ endpoint is no longer called
while grouped. Sort changes need no refresh (order-independent). Gated behind the
group_by_aggregations flag; flag-off behaviour is unchanged.
Deferred: per-group targeting (refreshes the loaded window), the optimistic +
realtime double request, and the 7.3.2 picker e2e.
* fix: dedupe and harden per-group aggregation refresh
Selecting an aggregation in a grouped view fired the group-by-data request
two or three times and could leave the footer total hidden behind a stuck
spinner until the page was refreshed.
- Clear the footer loading flag from refreshGroupByAggregations so the total
shows on first select.
- Make refreshGroupByAggregations the single owner and supersede in-flight
requests so a stale response can't overwrite newer values.
- Skip the duplicate fetch from updateFieldOptionsOfField and the footer
watcher while a picker already owns the refresh.
- Right-align and shrink the banner aggregation value, and let the label slide
behind the previous field instead of hiding it.
* chore: remove the group_by_aggregations feature flag
The per-group aggregations feature is finished, so enable it unconditionally
and drop the flag gating from the grid footer, group banners, and the
aggregation refresh action.
* test: drop obsolete group-by aggregation feature-flag specs
The group_by_aggregations flag is gone, so the two specs that asserted the
flag-disabled behaviour no longer apply.
* fix: stop the row context menu's Select row from clearing its own selection
The global click handler that clears a multi-select when clicking outside the
grid also fired for the row context menu's "Select row" click, wiping the
selection it had just made (most visible in group-by). Skip the clear when the
click lands inside a context menu; cell clicks, which should still clear, are
unaffected.
* fix: flaky test
* fix: show the spinner for updates as well
* fix: address copilot aggregation comment
* fix: avoid optimistic group aggregation values
* fix: address feedback
* fix: hide vert divider before primary field
* fix: only re-fetch when raw_aggregation_type changes
* feat: add collapsible group-by grid view
* fix: address copilot feedback, plus some other cleanup/fixes
* fix: harden grid e2e navigation
* Add e2e tests; improve performance; clean up code
* feat: show resolved values for reference fields in group-by headers
- Resolve collaborator, link-row and select group values to renderable display
objects in the group-by data API, batched once per field per page (O(1) lookups,
no per-group queries).
- Order many-to-many groups identically to the rows via correlated-subquery
ordering, since the relation column is shadowed by the aggregated array
annotation in group-by queries.
- Render the display values as chips in the group-by banner via dedicated
multiple-select / multiple-collaborators components; shrink the collaborator
badge, reduce the field-name size and keep the label on one line.
* fix: group many-to-many fields by their set of values
Grouping a grid by a collaborator, multiple-select or link-row field
produced empty groups with orphaned rows and duplicate headers for the
same set of values. The group key (an id array) was order-sensitive: the
backend's aggregated array order was unstable row-to-row and the cell
appends new values, so an optimistically-created group's key diverged
from the server's and rows were rejected by rowBelongsToGroupBySection.
- pathKey and the group-row Vue keys now sort m2m id arrays numerically,
so a group is identified by its set of ids, not their order.
- The backend aggregates the group value ordered by related id and sorts
the group's unique value, making grouping deterministic and set-based.
- Optimistically-emptied groups (row_count 0) are no longer rendered (the
node is kept for reconciliation), and the leading group gap is fixed so
the first visible group has no spurious gap.
- A newly created collaborator group resolves its badge name from the
workspace store instead of requiring the name on the value.
* fix: keep cell multi-select when dragging in a group-by view
A multi-select drag ends with a click whose target is the rows
container (the common ancestor of the dragged cells). cancelMultiSelect-
IfActive cancels the selection unless that container is recognised as
part of the rows area, but its whitelist only knew the flat-grid classes
(grid-view__rows / grid-view__row). The collapsible group-by feature
renders rows in grid-view__group-by-rows containers, so the post-drag
click was treated as "outside the rows" and the selection was cleared on
mouseup. Add the group-by row containers to the whitelist.
* test: expect emptied group-by banners to disappear
The optimistic empty-group hiding (a group disappears once its last row
moves out) made the e2e contract that kept the emptied source group
visible at row_count 0 obsolete. Update the 2.2.7/2.4.4 assertions to
expect the emptied group's banner to be gone (new expectNoGroupByBanner
helper), and correct the tree-maintenance comments: the node is still
kept for reconciliation, but the layout no longer renders its banner.
* perf: load the collapsible group-by grid in one bounded request
Grouping a wide table by many fields took several seconds and a request
waterfall to render the first screen. The group tree was fetched one HTTP
request per depth, a budget that ran out before reaching any leaf forced
a per-parent fallback, and the rows endpoint resolved group-by metadata
unconditionally.
Backend
- Walk the descendant tree with one batched windowed query per group-by
level (get_group_by_data_for_parents) instead of one query per parent,
so a single include_descendants request returns the whole visible
subtree in O(depth) queries.
- Scale the descent window to the viewport: row_budget = ceil(limit /
depth). A deep group-by stacks each leaf row under its ancestor
banners, so far fewer leaf rows fill the first screen; the window now
returns a viewport-sized slice (~264 -> ~68 groups on a 12-level grid)
and the rest lazy-loads on scroll.
- Gate the rows endpoint's group-by metadata behind
include=group_by_metadata so it is not computed when unused.
- Resolve reference/link-row display values in one id__in query per field
across all pages instead of once per page.
Frontend
- Initial load issues one group-by-data prefetch and one viewport rows
request; expand mode no longer takes the per-depth path.
- Cap the banner indent (<=50px) and shrink the per-level arrow spacing
as the group-by count grows, keeping the count aligned and the field
name ellipsised; render multi-level loading skeletons for the
not-yet-loaded levels.
- Guard walkPage against a cyclic page-resolution stack overflow and keep
activeGroupBys filtered to fields that still exist.
Plus e2e env isolation (configurable ports, cookie prefix) and docs.
* fix: address review feedback
Addresses the review comments on the collapsible group-by grid PR.
- Gate the group-by add-row "+" on the same condition as the flat grid
(not read-only, not a one-way data sync, has create-row permission), so
it no longer renders buttons that error on click for data-sync tables.
- Show the "(Empty)" label for empty array-valued groups (multiple select,
link row, collaborators), matching the text-field behaviour.
- Stop the flat-grid row placeholder from rendering in group-by mode
(v-else-if instead of v-else).
- Render formula group-by headers via the result field type's group-by
component instead of RowCardFieldFormula, removing the dev-only
"Missing required prop: row" Vue warning.
- Keep the cell selected at the first/last field for both Tab and arrow
keys (restore the pre-refactor behaviour); navigating past the edge no
longer drops the selection in either flat or group-by mode.
- Re-enable and de-flake the "sorted add outside buffer" e2e test: assert
on the re-resolved last row instead of a snapshotted renderedRowCount()
index, which raced with the create-confirmation re-render in CI.
* fix: keep rows inserted below in a grouped grid view in their group
Insert-below and add-row in a grouped view now derive the new row's group
path from the neighbouring row, so it inherits all writable group-by values
and lands in the same group; `before` is set only when the next row shares
that group.
* feat: soft-cap adding group-bys at 5 in the view UI
Once a view reaches 5 group-bys the add button is disabled with a tooltip;
views that already have more keep working and only offer to remove them.
* limit group-bys; fix css
* refactor: polish code and comments
* fix: address Bram's feedback
* feat: add vertical gap between sibling sub-groups and indent banner labels with their chevron
* fix: address remaining feedback
* fix: row-coloring and fixed-height for add-row
* fix: address Bram's feedback v2
* fix regression in last commit
* fix: address grid group review comments