n8n/packages/frontend/@n8n
Mutasem Aldmour a8fb02b46f
fix(editor): Make Browser Use work end to end in the agent chat preview (no-changelog)
Running an agent against a real model surfaced two failures that unit tests
and typechecking could not.

Anthropic rejected the whole request with "tools.19.custom.input_schema.type:
Field required". Three browser tools (browser_scroll, browser_cookies,
browser_storage) are discriminated unions, which convert to a top-level
anyOf; providers require an object at the root and refuse anyOf/oneOf/allOf
there. Because the rejection is per-request rather than per-tool, one such
schema took the entire agent down. They are now flattened into a single
object - union of every branch's properties, requiring only what all branches
share, with the discriminator collapsed into an enum so no mode is hidden
from the model. The real zod schema still validates inside callTool, so a bad
combination returns a correctable error instead of breaking the conversation.
A tool whose schema cannot be expressed is dropped with a warning rather than
poisoning every request.

The suspension then reached the frontend but rendered nothing: the chat only
built interactive cards for approval-shaped payloads and chat_action, so the
run sat suspended with no way to resume. Adds a third interactive variant for
the connect card. The approval card was not reusable - it is hard-coded to
"Approval required" with Approve/Deny, which is the wrong question here.

One suspend payload now serves both surfaces: `components` is what a channel
turns into Block Kit, `type` and `setupUrl` are what the in-app chat matches
on. Neither minds the other's fields.

Verified in the preview against Claude Sonnet 4.5: the agent calls
browser_tab_open, the card renders with a working setup link, and clicking
"I've connected" resumes the run - which then reports no browser and explains
it instead of looping.
2026-08-12 12:56:32 +02:00
..
chat 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
composables 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
design-system feat(core): Tell the assistant which services are connected and what tools they expose (#35931) 2026-08-11 09:02:51 +00:00
frontend-constants 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
frontend-module-sdk refactor(editor): Derive modal state from the registry instead of mirroring it (no-changelog) (#35859) 2026-08-11 07:54:50 +00:00
frontend-utils 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
i18n fix(editor): Make Browser Use work end to end in the agent chat preview (no-changelog) 2026-08-12 12:56:32 +02:00
rest-api-client fix(editor): Redirect to sign-in when the user's session expires (#35507) 2026-08-12 06:58:58 +00:00
stores fix(editor): Redirect to sign-in when the user's session expires (#35507) 2026-08-12 06:58:58 +00:00
storybook chore(editor): Reorganize Storybook sidebar (no-changelog) (#35608) 2026-08-05 12:32:03 +00:00