A search or filter change refreshes the view and cancels the pending
fetch of newly visible rows. The fetch threw RefreshCancelledError, but
the gallery and timeline views dispatch it without awaiting, so it was
reported as an unhandled rejection (BASEROW-SAAS-WEB-FRONTEND-7T). The
refresh loads the visible rows itself, so the cancelled fetch now just
returns.
* fix(database): group date-only created on and last modified fields by day (#6616)
* fix(database): sort grouped date rows by their group key (#6616)
* fix(database): align date groups and audit date sorting
* fix(database): align audit date filter values with sorting
Implement the companion get_value_for_filter required by custom get_order. Normalize date-only values to the UTC-day ordering key while preserving full timestamps and nulls, with SQL regression coverage.
* fix(database): harden date grouping and view indexes
* fix(backend): cap page size on view row listings and the agents list
Grid, gallery and timeline row listings (including public views) and the agents
list accepted any page size, so one request could serialize a whole table.
Kanban limit/offset now reject negative values instead of erroring.
* fix(frontend): keep view row requests within the row page size limit
Grouped grid ranges can span collapsed groups and exceed the limit the backend
now enforces, so grid requests are split into chunks and merged. Gallery and
timeline request sizes are capped to the configured limit.
* fix(backend): cap kanban limits and keep default page sizes within the limit
Kanban limits were unbounded, and a default page size above a lowered
BASEROW_ROW_PAGE_SIZE_LIMIT made requests without a size fail.
* chore: add changelog entry
* fix(frontend): fetch grouped grid rows per visible section
One range from the first to the last visible section also fetched every row
of the collapsed groups in between, split into thousands of capped requests.
* fix(frontend): fill the visible gallery and timeline range under a small page size limit
Capping the request size left visible rows as placeholders when the limit was
smaller than the visible range.
* fix(frontend): keep kanban row requests within the page size limit
The kanban store always asked for 24 rows, so it stopped loading when the limit
was set lower.
* fix(premium): return no rows when kanban or calendar grouping has no group to fetch
With no matching select option or an empty date range, the empty filter selected
every row of the queryset without the view filters applied.
* fix(frontend): refresh grouped grid rows per visible section
The refresh fetched one range across all visible sections, so a large
collapsed group in between turned into thousands of capped requests.
* chore: mark the page size limit changelog entry as a breaking change
Requests above the limit now return a 400 instead of rows.
* fix: keep public and restricted views in sync when linked-table changes move rows (#6339)
- Dependency cascades now send rows_deleted / rows_created to publicly shared
and restricted views when a row leaves or enters their filters. The decision
is made inside the transaction, from a before snapshot read under the row lock.
- Only tables with such a view filtering on a field the cascade changes pay for
this. The check is an EXISTS inside the existing snapshot read, so other tables
run the same queries as before and take no extra lock.
- Snapshot reads match ids read from the link tables with id = ANY(ARRAY(...)),
which avoids a full primary key walk. A row the cascade updated before
snapshotting it never gets an enter/leave decision.
- Fields a cascade changes without an UPDATE (link values) are tracked across
the transaction. Views filtering on them are skipped, and those values are
left out of rows_deleted. This replaces the cell_values_come_from_other_tables
field type flag.
- Cascades over the realtime limit also refresh publicly shared and restricted
views (force_view_rows_refresh), not only workspace members.
- On realtime deletes, the client removes rows it already holds by id. When the
payload lacks a value it needs to place an unheld row, it leaves counts as
they are.
- Creating a linked row from a link cell no longer sends a redundant PATCH,
which failed in restricted views.
* test: keep only the essential #6339 tests and trim docstrings
Merge overlapping tests into shared builders and parametrized cases. Keep one
test per behaviour, and keep the exact security assertions. Cut new docstrings
and comments down to the non-obvious why.
* fix: keep a link created from the link-cell modal in the cell (#6339)
Skipping the redundant PATCH also skipped the only local write of the
new link, so a later pick or remove PATCHed a stale list and unlinked
the created row. The link is now applied locally through the same store
path realtime uses; only the PATCH is skipped.
* fix: let a cascade decide only rows nothing else wrote in the transaction (#6339)
A broadcast decided enter and leave from its first snapshot of a row
and cached the result, so another write in the same transaction made
it send rows or values a public or restricted view never showed: a
direct edit after the cascade, a row created or edited before it, the
other rows after close() split the broadcast, or a cascade inside a
savepoint.
The transaction's writes are now tracked per table. At commit, a
broadcast drops every row something else wrote: rows written directly
keep develop's direct-path events, and rows of a savepoint split or of
a bulk write get none. close() is gone.
Also pins the no-lock gate's filters_disabled and changed-link cases.
* chore: shorten the #6339 changelog entry
* fix: stop editing rows hidden by restricted view filters
Cancel edits still queued for a row that the backend reported as hidden,
including pasted values, in grid, gallery, timeline, kanban and calendar,
so they are neither sent nor put back on screen. Close the row modal when
its row gets hidden in a restricted view; other views keep it open.
* test: cover builders and ignore broadcast order in restricted view tests
* test: add e2e tests for restricted view row visibility
Cover creating, editing, pasting and dragging rows in a restricted view
while the HTTP response is held after the server commits, the row modal
closing only in restricted views, and view default values.
* fix: hide rows created with the grid's floating add button when filtered out
createNewRowConfirmed used the single-row endpoint, which doesn't return
hidden_row_ids, so a restricted editor kept a row the view's filters
exclude. Create it through the batch endpoint and report hidden rows like
the other create paths.
* test: expect the batch endpoint for the grid's floating add button
* fix: cancel queued kanban edits when a drag hides the card
* fix(database): guard grid against missing and stale cell values
Grouped rows now get newly created fields, sorts treat a missing or null cell
as empty, and rich text cells tolerate a value of the previous field type.
Rows in collapsed groups resolve their group from the section key.
* fix(database): address review findings on grid cell guards
Key an undefined group value like null so pathFromKey can parse it, remove
deleted rows from collapsed groups, and sort present-but-undefined cells and
empty multiple select or collaborator formulas as empty.
* refactor(database): drop empty value for formula types that cannot be sorted
Multiple select and collaborator formulas cannot be sorted or grouped by, so a missing cell never reaches their sort.
* fix(database): sort zero in array formulas as a value
The element check treated 0 as missing, so [0] tied with [] and with other numbers.
* fix(database): keep grouped row caches shared and sort null cells as empty
addField now reuses one copy per row, so an edit reaches both sectionRows and
absoluteRows. The sort wrapper also replaces null cells.
* fix: report rows hidden by restricted view filters in batch responses
Compute row_ids_not_visible_in_view with one filter query in the API instead
of reusing visibility stashed by the realtime receivers, so dependent formula
and lookup filters are evaluated after the update. Ignore views of another
table.
Move kanban drag and grid cross-group drag to the batch update, so a row
dragged out of a restricted view is hidden and the move call is skipped.
Merge the frontend helpers into reportRowsNotVisibleInView and remove hidden
rows even when they don't match the active grid search.
* refactor: rename row_ids_not_visible_in_view to hidden_row_ids
---------
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
* fix: keep a button action card open when its save finishes
A created action is keyed by its new id once the list is refetched, which closed the card while the context was still on screen.
* fix: give the button action error a line height
* fix: outline the selected button field cell
* fix: name the button actions that ran before one failed
Completed actions are not rolled back, and the old message left the clicker to assume nothing had happened.
* fix: disable a button field for users who may not click it
The dispatch operation is now scoped to the field, which is the only id a cell has to ask with. Roles attach no lower than the table, so one check on the field answers the same as one per action.
* fix: refetch permissions when a field is created or restored
A role on the table or database lists the fields it covers, so a field
added after the page loaded was refused by every field scoped check
until a reload.
* test: cover the disabled button in the row modal and on a card
* fix: keep a button action card in place while its save finishes
The refetched list keyed a created or retyped action by its new id, so
its card remounted and the editor scrolled to the top mid-save.
* 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: per-feature and workspace-level AI model settings
Baserow could only point every AI feature at one instance-wide model. An
administrator can now register provider models, declare which AI features each
model may serve, and pick the default model per feature; a workspace admin can
inherit that choice, override it, or disable the feature locally.
The assistant resolves its model once per logical request and threads that
snapshot through its nested agents and tools, so a single run can no longer
re-read settings repeatedly or pick a model other than the one it validated.
The scoped provider state is memoized for the duration of a request, keeping
workspace serialization from loading it once per workspace.
Also:
- add Google and Groq provider types, and keep these database-only providers
out of the legacy workspace settings they cannot round-trip through;
- prune orphaned feature selections so an unloaded feature type's RESTRICT FK
no longer blocks provider and model deletion;
- record whether a configured model answers text and tool-calling probes, and
invalidate that result when its credentials or identifier change;
- broadcast provider and availability changes over the existing realtime
channel so open clients update without reloading;
- read the assistant model from the shared configmap, so frontend pods no
longer miss it on Helm installs.
Manual test instructions live in docs/testing/kuma-model-settings-test-plan.md.
* fix: address AI provider settings review feedback
* feat: support grouped row ordering
* fix: use existing endpoints without modifications
* fix: make grouped row moves reliable and optimistic
* address feedback
* feat: add instance AI provider management
* fix: simplify AI provider testing
* fix: remove extra model list spacing
* fix: show AI provider form errors inline
* fix: use icons for AI provider row actions
* fix: place model errors before help text
* chore: polish code
* fix: address feedback
* fix: address remaining frontend CI failures
* 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
* fix: group-by grid view review follow-ups
Address deferred review discussions from #5470 and #5602:
- Grouped grid refresh no longer blanks the grid before fetching. The
plain-refresh path builds the new grouped state in a snapshot and swaps
it in atomically (refreshActiveGroupBys gains a preserveScroll flag),
matching the flat grid's fetch-then-swap and keeping the scroll position.
- Right-clicking a group's add-row button now opens the "add N rows" menu,
seeding each new row with the group's values (new createNewRowsInGroup
action).
- Grouped cell selection clears the previous selection in O(1) via
rowLocations and a tracked selectedRowId, instead of scanning every
loaded row.
* fix: address feedback
* feat: send realtime updates for rows changed by dependency cascades (#595)
Rows whose values change as a consequence of a change in another (or the
same) table - formulas, lookups and link row display values - are now
broadcast to the subscribers of the affected tables, bounded by a
configurable limit with a debounced whole-table refresh fallback.
Also fixes formulas and lookups through a self-referencing link row field
never recalculating the rows that link to the changed rows (#4541).
* fix: broken test; minor fixes
* refactor: simplify dependant-rows realtime broadcast after review
Address maintainer feedback on #5642: remove the exact-broadcast rate cap,
the force-refresh debounce, per-field serialization and payload chunking.
The background task now serializes the full row (required by the frontend
realtime collaboration to resolve view membership) and over-limit tables
refresh immediately instead of being debounced.
* fix: remove bad optimizations; address feedback
* fix: add rows_before_update for every change
* fix: add dependant_fields to update_field_ids
* 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
* refactor: extract grid view common test helpers
* refactor: extract row-lifecycle helpers and migrate grid store
Add computeRowInsertPosition to utils/row.js (expresses insert
position by row identity rather than flat array index).
Add handleRowCreated, handleRowDeleted, handleRowUpdated to
rowLifecycle.js. Each takes a store-supplied mutations adapter so
the decision logic (filter matching, sort position) is shared
between the flat-array grid store and the upcoming collapsible
group-by store.
Migrate createdNewRow, updatedExistingRow, deletedExistingRow in
grid.js to delegate through the new helpers via inline adapter
closures that translate position descriptors to the existing
flat-buffer Vuex mutations. Observable behaviour is unchanged;
search gating is preserved in each Vuex action.
Also includes grid view e2e test additions (section 1.5 task queue,
section 7.7 row identifier type, section 10.1 hover actions) and
grid test plan updates from the refactor/grid-view-common-e2e work.
* chore: fix CI
* chore: cleanup
* refactor: remove dead grid e2e search helpers and dedupe row-lifecycle guards
- Drop the unused openSearch/typeInSearch/clearSearch/toggleHideNotMatchingRows
methods from GridPage; the richer, used variants live in
grid_view_options.spec.ts. This also removes the placeholder/getByText
selectors flagged in review (the remaining 'Delete row' selector stays scoped
to the visible context menu).
- Centralize the repeated 'applyMatchFlags ?? noop' / 'rowsForMatchCheck ??
emptyRows' guards into a single normalizeMutations() helper. No behavior change.
* refactor: remove dead updateMatchFilters/updateMatchSortings grid actions
Both grid store actions lost all production callers in the row-lifecycle
migration (match flags are now computed via onRowChange/reapplyMatchFlags and
direct computeRowMatchFlags calls). Repoint the remaining viewFilters test at
the live onRowChange path instead of the orphaned updateMatchFilters action.
* docs: note field-constraint create/edit coverage in grid view test plan
Add 1.6.x and 2.6.x TODO entries describing add/edit behavior under unique and
unique-with-empty field constraints (backend validation error surfaced +
optimistic rollback; empty values exempt from uniqueness).
* test: await route registration in failNextRequest
failNextRequest fired page.route() without awaiting it, so the intercept
could register after the caller already triggered the request. Make it async
and await registration before returning (mirroring pauseNextRequestWithSignal);
it now returns { done } and the 3 callers await it.
* test: scope grid_interaction serial mode per-describe
Replace the single file-level serial config with a per-describe one (matching
the other two grid specs) so a failure in one block no longer skips the rest and
independent blocks can run in parallel.
* docs: document createRowLifecycleContext and clarify escape wording
- Add a docstring to createRowLifecycleContext.
- Reword the Deferred/Escape note in the grid view test plan.
* fix(e2e): return created rows from createRows helper
setupGrid expected createRows to return the created rows to collect their
ids, but the helper returned void and discarded the batch-create response,
so created.map() threw 'Cannot read properties of undefined' and every
grid_interaction spec failed deterministically. Return response.data.items.
* revert publicView changes