Commit 1a74824
authored
feat: add --force flag to browsers update viewport resize (#131)
## 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](kernel/kernel@f0caf13).
<!-- CURSOR_SUMMARY -->
---
> [!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.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b77a4b1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent f64b9af commit 1a74824
4 files changed
+95
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
589 | 590 | | |
590 | 591 | | |
591 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
592 | 598 | | |
593 | 599 | | |
594 | 600 | | |
| |||
622 | 628 | | |
623 | 629 | | |
624 | 630 | | |
625 | | - | |
626 | | - | |
627 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
628 | 636 | | |
629 | 637 | | |
630 | 638 | | |
631 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
632 | 643 | | |
633 | 644 | | |
634 | 645 | | |
| |||
2122 | 2133 | | |
2123 | 2134 | | |
2124 | 2135 | | |
| 2136 | + | |
2125 | 2137 | | |
2126 | 2138 | | |
2127 | 2139 | | |
| |||
2159 | 2171 | | |
2160 | 2172 | | |
2161 | 2173 | | |
| 2174 | + | |
2162 | 2175 | | |
2163 | 2176 | | |
2164 | 2177 | | |
| |||
2619 | 2632 | | |
2620 | 2633 | | |
2621 | 2634 | | |
| 2635 | + | |
2622 | 2636 | | |
2623 | 2637 | | |
2624 | 2638 | | |
| |||
2630 | 2644 | | |
2631 | 2645 | | |
2632 | 2646 | | |
| 2647 | + | |
2633 | 2648 | | |
2634 | 2649 | | |
2635 | 2650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
0 commit comments