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(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: 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>
* 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