Commit Graph
60 Commits
Author SHA1 Message Date
Jonathan Adelineandpeter_baserow a26c5ce6b0 feat: filter dashboard widgets by date or date range (#6954)
* fix: handle calendar boundaries in date comparisons

* feat: add a single-date filter to the dashboard API

* feat: send the viewer timezone with dashboard data requests

* refactor: share dashboard filter controls and target settings

* feat: configure dashboard filter conditions on date fields

* feat: add the Date filter to the dashboard widget picker

Implement the single-date mode of #6886.

* fix: restore dragging dashboard filters by their titles

* feat: persist the dashboard date filter display format

* feat: choose how dashboard filter dates are displayed

* test: align numeric filter checks with shared dashboard controls

* style: format the dashboard date filter component test

* fix: accept fixed UTC offsets in dashboard date filters

* fix: expose dashboard filter dates as ISO strings in formulas

* fix: seed dashboard conditions with compatible operators

* feat: expose date ranges in dashboard formulas and viewer selections

* feat: configure inclusive date range conditions for dashboard targets

* feat: persist and dispatch inclusive dashboard date ranges

* docs: describe date range selections in the dashboard dispatch API

* feat: select and configure dashboard date ranges

* fix: let viewers clear each dashboard date range endpoint

* fix: preserve unfinished dashboard date range bounds on refresh

* fix: refresh public dashboards after a date filter mode change

* test: group dashboard date filter mode transitions

* fix: warn about incompatible date range formula operands

* fix: convert dashboard date defaults from the saved widget

* fix: keep dashboard filter controls aligned when a condition has a warning

* fix: clear incompatible dashboard conditions when switching date modes

* fix: show cleared date conditions without warnings or redundant saves

* fix: ignore empty dashboard date conditions after switching modes

* fix: ignore dashboard date conditions without a single date and simplify mode switch clearing

---------

Co-authored-by: peter_baserow <peter@baserow.io>
2026-12-03 20:40:18 +04:00
Peter Evans 557135532c chore: call workspace applications builders and name the builder role (#6948)
* chore: call workspace applications builders and name the builder role in English copy

* chore: say who can configure a builder instead of naming the builder role next to it

* test: expect the reworded Slack bot warning

* chore: name roles the same way everywhere and say builder in snapshot errors
2026-12-02 08:55:45 +00:00
Peter EvansandJeremie Pardou e4b9a2615b feat: add a shared base for integrations that connect an account through OAuth (#6810)
* feat: add a shared base for integrations that connect an account through OAuth

* fix: keep OAuth account scopes current and bound provider answers

* fix: share parent registration between form APIs

* fix: preserve refreshed OAuth tokens when actions fail

* refactor: use absolute imports for parent OAuth modules

* refactor: decouple OAuth cleanup from application publication models

* refactor: use common import hooks for OAuth connections

* fix: keep OAuth account integrations out of the workspace

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-30 08:55:52 +00:00
Peter Evans b84390b9ca feat: add an Add identity button to the Local Baserow Authenticate as dropdown (#6906) 2026-11-30 08:51:01 +00:00
Peter Evans 19e7bcc696 fix: invitation link password dialog, snapshot icon, unauthorized integrations and link cookie (#6907) 2026-11-30 08:08:57 +00:00
Peter Evans c772afdb22 feat: show application integrations in one grouped table (#6901)
* feat: show application integrations in one grouped table

* feat: show application integrations in one grouped table

* test: open the integration menu to promote in the automation settings spec

* refactor: share one integration row between both integrations tables
2026-11-27 15:39:11 +00:00
Tsering PaljorandJeremie Pardou 250748c8dc feat: Workspace level integrations (#6547)
* Add ADR-013 for workspace level integrations

* Add implementation

* Improve context section and remove technical points

* Move bulk replacement point to v2

* Remove workspace-level ownership on import since manual promotion should handle this.

* Add a glossary section

* Do Lazy creation + Celery migration

* Remove demotion

* Tighten the Options considered section

* Add Decision describing where the integrations are managed

* Update implementation plan after changes to ADR

* Sync plan and adr

* Rename adr and implementation

* Add the shared application that owns workspace integrations

* Create the shared application of every workspace

* Let only workspace admins manage workspace integrations

* Let applications use the integrations of their workspace.

* Trash workspace integrations in their workspace.

* Copy workspace integrations into exports and keep them in duplicates.

* Workspace admins can share integrations with every application in the workspace.

* Load the shared application of each workspace in the frontend and keep it out of application lists.

* Manage workspace integrations from an Integrations page in workspace settings.

* Offer workspace integrations in the integration dropdowns of every application.

* Move promoted integrations to the workspace list in other open tabs.

* Let admins make an app's integration available to the whole workspace from its integration settings.

* Preselect a workspace integration for new nodes and data sources when the app has none of its own.

* fix tests

* Delete implementation file

* More fixes after rebase

* Fix tests

* Let builders of an application see and use the workspace integrations from it.

* Show the workspace integrations, read-only, in the integration settings of applications.

* Keep a dashboard's integration out of promotion to the workspace.

* Leave the shared applications out of the admin dashboard's application count.

* Create the shared application of the workspaces made by the fill commands.

* Say in the promotion modal that an integration nobody authorized will run as the promoting admin.

* Say in the promotion modal that undoing it won't make the integration run as the previous person again.

* Ignore integration ids in sample data when publishing copies the workspace integrations an app uses.

* Let only undoing a promotion move an integration out of the workspace.

* Let the shared application backfill stop itself after 5 minutes and skip workspaces another transaction has locked.

* Say in the workspace integrations settings that published applications and workflows keep their own copy until they're published again.

* Leave the shared application out of the assistant evals' application counts.

* Refresh the workspace integrations when the Builder's data, events, users and integrations panels open.

* Say that anything new using a promoted integration blocks undoing the promotion, even from its own application.

* Warn when a database button sends through a workspace integration with no host or token.

* Refuse roles and invitations on the shared application.

* Fix tests

* Show an application only the workspace integrations of types it can use.

* Say in the promotion modal what builders of other applications can do as the integration.

* Leave the shared application type out of the API docs for creating and updating applications.

* Check who receives a workspace integration event in one permission call.

* Say which workspaces have a shared application and who creates it.

* Let a redone promotion record what uses the integration again.

* Update docstrings

* Stop template visitors from listing the integrations of the template's workspace.

* Let database buttons find their own copy of a workspace integration after an import.

* Say what holds the workspace row lock while a shared application is created.

* Fix tests

* Stop the workspace integration form component from being made reactive.

* Make test runs use a new copy of the workflow after an integration it uses changes.

* Hide the Members settings tab from members who can't list the workspace members.

* Add changelog

* Fix migration conflict

* Fix migration conflict

* Fix test

* Update comments and ADR number

* Link to the workspace integrations from the sidebar's Settings menu.

* fix: refresh agent action errors when workspace integrations change

* fix: move workspace integrations into workspace settings

* fix: use share icon for workspace integration promotion

* refactor: use explicit shared application relations

* feat: centralize default integration selection

* refactor: share integration change notifications

* refactor: prepare integration mappings before import

* refactor: collect integration references during export

* refactor: prepare integration ownership changes without a new hook

* test: restore registered service model after mocking

* test: cover shared integration defaults in Builder

* test: include Slack in Agent workspace integration choices

* Fix migrations

* Stop template visitors from listing the workspace integrations through an application of the template.

* Only offer integrations of the user source's integration type when updating a user source.

* Say the workspace integration copy means published Application Builder apps and automation workflows.

* Use the same spacing under both integration settings sections and enlarge their headings.

* Keep the shared application out of automatic snapshot schedules.

* Fix test after rebase

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-27 15:49:32 +04:00
Peter Evans cba704e8b7 feat: redesign the refinement popovers in the automation and dashboard sidebars (#6858) 2026-11-26 15:32:22 +00:00
Davide SilvestriandBram Wiepjes 68139d057c feat(agent): add semantic search as an agent action (#6814)
* feat(agent): add semantic search as an agent action

An agent's builder can add the enterprise semantic search service as an
action: the model supplies the query, the builder picks the Local Baserow
integration, table and fields. The search runs with the integration's
authority.

An action type now says whether it changes data. A type that only reads
starts with Ask first off and is never held behind another held call.

Every registered action type is offered, also when the workspace's license
locks it. A locked type shows the upgrade modal instead of being added, and
a locked action can only be renamed, switched or deleted until its type is
usable again. The model never gets a locked action.

* Fixed some bugs

* Run action with workspace identity

* fix(agent): keep a search match whose files or links don't fit

A row whose non-text values took more than the space left could not be cut,
so the result lost it and every row after it. Values that don't fit are now
cut to "…" like texts, so the best match is still read.

* test(agent): cover the semantic search card acting as the run identity

The spec still expected the removed integration picker. It now checks the
form gets the tables the run identity can read, the link to set up workspace
access without one, and the reload when the identity changes.

* fix(agent): don't offer action inputs in search filters

A filter is resolved when the call is sent, without the call's inputs, so
picking an input there only produced a configuration error. A host can now
narrow what filter values read, and the action card offers them none.

* refactor(agent): name the workspace check of an action type is_usable

available_action_types now lists the locked types too, so is_available named
the opposite of what it returned for them.

* refactor(agent): one limit on what the model reads of an action result

HTTP request and semantic search each defined the same 20,000 characters.

* refactor(agent): drop what the integration picker of actions needed

No action wraps its form anymore and Agents no longer hold Local Baserow
integrations, so the presenter hook and the test changes for them go.

* docs(agent): actions on Baserow data act as the Run as identity

State the rule for every action whose service reads or changes Baserow data:
no integration to pick, permissions on the identity alone. Actions on other
services keep their integration. Drop the integration and form wrapper parts
that no longer hold, and say how to bound a result.

* fix(agent): log why a tool or run failed in debug mode

Tool, preview, step, web fetch, trigger message, MCP and chat run failures
logged only the exception class, so a failed semantic search showed nothing
but its name. They now share the reply's helper, which adds the exception
text in debug mode.

---------

Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
2026-11-24 19:37:22 +00:00
Peter EvansandJeremie Pardou c152a16f92 feat: let Kuma create, change and remove data source filters from the filter form, the chat and MCP (#6544)
* feat: let Kuma create, change and remove data source filters from the filter form, the chat and MCP

* fix: allow earlier data sources in Kuma builder filters

* refactor: share targeted Kuma action endpoint

* refactor: derive service filter validation from filter types

* fix: reuse shared boolean values in service filters

* refactor: expose filter deprecation on backend types

* refactor: delegate formula examples to application types

* fix: allow Kuma to edit summary widget filters

* test: include summary widgets in filter tool contract

* fix: allow dashboard service filter groups

* test: allow dashboard filter groups in assistant prompts

* feat: enable inline Kuma for summary widget filters

* test: initialize roles for transactional synced table copies

* fix: reject table changes during Kuma filter generation

* fix: reject current node formulas in service filters

* perf: batch filterable data source discovery

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-11-24 18:08:58 +00:00
216d724aa3 Add dashboard text filter widgets (#6572)
* feat: add dashboard input filters and connected widget filtering

* style(dashboard): refine filter widget layout and resize handles

* fix: hide optional labels in dashboard filter settings

* feat(dashboard): resolve dropdown filter values from formulas

* feat(dashboard): add input and dropdown filter settings with cached options

* style(dashboard): use segmented control for filter type

* style(dashboard): remove separator above filter type

* style(dashboard): align filter settings field spacing

* feat(dashboard): support list-valued dropdown filters

* feat(dashboard): add single and multiple selection controls

* feat(ui): allow item cards without an icon

* feat(dashboard): simplify filter target configuration

* fix(ui): position floating dropdowns around their trigger

* feat(dashboard): simplify widget filter condition editing

* style(dashboard): streamline filter sidebar settings

* style(dashboard): clarify filter action buttons and spacing

* test(dashboard): align widget fixture with card rendering

* chore(changelog): document dashboard filters

* fix: preserve dashboard filter links across trash and restore

* fix: merge pending dashboard widget saves and settle all callers

* fix: match individual values in dashboard multi-select filters

* style: refine dashboard clear selection button

* feat: show dashboard filter cases as tabs with condition counts

* fix: limit dashboard refresh waits to dependent widget saves

* refactor: share the builder and dashboard item picker

* style: improve the dashboard text filter illustration

* feat: show inherited dashboard filters in widget refinements

* test: include table schemas in dashboard source responses

* fix: defer builder element availability checks until picker opens

* test: use shared item picker selectors in end-to-end tests

* feat: show Select actions for dashboard filter option fields

* feat: choose dashboard filter defaults from available options

Reuse cached options for single and multiple default selections and place the default picker below Filter values. Store multiple defaults as JSON lists while preserving existing string defaults.

* fix: clear dashboard filter defaults when options change

Save the new options and cleared default together so undo restores both. Ignore unchanged formula values and leave option refreshes unaffected.

* fix: persist filter defaults when switching selection modes

* fix: normalize dashboard filter defaults at the write boundary

* fix: preserve active filter selections when switching modes

* fix: remove unavailable dashboard filter defaults

* fix: reconcile filter defaults when dashboard options load

* fix: roll back filter selections independently of other widget saves

* fix: preserve explicit filter selections during failed saves

* fix: align dashboard filter input and dropdown dimensions

* feat: indicate when dashboard widget results are filtered

* feat: toggle dashboard filters for individual widgets

* feat: confirm and reset widget filters when changing tables

* fix: use source context data for dashboard filter options

* refactor: resolve dashboard filter options in the frontend

* refactor: organize dashboard filter providers and lifecycle hooks

* test: align dashboard context schema expectations

* fix: accept formula validation context in dashboard providers

* refactor: share dashboard update hooks and table selection

* refactor: configure nested dashboard formulas with shared field

* test: use grouped table selector in button field workflows

* refactor: validate dashboard runtime data through providers

* refactor: share formula property extraction across dashboard and builder

* refactor: delegate filter status to service types

* refactor: simplify dashboard restoration hooks and request cache

* perf: cache dashboard property extraction per widget

* refactor: resolve dashboard runtime filters through widget hooks

* refactor: rely on request transactions for dashboard source updates

* perf: share dashboard widget lookups and validation per request

* refactor: resolve dashboard context sources through handler

* refactor: validate dispatch data through every provider

* refactor: extract dashboard properties using source handler

* refactor: validate dashboard source ownership when saving formulas

* refactor: apply dashboard filters as additional AND groups

* refactor: store dashboard widget filters in relational models

* refactor: share grouped filter conversion and persistence

* refactor: delegate empty summary values to aggregation types

* refactor: place dashboard settings separators in data forms

* refactor: defer dashboard source formula imports

* fix: expose table field options for all data source types

* fix: scope dashboard cache signals to dashboard models

* feat: support option labels in selection filters

* fix: preserve summary widget spacing in edit mode

* test: preserve selection labels during filter imports

* fix: harden dashboard filters on public dashboards and select label view filters

* fix: keep dashboard filter imports, settings and stored links consistent

* fix: accept stale multi-value selections and validate inactive dashboard filter conditions

* feat: gate dashboard filter creation behind a feature flag

* feat: default dashboard filter conditions to their widget value

* fix: explain when the formula data explorer is empty

* test: use grouped table selector for agent triggers

---------

Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
Co-authored-by: peter_baserow <peter@baserow.io>
2026-11-18 15:22:53 +00:00
Davide Silvestri 5169076065 feat: introduce User-backed workspace identities (#6556)
* 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.
2026-11-18 08:44:31 +00:00
Davide Silvestri d21801281f feat(agent): trigger agents when rows are created, updated or deleted (#6695)
* feat(agent): trigger agents when rows are created, updated or deleted

* test(agent): find the trigger picker by the class it now has

The trigger picker renders the shared service picker since the send
email actions, so its menu is under .agent-service-picker.

* fix(agent): check a trigger's access again before its conversation starts

The task that starts a firing's conversation trusted the access check made
when the event happened. A run identity removed, trashed or without access
by the time the task ran still got a conversation with the event's rows.

* fix(agent): apply the row trigger review fixes

- A type change moves an overlap rule left at the old type's default to
  the new type's default.
- Queued replies wait while the run identity can't read what the trigger
  watches.
- An imported formula is kept as written when no path is remapped,
  through one import_formula in core.
- Row events hand their listeners services holding the event's table.
- Trigger form choices no longer read the workspace's views.
- A first row too long for a message is cut short instead of left out.
- A no-access error for a type the card no longer shows is ignored.
- The dispatcher no longer clamps the batch size.

* fix(agent): keep the merged trigger behaviour and UI for row triggers

- Skipping stays the default overlap rule: only the row trigger types say
  their events can't be skipped, so HTTP and periodic triggers start as
  they did before.
- The workspace-access note is a plain alert and the batch size field is
  spaced like the hosted forms, without style overrides.
- The type-change and queued-firing tests are develop's again, with the
  row trigger tests added after them.
- ADR 014 names the hooks row triggers add to the shared service type.

* fix(agent): show a row trigger without workspace access as misconfigured

The trigger can't run until the agent has workspace access, so its card
gets the error icon with a tooltip and the database field shows the error,
instead of an info note.
2026-11-17 23:42:51 +01:00
Davide Silvestri b566941058 feat(agent): start runs from HTTP webhooks (#6737)
* feat(agent): start runs from HTTP webhooks

* fix(agent): address HTTP trigger review feedback

- Add opt-in agent trigger types that adapt a shared trigger type
- HTTP: exclude GET by default and drop the workflow response settings
- HTTP: raw body is the default message and the text of an unset one
- A message with no text says when the trigger fired, not the payload
- Forms take hiddenFormFields from their host
- Trigger cards collapse and no longer resize while saving
- Keep the HTTP trigger uid out of exports without sensitive data

* feat(agent): make trigger and action card headers consistent

- Chevron on the left of action cards, as on trigger cards
- "Enabled" label above the switches, on the Expand all line
- Switch tooltip says the state and what a click does
- No divider under an action card's name
2026-11-17 17:14:52 +01:00
Peter Evans eaf6971633 fix: exclude personal views from the Local Baserow integration (#6724)
* fix: exclude personal views from the Local Baserow integration

* fix: let undo and redo restore a view that has become personal
2026-11-17 14:13:25 +00:00
Davide Silvestri 3460fd301f feat(agent): change a trigger's type and name row trigger services (#6704)
* feat(agent): let a trigger change its type

* feat(integrations): name row trigger services after their table

* feat(agent): change a trigger's type from its card

* chore(agent): name a read-only trigger's type box after its type

* fix(agent): keep trigger type changes consistent

* fix(agent): keep trigger validation and type changes consistent
2026-11-16 16:54:31 +01:00
Davide Silvestri 26ff58a3d9 feat(agent): let agents send emails through configured actions (#6720)
* feat(agent): add configurable send email actions

* fix(agent): send what an action call showed and harden actions

Review fixes for the send email action.

- Resolve an action call's formulas once and carry the values from the
  held call to its dispatch, so the approved preview is exactly what is
  sent. DispatchContext.resolved_values lets a dispatch skip resolving
  the formulas of that service again.
- Deny an approved call when its integration changed, or when it comes
  back without the values its approver read.
- Let the AgentActionType base own configuration checks, preview and
  dispatch. A type only supplies its defaults and readable values.
- Reserve the mcp<number>_ names of connected app tools, and accept any
  valid input name, run_ctx included.
- Keep whole numbers whole in Number inputs.
- Add BASEROW_AGENT_MAX_ACTIONS_PER_AGENT, unset by default, and load an
  agent's actions in a constant number of queries.
- Order and label an action's fields from its presenter in the step
  card and in configuration errors.
- Replace the plan with docs/development/agent-actions.md.

* fix(agent): show what a saved action returns and drop undone errors

- A debounced save updated a copy the action card doesn't render, so the
  configuration errors the server found never showed. Save through the
  object the list renders.
- Clear a rejected edit's error once the edit is undone.
- Word the action limit so it also reads well with a limit of one.

* test(database): update decorator tooltip snapshots for edge-aware tooltips

The tooltip directive now keeps top and bottom tooltips inside the
viewport and positions their arrow, which changes the inline style the
two decorator tooltip snapshots record.

* fix(agent): mark an action formula with a refused argument as invalid

A function's argument check raises Django's ValidationError, which the
readiness check let through. A formula like minus('abc', 1), stored by
an import, then failed the action list, the configuration and every
reply instead of showing the action as misconfigured.

* fix(agent): start an email action on the instance server only if it delivers

The starter asked the looser question the builder and automations use,
while the readiness check asks whether a message is delivered. With a
backend that only prints, a new action opened on the instance server
and was unavailable straight away.

* fix(agent): name a deleted action in the trash

* fix(agent): read a negative agent limit as no limit

A limit of -1 was kept as a limit, so nothing could be added: no action
with BASEROW_AGENT_MAX_ACTIONS_PER_AGENT, no reply with
BASEROW_AGENT_MAX_ACTIVE_RUNS_PER_WORKSPACE. Both now treat 0 or less
as no limit, like the trigger caps.

* feat(agent): ask first by default before an action runs

A new action sent as soon as it was added, so anyone chatting with the
agent could have it email any address. Built-in tools that change data
and MCP tools already start with Ask first on; every action now does
too, at the model level so the next action types inherit it.

* fix(agent): tell the approver's own session when "Always allow" applies

Approving with "Always allow" turned Ask first off on the server, but
the realtime event skipped the approver's session as if it had edited
the action itself. The Actions card kept showing Ask first on while
emails went out. No session made this edit, so every session is told.

* fix(agent): show an action call in full to whoever approves it

The approval preview kept 10 recipients and 1,000 characters while the
call sent everything. An action's step now shows every value, never
shortened. Limiting what a call may send is left to a follow-up.

* fix(agent): apply every action event a reconnect replays

Action events all write to one slot of the agent, and the watcher only
saw the last value of a tick. A reconnect replays what it missed in one
loop, so an action another user created was lost when a later event
followed it. The watcher now runs on every write.

* fix(agent): reload the configuration when the agent gains or loses an action

Actions count as tools for web search, but nothing refetched the
configuration when one was added, switched, repaired or deleted, here
or by another user. On a model that can't search while it uses tools,
the web search setting stayed stale until a reload. The Actions section
now emits the reload other sections already use, only when the agent
gains its first callable action or loses its last.

* docs(agent): leave the limits of a call to its action type

What a call may send and what its preview shows is for each action type
to limit. Send email limits neither yet.

* fix(agent): mark a stored formula that can't be checked as invalid

A formula nested too deeply raised RecursionError in the readiness check,
so listing the actions, the configuration and every reply failed. Any
failure to check a formula now marks its field as invalid, as a stored
formula can make the parser or a function's own check raise anything.

* fix(agent): keep an approval when its integration is renamed or moved

The approval key digested the whole exported integration. Its name and
its place in the list don't change where a call is sent, and the place
of every integration can change when another one is added or moved.

* fix(core): keep the custom scrollbar in WebKit browsers

Since Chromium 121 the standard scrollbar properties replace the
::-webkit-scrollbar rules, so the rich text editor lost its 10px thumb.
The standard properties now only apply where those rules don't exist.
Stylelint is told that a mixin's body ends up inside a rule.

* chore(agent): name the collapse-all button after its block
2026-11-16 14:41:41 +00:00
Peter Evans de0083d963 feat: simplify the Slack integration setup with a prefilled app manifest link (#6723) 2026-11-16 10:28:15 +00:00
Davide Silvestri 4ad9b01319 feat(agent): set up agent triggers in When it runs (#6693)
* refactor(core): read service results and trigger timezones through the service type

* feat(agent): add named agent triggers with their API

* feat(integrations): name and describe periodic trigger services for any consumer

* feat(agent): configure triggers in the When it runs section

* docs(adr): record agent triggers and shared conversations

* fix(agent): save a trigger switch alone after a rejected save

* fix(agent): audit only trigger messages that change and translate trigger actions

* perf(agent): load trigger services in bulk when listing triggers

* fix(agent): resolve trigger dates in the trigger's timezone, drop the duplicate schema and unnamed trash names

* fix(agent): save each trigger field alone and show reverted service values in the form

* fix(agent): offer to add a trigger only once the trigger list has loaded

* fix(agent): stop nesting trigger service forms inside the configuration form

* refactor(builder): read data source and previous action results through the service type

* perf(agent): look up a trigger's type only when its service values change
2026-11-12 22:55:05 +00:00
Bram 3d9e37163e feat: [3/5] Semantic search action for automations and applications (#6451)
* Semantic search action for automations and applications

* Fixed feedback
2026-11-12 11:03:12 +01:00
Peter Evans 82f9a7f9d1 feat: add an HTTP request data source to the application builder (#6553)
* feat: add an HTTP request data source to the application builder
2026-11-12 09:36:00 +00:00
Davide Silvestriandpeter_baserow 2eec18d613 fix(integrations): keep a saved minute frequency when the periodic form loads (#6677)
* fix(integrations): keep a saved minute frequency when the periodic form loads

The interval watcher reset minute to the instance minimum whenever the
interval changed, including when the form loaded a saved every-N-minutes
schedule, so opening such a trigger saved it back at the minimum. The reset
now runs only when someone picks an interval.

* fix: save every periodic interval change and enforce the minute minimum on partial updates

---------

Co-authored-by: peter_baserow <peter@baserow.io>
2026-11-11 15:00:50 +00:00
Tsering Paljor 6d729c3b1d feat: Add Wait node (#6575)
* Add suspect and presume primitives for wait service.

* Add the Wait service and node that pauses a workflow.

* Ensure resume_at is returned in node history serializer

* Add the frontend Wait node and show waiting nodes in the workflow history.

* Add migrations for wait service and node

* On cancellation request, ensure waiting node is cancelled immediately

* Tolerate a deleted run history when the dispatch chain ends

* Ensure that lost wake-up tasks are recoverable

* Add changelog

* Fix test

* Cancel run of deleted workflow

* Mark the node as error when hourly sweep finds stale waiting node that is in a loop

* Show the iteration of a waiting node in the run history

* Stop counting waiting runs toward the unfinished runs rate limit

* Add tests that waiting runs finish after the workflow is switched off

* Merge migrations

* Update comment

* Disable node error policy for types that don't need it

* Simplify error message

* Remove the skipped status, as it isn't really useful

* create index concurrently
2026-11-10 15:31:28 +04:00
Peter Evans 73aa028b7b feat: group the Authenticate as picker into members and identities (#6577) 2026-11-05 11:43:42 +00:00
Peter Evans b95ccd0f8d feat: rename Agent to Identity in the interface (#6573)
* feat: rename Agent to Identity in the interface

* refactor: rename identity locale keys from agent to identity

* fix: show identity instead of agent when restoring an identity in the audit log
2026-11-05 11:18:53 +00:00
alamin-br 4bfe9dbb99 fix: don't return AI integration API keys in API responses (#6490)
* fix(backend): make AI integration provider API keys write-only

The integration API and websocket returned each provider api_key in plain text. An omitted key now keeps the stored one, unless another connection setting of that provider changes.

* fix(backend): compare only declared AI provider settings before keeping the key

A stored setting the serializer no longer accepts blocked every keyless edit. The rule is now shared with secret_field_dependencies, so an omitted target is not a change.

* fix(web-frontend): require the AI API key when it cannot be kept

A cleared key or a changed connection setting was submitted without the key, which the backend rejects or silently keeps the old key for.

* chore: add changelog entry
2026-10-27 08:49:24 +01:00
Jérémie Pardou 93eeb19dcb feat: run Local Baserow integrations as Agents (#6064)
* Run Local Baserow integrations as Agents

* fix tests

* feat(core): add reusable subject options endpoint

* Add beta badge

* fix(audit-log): require actor type with actor id

* fix(audit-log): avoid duplicate actor export columns

* fix(audit-log): guard deprecated actor fields

* Restore the feature flag

* fix tab alignement

* fix(integrations): reject trashed authorized agents

* Fix migration conflict

* fix(audit-log): assert structured validation error

* fix(database): support agent row deletion trash entries

* fix(database): support agent row notifications

* fix(core): enforce subject option permissions

* chore: fix formatting after rebase

* fix(core): include agents in member totals

* fix(database): batch row history actor migration

* fix(integrations): handle trashed authorized agents

* fix(core): remove untranslated subject labels

* chore: move nodes around

* test: mock integration registry in AI agent service tests

* fix: resolve database migration conflict

* Add changelog entry

* feat: use typed subjects for local Baserow integrations

* fix: make audit actor migration retry-safe

* fix: retain historical audit actors

* Please linting

* fix: use canonical local integration subjects

* fix: order listed workspaces

* fix: validate current user integration authorization

* fix: preserve integration authorization on update

* docs: clarify migration deployment compatibility

* fix: paginate local baserow agent selection

* fix: validate selectable subject options

* fix: preserve integration authorization on update

* fix: show saved integration user in subject dropdown

* fix(enterprise): protect team subject options

* fix(builder): redispatch data sources for trashed agents

* fix(database): split row history actor backfill

* fix(enterprise): require audit log actor type

* fix(enterprise): use audit log actor options

* fix(core): prevent blank agent names

* fix(integrations): resolve migration conflict

* fix(integrations): pass SMTP preparation context

* docs: clarify migration rollout guidance

* fix: handle trashed integration subjects

* fix: reuse local integration authorization column

* fix: allow unconfigured local integrations

* fix: only update changed integration values

* fix: cache local integration subjects

* fix: sort field permission subjects by name

* fix: include historical audit log actors

* fix: center grow tab labels

* chore: remove unused AI providers flag

* fix: support agent file uploads

* Please linter

* fix: initialize integration edit values

* fix: preserve integration authorization updates

* fix: bound audit log actor pagination

* fix: support legacy local integration fixtures
2026-10-19 10:38:57 +02:00
Tsering Paljor 410e545dc4 chore: Standardize Automation class names (#6356)
* 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
2026-10-16 13:52:31 +04:00
Tsering Paljor 4ff953ed43 feat: Add markdown_to_html() formula expression (#6366)
* Add markdown to HTML renderer for runtime formulas

* Add markdown_to_html formula function

* Add markdownToHtml renderer for runtime formulas

* Add markdown_to_html runtime formula to the frontend

* Add changelog

* Enable advanced mode for smtp service's body input
2026-10-15 15:33:52 +04:00
alamin-br 3e084aceb4 docs(adr): rewrite ADR 006 in the ADR template format (#6337)
* docs(adr): rewrite ADR 006 in the ADR template format

Folds the phase amendments into the main sections and trims the record to the decisions.

* docs: point ADR 006 references at the rewritten sections

Drops references to points the trimmed record no longer covers.

* docs(adr): drop implementation details from ADR 006

* docs(adr): state the unwritable-field rule in ADR 006

Comments cite it as section 4's stricter rule.

* docs(adr): apply review suggestions to ADR 006
2026-10-09 11:21:26 +02:00
Peter Evans b790a92d98 fix: support implicit SSL/TLS (port 465) in the SMTP integration (#6162) 2026-10-08 15:23:35 +00:00
Davide Silvestri fcaea7f1a1 feat(core): add Z.ai AI provider (#6209)
* feat(core): add Z.ai AI provider

Z.ai can be added as an instance or workspace AI provider with an API key.
It uses pydantic-ai's ZaiModel with a profile limited to the request fields
Z.ai documents: automatic tool choice, max_tokens, no strict tool definitions
and no file parts. AI fields send JPG/PNG images and small text files; the
temperature is capped at 1.

Part of #5753.

* fix(core): limit Z.ai thinking on short capped requests

Z.ai reasons at maximum effort by default, so a 250-token Kuma title or a
256-token model test could spend its whole budget reasoning and return
nothing. Requests capped at 1024 tokens or less now disable thinking, or
ask always-thinking models such as glm-5.3 for low effort, unless the
caller chose a level.
2026-09-30 12:18:46 +02:00
Peter Evans d2fece8cba Resolve core response getErrorMessage issue (#6216) 2026-09-30 08:34:18 +00:00
alamin-br f594e12c0f feat(database): button field - send email through an SMTP integration (#6208)
* feat(database): let a button email send through an SMTP integration

SaaS turns instance SMTP off, which left the email action unusable there.

* feat(database): flag a button email with nothing to send through

An email set to an unavailable instance server or a missing integration fails on every click.

* test(database): cover email actions carrying an SMTP integration through import

* feat(database): pick an SMTP integration for a button email

The backend now lets a button email send through an SMTP integration, so the form offers the dropdown and says when the instance cannot send.

* fix(database): let a stale instance email switch to an integration

With the instance choice hidden the saved true value stayed, so the integration was dropped by the backend.

* docs: record that button emails can use an SMTP integration

SaaS turns off instance SMTP, so the 4b revisit trigger fired.

* test(e2e): the button email form offers an SMTP integration

The form now matches the builder's instance/integration choice.

* fix(database): refresh open button editors when an integration is updated

A renamed or reconfigured integration left the editors of the buttons using it stale.

* fix(database): keep a button email's integration choice from blocking a save or a click

Switching to the instance failed when the old integration was trashed or unreadable. A trashed, missing or hostless integration only failed after earlier actions ran.

* fix(database): refuse button emails that cannot send and keep the chosen sender

A stored instance choice was lost on any save while instance SMTP was off, and a named integration was dropped where the instance only prints mail.
Clicks through an integration with no From or a non-public host are refused before anything runs.

* fix(database): stop the button email form from editing actions on open

The shared SMTP form rewrote a stored instance choice on mount, so opening an editor during an SMTP outage changed actions, and the builder and automations saved on view.
The form is back to develop's behaviour unless the button passes its new prop.

* chore: drop the changelog entry for button email integrations

The button field is not released yet, so its own changelog entry covers this.

* fix(database): let a button email's SMTP integration be edited

A database has no integrations page, so the dropdown is the only place to edit one, as with the Slack action.
2026-09-29 16:50:45 +00:00
Davide Silvestri 7b41023ab2 feat(core): add xAI AI provider (#6203)
Admins can add xAI as an instance or workspace AI provider with an API key.
It uses xAI's OpenAI-compatible Chat Completions API at https://api.x.ai/v1
through pydantic-ai's OpenAIChatModel and Grok profile, so no new dependency
is needed. Only the stored key is used: the provider never falls back to
XAI_API_KEY or OPENAI_* variables, and it clears the organization and project
headers the OpenAI SDK would otherwise fill from the environment.

AI fields embed JPEG and PNG images within a 20 MiB budget and inline small
text files. Chat Completions has no document input, so other files are
skipped.
2026-09-29 15:40:06 +02:00
Peter EvansandJonathan Adeline e214acfa6c chore: add immediate node store update argument. (#6178)
Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-09-29 14:12:15 +01:00
Jérémie Pardou 0813d11077 fix(automation): default JSON response bodies (#6182) 2026-09-29 14:17:23 +02:00
Davide Silvestri 8b51a71c1c feat(core): add Amazon Bedrock AI provider (#6192)
* feat(core): add Amazon Bedrock AI provider

Admins can add Amazon Bedrock as an instance or workspace AI provider with
an IAM access key or a Bedrock API key plus a region. The client only uses
the stored credentials: it forces its signature version so botocore never
prefers AWS_BEARER_TOKEN_BEDROCK, and ignores configured endpoint URLs so
the Helm chart's MinIO AWS_ENDPOINT_URL cannot redirect Bedrock traffic.

AI fields send images and documents as native Converse blocks within
Bedrock's per-kind limits, via a new EmbedKindLimit hook on FileHandler.

* fix(core): allow AI provider API keys up to 4096 characters

Short-term Amazon Bedrock API keys are presigned URLs of about 2,500
characters, so the 512-character limit rejected valid keys. The column only
widens (varchar(512) to varchar(4096)), which needs no table rewrite and
stays compatible with the previous app version.

* fix(core): do not send HTML files to Bedrock as documents

Uploads store HTML as application/octet-stream to neutralise active
content, which Bedrock Converse cannot map to a document block, so one
large HTML file failed the whole AI field cell. Large HTML files are now
skipped; small ones are still inlined as text like for every provider.

* test(core): pin Bedrock API key mode and newline key rejection

Assert that an API key client never resolves the default AWS credential
chain, and that the embedded-newline test fails on the api_key error
rather than on an unsupported provider type.
2026-09-29 11:52:15 +00:00
alamin-br 4a07ad00b3 fix(database): flag imported email buttons with no recipients (#6191)
* fix(database): flag imported email buttons with no recipients

A workspace export blanks email recipients, so imported buttons looked ready
and failed only when clicked.

* fix(integrations): treat whitespace-only email recipients as missing

Matches the backend's reconfigure check and the row id check.
2026-09-29 09:42:38 +00:00
Davide Silvestri 61a5d70dcc fix: make the OpenAI base URL optional in AI integration overrides (#6188)
The AI integration form marks every provider setting without `optional: true`
as required. The OpenAI base URL was added without that flag, so overriding
OpenAI in an integration has demanded a base URL since 2.0.0, even though its
own help text says an empty value uses the default OpenAI URL.

The backend already accepts a blank base URL and resolves it to the default
endpoint instead of inheriting the instance one. A new test pins that for the
exact payload the form submits.
2026-09-29 09:10:44 +02:00
Davide Silvestri 64c9fff85e feat [6/8]: prepare AI provider management for rollout (#6070)
* feat: retire AI provider flag and add rollout audit

* test: remove obsolete AI provider flag setup and docs

* chore: clean up AI provider configuration and tests

* feat: deprecate legacy AI provider environment configuration

* docs: explain AI provider migration sizing and timing

* docs: mark AI provider migration audit for removal

* docs: explain AI provider migration audit usage

* fix: log AI provider env deprecations after logging setup

log_ai_provider_env_deprecations() ran at the tail of _setup_health_checks(),
which ready() calls before setup_logging(). The notice went out through
loguru's default sink and missed BASEROW_BACKEND_LOG_LEVEL, the Baserow
format, and the OpenTelemetry log exporter, so operators shipping logs to a
collector never saw it.

Also drop two references the flag removal invalidated: the getEffectiveAIAgentModels
JSDoc still described filtering as conditional on the removed provider flag, and
the AI field architecture doc still pointed provider authors at the deleted
legacy workspace-setting hook. That doc now names BuiltInGenerativeAIModelType,
which is what grants an integration override model inheritance.

* fix: reuse environment AI settings in generation workers

* feat: import legacy AI provider settings on upgrade

Removing the ai-providers flag makes database-backed providers the default, which
would leave every existing installation on an empty AI providers page with a
management command as the only way to populate it. A data migration imports the
environment and each workspace's stored settings instead, so a standard upgrade
needs no commands.

Both scopes are imported in one migration. Legacy workspace settings replaced the
instance ones entirely, while database providers inherit, so each imported workspace
is also switched off the instance provider of the same type. Without that a workspace
would silently gain models billed to the instance account.

Settings that cannot fit their columns are skipped and logged rather than raising
DataError and rolling back the whole upgrade. The migration reverses as a no-op
because the previous version does not read these tables, so deleting rows would only
discard edits made during a rollback window.

migrate_ai_provider_settings stays as the recovery path and now shares its planning
logic with the migration, so both agree on which legacy settings are complete. It
deliberately does not switch workspaces off inherited providers, and warns instead.

* chore: remove the temporary AI provider audit command

audit_ai_provider_settings existed to inventory legacy configuration before a manual
import. The upgrade now imports automatically, so the command has no remaining step
to support. Removal was already tracked in #5749.

* docs: reduce AI provider docs to lasting behaviour

The upgrade procedure, rehearsal plan and sizing query described a one-time
transition and do not help anyone after the release; they live in the pull request
instead. What remains explains how providers work: the two scopes, how they combine,
the inheritance switch, what the deprecated environment variables still do, and how
integration overrides and published applications behave.

Also corrects claims that no longer hold: published applications keep materialised
credentials only when they were published before the upgrade, the import is no longer
optional, and a workspace-owned provider suppresses the environment fallback too.

* docs: shorten the AI provider changelog entries

Bullet points render as single list items under the entry. The released entries
average around twenty characters; these ran to four hundred, so the detail belongs
in the AI providers guide rather than the changelog.

* docs: clarify where imported AI credentials are stored

The previous wording implied Baserow's own exports carry provider credentials.
They do not: AIIntegrationType lists ai_settings as a sensitive field and
ImportExportConfig excludes those by default, and AIProviderConfig is not part of
any export path.

* docs: explain the AI provider upgrade and where to configure providers

State that the upgrade imports the BASEROW_* provider variables once and no longer
reads them, list the exceptions, and give the exact navigation for instance admins
(Admin tools -> AI providers) and workspace admins (workspace Settings -> AI
providers). Map each deprecated variable to the field that replaces it.

* fix: renumber the legacy AI provider import after 0121_agent

Develop's core 0121_agent and this branch's import migration both depended on
0120, leaving two leaf nodes, so migrate refused to run and the startup check and
E2E shards failed. The import is now 0122 and depends on 0121_agent.

* feat: remove the legacy workspace generative AI settings endpoint

GET/PATCH /api/workspaces/{id}/settings/generative-ai/ had no caller left, yet a
PATCH was still honoured for any provider type without a workspace provider and
never shown in the AI providers UI. Remove it with the handler parameter,
receivers and frontend handler that only it could trigger.

* fix: stop instance AI provider changes from fanning out per workspace

An instance-level change queued one Celery task per 25 workspaces behind a global
blocking lock, sent a payload to every connected user, and made the premium receiver
serialize every AI field on the instance. Instance changes now notify staff only;
other users see them after a reload. The render lock is per scope, and the in-use
guards no longer read one row per workspace.

* fix: keep inherited Kuma when a workspace switches off the instance provider

The upgrade switches imported workspaces off the same-type instance provider, which
made an inherited instance Kuma model invalid there, so Kuma fell back to the
deprecated env model or turned off. Inheriting the instance Kuma selection now
ignores workspace switch-offs; explicit workspace selections stay strict and are
the only ones that block a switch-off.

* fix: skip malformed Ollama URLs during AI provider migration

* fix: preserve skipped legacy AI provider connections

* test: cover independent legacy AI workspace connections

* fix: skip malformed legacy AI provider settings

* fix: move legacy AI import after current core migrations

The linear rebase omitted the migration renumbering from the previous merge commit, while develop advanced through core 0124. Rename the existing AI import to 0125, depend on 0124, and update its historical migration test so core has a single leaf.
2026-09-25 17:05:10 +02:00
Jérémie PardouandTsering Paljor e83d592353 feat: add response node (#5595)
Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-09-24 15:41:25 +02:00
Peter EvansandJeremie Pardou 620fcc9a56 feature: inbound email trigger (#5730)
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
2026-09-22 13:41:10 +01:00
alamin-br 8d389cd0e8 fix(database): Show when a button field needs reconfiguring (#6114)
* feat: report when a button's row action points at the trash

* fix: keep a row action's mapping on a trashed field across edits

* fix: update buttons in other tables when their target is trashed

* feat: disable a button cell that needs reconfiguring

* feat: flag a row action that writes to a trashed field

* docs: describe the button reconfigure state in ADR 006

* test: cover a button healing when its mapped field is restored

* test: keep failing-click tests clickable under the reconfigure state

Give "Broken" and "BrokenChain" a table-targeting action that fails at
dispatch instead of one with no table, so requires_reconfiguration
stays false and the original click/toast assertions still run.

* perf: look up a button's own services in the reconfigure check

The uncorrelated subqueries scanned every upsert row service in the
instance, which the builder and automations share.

* perf: load mapped fields in one query when saving and serializing mappings

Update responses and realtime payloads read each mapping's field for
`trashed`, and saving looked each field up separately.

* fix: let undo restore the values of a mapping on a trashed field

The kept mapping was skipped, so replaying the exported mappings left its
current value and enabled flag in place.

* perf: skip the button lookup when no service depends on a trashed item

Every table and application created, and every field trashed, joined all
button fields and their actions even when no service pointed at it.

* fix: only offer restoring the field to heal a trashed field mapping

A permanent delete is cleaned up later without a broadcast, so an open
page never learns the action works again.

* fix: show the full label of a grid button that needs reconfiguring

The tooltip span shrink-wrapped the button, so its 90% max width
resolved against the span and cut the label short.

* fix: put a button using a trashed integration in the reconfigure state

The dispatch refuses a service whose integration is in the trash, so the
button now says so up front and open grids update on trash and restore.

* fix: update open grids when emptying the trash heals a button

Permanently deleting a trashed field or integration ends the reconfigure
state without any broadcast, so the cell stayed disabled until a reload.

* docs: note trashed integrations and permanent deletion in ADR 006

* fix: count a missing integration a button action needs

Deleting a trashed Slack bot left the action with none and re-enabled a
button that still fails. Also skips integrations outside a database, keeps
service lookups as subqueries, and stops a failed deletion leaking state.

* docs: note a missing required integration in ADR 006

* test: wait for a button field save to finish before moving on

The save sends the field update and each action call in sequence. A test
that navigated right after clicking Save could cancel the order call, so the
Stale button kept its old order and never navigated.

* fix: replace a row action's mappings with exactly what the payload sends

Keeping trashed mappings the payload left out stopped undo from removing them
and made undo raise on a mapping it had removed. The editor now sends them back.

* fix: leave the reconfigure flag out when the field refresh after a save fails

The mount-time value was written over whatever a broadcast had set since.

* fix: update buttons mapping a link field to a table that is trashed

Trashing a table trashes the link fields to it in other tables without a field_deleted signal.

* perf: send the buttons of a table in one message with their flags annotated

Every field_updated refreshes the grid, and an unannotated button cost queries of its own.

* fix: put a button whose target table is in a trashed workspace in the reconfigure state

An action can target a table in another workspace, and the dispatch refuses one whose workspace is trashed.

* fix: leave the buttons of a new table or database out of its broadcast

Duplication, template installs and imports send the created signals too, and nobody has the copy open.

* perf: pair each button service lookup only with the actions it backs

Also stop the early check deduplicating its UNION, and test that permanently deleting a builder integration never looks up buttons.

* fix: name each action that needs reconfiguring in the button editor

The field flag is now whether any action has the per-action flag, so the
editor can point at a trashed table, database or integration too.

* fix: keep the button flags out of the cached table model

They depend on other tables, so a model cached for the button's table served
them stale. They are now annotated only where fields are fetched to serialize.

* test: make the shared grid view private again after the public view test

A public view hides a field created in it until its editor closes, so the
retry test that runs later never saw its column.

* fix: update buttons mapping a link field to a table deleted from the trash

Deleting the table deletes the link fields to it and their mappings, with no signal of their own.

* fix: send a restored workspace's dependent buttons once and leave its own out

The once-per-restore check now keys the waiting on-commit callback by workspace id instead of relying on a shared Workspace instance.

* perf: leave a button's action state out of a service's table schema

The grouped aggregate rebuilds that schema uncached per property, and each
flag now cost a query per button. Nothing reads them from the schema.

* refactor: read an action's reconfigure flag straight from its definition

* fix: update buttons mapping a link field whose related field is purged

Emptying the trash for a link field also deletes its related field and that
field's mappings, which left buttons mapping it disabled until reload.

* fix: drop a mapping whose field was deleted from the trash on save

An open editor or an undo still sends the purged field's id, so every save
failed until reload. Fields that still exist elsewhere are still refused.

* fix: match no button for a lookup with no action model

An empty model list left the action filter empty, which matched every action
and would have sent every button in the instance.

* test: describe mappings replaced by the payload after a table change

The table change test sent no mappings, so it did not show a new table's
mapping replacing the old table's trashed one.

* fix: name a button action's trashed table instead of its fields

Trashing a table marks all its fields trashed, so the editor asked to restore a
field that only restoring the table brings back. The 404 from the fields fetch
now marks the table missing, and the action says so rather than a toast.

* fix: drop a mapping on another workspace's field instead of refusing it

Refusing it told the editor that the field exists.

* perf: send a button's state on its own realtime message

A `field_updated` makes the client refetch the whole grid, which for a flag
that says nothing about the rows throws away what someone is typing. The
signal also gives the enterprise restricted views a place to mirror from.

* fix: update buttons when a workspace is purged without being trashed

`delete_expired_users` and the admin panel delete a workspace outright, so
the `workspace_deleted` that would have flagged the buttons pointing into it
never goes out. A snapshot's application expires the same way.

* fix: flag an update row action that names no row

Every click on it is refused, so to the person clicking it is no different
to a target in the trash, but the button stayed enabled.

* fix: clear the server's reconfigure verdict when an action is edited

It describes the action as it was read, so the warning stayed up after a fix
until the save landed. Changing the type already dropped it by rebuilding.

* docs: name every cause of the button reconfigure state

The field and action descriptions each left one out, so they disagreed with
ADR 006 and with each other.

* test: expect the rowless button to render disabled

The server now flags an update row action with no row id, so the click the test made never lands.

* perf: serialize button fields once for all restricted views

Each serialization runs the reconfigure and action queries, which repeated for every view.

* perf: skip purged buttons and merge purge broadcasts

Buttons deleted with their container were collected for nothing, and a workspace purge
also purges its tables, so one button could be sent twice.

* fix: bump the global cache version

The button field schema dropped its action state, and cached schemas would keep the old shape.

* fix: keep the reconfigure verdict while the integration is unchanged

A trashed integration is missing from the list, so the verdict is the only warning.
2026-09-21 14:29:18 +02:00
Jérémie PardouandTsering Paljor 1874ac19f4 feat: port grouped aggregations data source to builder (#5546)
Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-09-17 07:41:59 +00:00
alamin-br 13aac9a693 fix: require a row ID on update row actions (#6079)
* fix: require a row ID on update row actions

The upsert row service creates a row when the row ID is empty, so an update
action left without one silently created rows in builder, automation and
button field actions.

* test: e2e for an update row action without a row ID

Covers the editor warning, the refused click and the unchanged rows through the real grid.

* fix: refuse update row actions without a row ID before they run

A button now checks every action up front, so earlier actions don't run ahead of a doomed update.
The assistant rejects blank row IDs, and the tests pin the exact error.

* chore: drop the duplicate bug changelog entry for #5934

The breaking change entry already covers it.

* fix: refuse whitespace-only row IDs on update row actions

Addresses review on #6079: trim the row ID on both ends, declare the
misconfiguration hook on every action and node base, and require a type
in the e2e row action fixture.
2026-09-16 17:11:27 +02:00
alamin-br 5275ede481 fix: make SMTP and Slack integration credentials write-only (#6072)
* fix: make integration credentials write-only in the API

The SMTP password and Slack bot token were returned in plain text by the
integration API and broadcast to every collaborator over the websocket.

* fix: record integration config changes in the undo log

The exclude list used sensitive_fields, which for SMTP covers every field,
so undoing an SMTP integration update restored nothing.

* fix: require the SMTP password when the connection target changes

Keeping the stored password while changing host, port or use_tls let a
user redirect it to a server of their choosing, or downgrade the
connection so it crossed the wire in the clear.

* fix: refresh integration state from the update response

The has_password and has_token flags are derived server side and nothing
else refreshes them for the user who made the change.

* feat: keep the saved SMTP password when it is not retyped

The API no longer returns the password, so the form must distinguish an
untouched field from a deliberate clear.

* feat: keep the saved Slack bot token when it is not retyped

Also mask the input, which rendered a bearer credential in plain text.

* feat: explain why an integration credential must be re-entered

* chore: add changelog entry for write-only integration secrets

* test: cover write-only integration secrets end to end

Unit tests on either side cannot see the seam between the form omitting an
untouched credential and the backend reading an omitted one as keep.

* fix: correct Slack integration copy and defaults for write-only tokens

The summary read the token itself, so a configured bot showed as not
configured, and the create warning told users the token could be read
back through the API.

* fix: keep every sensitive field out of the integration action log

Narrowing the exclude list put the SMTP host into a replayable log while
the credential stayed out, so a recorded target change could be replayed
onto a password supplied later by someone else. It also wrote the AI
integration's provider API keys into the action and audit logs.

* fix: keep integration secrets required when there is nothing to keep

Making every secret optional so an update need not retype it also made the
Slack token optional on create, where no stored value can be kept.

* fix: never use the instance SMTP account for an integration

Django's SMTP backend replaces a None username or password with the instance's own.

* fix: read has_token when checking a Slack bot in button field actions

* fix: list writable credentials in the integration request schemas

Also keep the blank error code for an empty token on create.

* docs: correct integration secret comments and changelog

* style: format button field action list spec

* fix: validate integration updates as partial

Keeps secrets required on create so the schema matches the server, and
drops the None stripping and view-level secret check it made redundant.

* docs: cross-reference the two secret_field_dependencies

* docs: describe the write-only contract of integration secrets

The copy stops a base serializer's extra_kwargs leaking into the type's
shared dict, which made name optional on the create serializer.

* docs: move integration secret reasoning into docstrings

* fix: name the credential generically in the retype message

* test: select the SMTP password input by type

* test: expect the credential wording in the retype e2e

* fix: document integration updates as partial

The update validates with partial=True, but its per-type schema components
still listed token and host as required.

* fix: let undo restore non-credential SMTP settings

Only secrets and the targets they protect stay out of the action log, so an
SMTP username change can be undone. Types without secrets still exclude every
sensitive field.

* docs: point sensitive_fields readers to secret_fields

sensitive_fields does not hide a field from API responses, so new
integration credentials need secret_fields too.
2026-09-14 16:07:05 +02:00
Davide Silvestri 581917f842 feat [5/8]: use database-backed providers for AI Agent services (#5976)
* feat: register ai_agent AI provider model feature type

* feat: expose integration-only AI provider settings lookup

* feat: validate AI agent models against the ai_agent provider feature

* feat: resolve AI agent dispatch settings from database-backed providers

* feat: list database-backed AI providers in the AI agent node form

* chore: add changelog entry for ai agent database-backed providers

* fix: close dispatch feature-gate bypass for partial AI integration settings

An integration-level ai_settings blob that omits credentials (e.g. only
a models list) skipped the ai_agent feature membership check at dispatch,
letting a restricted model run on the admin's DB credentials. Only a
complete blob (its own connection) now bypasses the check; a partial one
is validated the same way prepare_values already does.

Also share one ScopedAIProviderState across the publish materialization
loop instead of reloading it per model, and fully annotate
AIAgentAIProviderModelFeatureType.get_workspace_availability.

* fix: harden AI agent provider resolution

* fix: preserve AI agent model inheritance during provider migration

* fix: harden AI agent provider validation and document contracts

* refactor: declare built-in AI provider types on the type itself

The AI Agent model resolver duplicated the backend AI_PROVIDER_TYPES keys
in a frontend Set, so a provider added there without updating the Set
would silently lose model inheritance. Provider types now report it
through isBuiltInProviderType(), inherited from
BuiltInGenerativeAIModelType, with a test asserting every registered
provider declares it.
2026-09-14 10:10:20 +02:00
Jérémie Pardou 8471137a23 feat: allow raw formula mode in any formula fields (#5643)
* Allow raw formula mode

* Fix formula mode toggle

* Ignore formulas that are already in raw mode

* Simplify filter normalisation
2026-09-09 15:11:19 +02:00
Peter Evans 00dc3ad544 feature: introduce further undo/redo support in builder (#5691) 2026-09-08 13:55:09 +01:00