Problem
Preview automation can navigate authenticated pages, but it cannot set cookies in the environment-scoped Electron browser partition. Agents must fall back to a separate browser, so the collaborative preview no longer reflects the same session or remote environment.
This is a generic cookie-setting capability. It must not depend on Better Auth or on where the cookie value came from.
Expected behavior
- Expose a preview automation operation that accepts standard cookie fields: URL, name, value, domain, path, secure, HTTP-only, SameSite, and expiration.
- Apply the cookie to the selected environment isolated preview partition.
- Preserve isolation between environments.
- Return typed failures without exposing cookie values.
- Continue to support clearing cookies through the existing reverse operation.
Problem
Preview automation can navigate authenticated pages, but it cannot set cookies in the environment-scoped Electron browser partition. Agents must fall back to a separate browser, so the collaborative preview no longer reflects the same session or remote environment.
This is a generic cookie-setting capability. It must not depend on Better Auth or on where the cookie value came from.
Expected behavior