Commit Graph
11 Commits
Author SHA1 Message Date
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
Davide Silvestri 2659033445 feat(agent): website widget channel (#6884)
* feat(agent): serve a website widget channel and its embed script

A website widget is a public chat a website opens in a panel from a
button. Its model extends the public chat's with the button's text and
corner and never has a password. GET /api/agent/public-chat/<slug>/widget.js
returns the button's script with the widget's settings written in,
cached for five minutes. ADR 016 records the decision.

* feat(agent): add website widgets in the Channels section

Channel types now come from a frontend registry: "Add channel" opens a
menu of them and each card shows its type's form. The website widget's
form has the embed code and the button's text and corner, and shares the
title, welcome text and appearance with the public chat. Embedded in the
widget's panel, the chat page fills it with its background, keeps text
readable on a dark one, and asks the widget to close on Escape.

* fix(agent): copy only a channel type's own settings

Export and import copied the public chat's appearance fields for every
public chat type, so an imported widget kept a background it can't show
or change. Each type now lists its appearance fields once, and copies use
that list; the password follows the same rule. The widget's chat URL is
built with get_embedded_share_url, so a share URL ending in / works.

* test(agent): run the widget script on another website

An e2e test embeds the widget on a page from another origin, with markup
as the button text and title, and checks both show as text and the chat
opens in the panel.

* fix(agent): backend default button text, focus the channel menu, keep widget names visible

A new widget gets its button text from the backend only, as one created
through the API does. "Add channel" moves focus into its menu like the
other menus, and a card's type label gives its space up before the name.
A test covers choosing Automatic to clear a colour.

* fix(agent): visible hover without an accent, no suggestions while a message is locked

Without an accent colour the chat's buttons darken on hover as the
member chat's do, and custom accents get the stronger hover again. The
member chat hides suggested messages while the message box is read-only
for a pending or failed send, since a click couldn't change it.

* test(agent): serve the widget test's website on loopback

CI's Chrome blocks a public page's scripts from loopback, so the routed
website never loaded the widget.
2026-11-27 10:53:47 +01:00
Davide Silvestri 8f70a1c830 test(agent): stabilize approval E2E tests (#6878) 2026-11-26 11:15:48 +00:00
Davide Silvestri 638d7236c3 feat(agent): let triggered runs ask a person (#6812)
* feat(agent): let triggered runs ask a person

A trigger-started reply gets a built-in ask_person tool when the trigger's
may_ask_person is on (default). The call is held like an ask-first call:
the run pauses, counts as going for the overlap rule, and resumes with the
answer of someone who may approve tool calls, or is told nobody will
answer when the question is dismissed. Unattended replies are told that
nobody reads them and whether they may ask; follow-ups keep the
outside-data instruction. Later replies replay each decided question and
its answer as plain turns in their history.

* feat(agent): answer an agent's question in the conversation

A held ask_person call shows as its own card with an answer field, Send
answer and Dismiss, kept out of the approval card's batch actions. Only
people without the approve permission see it read-only. The trigger card
gets a switch to let the agent ask a person, and approval wording now
covers questions too.

* test(agent): cover asking a person end to end and record it in ADR 014

* refactor(agent): build the question tool like web fetch and tell it from actions

The question tool is a plain Pydantic AI tool in agent/tools.py that the
reply runner wraps in a FunctionToolset, like web fetch. A held call is a
question only when it has no tool key, so an action saved as ask_person
before the name was reserved keeps its normal approval. History prefetches
only the decided questions, and the pending approvals menu links to the
conversation only for a pending question.

* test(agent): cover Ask first in a triggered run end to end

With changes set to not ask first, a triggered run creates a database without waiting; turned back on, the same run waits for approval and finishes once approved.

* test(agent): open the Triggers section in the ask-a-person spec

The section was renamed on develop.

* fix(agent): keep web search off next to the question tool on older Gemini

Gemini before 3 refuses web search next to function tools. The question
tool now counts as one, so a triggered run that may ask a person no longer
sends both, gets a 400 and records a failed search on every run.

* fix(agent): keep the ask-a-person switch of a license-locked trigger read-only

The API refuses the change like the trigger's other locked settings, and
the card makes the section inert and the switch read-only, like the
overlap rule.

* fix(agent): reserve the web_fetch action name

An action named web_fetch on an agent with web fetch on gave two tools
with the same name, so every reply failed when its toolsets were built.

* refactor(agent): drop the special case for an action named ask_person

Agents are behind a flag with no production users, so the name is simply
reserved like the other built-in tools: a held ask_person call is always
a question, on the backend and in the conversation.

* fix(agent): answer a waiting question after asking is turned off

ask_person now defers its call, and the resumed run gets the answer, or
the dismissal note, as the call's result. Turning the trigger's switch off
only stops new questions, instead of telling the agent that an answered
question is no longer allowed while the card shows it as answered.

* fix(agent): decide calls held with a question from the pending approvals menu

The question shows as its link row to the conversation, and the other
held calls stay in a card below it, so they can still be approved or
rejected from the menu.
2026-11-25 17:17:04 +00:00
Bram 2f954bffad Group agent right sidebar sections and change descriptions (#6861) 2026-11-25 14:00:31 +00:00
Davide Silvestri 16dbb0690f feat(agent): configure who can chat, approve and continue triggered runs (#6826)
* feat(agent): configure who can chat, approve and continue triggered runs

Approving held tool calls and continuing a conversation a trigger started
become their own operations. With RBAC, an agent's Permissions section
sets who may chat, approve and continue: a lowest role, specific people
or teams, or nobody. Without RBAC every member chats and approves, and
nobody continues. The owner of a private conversation can ask others to
approve its held calls, and leave it to them.

* feat(agent): let everyone in a private conversation leave it and name who stopped a reply

Anyone asked to approve can now remove a private conversation from their
own list; only its owner deletes it for everyone. Once the owner has
left, the last person to leave deletes it for good, as only an owner's
trash may list a private conversation. A reply someone else stopped says
who stopped it.

* fix(agent): close the gaps a security review of participation found

Keep a triggered conversation's opening message untrusted when a person
continues it, audit changes to who can chat, approve and continue, and
require being able to chat to ask others to approve. People asked to
approve follow runs only while they may read the conversations, the
approver picker scans at most a thousand members, and the permission
object lists only the agents the person may see. A reply whose sender
was deleted can still be resumed by someone asked to approve it.

* docs(agent): add the participation test plan with its results

Cover every participation setting, asking others to approve, leaving a
private conversation and stopping replies, with the outcome of the e2e
run and the findings of the security review.

* fix(agent): address the review of participation permissions

- Name only people's messages to the model: a trigger's opening message
  no longer reads as written by a deleted user.
- Check the approver candidates in one pass, so the number of queries
  doesn't grow with the workspace.
- Show the read-only note only to who can't write in a conversation.
- Take a person who leaves the workspace out of the conversations they
  were asked into and the rules naming them, and delete the conversations
  nobody is left in.
- Record a rule change and its audit entry in one transaction.
- Refuse a custom approve rule nobody named in it could use.

* docs(agent): update the participation test plan after the review
2026-11-25 09:24:20 +01:00
Davide Silvestri 1a555ad89e feat(agent): share conversations with everyone who reads the agent (#6793)
* feat(agent): share conversations with everyone who reads the agent

A person's conversation starts private; its owner can share it for good.
Everyone who may read the agent's conversations then sees it, and anyone
who may send the agent messages continues it. Messages record their
sender, and a reply runs for the person it answers. The conversation
list filters private and shared conversations.

* feat(agent): show each conversation's state, origin and age in the list

* fix(agent): address conversation sharing review

Name who wrote each message of a shared conversation to the model, let
the person a reply answers stop it, and say in the share dialog that
only people who can update the agent rename, pin or delete it afterwards.
Only the owner shares a conversation. Show a failed reply live, on a
resend and with the false filter, explain why you can't send in any
conversation you can only read, list a conversation again when the share
or update that hid it fails, and name a deleted owner in the list.

* fix(agent): polish shared messages and the conversation list

Show another person's message as a grey bubble with their name inside
and keep its line breaks. Keep the copy button and time closer to their
own message than to the next one. In the conversation list, align the
icon, lock and time with the filter and the section label, put the icon
on the title line, let the options button take the lock's place instead
of reserving a column, and leave a small gap between rows.

* fix(agent): stop a message or a name from passing for another sender
2026-11-24 14:48:09 +01:00
Davide SilvestriandBram Wiepjes b580793dd7 fix(agent): address agent builder feedback (#6781)
* fix(agent): address agent builder feedback

* feat(identities): let builders bind existing identities

Binding an Agent or a Local Baserow integration to an existing identity takes the new identity.bind permission, held by workspace builders and admins. Creating, editing and deleting identities stays admin-only. ADR 013 updated and trimmed of migration and deployment details.

* fix(agent): show ask before changes only for the Everything preset

* fix(agent): fix CI and polish the tools modal and input table

Update tests for the identity bind rule and the key/value input table, keep table keys on one line, use one toggle style in the external tools modal, and apply Prettier.

* fix(agent): compact the pending approvals menu

Each conversation is one line: its title with an ellipsis, then Always allow, Reject and Approve. The chat keeps the full approval card.

* feat(agent): make the conversation sidebar collapsible

* address feedback

* Added a little bit of space after the trigger

---------

Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
2026-11-20 11:54:38 +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 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 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