* 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
* feat(core): add Redis-backed background chat runs
Run AI work once in Celery and follow bounded Redis Streams over HTTP. Keep
lifecycle, Stop, leases and final outcomes in Postgres without per-token writes.
Include the shared frontend follower, adapter registry, recovery API, migration,
queue/deployment wiring and adapter guide. No product uses it yet.
Part of #6346
* Remove unused chat run response header exposure
* Extract shared async streaming HTTP router
* Simplify chat run follower and group engine constants
- Check read access once when a stream opens; read run state from Postgres
only after 5 s without output or on run.finished.
- Split follow_run into small steps around _OutputReader.
- Turn event kinds, error codes and stop reasons into StrEnums; the
Kuma-only model_unavailable code moves to Kuma.
- Document ChatRunType hooks with param, return and raises fields.
- Add BASEROW_ASGI_HTTP_MAX_CONCURRENT_STREAMS and size the follower Redis
pool by it.
- Give handler publish/recover calls their own event loop, so cleanup
cannot close pools shared by HTTP followers.
- Update ADR 010 and the background chat runs docs.
* Clean up chat run interfaces and test setup
* Prune chat runs once after 7 days and skip overdue claims
- Delete each expired page with one statement. Incomplete runs get one more
ensure_interruption_warning call first, and are deleted even if it fails,
so run metadata never accumulates. The hook now returns None.
- Keep runs for 7 days instead of 30.
- Never claim a queued run older than NOT_STARTED_AFTER; the sweeper ends it.
* Retry brief Redis failures in chat run followers
- A connection error, or a buffer that does not exist yet, is retried with
the same cursor, sending heartbeats meanwhile.
- run.replay_unavailable is only sent once the follower stops reading, so
the browser can treat it as final.
* Let finished chat run output expire with the active TTL
Nothing reads a buffer once its run has finished: followers return the saved
outcome first and recovery only reads running runs. Drop finish() and the
24 h TTL, so a finished buffer expires an hour after its last append.
_publish_terminal now reuses _publish.
* Run the chat run scale tests on fakeredis
Build the buffer's real read and write pools on fakeredis connections, so
these tests always run and backend CI needs no Redis service. The Kuma e2e
tests cover a real Redis.
* Address the remaining chat run review comments
- Serialize the saved outcome after the transaction, so only a failed save
is logged as one.
- Make the primary-pin test transactional; inside the test transaction the
router always used the primary, so it could not fail.
- Cover the race past the per-user lock, a lost run after Stop and an old
writer appending to a recreated buffer.
- End the admission test's request with a disconnect, so a regression fails
instead of looping.
- Document that one worker process runs AI replies one at a time.
* Move the chat run migration after develop's core 0130
* Log only the class of an outcome serialization error
* Test that the run deadline asks a run to stop
* Keep a run's status when a resumed follower rebuilds its output
* Note that slow DNS lookups turn off a run's live output
* Implementing the new invite-to-scope design and functionality.
* Simplifying the invitation acceptance, we don't need the redirect.
* Fix the action type description
* Addressing my own review feedback, and making sure the workspace invitation form behaves like the scoped one.
* Further tweaks after testing edge cases manually
* Lint fix
* Taking a DRYer approach to validating the subject chips.
* Lint fix
* Addressing feedback
* fix: block invitation batches containing invalid emails
Malformed addresses could be silently cleared after a partial batch send.
Keep them visible and block submission until corrected or removed.
* fix: respect workspace invitation permission in scope sharing
Scoped Admins could attempt email invites denied by workspace permissions.
Gate new-email invitations while keeping existing subjects assignable.
* feat: unify workspace and scoped access lists
Workspace and scope lists duplicated markup and lacked consistent controls.
Share rows, add workspace edit/cancel actions, and cap lists at six rows.
* fix: reconcile invitation branch with develop
Develop enables agents and adds an Enterprise migration at the same number.
Align invitation subjects and renumber the branch migration after develop.
* refactor: resolve workspace user roles in the backend
The frontend duplicated the backend mapping from basic roles to RBAC roles.
Expose role_uid in user payloads and reuse it for inherited access counts.
* fix: validate invitation emails before submission
The permissive database validator let malformed invitation addresses reach the API.
Use the existing strict validator for email suggestions, chips, and batch submission.
* fix: align invitation input focus styling
The invite input used a gray border tied to whether suggestions were open.
Use the standard blue border with focus-within so Escape preserves the focus highlight.
* feat: limit email invitation batches
Large invitation batches can exhaust the sending allowance partway through.
Default to five new emails per batch, configurable, with a message before submission.
* feat: let roles declare the invitation default
RBAC invitations should default to Viewer without Enterprise-specific logic in core.
Let role types declare the default: Member for basic workspaces and Viewer for RBAC.
* refactor: keep invitation role semantics in their owning modules
Core invitation UI should not interpret Enterprise role IDs or depend on Database roles.
Move basic roles to core and let Enterprise supply invitation subtitles through role metadata.
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* 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.
* feat: add instance AI provider management
* fix: simplify AI provider testing
* fix: remove extra model list spacing
* fix: show AI provider form errors inline
* fix: use icons for AI provider row actions
* fix: place model errors before help text
* chore: polish code
* fix: address feedback
* fix: address remaining frontend CI failures
* feat: add configurable max length for text-based field values
Add BASEROW_MAX_FIELD_TEXT_LENGTH (default 500000), enforced at the serializer and in the frontend for single line text, long text, URL and AI fields. Existing longer values remain readable; only new writes over the limit are rejected.
Implements #5688
* fix: address review feedback for max text length
- Fix rich text editor modal crashing on expand: guard
FieldRichTextModal.serializeToMarkdown() while the editor is
unmounted during the open transition.
- Surface the max-length error inside the expanded modal (Alert
banner) and block closing while the value is over the limit.
- Fall back to the default limit in the frontend when the runtime
config is missing or non-numeric instead of silently disabling it.
- Improve the error message to show how many characters are over the
limit (Max N chars (-x)).
- Avoid a settings crash when BASEROW_MAX_FIELD_TEXT_LENGTH is set to
an empty string.
- Add frontend tests for the rich text modal and the validation.
Drop the default SENTRY_TRACES_SAMPLE_RATE from 0.1 to 0.01, and cap
frontend session replays on error via a new SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE
env var (default 0.1) instead of saving a replay for every error.
* chore: enable backend Sentry tracing, reduce frontend span rate
Enable performance tracing in the backend by sampling 30% of
transactions (disabled when the console transport is used in dev), and
reduce the frontend trace sample rate from 100% to 10% since tracing is
not actively used at the moment.
* chore: make Sentry traces sample rate configurable via env var
Introduce a shared SENTRY_TRACES_SAMPLE_RATE env var driving both the
backend and frontend Sentry tracing sample rate (default 0.1), so it can
be tuned without a redeploy instead of being hardcoded.
* chore (deps): upgrade nuxt to 3.21.2
* chore (deps): upgrade prttier, eslint and vitest
* fix(frontend): move dashboard redirect to middleware for Nuxt 3.21 compat
The dashboard page had a top-level `await navigateTo()` in `<script
setup>` that triggered chained navigation during Suspense. Nuxt 3.21's
"force remount suspense when navigating after pending" change caused
this to deadlock — the URL would update but the page never re-rendered.
Move the workspace redirect logic into a dedicated `dashboardRedirect`
middleware that runs before the component setup, avoiding the issue.
* Address feedback
* Update web-frontend/modules/core/middleware/dashboardRedirect.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix sort in data source
* Fix bug in preview authentication
* chore: Remove `applicationContext` from table page metadata.
* chore: Remove `applicationContext: true` from `definePageMeta` in automation workflow and dashboard pages.
---------
Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
* refactor: Update URL validation to use runtime config and clean up feature flag plugin code.
* refactor: Migrate module environment variable handling to Nuxt runtime config, utilizing `env-remap.mjs` for backward compatibility.
* Add debug page to show all runtime variables
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* Fix production images
* Please linter and fix the use of the linter cache
* Polish frontend commands
* Remove build-local
* Fix dev server
* Address copilot feedback
* fix nuxt.test.config for saas
* add .nuxtrc
* Enhance Nuxt configuration to ignore sourcemaps from node_modules
* Add nuxt-prepare command to docker-entrypoint.sh for generating .nuxt directory
* Refactor license.vue to use Composition API
* Add korean language support
* Add impersonate middleware to dashboard and workspace pages
* Mount local backend/media folder in docker-compose for Caddy to serve uploaded files during development
* Fix invitation related issues
* Update email configuration for local development with Mailhog integration
* Add moment-guess to optimizeDeps in Nuxt configuration to pre-bundle and avoid missing source map warnings
* Refactor login components to use Composition API and improve routing structure for login pages
* Update sidebar user context to conditionally display workspace creation option based on user permissions
* Centralize locale definitions in a new config file
* please linter
* 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