* fix: restore builder element columns, menu items and options on undo
The update action only snapshotted allowed_fields, so related rows saved in
after_update (table columns, menu items, choice and property options) were
left out and undo/redo had nothing to restore.
* fix: snapshot only updated element values and skip deleted page links on undo
Exporting every related collection on each update cost queries for unrelated
changes, and replaying a link to a page deleted since made the whole undo fail.
* fix: keep click actions and page links of builder elements through undo
Undo hard-deleted the click actions of removed columns and menu items, trashed
ones included, and replayed links to trashed pages or skipped style changes.
* fix: keep trashed page links and replayed click actions through undo
Clearing links to trashed pages unlinked them for good, click actions trashed
by an undo or redo were never restored, and Kuma's formulas leaked into the
undo snapshot through prefetched column configs.
* fix(builder): keep click actions consistent across element update undo
Undo could duplicate a restored action in the editor, leave it on the old page,
delete nested or other elements' actions, or fail on an unused page link.
* fix(builder): echo trashed click actions to the requester only on element updates
A direct delete already removed the action in the requester's tab, and an echo
could hide it again after a quick undo. Menu item uids kept by an update now come
from one helper.
* feat(assistant): stream Kuma background replies over HTTP
Behind assistant_background_runs, commit and enqueue the message then follow
Redis on the existing POST/200 cumulative JSON response. Resume the same run
without sending the prompt again. Keep refresh, multi-tab discovery, onboarding
and durable outcome recovery in the Kuma adapter and UI integration.
Part of #6346
* Remove unused Kuma chat run response header
* Register Kuma with the shared async streaming router
* Always execute Kuma messages in background runs
* Use chat run constant enums in Kuma
Kuma's model_unavailable error code moves to its own run constants,
because the engine no longer defines run type specific codes.
* Move the tool executor into Kuma
Kuma is its only user, and it is specific to pydantic-ai agents, so it does
not belong to the shared chat run engine.
* Return nothing from Kuma's interruption warning hook
The engine now prunes a run whatever the hook does, so it no longer reports
whether the warning was kept.
* Stop patching the removed ChatRunBuffer.finish
* Fix and simplify Kuma's background run adapter
- Save "nothing changed" when the model was unavailable or the prompt
never reached it.
- Keep the progress line after a reconnect and build the compatibility
records from their models, with the right text for runs that did nothing.
- Delete the in-request path, its cache-key Stop and the event bus.
- Map a second message to 409 directly and return one run shape in the
chat API.
- Fix docstrings, help texts and the POST schema; drop overlapping tests and
share run test helpers.
* Fix and simplify Kuma's run follower in the browser
- Keep local-only messages on refresh and show a queued run as queued.
- Settle a request aborted before it is sent and never show raw error pages.
- Fall back to the API for a new view whose broadcast is late.
- Stop a run through the engine.
- Delete the reader for the previous backend, the old cancel call and the
UI location history.
- Share run test helpers and drop overlapping tests.
* Tighten Kuma's e2e tests, CI setup and docs
- Prove a live resume after a reload and drop a test that proved nothing new.
- Keep Kuma's panel closed in every browser context through the storage state.
- Drop the unused OpenAI key from the e2e setup.
- Rewrite the background replies section of the AI assistant docs.
* Handle Kuma runs whose sender lost access, and other review fixes
- A queued run whose sender can no longer use Kuma ends as access_lost
without calling the model.
- A chat keeps asking runs for a title while its title is provisional.
- Test that a run captures and saves its onboarding target.
- Pass Phoenix settings to the dev export worker; pin CI's Kuma stub to
Node 24.22.1.
* Fix Kuma's browser edge cases found in the re-review
- A send whose stream is refused after its run started re-reads the
chat and counts as accepted.
- A chat read that ends after another chat was chosen is dropped, and
only a 4xx forgets the tab's stored chat.
- An unsaved outcome stays shown while its run is the chat's latest.
- The status line shows that Kuma is answering.
- Empty stopped or failed answers show only their outcome.
- Logout clears Kuma's chats, messages and pending navigation.
* feat(assistant): follow Kuma replies through shared chat runs
* refactor(assistant): remove obsolete stream-limit recovery
* fix(assistant): simplify Kuma cutover and preserve legacy Stop
* fix(assistant): preserve existing Kuma API contracts
* refactor(assistant): match stream event kinds
* refactor(assistant): simplify execution and navigation
* fix(assistant): show that Kuma is cancelling after Stop
* test(assistant): cover the stale refresh guard and trashed workspaces
* refactor(assistant): close the run follower and drop the unused baseline
* refactor(chat-runs): share the run-in-progress error code
* docs(assistant): document the run limit and the deprecated chat status
* fix(assistant): give a duplicated tab its own Kuma tab id
* feat: let builder data sources be tested and work without an integration
* fix: return a clear error when testing a data source with a missing sort or filter field
* WIP
* Remove formula conversion related changes
* Move the file input click guard to formatted text component
* Move format types into their own components
* Use a shared markdown-it instance
* Move the formatter into data explorer
* Move minification logic into BaserowFormulaMinified
* Renderer should own the root element
* Ensure long choice names are truncated
* Ensure line height doesn't grow for paragraphs
* Add tests
* Add changelog
* Add specific tests for choice element
* Allow markdown in text collection fields.
* Add support for markdown format in more Builder elements and fields.
* Add tests
* Fix tests
* Fix test
* Fix frontend tests
* Remove markdown from tags for now
* Fix markdown rendering extra newline
* Ensure markdown with relative links don't do a full reload
* fix(builder): ignore hidden form fields when validating form container submit
* Remove stale data from the store on component unmount
---------
Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
* feat(assistant): add application builder tools module
Add 19 tool functions for creating/managing pages, elements, data sources,
and workflow actions in Baserow builder apps. Includes permission-checked
CRUD helpers, formula generation context, element type models with dispatch
tables, and routing rules for all builder operations.
* feat(assistant): add theme catalog, apply_theme, and theme templates
Add THEME_CATALOG with 20 theme definitions, ThemeName type, apply_theme()
helper, and auto-theme application on builder creation. Includes JSON and
ZIP template files for all themes.
* feat(assistant): register BuilderToolType and wire up imports
Register BuilderToolType in apps.py, consolidate ToolInputError in
builder.helpers, remove try/except guard on builder import in toolset,
and minor formatting fixes.
* feat(assistant): add builder page navigation and UI context
Add builder-page navigation handler in AssistantPanel, page name display
in AssistantUiContext, builder page context extraction in store, and
undo/redo scope dispatch for builder pages.
* test(assistant): add builder tools and eval tests
Add 55 unit tests for builder tools (pages, elements, data sources,
workflow actions, styles, themes), 4 element move tests, restore 3 theme
tests in core tools, and 11 LLM eval tests for builder scenarios.
* lint
* refactor(assistant): extract theme code for separate PR
Remove theme catalog, apply_theme, set_theme, and 20 new template files
to be re-added on pydantic-ai-pr3 as a focused theme PR.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(assistant): add missing application_type_registry import in core types
* fix(assistant): add prerequisite hint to create_display_elements and update builder evals
* feat(assistant): add view_id to data source create and update
Allow data sources to reference a database table view for filtering.
Instead of reimplementing the full filter model, this leverages existing
create_views + create_view_filters tools to set up filters on a view,
then links it via view_id.
* feat(assistant): add user source setup, role visibility, and login page
- Add setup_user_source tool: creates users table with fields and
example rows, configures Local Baserow user source with password auth,
creates login page with auth_form element, and sets builder.login_page
- Add update_builder core tool for application-level settings
(login_page_id) and register it in all mode-aware toolsets
- Add role_type and roles fields to PageCreate, PageUpdate, PageItem,
ElementItemCreate, and ElementUpdate for role-based visibility
- Add auth_form element type with user_source_id and login_button_label
- Enrich list_pages response with user_sources, available_roles, and
login_page_id so the LLM knows what auth is configured
- Add 3 unit tests and 2 eval scenarios for user source setup
* fix(assistant): address copilot feedback
- Guard `update_single_element_formulas` against KeyError from
`get_first_ancestor_of_type` (shared page elements), matching the
existing guard in `update_element_formulas`
- Enforce XOR validation on UserSourceSetup for table_id/database_id
- Use `literal_or_placeholder` in notification/open_page workflow action
kwargs so plain strings are properly quoted as formula literals
- Raise ToolInputError when table lookup via .first() returns None in
data source and workflow action types
- Reorder page.js selectById to validate pageId before setting undo/redo
scope
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(assistant): fix view type bugs in ViewItemCreate and from_django_orm
- Default `public` to False instead of requiring it
- Read grid `row_height` from ORM instead of hardcoding "small"
- Use `is None` check for required fields to accept valid falsy values
* fix(assistant): prevent shared header misuse and fix collection element formulas
Strengthen guidance so the AI doesn't place page-specific content in
shared headers/footers and correctly uses current_record instead of
data_source.<id>.0 for formulas inside table/repeat elements.
* fix: add pytest.skip to flaky test test_async_start_workflow_rate_limited_runs_eventually_disable_workflow
* fix: address feedback
* Revert "fix: add pytest.skip to flaky test test_async_start_workflow_rate_limited_runs_eventually_disable_workflow"
This reverts commit 39ca93eebf.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add realtime signals for data-sources and workflow-actions
* Address feedback for data sources and other handlers
* Add realtime update for theme
* apply Peter's patch
* Fix flaky test
* Adding a 'create new data source' link in the footer of the DataSourceDropdown.
* Force a DataSourceCreateEditModal remount by setting a unique key. After an updated event has been emitted, we don't want to edit in the subsequent 'add new' click.