Skip to content

feat: add --force flag to browsers update viewport resize#131

Merged
hiroTamada merged 2 commits intomainfrom
feat/add-force-viewport-resize
Mar 5, 2026
Merged

feat: add --force flag to browsers update viewport resize#131
hiroTamada merged 2 commits intomainfrom
feat/add-force-viewport-resize

Conversation

@hiroTamada
Copy link
Contributor

@hiroTamada hiroTamada commented Mar 5, 2026

Summary

  • Bumps kernel-go-sdk from v0.40.0 to v0.42.1
  • Adds --force flag to kernel browsers update command
  • When --force is used with --viewport, the viewport resize proceeds even when a live view or recording/replay is active — active recordings are gracefully stopped and restarted as separate segments at the new resolution
  • Default behavior (without --force) is unchanged — resize is refused when a live view or recording is active

Corresponds to kernel/kernel#1407.


Note

Medium Risk
Bumps the Kernel Go SDK and changes the shape of the BrowserUpdateParams viewport payload, which could affect runtime behavior/compatibility with the API. The new --force path explicitly alters how viewport updates are applied during active live views/recordings.

Overview
Adds forced viewport resizing for running browser sessions. kernel browsers update now accepts --force (only valid with --viewport) and passes a force=true option in the update payload to allow resizing even when live view/recording is active.

Updates dependencies and tests. Upgrades github.com/kernel/kernel-go-sdk to v0.42.1, adjusts the viewport update params type accordingly, and adds unit tests covering --force behavior and validation errors.

Written by Cursor Bugbot for commit b77a4b1. This will update automatically on new commits. Configure here.

Bump go-sdk to v0.42.1 and expose the new `force` parameter on
`PATCH /browsers/{id}` viewport updates. When `--force` is passed
alongside `--viewport`, the resize proceeds even when a live view or
recording/replay is active — active recordings are gracefully stopped
and restarted as separate segments at the new resolution.

Made-with: Cursor
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Adds explicit validation so --force is rejected with a clear error
when used without --viewport, instead of being silently ignored.

Made-with: Cursor
@hiroTamada hiroTamada merged commit 1a74824 into main Mar 5, 2026
2 checks passed
@hiroTamada hiroTamada deleted the feat/add-force-viewport-resize branch March 5, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants