* 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>
* Added additional actions and email trigger to agents
* Made delete row id required and share outcome
* Default formula handles text and html
* Made the email trigger and list rows labels a bit more generic
* Remove AI prompt and start workflow actions
* Added create, update, and delete permissions check
* Give correct action name to Kuma
* Add view, field and aggregation to tool call
* Prefetch query for row aggregate to reduce queries
* Implemented tool presentation for each type
* Made semantic search extend LocalBaserowAgentActionType
---------
Co-authored-by: Davide Silvestri <silvestri.eng@gmail.com>
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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
* 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.
* 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.
* feat: let a button field send an email
A button can now send an email when it is clicked, through the SMTP
server this installation is configured with. A button's actions carry no
integration, so the form drops the integration branch of the shared SMTP
form and the action always sends through the instance.
Without an instance SMTP server the action would fail on every click, so
it is refused when it is configured instead, and the editor shows the
reason rather than a generic error. The refusal covers creating an
action, swapping an existing one to this type, and clicking a button that
already carries one.
A failure names neither the mail host nor its port: the clicker is told
which action could not be completed and nothing more.
* fix: refuse the email action on an instance that only prints what it sends
Without SMTP configured, Baserow keeps a backend that writes the message
locally and reports that it sent, so the guard never fired on the very
installation it was written for: the action was offered, the click said it
worked, and nothing arrived. What the instance does with a message it is
given now decides, rather than EMAIL_HOST, which Django defaults to
localhost whether or not anything is listening.
The instance setting is also pinned when an action is prepared. The form
does not offer the choice, but the endpoint took whatever it was given,
and a service that sends through nothing fails on every click.
A click that may not dispatch no longer learns how this installation is
configured: the refusal now runs after the permission check, and once per
type rather than per action.
Drops the editor's own toast for a refused type. The shared error handler
already shows the reason on a 4xx, and replacing the handler with a stub
broke every caller that asks it what kind of failure it was.
Also sets the SMTP form's instance flag where the form takes its defaults,
so opening an action no longer reports a change the user never made, and
fixes the mail fixture, which read one page of a catcher the whole suite
shares.
* fix: scope the mail cleanup, and only hide the failures that name an address
Emptying the catcher in `beforeAll` runs once per worker, and the suite
runs three of them locally, so one worker could delete the message another
was waiting for. Pointed at a dev stack it also took whatever mail the
developer had captured. A test now drops the message it read, by id.
The clicker was told "the request could not be completed" for failures
that name nothing about this installation, such as a server refusing the
encryption. What is withheld is now named: the failures whose message
carries the address the request was going to. Everything else a service
raises is about the values it was handed, and is the only thing telling
the clicker what to fix.
* fix: keep the mail lookup independent of the catcher, and say when sending is off
The catcher is asked for the message by subject rather than read a page at
a time. A dev stack's is long lived and holds whatever the developer
captured, so the one being looked for can be arbitrarily far down, and the
purge that used to hide that was itself taking other workers' mail.
Whether this installation can send is now decided in one place, the SMTP
service type, so the flag the API already exposes for it is true rather
than a check the button field kept to itself. A backend the settings do
not name at all counts as unable to send: the service asks for it by name
and would fail on every click. The editor reads that flag and says so on
an action whose instance has stopped being able to send, which until now
only a click would reveal.
A sequence carrying two deactivated types names the same one every time.
Tests cover what the endpoints answer: the create, type swap and dispatch
refusals, their error code and reason, and that a refused click leaves the
rate limit alone.
* fix: say an instance cannot send email before the action is saved
An action being configured has not been saved yet, so there is no service to
ask whether this installation can send. Until now the first thing to say so
was the refusal on save. The settings the editor already loads now carry it,
and the email option in the action dropdown is disabled with the reason beside
it.
The two ways of being unable to send are told apart. Sending turned off by an
administrator and an instance with no mail server each get their own reason,
returned as a code so the editor words and translates it.
The mail backend is matched as whole path segments, so a custom backend such
as `myapp.console_relay` is not read as the console one.
The setting behind all of this is documented, including that turning it off
disables a button field's email action altogether.
* fix: pin the mail server as part of the write that creates the service
A database action carries no integration, so the service is pinned to the
instance server whatever the caller asked for. That pin was applied after the
base had already saved the service, which updated the row a second time. It
now travels in the values the base saves, so a create writes the service once.
* test: cover what an exported email action carries and what it drops
The HTTP action had import and duplication coverage, the email one had none.
These pin the field references a copy has to rewrite, that an export keeps the
action pinned to the instance server, and that an instance which cannot send
still imports the action as configured rather than dropping or repairing it.
* fix: hold a button's lock for as long as its email actions can wait
The lock's TTL read a `timeout` field off each service. An email service has
none, so a click that only sends email got the default floor however many
sends it chained, and a lock expiring mid sequence lets a second click send
the same mail again.
Services are asked now. The HTTP one answers with its timeout, the email one
with three times the SMTP timeout, which is per socket operation rather than
for the send as a whole.
* docs: say what the deactivation hooks take and give back
The hooks a type overrides to say it cannot be used here were documented
unevenly: no return described, no raise named, and the SMTP overrides took
untyped arguments.
* fix: let an unsaved email action be read by the one after it
A service has no schema until it is saved, so an email added in the editor was
missing from the next action's explorer until the field was saved and reopened.
An email answers with whether it went out and nothing else, which is known
before anything is sent, so the type offers that shape itself.
* test: prove the chained email arrived, and say where the catcher is
The chained test only showed that the action after the email ran. It now waits
for the message itself, under a subject unique to the run, and drops it in a
`finally` so a failed assertion leaves nothing behind for later runs to read.
Which mail catcher the suite reads is documented: the local runner follows the
dev stack's own MailHog port rather than assuming the default instance, and
the two mail variables are written down with when each applies.
* fix: keep the email action pinned through an edit, and size its lock for a real send
An update is not refused the way a create is, and the service type drops the
instance server while sending is off. An action edited then came out unpinned
and failed on every click once sending was back. The action type restores the
pin after the base has saved, writing only in that case.
The lock's share for an email is sized for the conversation a send really is:
the timeout applies to every socket operation, and there are a dozen or more
of them, not three.
Whether the instance can send is asked two ways now. The Application Builder
and automations keep the setting-and-host check they always had, so an
installation without a mail server behaves as before for them. The stricter
check, where a backend that only prints counts as no server, is the button
field's alone: it has no integration to fall back on. `is_deactivated` is
derived from the reason rather than computed a second time.
* refactor: let every email editor see the answer's shape, and decide deactivation once
The `{success}` shape an unsaved email answers with lived on the button field's
action type alone, so the builder and automations still showed nothing for an
unsaved email. It moves to the shared service type, which every editor reads
through.
The action type's `getErrorMessage` repeated what the base already does with
`isDeactivatedReason`, and only differed for tests that passed no workspace.
The override goes, and the tests pass the workspace the action list passes.
* test: read the dev stack's mail catcher by default
A plain `yarn run test` after the local runner has finished fell back to the
containerized stack's port, which the README says it does not. `just e2e` and
CI set the URL themselves.
* fix: line up what an email action promises with what it can do
Four follow-ups from the review of the email action.
The editor and the send now ask the same question about the instance mail
server. A mail backend with no host to give it reported the action as
available and then failed the click, because a database action has no
integration to fall back on.
What an email says no longer travels in an export that leaves the
instance. The table schema handed to formula AI is serialized that way,
and reading a formula field needs far less permission than configuring a
button, so recipients, subject and body are blanked there as an HTTP
action's headers already are. A snapshot and a duplicate keep them.
A server that answers and then refuses, over TLS or over credentials,
now counts against the rate limit. The instance had already opened the
connection, so giving the slot back made that traffic free to repeat.
And ADR 006 records that the email action sends through the instance
server rather than an SMTP integration, which is the opposite of what it
said.
* Add Go to node
* Remove goto_ prefix from destination_node_*
* Move max dispatches check into _before_node_dispatch()
* Remove translations from backend errors
* move validate_goto_destination to a static method in the node type
* Move clearing goto links to node type
* Refactor cleared_goto_links to a more generic post_move_modifications
* Remove automation concepts from integration land
* Fix flakey service test
* Remove 'node' mentions in CoreGotoServiceType
* Implement new import_references() hook to avoid overriding import_formulas()
* Fix forward-jumps
* Fix test
* Rename goto_node to just goto
* Update comment
* Clean up old references to connectors (we now use badge)
* Refactor history handler's get_destination_labels() to get the destination from node type.
* Handle max dispatch error in the dispatch_node()
* Rename output_service_id to destination_service_id
* Remove simulate check from goto node type.
* Rename post_move_modifications to move_extra_data
* Rename revert_move_in_workflow and after_move_in_workflow to revert_move and after_move respectively.
* Rename import_references to post_import
* Make _condition_is_set more consistent
* Move CoreGottoServiceForm to integrations and refactor logic/imports.
* Make node history label more generic.
* Add afterMove() hook
* Max dispatch check should happen for simulations too
* Move _before_node_dispatch() error handling into the main try/except
* Move post_import() into EasyImportExportMixin
* Add a generic getDestinations() method to node types
* Simplify setting destination_service_id
* Use existing convention to inject registry
* Set limit to 2000 for max dispatch
* Add new skipped history status
* Dedupe queries for destination labels
* Ensure destination node validation considered deleted nodes.
* Ensure destination nodes are ordered per graph
* Set max dispatches default limit to 1000
* Only allow backward jumps.
* Fix ordering bug that caused non-default router branch nodes to not appear as a destination target.
* Fix migration
* Re-add lost commit from Jeremie - rename to after_import()
* WIP - node history
* Add migrations
* Fix test
* Re-generate migrations
* Node history should show result, not payload.
* Ensure nested node history scrolls
* get_previous_positions() may return None
* Fix get_iteration() to use the new iteration_path
* The scrollbar should be lighter, hide the background container.
* Only show expandable if the node history is completed
* Optimize node history endpoint
* Return the node type and label from the backend, so that we don't have to lookup published node which the frontend doesn't know about
* Use history status icons from design spec
* Remove debugging code
* Display workflow run error
* Don't expand history if workflow is in progress
* Find the most specific error
* Remove old HistorySection and unused translations
* Remove old _NodeHistory.vue, replaced by NodeHistory.vue
* Ensure node type label is truncated
* Align node type header icon
* Ensure Node Explorer's content name is truncated
* Add router label to node type, ensure max-width for label
* Make sure header expand icon is centered
* Truncate error preview
* Ensure node result is created when there is an error. This is needed to show the error in the node history.
* Lint fix
* Ensure parent nodes show error indicator (red text) if child has error.
* Clean up styles
* Clean up
* Handle case when router node has error
* Don't render Context or Modal if not final node
* Document success_count and fail_count in the API response
* When workflow times out, ensure child node histories are also updated.
* Remove unused css definitions
* Use computed props
* Add test to check query count for workflow history
* Update test to ensure node history is updated when workflow times out
* use a single timezone.now() instance
* getNodeType should be a computed prop
* getHistoryIconPath should be a computed prop
* Add test for node history in api response
* Add test for success/fail counts
* Add assertion to existing tests to ensure node result is created on workflow error
* Update the workflow when a node is modified
* Add original_workflow to AutomationWorkflowHistory model, migration, and backfill original_workflow
* Delete any published automations that don't have history.
* Create a snapshot of the history via publish flow.
* Add id to automationnodehistory ordering. Update migrations.
* Fix tests
* Ensure sample data is saved from snapshot to the draft workflow.
* Fix test
* Add tests for snapshots
* Remove unnecessary guard.
* Handle list vs flat result data.
* Ensure workflow is updated for snapshot when we CRUD a node.
* Make the edge detection more generic.
* Add new history_clone workflow state choice
* Refactor common logic to new _clone_workflow().
* Simplify async_start_workflow()
* Exclude history clones from being deleted during publishing.
* Ensure active_published only filters for live workflows
* Refactor existing tests + write new ones
* Fix test
* Add real-time for dispatch start/end, and update history in frontend.
* Increase size of the triple-dot link that reveals the Show result button.
* Ensure original_workflow is ZDM compatible
* Squash local migrations
* Simplify
* Add spinner when history is loading.
* Improve clean_up_previously_published_automations() logic
* Use global cache instead of relying on updated_on for cloned workflow.
* Rename history clone to test clone.
* Create clone only for test, not for simulation.
* Update docstring/comments.
* Move clone creation to toggle_test_run()
* Post-migration fixes
* Ensure async_start_workflow() always receives a draf or live workflow. For tests, it should get/create a clone.
* Fix state confusion
* Add filter to prevent deleting newly created test clone.
* Fix test
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* Allow users to choose, when the interval is minute, how many minutes can pass between intervals. A value of 15 means every 15 minutes since the last periodic run. I'm using this opportunity to also set minimum limits. Self-hosters can run every minute, but in SaaS it will be a higher value.
* The second/microsecond reset needs to happen at the beginning.
* Lint fixes
* Fix tests; add backend validation to ensure interval=minute minute values are >=settings.INTEGRATIONS_PERIODIC_MINUTE_MIN