mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 00:38:35 +00:00
develop
168
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8882deb350 |
fix: send the full workspace in the group_created event (#7028)
* fix: send the full workspace in the group_created event Other tabs added the workspace without its users, so later workspace user events failed on it. * fix: don't add a workspace the store already has A tab could fetch the new workspace and then get its group_created event too. |
||
|
|
547237eafb |
fix: don't report sign-out error when old session token is already invalid (#6980)
* fix: don't report sign-out error when old session token is already invalid * Review feedback |
||
|
|
6391674129 |
fix: Revoke a login's access tokens on logout (#6951)
* Reject the access tokens of a login session once the user logs out. * Reject user source access tokens once the user logs out of the published application. * Refuse websocket connections made with the access token of a logged-out session. * Keep a logged-out session revoked for backends running another Baserow version. * Test that an unreadable revoked-session marker keeps a token off the websocket cached fast path. * Revoke the session's access tokens when logging out with an expired refresh token. * Test that logging out with an already rotated refresh token rejects the session's access tokens. * Make the user source blacklist test show that the access token authenticates before the logout. * Log a published application visitor out in the tabs where their login ended elsewhere. * Add the changelog entries. * Keep a published app login whose cookie the browser never saved, such as in a cross-site iframe. |
||
|
|
250748c8dc |
feat: Workspace level integrations (#6547)
* Add ADR-013 for workspace level integrations * Add implementation * Improve context section and remove technical points * Move bulk replacement point to v2 * Remove workspace-level ownership on import since manual promotion should handle this. * Add a glossary section * Do Lazy creation + Celery migration * Remove demotion * Tighten the Options considered section * Add Decision describing where the integrations are managed * Update implementation plan after changes to ADR * Sync plan and adr * Rename adr and implementation * Add the shared application that owns workspace integrations * Create the shared application of every workspace * Let only workspace admins manage workspace integrations * Let applications use the integrations of their workspace. * Trash workspace integrations in their workspace. * Copy workspace integrations into exports and keep them in duplicates. * Workspace admins can share integrations with every application in the workspace. * Load the shared application of each workspace in the frontend and keep it out of application lists. * Manage workspace integrations from an Integrations page in workspace settings. * Offer workspace integrations in the integration dropdowns of every application. * Move promoted integrations to the workspace list in other open tabs. * Let admins make an app's integration available to the whole workspace from its integration settings. * Preselect a workspace integration for new nodes and data sources when the app has none of its own. * fix tests * Delete implementation file * More fixes after rebase * Fix tests * Let builders of an application see and use the workspace integrations from it. * Show the workspace integrations, read-only, in the integration settings of applications. * Keep a dashboard's integration out of promotion to the workspace. * Leave the shared applications out of the admin dashboard's application count. * Create the shared application of the workspaces made by the fill commands. * Say in the promotion modal that an integration nobody authorized will run as the promoting admin. * Say in the promotion modal that undoing it won't make the integration run as the previous person again. * Ignore integration ids in sample data when publishing copies the workspace integrations an app uses. * Let only undoing a promotion move an integration out of the workspace. * Let the shared application backfill stop itself after 5 minutes and skip workspaces another transaction has locked. * Say in the workspace integrations settings that published applications and workflows keep their own copy until they're published again. * Leave the shared application out of the assistant evals' application counts. * Refresh the workspace integrations when the Builder's data, events, users and integrations panels open. * Say that anything new using a promoted integration blocks undoing the promotion, even from its own application. * Warn when a database button sends through a workspace integration with no host or token. * Refuse roles and invitations on the shared application. * Fix tests * Show an application only the workspace integrations of types it can use. * Say in the promotion modal what builders of other applications can do as the integration. * Leave the shared application type out of the API docs for creating and updating applications. * Check who receives a workspace integration event in one permission call. * Say which workspaces have a shared application and who creates it. * Let a redone promotion record what uses the integration again. * Update docstrings * Stop template visitors from listing the integrations of the template's workspace. * Let database buttons find their own copy of a workspace integration after an import. * Say what holds the workspace row lock while a shared application is created. * Fix tests * Stop the workspace integration form component from being made reactive. * Make test runs use a new copy of the workflow after an integration it uses changes. * Hide the Members settings tab from members who can't list the workspace members. * Add changelog * Fix migration conflict * Fix migration conflict * Fix test * Update comments and ADR number * Link to the workspace integrations from the sidebar's Settings menu. * fix: refresh agent action errors when workspace integrations change * fix: move workspace integrations into workspace settings * fix: use share icon for workspace integration promotion * refactor: use explicit shared application relations * feat: centralize default integration selection * refactor: share integration change notifications * refactor: prepare integration mappings before import * refactor: collect integration references during export * refactor: prepare integration ownership changes without a new hook * test: restore registered service model after mocking * test: cover shared integration defaults in Builder * test: include Slack in Agent workspace integration choices * Fix migrations * Stop template visitors from listing the workspace integrations through an application of the template. * Only offer integrations of the user source's integration type when updating a user source. * Say the workspace integration copy means published Application Builder apps and automation workflows. * Use the same spacing under both integration settings sections and enlarge their headings. * Keep the shared application out of automatic snapshot schedules. * Fix test after rebase --------- Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com> |
||
|
|
7a96926483 |
fix: polish sidebar redesign (#6840)
* fix: align the sidebar glyph across workspace views * style: match the sidebar glyph to the 13px design * style: balance spacing around the workspace breadcrumb slash * style: refine the sidebar search icon and field shadow * style: use the design background color for the sidebar * fix: keep unread indicators on workspace controls * feat: add workspace learning resources to sidebar help * fix: show loading on the workspace being opened * fix: truncate long application names in the workspace sidebar * fix: release the workspace picker when navigation completes * fix: preserve the active workspace when navigation is refused |
||
|
|
a8bf3b73ae |
feat: redesign app sidebar (#6798)
* feat: redesign sidebar workspace navigation * feat: redesign the sidebar footer and account menu Match the account menu to the sidebar prototype and reuse the admin navigation in a submenu. Keep Add new above the footer while the application list scrolls. * fix: show the sortable indicator only when dragging * feat: refine workspace sidebar application navigation * feat: reorganize workspace sidebar shortcuts * fix: isolate workspace sidebar menus and actions * fix: cancel sortable drops on hidden lists * fix(enterprise): allow retrying Direct support * feat: simplify the workspace overview header * fix: prevent horizontal overflow around the sidebar Constrain animated tree groups to the width of the sidebar so long labels truncate. On narrow screens, let the sidebar expand over the content instead of reducing the usable page width. * fix: fit workspace cards and creation menus on mobile * test: keep the current table selected after reload * fix: undo and redo edits across expanded sidebar applications * fix: keep sidebar groups out of the tab order * fix: highlight the active database in the tables tour * feat: label workspace integrations in the settings menu * fix: keep the workspace sidebar and guided tour usable on phones * fix: undo sidebar row imports in the destination database * fix: keep the guided tour highlight on the current step * fix: show an empty state in the workspace picker * fix: confirm workspace deletion before moving it to trash * feat: open registered workspace settings tabs from the sidebar * fix: keep the sidebar logo the same size across workspaces --------- Co-authored-by: peter_baserow <peter@baserow.io> |
||
|
|
23f328cb19 |
feat(database): assign identities to rows and mention them in comments (#6619)
* feat(database): assign and mention identities behind a field option - Collaborator fields get `include_identities` and long text fields `long_text_include_identities`, both off by default. - With the option on, active identities of the workspace can be assigned or suggested as mentions; they are shown with their icon and renamed in realtime, and they never receive notifications. - Turning the collaborator option off backs up the column, deletes the identity assignments and strips identities from the view defaults, so the update can be undone. - Identities can author row comments and be mentioned in them. - Exports write an identity as `Name <identity>`. * refactor: hide internal emails in collaborator exports through one check * fix: import a personal view only for a person, without a query per owner * fix: show collaborator identities with the icon of the user subject type * refactor: drop a redundant local import of the core handler * fix: unify identity icons and space field options * fix: keep identity field menus and saved mentions readable * fix: limit identity mention suggestions to row comments * perf: prefetch available collaborators once per workspace * fix: use workspace members as authors of generated rows * fix: resolve linked collaborator values by member email * fix: use workspace collaborators for field pickers and paste * refactor: move identity avatar styles to the avatar stylesheet * fix: address review feedback on identity collaborators |
||
|
|
864c6d6f51 |
feat: let visitors report abuse on published applications (#6715)
* feat: let visitors report abuse on published applications * fix: let logged-in app users report published applications |
||
|
|
5169076065 |
feat: introduce User-backed workspace identities (#6556)
* feat: introduce User-backed workspace identities Replaces workspace core.Agent subjects with identities stored as Django Users, so permissions, execution and attribution use the same record. - User.objects and WorkspaceUser.objects are human-only; permission and identity code opts in through objects_and_identities. is_human and is_identity classify a user at runtime. - Login, tokens, seats, notification recipients, personal views and last-admin checks stay human-only. Roles, teams and field grants work for identities unchanged. - Agent applications run as an identity, never as a person. Every shared tool rechecks the identity's authority on each call, and MCP refuses a tool that skips that boundary. - Migrations add the profile metadata and index, remove the Agent model and delete or clear legacy Agent data: trash entries, role assignments, team memberships, integration authorizations and run-as bindings. - Rename the management API, UI, events and feature flag to identity. Squashed and rebased onto develop; the previous history is kept on backup/6556-before-develop-rebase. * refactor: remove generic subject options endpoint * refactor: simplify identity selection and Agent run-as options * feat: distinguish identity notification senders * fix: restrict identity bindings to identity managers * docs: record users and identities verification * fix: restore snapshots as the person restoring A restore checked the snapshot creator's permission and used the creator to decide whether an Agent keeps its identity binding. It now checks the person restoring, passed to the import as `restored_by`. `copied_by` stays unset on restore, so credential checks keyed on it behave as on develop. Restoring a snapshot whose creator was deleted works again. The copy rule for identity bindings covers Agent run-as only; a copied Local Baserow integration keeps its authorized subject. * fix: leave settings pages the user may not open A settings route without a permitted tab rendered an empty page, as the Identities page did with its feature flag off. It now opens the first page the user may see. * fix: renumber the legacy Agent cleanup migrations Develop added agent 0016 and integrations 0043, so the migrations that clear legacy Agent run-as bindings and integration authorizations move to agent 0017 and integrations 0044. * test(agent): run the trigger self-event test as an identity The test added on develop created a `core.Agent`, which this branch removes. It now uses an identity user as the Agent's run-as subject. * perf: load user types once per batched permission check * refactor: state the stored subjects in each subject type * fix: give every user a profile * fix: keep identity attribution on rows copied in their workspace * refactor: give people and identities their own subject type UserSubjectType stays the type both are registered and stored under. It forwards what differs to HumanSubjectType and IdentitySubjectType, so get_specific_type is the only place in subject code that inspects the user type. The registry returns the specific type on request and get_by_model keeps returning the stored type, which never reads the profile. An identity's membership is checked in one query instead of two. * fix: keep the roles of identities when a database is duplicated The role import read subjects through the model's default manager, which only returns people, so duplicating or restoring a database failed when an identity held a role on it. It now resolves the subject through the subject registry. A subject that no longer exists is skipped instead of failing the whole duplicate or restore. * refactor: look up a subject type from its content type in one place * fix: reload a cached token whose profile is incomplete A token cached by the previous release has a profile without the user type, which reads as not a person, so its requests were refused until the entry expired. The token cache now treats it as a miss, with the check the user cache already used. * refactor: check the user type once where the check was repeated The MCP endpoint loader, the personal view permission manager and the identity trash type each asked the same question several times. The rule that an identity is never selected by email moves from the team handler to the identity subject type. * refactor: leave trashed workspaces out of the identity membership manager WorkspaceUser.objects_and_identities was named after objects but also returned memberships of trashed workspaces, so callers filtered them by hand. It now follows the existing pair: it leaves trashed workspaces out, and objects_and_identities_and_trash includes them, as objects_and_trash does for people. * test: state the behaviour of every user type The table fails when a user type is added and says what has to be decided first. An unknown type is checked to be denied. * refactor: refuse to say whether a stored user subject is interactive The answer differs between a person and an identity, so reading it from the stored type would be wrong for one of them. It now raises and points to the specific type. * refactor: lock the person in membership writes instead of checking the type Leaving a workspace, removing a member and adding a user lock the user through the people manager, which refuses an identity or an unknown type in the same query. Nothing adds an identity through add_user_to_workspace, so its branch for identities goes. The last admin check compares the membership with the people who are admin, which needs no type check. * test: leave no rows behind in the legacy authorization migration test The test left an integration that pointed at a user that didn't exist and a workspace, in the database the migration tests share. Tests that ran after it then failed on the foreign key or on the workspace id. It now uses a real user and empties the two tables. * docs: describe the subject types and compare the Subject table alternative ADR 013 is shorter and states that people and identities each have a specific subject type under the stored auth.User type. It compares shared User storage with a Subject table that users and identities would both point to. * chore: run the legacy run-as cleanup after the agent actions migration Develop added agent migration 0017, so the cleanup becomes 0018 and depends on it. * test: leave no rows behind in the legacy agent migration tests Like the legacy authorization test, these left a workspace in the database the migration tests share, which a later test that creates workspaces with fixed ids collides with. * fix: write and read the workspace role of an identity in one place The role assignment API wrote the role of an identity through the membership update of people, which told every member of the workspace about it and stored Builder as MEMBER, while the identities API stored BUILDER and returned the stored value. Both now write through the identity handler, which stores the role like the role of a person, and the role is read with the resolver the workspace members use. * fix: take no row lock in the membership writes of a person Leaving a workspace locked the user before the membership while removing or updating a member locks the membership first, so the two could deadlock. The user type never changes and these operations refuse an identity, so the lock protected nothing: they now only check that the user is a person. Leaving no longer locks the admin memberships and removing a member no longer checks for the last admin, as before identities. * fix: find an identity by its name only in the subject options The search also matched the email and username, which for an identity hold an internal key, so searching a part of that key returned every identity. * chore: run the identity migrations after the new ones on develop Develop added core 0138, integrations 0044 and enterprise 0073, so the identity migrations become core 0139 and 0140, integrations 0045 and enterprise 0074 and depend on them. * fix: keep the identity of a copied integration only for identity managers A duplicated application or a restored snapshot kept the identity its Local Baserow integration acts as, without checking the person who made the copy. Restoring a snapshot could so bring back a binding an admin had removed. The copy now keeps the identity only when that person may bind identities, as the Agent application already did, and is otherwise authorized as that person. * docs: follow the renumbered migrations and the copy rule in the test plan The test plan named the identity migrations and their tests by their old numbers and still said a copied integration keeps its subject. * test(agent): run the row trigger tests as an identity The row trigger tests added on develop created a `core.Agent`, which this branch removes. They now use an identity user as the Agent's run-as subject, and the e2e fixture creates it through the identities endpoint. |
||
|
|
d77b5fd2d5 |
feat: let admins password protect invitation links (#6643)
* feat: let admins password protect invitation links * test: expect the invitation link token header in the workspace service spec |
||
|
|
13ac9fc914 |
feat: manage every user template from the admin Templates page (#6654)
* feat: manage every user template from the admin Templates page * Review feedback |
||
|
|
5e271e22c9 |
feat: add permanent workspace invite links (#6521)
* feat: add permanent workspace invite links behind the rbac_improvements feature flag * feat: ask logged-in users to confirm before joining a workspace through an invite link * feat: make the invite link code length configurable with a default of 12 and a minimum of 7 * feat: let admins name invite links so they remember what each one is for * feat: show only the invite path in the link column to make room for the name * fix: harden invite links and let people sign up through them with single sign-on * fix: ask people who sign up through an invite link with single sign-on to confirm joining * feat: let invite links raise a member's role after they confirm, without ever lowering it * fix: move shared clipboard helper into core * fix: validate workspace invitation link roles * refactor: share confirmation modal across core features * refactor: use literal frontend translation keys * fix: label invitation route Invite links * fix: copy invitation links when clicking their paths * fix: align invitation migration with latest develop --------- Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com> |
||
|
|
2f17b58e1c |
feat: download a user template (#6477)
* feat: download a user template * Review feedback * Review feedback 2 |
||
|
|
362f690b9e |
feat(chat-runs): per-run-type limits and a core run stream (#6454)
* feat(chat-runs): limit active runs per run type, per user or workspace Each run type now counts only its own runs. The per-user limit keeps its default of 2, and a run type can add a per-workspace limit. * feat(chat-runs): follow any run over one core streaming endpoint GET /api/chat-runs/<run_id>/stream/ relays the output of any run type behind its read check. Helm and the install guides route /api/chat-runs/ to the ASGI service; the guides also gain Kuma's /assistant/ route. * feat(chat-runs): read the core run stream by default in the frontend The base ChatRunType reads the core stream, applies the resume baseline and retries once after a token refresh. * refactor(chat-runs): expose the output fold for lost runs Run types rebuild a lost run's partial text from the buffered output with fold_output. * perf(chat-runs): send heartbeat records and skip repeated run reads While no output arrives, an open stream sends run.heartbeat as a JSON record, so a follower can tell a quiet stream from a stalled one. The stream view hands follow_run the run state it read for its permission check, finish_run returns the ended run instead of letting callers read it again, and a lease renewal takes one statement while the run goes on. The per-workspace limit hook receives the workspace, so a run type can set the limit per plan. * perf(chat-runs): follow runs from their open stream in the frontend The store reads a run's status only while it has no stream or the stream lost its output, and restarts a stream that stays silent for 15 seconds, also after the computer slept. Following a run opens its stream directly, and Stop doesn't read a run whose stream is open. Each run type keeps one chat subscription, released with unsubscribeFromChat; refreshChat runs only when a subscription is confirmed on a new websocket, and window focus or a regained network only re-attach followers. The developer guide documents the subscription and heartbeat contract. * perf(chat-runs): write a reply's first words at once - The journal writes output after a quiet moment at once and batches what follows, so the first words no longer wait for the 250 ms timer. - The stream adapter settles when aborted. Chrome can fire the last progress event after the request is done, where aborting fires no event. - A stream refused with 503 is retried with the next status check instead of spending every reconnect attempt at once. * refactor(chat-runs): register the stream route by URL name |
||
|
|
356f9a9da6 |
feat: install a user template (#6460)
* feat(install-user-template): Install a user template * Review feedback * Review feedback v2 |
||
|
|
ba24b135b2 |
fix: rotate refresh tokens and revoke the session when an old one is reused (#6519)
* fix: rotate refresh tokens and revoke the session when an old one is reused A refresh token could be replayed to get new access tokens until it expired, so a leaked token gave access for up to seven days. * test: mint the refresh token inside the frozen time The token was minted at the real time, so refreshing at an earlier frozen time failed once the clock passed it. * fix: document the rotated refresh token in the token refresh response The schema checked simplejwt's own rotation setting, which is off, so the API docs left out refresh_token. * fix: keep the user session valid across refresh token rotation The previous release crashed on the new cookie payload, and the cookie stopped working as soon as its refresh token rotated. * test: sign out through the API in the secure file serve test Signing out revokes the session, which is what the user session cookie checks now. |
||
|
|
b14271c6e6 |
fix: accept workspace invitations only with the emailed token or a verified email (#6502)
* fix: accept workspace invitations only with the emailed token or a verified email Accepting by id only compared the username with the invited address, which anyone can register without verifying it. The emailed token now proves ownership and verifies the email; without it, the user's email has to be verified. * fix: require a verified email to reject invitations and keep accept visible Rejecting still only checked the username, so whoever registered the invited address could delete the invitation. Accept stays visible after a verification error so it works once the email is verified. * fix: hide accept for unverified users, allow reject, skip the check without SMTP Without an email backend neither the invitation nor a verification email arrives, so the check can't be met. Signing up from the invitation link verifies the email, so the user is signed in even when verification is enforced. * fix: leaving a workspace hangs and removing the current user deletes the wrong workspace |
||
|
|
72760990c5 |
feat(agent-builder): configure Agent instructions and model (#6415)
* feat(agent): configure Agent instructions and model Adds the Agent settings fields, readiness and configuration endpoints, an autosaving configuration sidebar and the settings permission. Settings are copied with the Agent and exported only by members who can read them. * test(agent): share Agent page setup and mock helpers Both page specs reuse one setup and one-line route mocks, and API tests share an authenticated client. * fix(agent): lock parent before configuration updates * fix(agent): limit model availability checks to settings readers * refactor(agent): read Agent readiness from the application Readiness travels with the application payload instead of a separate readiness endpoint, so the page load and realtime updates keep it current. The configuration form also stays stable while editing. It no longer reloads on unrelated application updates, saves text fields on blur and selections on change, restores a blank name instead of blocking navigation, keeps the current Agent selected when the save before a switch fails, and ignores re-selecting the current provider. The export permission test now goes through ExportApplicationsActionType. * fix(agent): tighten the Agent configuration API The configuration endpoint now serves only instructions, provider and model behind agent_application.read_configuration, which saving also requires. Renames go through the standard application update, the views return their declared serializers, the length limits come from the model, and the endpoints are documented in the API schema. * fix(agent): rename through the application and fit the assistant panel The configuration sidebar renames the Agent through the regular application update, follows the Agent column width with container queries, offers Retry first without an empty actions row, keeps its focus outline on its own buttons, and names an unavailable provider. The first load starts on mount, and the specs mount with a route record and find fields by label. * fix(agent): keep configuration edits across token refreshes The page reset itself whenever a token refresh reassigned the user, because the watch compared a new array each time; it now watches the Agent and user ids by value. The configuration payload names its readiness `readiness`, like the application payload, and the redundant readiness tests are gone. * fix(agent): explain configuration section errors * fix(agent): address configuration review feedback * refactor(agent): reuse shared menu and button components * fix(agent): align sidebar separators and back control with design * fix(agent): match sidebar close control to design * Remove name input loading spinner and added newline * remove double validation --------- Co-authored-by: Bram Wiepjes <bramw@protonmail.com> |
||
|
|
9eabe6b06b |
feat(core): add Redis-backed background chat runs (#6382)
* 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 |
||
|
|
93eeb19dcb |
feat: run Local Baserow integrations as Agents (#6064)
* Run Local Baserow integrations as Agents * fix tests * feat(core): add reusable subject options endpoint * Add beta badge * fix(audit-log): require actor type with actor id * fix(audit-log): avoid duplicate actor export columns * fix(audit-log): guard deprecated actor fields * Restore the feature flag * fix tab alignement * fix(integrations): reject trashed authorized agents * Fix migration conflict * fix(audit-log): assert structured validation error * fix(database): support agent row deletion trash entries * fix(database): support agent row notifications * fix(core): enforce subject option permissions * chore: fix formatting after rebase * fix(core): include agents in member totals * fix(database): batch row history actor migration * fix(integrations): handle trashed authorized agents * fix(core): remove untranslated subject labels * chore: move nodes around * test: mock integration registry in AI agent service tests * fix: resolve database migration conflict * Add changelog entry * feat: use typed subjects for local Baserow integrations * fix: make audit actor migration retry-safe * fix: retain historical audit actors * Please linting * fix: use canonical local integration subjects * fix: order listed workspaces * fix: validate current user integration authorization * fix: preserve integration authorization on update * docs: clarify migration deployment compatibility * fix: paginate local baserow agent selection * fix: validate selectable subject options * fix: preserve integration authorization on update * fix: show saved integration user in subject dropdown * fix(enterprise): protect team subject options * fix(builder): redispatch data sources for trashed agents * fix(database): split row history actor backfill * fix(enterprise): require audit log actor type * fix(enterprise): use audit log actor options * fix(core): prevent blank agent names * fix(integrations): resolve migration conflict * fix(integrations): pass SMTP preparation context * docs: clarify migration rollout guidance * fix: handle trashed integration subjects * fix: reuse local integration authorization column * fix: allow unconfigured local integrations * fix: only update changed integration values * fix: cache local integration subjects * fix: sort field permission subjects by name * fix: include historical audit log actors * fix: center grow tab labels * chore: remove unused AI providers flag * fix: support agent file uploads * Please linter * fix: initialize integration edit values * fix: preserve integration authorization updates * fix: bound audit log actor pagination * fix: support legacy local integration fixtures |
||
|
|
2dd4defb3b |
feat(database): run a button click with external actions as a job (#6164)
* fix: keep every button action card in place after a save A retyped action can keep its id, and an action created by an earlier save still carries its client id, so the refetched list must keep the client id of every buffered action rather than only the created ones. * feat(jobs): let a job type choose its Celery queue * test: assert the job enqueue through apply_async * refactor(database): expose the button click pre-checks on the service * refactor(database): share the button click payload and outcome mapping * feat(database): run a button click with external actions as a job * fix(database): map click races on the job and assert the audit entry * feat(database): answer a click with external actions with a job The request returns 202 and the job runs the sequence, so a slow endpoint holds a Celery worker instead of a WSGI one. * fix(database): give a capped click its slots back and cover the denied job * refactor(database): raise a plain exception for a denied click job * chore: consume the button_dispatch queue on the default worker * chore: add the button_dispatch queue to the Zed worker launch config * feat(database): wait on the job of an accepted button click * fix(database): stop waiting on a button click job after a deadline * test(e2e): a slow endpoint no longer blocks the grid during a click * test(e2e): name the second-button test for what a single worker can prove * test: assert the airtable import job enqueue through apply_async * chore: changelog for the button dispatch job * fix(database): keep the clicker's IP and session on a button click job The audit log and analytics read both from the user, which the job only restores through these mixins. * fix(database): fail a button click job whose field or table was trashed * fix(database): serialize the busy check of a click with its job creation Two racing requests could both see the cell free and each start a job, so a single worker sent every request twice. Also drops the budget bookkeeping from the inline path, which no longer reaches outside Baserow. * test: assert a refused dispatch check records no audit entry * docs: say a button click job shares the default worker with realtime updates Also adds the automation_workflow and button_dispatch queues to the example supervisor config. * fix(database): check a button click job once more at the deadline The job store stops polling before the deadline, so a job that finished unseen was reported as still running. * test: cover an accepted click in the row modal and on a card * refactor(database): ask the service whether a cell has a click in flight The view queried the job table itself; the check belongs beside the other dispatch rules in the service. * fix(database): run only the action list a click was accepted with The request checks and charges one list; the job re-read the field's current one, so an action added while the job waited ran unchecked and an added external one sent without a rate-limit slot. * fix(database): keep queued button clicks sane across crashes, retypes and trash A dead worker's job no longer blocks its cell until cleanup, a retype no longer deletes a queued job, and a trashed database refuses the click. Core permission refusals use the API's wording. The cell lock is shared and the unused refund plumbing is gone. * fix(database): stop a queued button click from sending twice or unchecked A late or replica-blind click no longer repeats its requests, a retype to external is caught, and a quota refusal answers in the request. Slots come back when no job row was written, and the stored answer is safe for jsonb. * fix: keep polling a button click job after one failed poll A click waits on the job store, which stopped for good after a single failed poll. A settled click's job is dropped so the store stops polling it. * fix(database): stop a cancelled button click between actions The owner can cancel a running job, and later actions still ran. The last job check at the deadline is bounded too, so a hung request cannot keep the button spinning. * test: cover a job's answer reaching Open URL and a click edited while queued * fix(database): let a click job finish when its button is retyped mid-run The worker's save wrote the old field id back and failed. Timeouts and unmapped failures no longer name the job type, and a job that is already final leaves the store. * fix(database): run button click jobs on the export queue Review feedback: the celery queue is for fast tasks, and a new queue needs every self-hosted worker changed. Also strips lone surrogates from the stored answer, moves the enqueue rules into the service and drops the unused websocket id. * fix(database): drop a waiting button click on logout or table switch A job can end minutes after the click, when its toast or Open URL no longer belongs to the page. * chore: drop the changelog entry for #6134 The button field has not shipped yet, so there is no fix to announce. * fix(database): point a click job at the base field A retype deletes the button row, so a job pointing at it had to be nulled first, and a click landing meanwhile failed the retype. * fix(database): keep a button spinning for its job after a reload The spinner only knew about clicks made in this page, so a reload dropped it while the job ran and a second click got the 409 toast. * fix(database): ignore a late job_started for a settled button click On a single worker the broadcast reaches the clicking tab after the job ended, and its started copy spun the button again until the next poll. * docs(database): correct the dispatch signal and e2e comments The signal's first send for a job click happens before the enqueue lock. |
||
|
|
64c9fff85e |
feat [6/8]: prepare AI provider management for rollout (#6070)
* feat: retire AI provider flag and add rollout audit * test: remove obsolete AI provider flag setup and docs * chore: clean up AI provider configuration and tests * feat: deprecate legacy AI provider environment configuration * docs: explain AI provider migration sizing and timing * docs: mark AI provider migration audit for removal * docs: explain AI provider migration audit usage * fix: log AI provider env deprecations after logging setup log_ai_provider_env_deprecations() ran at the tail of _setup_health_checks(), which ready() calls before setup_logging(). The notice went out through loguru's default sink and missed BASEROW_BACKEND_LOG_LEVEL, the Baserow format, and the OpenTelemetry log exporter, so operators shipping logs to a collector never saw it. Also drop two references the flag removal invalidated: the getEffectiveAIAgentModels JSDoc still described filtering as conditional on the removed provider flag, and the AI field architecture doc still pointed provider authors at the deleted legacy workspace-setting hook. That doc now names BuiltInGenerativeAIModelType, which is what grants an integration override model inheritance. * fix: reuse environment AI settings in generation workers * feat: import legacy AI provider settings on upgrade Removing the ai-providers flag makes database-backed providers the default, which would leave every existing installation on an empty AI providers page with a management command as the only way to populate it. A data migration imports the environment and each workspace's stored settings instead, so a standard upgrade needs no commands. Both scopes are imported in one migration. Legacy workspace settings replaced the instance ones entirely, while database providers inherit, so each imported workspace is also switched off the instance provider of the same type. Without that a workspace would silently gain models billed to the instance account. Settings that cannot fit their columns are skipped and logged rather than raising DataError and rolling back the whole upgrade. The migration reverses as a no-op because the previous version does not read these tables, so deleting rows would only discard edits made during a rollback window. migrate_ai_provider_settings stays as the recovery path and now shares its planning logic with the migration, so both agree on which legacy settings are complete. It deliberately does not switch workspaces off inherited providers, and warns instead. * chore: remove the temporary AI provider audit command audit_ai_provider_settings existed to inventory legacy configuration before a manual import. The upgrade now imports automatically, so the command has no remaining step to support. Removal was already tracked in #5749. * docs: reduce AI provider docs to lasting behaviour The upgrade procedure, rehearsal plan and sizing query described a one-time transition and do not help anyone after the release; they live in the pull request instead. What remains explains how providers work: the two scopes, how they combine, the inheritance switch, what the deprecated environment variables still do, and how integration overrides and published applications behave. Also corrects claims that no longer hold: published applications keep materialised credentials only when they were published before the upgrade, the import is no longer optional, and a workspace-owned provider suppresses the environment fallback too. * docs: shorten the AI provider changelog entries Bullet points render as single list items under the entry. The released entries average around twenty characters; these ran to four hundred, so the detail belongs in the AI providers guide rather than the changelog. * docs: clarify where imported AI credentials are stored The previous wording implied Baserow's own exports carry provider credentials. They do not: AIIntegrationType lists ai_settings as a sensitive field and ImportExportConfig excludes those by default, and AIProviderConfig is not part of any export path. * docs: explain the AI provider upgrade and where to configure providers State that the upgrade imports the BASEROW_* provider variables once and no longer reads them, list the exceptions, and give the exact navigation for instance admins (Admin tools -> AI providers) and workspace admins (workspace Settings -> AI providers). Map each deprecated variable to the field that replaces it. * fix: renumber the legacy AI provider import after 0121_agent Develop's core 0121_agent and this branch's import migration both depended on 0120, leaving two leaf nodes, so migrate refused to run and the startup check and E2E shards failed. The import is now 0122 and depends on 0121_agent. * feat: remove the legacy workspace generative AI settings endpoint GET/PATCH /api/workspaces/{id}/settings/generative-ai/ had no caller left, yet a PATCH was still honoured for any provider type without a workspace provider and never shown in the AI providers UI. Remove it with the handler parameter, receivers and frontend handler that only it could trigger. * fix: stop instance AI provider changes from fanning out per workspace An instance-level change queued one Celery task per 25 workspaces behind a global blocking lock, sent a payload to every connected user, and made the premium receiver serialize every AI field on the instance. Instance changes now notify staff only; other users see them after a reload. The render lock is per scope, and the in-use guards no longer read one row per workspace. * fix: keep inherited Kuma when a workspace switches off the instance provider The upgrade switches imported workspaces off the same-type instance provider, which made an inherited instance Kuma model invalid there, so Kuma fell back to the deprecated env model or turned off. Inheriting the instance Kuma selection now ignores workspace switch-offs; explicit workspace selections stay strict and are the only ones that block a switch-off. * fix: skip malformed Ollama URLs during AI provider migration * fix: preserve skipped legacy AI provider connections * test: cover independent legacy AI workspace connections * fix: skip malformed legacy AI provider settings * fix: move legacy AI import after current core migrations The linear rebase omitted the migration renumbering from the previous merge commit, while develop advanced through core 0124. Rename the existing AI import to 0125, depend on 0124, and update its historical migration test so core has a single leaf. |
||
|
|
eb1c1c613e |
All workspaces homepage [5/7] All workspaces sort functionality (#6002)
* Added sort to all workspaces homepage and remember preference * Fixed feedback * Fixed migration conflict * Fixed feedback |
||
|
|
eec12c997d |
All workspaces homepage [3/7] List all workspaces in the all workspaces page (#5992)
* List all workspaces in the all workspaces page * Undo/redo support * Fixed feedback |
||
|
|
35866e79de |
All workspaces homepage [2/7] Added all workspaces page and sidebar (#5980)
* Added all workspaces page and sidebar * Show error if workspace is not found * Fixed feedback * Fixed feedback * Fix test |
||
|
|
ad80341c03 |
feat: add Agent subject type (#5851)
* Add workspace Agents and permission management * fix: remove all duplicate team subject memberships * fix: align agent team role inheritance with users * fix: delegate workspace role storage to subject types * fix: preserve agent team memberships through trash * Fix migration conflict * fix: save agent settings pages independently * fix: preserve agent roles across license changes * fix: stabilize agent list pagination * fix: filter agent websocket events by list permission * fix: authorize agent team membership changes * fix: serialize concurrent agent team updates * fix: refresh agent teams through realtime events * fix: restrict personal views to user subjects * fix: deny agents with unavailable roles * fix: exclude agents in trashed workspaces * test: cover permanent agent access cleanup * fix: gate agents in team selectors * fix: accept trash option for preview actors * fix: set native agent form button types * fix: ignore stale agent modal saves * fix: show permitted agent management actions * fix: validate subject lookup fields * perf: optimize batched user membership checks * perf: cache agent team feature per list * fix: map agent nonmember API errors * fix: document paginated agent API schema * fix: stabilize agent API schema operations * fix: show agent name validation errors * fix: show total agent count * test: cover agent creation submissions * test: cover agent and subject UI behavior * docs: define direct subject role contracts * fix: clarify team access management * fix: use standard empty agents table * fix: align agent name column styling * refactor: move agent trash import * refactor: align agent extension registry naming * fix: recover agent team selector loading * fix: validate every subject in role batches * fix: ignore stale agent list responses * perf: index recent team subjects * fix: restore role handler imports * Fix lint * fix: reuse prefetched user memberships * fix: preserve low priority role fallback * fix: preserve trashed field permission subjects * fix: open team picker when agent loading fails * Fix tests |
||
|
|
22cd0eda09 |
feat: warn about AI model usage instead of silently breaking consumers (#6075)
* feat: report AI provider model usage per feature type Feature types now count the rows they store referencing a provider model, so the admin can be warned before disabling, deleting or narrowing one instead of being blocked. Counting is by provider type and model identifier because consumers do not store the provider row id, which makes the result an upper bound: fit to warn, never to block. Default-model features are excluded, their RESTRICT foreign key already blocks the change. * feat: count AI field and AI Agent references to a provider model Both features store a provider type and model identifier per row rather than a reference to the model, so nothing told an administrator what a model change would break. They now count their own rows, skipping every consumer whose owner is trashed: a field's table, database or workspace, and an agent service's automation node, builder workflow action, integration or application. * feat: expose AI provider model usage over the API GET /ai-providers/models/<id>/usage/ reports the per-consumer counts to warn about and, separately, the default-model features that refuse the change outright. Kuma holds a restricted foreign key, so naming it up front lets the client say which selection to repoint instead of letting the admin discover it through a generic error. Permissions and scoping mirror the sibling model endpoints, so a workspace-scoped caller cannot read an instance model's usage. * feat: warn before an AI model change breaks its consumers Disabling, deleting, renaming or narrowing a model now names what depends on it and proceeds on confirmation. Disabling was entirely unguarded before, and a rename orphans consumers just as thoroughly as a delete because they persist the identifier string. The counts are an upper bound: an instance model and a workspace model sharing an identifier are indistinguishable to a consumer, so the copy says a feature uses the model rather than claiming it will break. A failed lookup degrades to the plain confirmation instead of trapping the administrator. * fix: keep an unavailable AI model visible in the AI field form The form dropped a saved provider or model as soon as it stopped being available, leaving empty dropdowns that hid what the field had been configured with. It now retains the saved selection, disabled and marked unavailable, the way the AI Agent node form already does, while the validator keeps reading the genuine list so the field cannot be saved until a real model is picked. * docs: describe the AI provider model usage warning * refactor: drop redundant blocking feature types from model usage The usage endpoint pre-announced the features whose selection refuses a change, but ERROR_AI_PROVIDER_MODEL_IN_USE already names them and the frontend already renders that detail. Worse, the modal applied the list only on rename, the one path that is never refused: Kuma holds a foreign key to the model row, so the selection follows the rename instead of breaking. The same claim was in the installation docs; both are corrected to say what actually happens. Also drop the `trashed=False` filters from both model reference counts. AIAgentService.objects and AIField.objects are no-trash managers, so the generated SQL already excludes trashed rows. Rename the endpoint's operation id to get_ai_provider_model_usage: the documented response is an object, not a list. * fix: address Qodo review of the model usage warning Count a service only while a live owner still reaches it. The previous exclusion dropped the whole service as soon as any related builder action was trashed, so a service shared by a live and a trashed action vanished from the warning. Both owner managers already encode which ancestors count as trashed, so the check reuses them through EXISTS instead of restating the rules. Treat a failed usage lookup as unknown rather than zero. Returning empty counts made every caller skip its confirmation, letting a rename orphan consumers with no warning at all; the dialog now says the check failed and still lets the admin proceed. Cover fetchModelUsage directly: payload forms, workspace scoping and the snake_case to camelCase mapping had no store test. |
||
|
|
08a4bfd561 |
chore(deps): bump jwt-decode from 3.1.2 to 4.0.0 in /web-frontend (#5816)
* chore(deps): bump jwt-decode from 3.1.2 to 4.0.0 in /web-frontend Bumps [jwt-decode](https://github.com/auth0/jwt-decode) from 3.1.2 to 4.0.0. - [Release notes](https://github.com/auth0/jwt-decode/releases) - [Changelog](https://github.com/auth0/jwt-decode/blob/main/CHANGELOG.md) - [Commits](https://github.com/auth0/jwt-decode/compare/v3.1.2...v4.0.0) --- updated-dependencies: - dependency-name: jwt-decode dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: use named jwt-decode import for v4 jwt-decode 4.0.0 dropped the default export, which broke the production build with `"default" is not exported by jwt-decode/build/esm/index.js`. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Davide Silvestri <silvestri.eng@gmail.com> |
||
|
|
5275ede481 |
fix: make SMTP and Slack integration credentials write-only (#6072)
* fix: make integration credentials write-only in the API The SMTP password and Slack bot token were returned in plain text by the integration API and broadcast to every collaborator over the websocket. * fix: record integration config changes in the undo log The exclude list used sensitive_fields, which for SMTP covers every field, so undoing an SMTP integration update restored nothing. * fix: require the SMTP password when the connection target changes Keeping the stored password while changing host, port or use_tls let a user redirect it to a server of their choosing, or downgrade the connection so it crossed the wire in the clear. * fix: refresh integration state from the update response The has_password and has_token flags are derived server side and nothing else refreshes them for the user who made the change. * feat: keep the saved SMTP password when it is not retyped The API no longer returns the password, so the form must distinguish an untouched field from a deliberate clear. * feat: keep the saved Slack bot token when it is not retyped Also mask the input, which rendered a bearer credential in plain text. * feat: explain why an integration credential must be re-entered * chore: add changelog entry for write-only integration secrets * test: cover write-only integration secrets end to end Unit tests on either side cannot see the seam between the form omitting an untouched credential and the backend reading an omitted one as keep. * fix: correct Slack integration copy and defaults for write-only tokens The summary read the token itself, so a configured bot showed as not configured, and the create warning told users the token could be read back through the API. * fix: keep every sensitive field out of the integration action log Narrowing the exclude list put the SMTP host into a replayable log while the credential stayed out, so a recorded target change could be replayed onto a password supplied later by someone else. It also wrote the AI integration's provider API keys into the action and audit logs. * fix: keep integration secrets required when there is nothing to keep Making every secret optional so an update need not retype it also made the Slack token optional on create, where no stored value can be kept. * fix: never use the instance SMTP account for an integration Django's SMTP backend replaces a None username or password with the instance's own. * fix: read has_token when checking a Slack bot in button field actions * fix: list writable credentials in the integration request schemas Also keep the blank error code for an empty token on create. * docs: correct integration secret comments and changelog * style: format button field action list spec * fix: validate integration updates as partial Keeps secrets required on create so the schema matches the server, and drops the None stripping and view-level secret check it made redundant. * docs: cross-reference the two secret_field_dependencies * docs: describe the write-only contract of integration secrets The copy stops a base serializer's extra_kwargs leaking into the type's shared dict, which made name optional on the create serializer. * docs: move integration secret reasoning into docstrings * fix: name the credential generically in the retype message * test: select the SMTP password input by type * test: expect the credential wording in the retype e2e * fix: document integration updates as partial The update validates with partial=True, but its per-type schema components still listed token and host as required. * fix: let undo restore non-credential SMTP settings Only secrets and the targets they protect stay out of the action log, so an SMTP username change can be undone. Types without secrets still exclude every sensitive field. * docs: point sensitive_fields readers to secret_fields sensitive_fields does not hide a field from API responses, so new integration credentials need secret_fields too. |
||
|
|
42371d6beb | feat: Add skeleton loading animation and make pages load instantly (#6023) | ||
|
|
40c18a3c9f |
feat: add separate domain for preview (#5682)
Co-authored-by: Tsering Paljor <tsering@baserow.io> |
||
|
|
5459f9ecb5 |
feat[4c/6] Button field: send a Slack message (#6005)
* feat: let a database carry integrations, and take them along in an export
* feat: let a button field post to Slack through a bot of its own database
* feat: offer the Slack action in the button field editor, with the bots of its database
* docs: record where a button's external integrations live, and what an import drops
* fix: draw the button's action list the way the design does
* fix: put a Slack message's answer where its schema says it is
* test: drive the Slack action end to end, and send for real when a bot token is given
* test: let the e2e stack answer for Slack, so a click is proven in CI
* fix: charge a click for a Slack post its API refused
The refusal is raised once the post has been made, so treating it as
'nothing left the instance' handed the outbound slot back and let one row
drive unbounded requests at Slack.
* fix: read one rule for the integration a button may carry
Saving, importing and dispatching each spelled the rule out again, and
dispatch had lost the half about the field's own database. The refusal is
one answer now: three different ones let a caller walk the ids and learn
what the installation holds.
* fix: keep the Slack action standing on an answer that is not Slack's
The endpoint is configurable now, so a refusal need not carry an error
code, and a blocked address reads like the HTTP service's. The channel is
held to its column, and a half-filled form is described rather than
thrown over.
* fix: forget a database's integrations when its application is replaced
Remembering the fetch in a module-level map outlived the object it
described, so after any refetch the bot dropdown stayed empty and the only
thing offered was creating a second bot. A failed fetch is now reported
rather than left as an unhandled rejection.
* test: point the e2e suites at the renamed label and the stub's real path
The email spec picks its action by exact label, which this branch renamed,
and the stub was mounted from a path that does not exist once the recipe
has moved to the repo root.
* test: let the API guard for an unsupported application keep a type to refuse
A database accepts integrations now, so the endpoint test that used one to
prove the guard was asserting the opposite of what ships.
* fix: hold a database to the integrations its buttons can actually carry
Opening a database to integrations opened it to every type, so a Local
Baserow one, carrying an authorized_user, could be created on it and ride
along in every duplicate and snapshot. Refusing it on the action was not
enough. The list is read from the action types themselves, so the two
cannot drift.
* fix: answer a refused address and a stranger's JSON the way the HTTP action does
An address Advocate blocked was charged to the click although nothing was
sent, an answer that is not an object raised out of the service, and the
frame holding the bot token was logged with its locals. The channel form
also refused a length the API accepts.
* fix: check the integration an action carries on every save, not just the first
An edit that resent only the channel and the message skipped the read
check, so someone who may edit the field but not read the bot could
retarget it.
* fix: check who is copying an action against the integration it carries
Duplicating a field and changing a field's type both recreate the actions
without passing through the endpoint that checks the credential, so a copy
kept a bot the person asking for it may not read. The duplication hook now
carries the acting user, and a copy it cannot account for comes back
unconfigured.
* fix: hold a Slack answer to a size and a deadline, the way an HTTP one is held
The endpoint is configurable now, so its answer is not bounded by Slack's
own limits, and the request timeout restarts on every byte. A body that
drips could outlive the lock its dispatch time sizes, letting a second
click post against the same row. The reader the HTTP service already had
now lives beside the request function both of them use.
* fix: read the clicked field once, and survive an id an export made up
The dispatch guard read the field back through every action, two cold
queries apiece inside the lock, when the context already holds it. And an
integration id from an import file is not the validated integer the
endpoint's serializer produces, so a hand-edited export failed the job
with a database error.
* test: land a second click while a Slack post is still in flight
The lock that keeps two clicks off one row had no Slack coverage, which is
what the size and deadline on the answer are there to protect. The stub
holds one channel open long enough for the second click to arrive.
* docs: say what an empty integration list means, and what an authorized user does
It read as though only the row and frontend-only actions carried nothing,
when HTTP and email carry nothing either, for reasons of their own. And an
integration's authorized user does not outrank the clicker, it replaces
them: the dispatch never compares the two.
* fix: check what a duplicating user may read on every path that copies an action
The permission check only ran where a person copies an action in place, since
that was the only path carrying an actor. Duplicating a table or a database
goes through the serialized import instead, which had nobody to check, so the
copy kept a bot its owner may not read.
`ImportExportConfig` now carries who asked for the copy. An import from a file
and a template install still carry nobody, and keep what they came with.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: refuse an imported integration the application would not accept
The endpoint refuses a Local Baserow integration on a database, because its
authorized user would replace the clicker (ADR 006 section 5). The import path
never asked, so a hand written export placed one anyway, and it rode into
every duplicate and snapshot from there.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: read an integration id out of an export before keying the mapping with it
A list or a dict is not hashable, so looking one up aborted the whole import
job with a `TypeError`. `true` hashes equal to 1 and quietly picked up
whatever integration 1 was remapped to. A numeric string missed the mapping
and then resolved the id the export was written with, which is another
database's.
Coerced before the lookup rather than after, and booleans, containers and
floats refused outright.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* perf: read the bot once however many actions of a click share it
`select_related` only saves the base row. The token lives on the subtype, and
resolving that row by row cost a query per action, inside the lock that guards
the row. Three actions sharing one bot read it three times.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: hold a Slack post to the time its lock was sized for
The timeout Requests applies is per socket operation, not for the call as a
whole, and redirects were followed, thirty of them if offered. A configured
endpoint could spend a fresh timeout on every hop and outlive the lock that
guards the row, letting a second click through.
Redirects refused, since `chat.postMessage` answers directly, and the lock
sized off the socket operations the way the email service already does.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: remove only the containers the local e2e run started
A trap replaces the one before it rather than adding to it, so the Slack stub's
had to name httpbin too. It named it whether or not this run started one: point
E2E_HTTP_STUB_URL at your own stub and the block that starts httpbin never
runs, but the exit still removed whatever was using that name.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: let a fetched integration list land on the application still on screen
The fetch mutated the object it was handed, so a `forceSetAll` in flight left
the bots on an object nobody renders while the one on screen stayed empty. And
it cleared and repopulated with no ordering guard, so a bot created while the
request was open was wiped when the answer landed, with nothing to fetch it
again.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: ask again for a bot list the editor failed to fetch
The action cards are hidden rather than unmounted, so a fetch tied to a form's
own `created` ran once for the life of the editor. After a network blip the
dropdown read as a database with no bot, and the only thing offered was
creating a second one. Every form also reported the same failure, so three
Slack actions raised three toasts for one request.
The list owns the fetch now: it knows when a card opens, so reopening one asks
again, and there is one place to report from.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: make the integration dropdown selectable, editable and reachable
Every parent binds it with `v-model`, which listens for `update:modelValue`.
Creating an integration from the footer emitted `input` instead, so the bot was
created and then not selected. The auto select of a lone integration went the
same way.
The footer was an anchor with no href, so tab skipped it and no key opened it,
which left creating a first bot unreachable without a mouse.
And the footer only ever opened the modal to create. A database has no
integration settings page of its own, so an imported bot, whose token the
export stripped, could not be repaired from anywhere.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: say when a Slack action carries a bot with no token
An export strips the credential, so an imported bot arrives named and unusable
while the action still looks configured. Every click was then an outbound
request that was never going to work, and the reason only arrived after it.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* test: cover the Slack request deadline and its refused redirects
The tests for these were written with the fix and then left out of it, so the
lock sizing and the refused redirects went in uncovered.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: report a failed integrations fetch once for the request, not once per waiter
Moving the fetch to the list left the reporting with the caller, and a list can
be asked for the same request more than once. Each caller then caught the same
rejection and raised its own toast. Reported from inside the shared request
instead, so one failure is one message however many are waiting on it.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: describe the Slack answer where the dispatch actually puts it
`generate_schema` advertised `ok`, `channel` and `ts` at the root while the
dispatch kept them under `data`, so every path the data explorer offered for a
Slack node resolved to nothing. Chaining off one has never worked.
The schema describes the wrapper now, rather than the dispatch dropping it.
That leaves every sample an earlier version stored exactly as it is, so no
migration is needed. The cost is that this service describes its answer one
level deeper than the HTTP and email ones, which unwrap theirs instead.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* feat: say who else can use a Slack bot when its token is entered
A database's integrations are shared by everyone who can build in it, and nothing said
so at the moment that matters. The warning goes where the decision is made, and is
worded around reuse rather than exposure, since the token is never shown back.
It comes out again once ownership or private integrations land.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* docs: keep the integration rule in one place, and say what the new methods take
The comment on `allowed_integration_types` listed every action type's reason, which goes
stale the first time someone adds one. It now says what an empty list means and points
at the ADR, which carries the reasoning.
The methods this branch added or changed say what they take and what they answer with.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* docs: bring ADR 006 up to what phase 4c actually built
Section 5 said databases carry integrations while later sections still read as though
external actions were unbuilt: nothing to strip, nothing to reconfigure, no integrations
on a database at all.
Now recorded: which integration types an action may carry and why the list is empty for
most of them, that the database derives what it holds from those lists rather than
keeping a second one, which copy paths carry the requesting user and which deliberately
do not, what happens to a stripped token on import, and the Slack action's own
lifecycle.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* test: prove a Slack answer reaches the paths its schema offers
Three gaps found reviewing the fixes against what was asked for.
The e2e still reopened the dropdown to pick the bot it had just created, which
was the manual step the Vue 3 event was meant to remove. The dropdown now says
so on its own, and a form test covers it, asserting the selected value rather
than the item list, which holds the name either way.
And nothing exercised an automation node reading a Slack result, which is what
the shape question was really about. The new test builds the stored result with
`dispatch_transform` and walks the paths out of `generate_schema`, so moving
either side without the other fails it.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* refactor: cut the comments back to what is not already in the code
Roughly half of what this branch added restated the line below it or explained
at paragraph length what a sentence covers. Kept the ones that say why, dropped
the rest, and fixed a stale reference to an exception this service no longer
raises.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: keep the integration dropdown reaching its parent
Declaring `update:modelValue` in `emits` was half a fix. Vue keeps a declared
event's listener out of `$attrs`, so the parent's `onUpdate:modelValue` stopped
falling through to the dropdown below, which was the only thing carrying a
list selection back. Creating a bot worked; picking an existing one silently
did nothing, for the builder's data sources and user sources as much as for a
button field.
Everything now goes through `select`, and `autoSelectFirst` reads what the
parent actually bound rather than the `value` prop nobody passes.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: do not remember a load that backed off, or share one across requests
A fetch that backed off returned the list it declined to fill, which read as
success: the caller marked the database loaded, so bots that existed before
the request never appeared and nothing asked again. It answers null now, and
only a fetch that committed marks the load.
The in-flight map was also module scope, which one server process shares
across every request it renders. Keyed by store instead.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: let an action's bot be cleared without permission to read it
`get` cannot tell a key the request never sent from one sent as null, so
clearing the integration resolved to the one already carried and was refused
to anyone who could not read it. Removing a credential takes nothing away
from anyone, so it needs no such permission. An absent key still keeps and
checks what the action carries.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: stop a failed Slack request repeating the message back in its error
`except ConnectionError` caught the builtin, which requests' own
ConnectionError does not inherit from, so that branch never ran and the
failure fell through to a clause that raised `str(e)`. Requests builds that
message out of the whole URL, and this one's query string carries the channel
and the resolved message text.
`response.json()` sat in the same block, so a proxy's HTML or a redirect body,
which `allow_redirects=False` now stops following, surfaced as an opaque parse
error. Read outside it, and reported as an answer that is not Slack's.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: let a database still turn integrations off entirely
The override answered from the action types alone, so `supports_integrations`
was dead for databases. The two tests that turn it off to exercise the guard
were passing on the allow-list instead, and would have passed with the guard
deleted. Both now name a type the allow-list accepts, so only the flag can
refuse it.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* docs: say that a bot's token can be read, because it can
The warning claimed the token stays hidden. The integrations endpoint
serializes it in the clear, as it does for every other type, and this branch
is what exposes that endpoint on databases. Reworded, and the ADR with it,
noting that masking it on read is worth doing and is not scoped here.
Also finishes the comment trim, which a script gave up on halfway through, and
sources the Slack logo from the integration type that already owns it.
Claude-Session: https://claude.ai/code/session_0125wkP6wPcyQ3MZwtbDawhr
* fix: send the Slack channel and message in the body, not the query string
Both are row data. A query string is what a proxy writes to its access log, and
this PR makes the destination host configurable, so the message travelled
further than it needed to. The error path already worked around this by
refusing to repeat `str(e)`; sending the payload as form data removes the
reason for that.
* fix: keep a bot out of a duplicate made by someone who may not read it
A duplicate is taken with `exclude_sensitive_data=False`, so the bot was cloned
into the new database with its token. The action's `ReadIntegration` check then
ran against that clone, which lives in an application the duplicator owns and
can read, so it always passed. Denying read on a bot and duplicating the
database was a way to obtain its token.
The credential is left out of the export instead, and the copied action drops it
for want of one it may carry. One `check_multiple_permissions` call for the
whole list rather than one per integration.
The existing test passed only because it denied the operation by name, which
denied the clone too. The new one denies a single object, the way a per-object
role assignment does.
* perf: stop reading the same integration row three times on every save
The check resolves the integration to check it, then hands the id on and the
service type reads the same row twice more, base and subtype. It passes the
instance it already has instead. Its own checks are looser than the ones that
have just run.
The click path resolved integrations with `specific_iterator` directly, which
skips each type's `enhance_queryset`, trading one query per action for one per
related row. It goes through `IntegrationHandler.get_integrations` now.
Also says in the comment why an edit that does not resend the id is still
checked: the channel and the message are the whole of what a bot does.
* fix: skip an integration an application will not take, rather than fail the import
The gate refused the whole job. No export this instance writes can fail it
today, but a release that stops registering an action type would turn every
snapshot holding that integration into one that cannot be restored, and a
restore is the one path a user cannot work around.
The row still does not land, which is what the gate is for. An action naming a
skipped integration imports unconfigured, the same as for any integration it may
not carry. Only the database type narrows what it accepts, so nothing else can
see the None this now returns.
* refactor: tidy what the database does with its integrations
Share one cache across the integrations it exports and imports, the way builder,
automation and dashboard already do, so a type that serializes a file writes it
once. Count them in the import progress, which reported 100% before they were
done.
Keep `supports_integration_type` out of the middle of the class attributes and
read the accepted types once per call instead of scanning the registry inside a
generator. Not cached across calls: a test can register an action type.
Drop `_read_response_within_limit`, which had become a one-line pass-through to
the util the module already imports.
* fix: do not let a delayed integrations fetch undo a change made while it ran
Only a create or a delete bumped the generation the fetch reads, so an edit or a
reorder landing mid-request was overwritten by an answer written before it. For
a bot's token that reads as a missing credential on a bot that has one.
The fetch also restored the counter to what it found after writing its answer,
which dropped a bump a create had committed in the meantime and let a second
fetch write a list without the new bot. It commits the rows directly instead:
its own writes were never a change to back off from.
* fix: say when a Slack action points at a bot that is not there
An empty list read as healthy, so a bot deleted since, or one named by an import
made elsewhere, left the action looking configured until the click failed. It
now waits for the list to have been fetched rather than for it to be non-empty,
and reports a bot it cannot find.
A fetch that failed stays quiet: the list is unknown then, not empty, and the
failure already raises its own message.
* fix: offer to edit an integration only where there is nowhere else to
The edit button went into the shared dropdown, so it appeared in the builder
data source and user source forms, automation, dashboard, the AI agent form and
the SMTP form. All of those have an integration settings page; a database does
not, which is the reason the button exists.
It is behind a prop now, and the Slack form passes it only for a database.
* fix: match the slow Slack stub on the body the request now sends
Moving the payload out of the query string left this stub matching on a
`channel` query parameter that is no longer there, so it never matched and the
catch-all answered at once. The concurrent-click test lost the delay its lock
assertion depends on, and would have passed without ever holding a lock.
* fix: ask again for an integrations list that changed, rather than dropping it
Bumping the generation on an edit or a reorder made the back-off common, and
only the button field caller reads the null it returns. The builder awaits this
inside `loadExtraData` and then marks itself loaded either way, so renaming an
integration while that fetch was open left every data source and user source
dropdown empty until a reload.
It asks again instead, up to three times, and answers null only when the list
will not settle. The tests give the retry the answer a server would have by
then.
* fix: do not call a bot missing when it may only be hidden
`get_integrations` filters the list by what the caller may list, so a bot absent
from it is either deleted or invisible to this user and there is no telling
which. Someone with no list access to a colleague's bot was told a working
action was broken, and following the message would have overwritten it.
* refactor: read the accepted integration types without building a set
One membership test does not need a frozenset of every type: the generator it
replaced short-circuited and allocated nothing. Not keeping the answer was the
right call; building the set was not.
Also `or []` for the imported integrations, since a hand-edited export can name
the key with an explicit null, and two test names and a docstring that still
described the behaviour before this branch changed it.
* test: open the Slack answer's data node before reading its fields
The schema describes the wrapper the dispatch actually writes, so `ok`,
`Channel` and `Message timestamp` sit one level in. The test still expected
them beside the action, and had been failing since the schema was corrected.
Opening the node is what a user does to reach them.
* fix: mount the Slack stub from the directory the recipe actually runs in
`just --justfile e2e-tests/justfile` runs recipes from that file's own
directory, so `$(pwd)/e2e-tests/stubs/slack` pointed a level too deep. Docker
created the missing path and mounted it empty, WireMock started with no
mappings, and every Slack call answered 404. CI was unaffected: it mounts the
stub by workspace path.
* docs: say why the application type is compared as a literal here
`integrations` must not import from `database`, and the sibling forms compare
`application.type === 'automation'` the same way.
* Revert "fix: mount the Slack stub from the directory the recipe actually runs in"
This reverts commit
|
||
|
|
ab45c2346a |
feat [4/8]: per-feature AI model settings (#5796)
* feat: per-feature and workspace-level AI model settings Baserow could only point every AI feature at one instance-wide model. An administrator can now register provider models, declare which AI features each model may serve, and pick the default model per feature; a workspace admin can inherit that choice, override it, or disable the feature locally. The assistant resolves its model once per logical request and threads that snapshot through its nested agents and tools, so a single run can no longer re-read settings repeatedly or pick a model other than the one it validated. The scoped provider state is memoized for the duration of a request, keeping workspace serialization from loading it once per workspace. Also: - add Google and Groq provider types, and keep these database-only providers out of the legacy workspace settings they cannot round-trip through; - prune orphaned feature selections so an unloaded feature type's RESTRICT FK no longer blocks provider and model deletion; - record whether a configured model answers text and tool-calling probes, and invalidate that result when its credentials or identifier change; - broadcast provider and availability changes over the existing realtime channel so open clients update without reloading; - read the assistant model from the shared configmap, so frontend pods no longer miss it on Helm installs. Manual test instructions live in docs/testing/kuma-model-settings-test-plan.md. * fix: address AI provider settings review feedback |
||
|
|
f27bb387fe |
feat [3/8]: add workspace AI provider management and complete AI Field resolution (#5785)
* feat: add workspace AI providers for AI fields * fix: address workspace AI provider review feedback * fix: address remaining AI provider review feedback * fix: resolve core migration conflict * fix: stabilize premium AI provider tests * address feedback for local imports |
||
|
|
85bb455970 | feat: Add option to replay guided tour (#5892) | ||
|
|
c3706658a2 |
feat [1/8]: add instance AI provider management behind a feature flag (#5740)
* 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 |
||
|
|
3486ba237a |
feat: data sync run history - record every sync as a job and show it to users (#5706)
* fix: call JobType.on_error hook again when a job fails
The call was accidentally dropped in
|
||
|
|
f5ebc9457c | feat: show anonymous public view visitors in editor's presence bar (#5704) | ||
|
|
8eeb53e4fc | feat: User presence (part 2) - user presence on grid (#5570) | ||
|
|
0b0562ec93 | feat: User presence (part 1) - infrastructure and grid avatars (#5399) | ||
|
|
1d1e992b21 | Improve websocket management when the connection is lost (#5355) | ||
|
|
41b17384a3 | fix: avoid shared Vuex module state (#5576) | ||
|
|
6d902bb127 | feat: add membership management for all app types (#5419) | ||
|
|
87ccd866b5 | Remove all live code TODO MIG (#5207) | ||
|
|
3a431d246c | fix (nuxt): instance unavailable errors (#5064) | ||
|
|
5b77347066 | feat (auth): implement Cloudflare Turnstile captcha (#5052) | ||
|
|
7bf50f86a4 |
fix: handle error when user logs out while refresh token is already expired (#4987)
* Handle error when refresh token is already expired. * Update code --------- Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com> |
||
|
|
ee21b017f2 | Fix more frontend unit tests after nuxt migration (#4591) | ||
|
|
0cf64c4fd9 |
Refactor prettier formatting (#4598)
* fix prettier linting and please the linter * Use dedicated prettier command * Update .prettierignore * Add vendor SCSS directory to .prettierignore |
||
|
|
5ceae6c70a |
Nuxt3 migration continue (#4578)
* 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 |