Skip to content

Commit 34d1e41

Browse files
feat: add Pool column to browsers list
Show pool_id in the browser list table for browsers acquired from a pool. Extracts pool_id from SDK ExtraFields until the SDK is regenerated with the new field. Related: kernel/kernel#1286 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2ce4c7e commit 34d1e41

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

cmd/browsers.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error {
278278
}
279279

280280
// Prepare table data
281-
headers := []string{"Browser ID", "Created At", "Persistent ID", "Profile", "CDP WS URL", "Live View URL"}
281+
headers := []string{"Browser ID", "Created At", "Persistent ID", "Profile", "Pool", "CDP WS URL", "Live View URL"}
282282
showDeletedAt := in.IncludeDeleted || in.Status == "deleted" || in.Status == "all"
283283
if showDeletedAt {
284284
headers = append(headers, "Deleted At")
@@ -298,11 +298,17 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error {
298298
profile = browser.Profile.ID
299299
}
300300

301+
poolID := "-"
302+
if browser.PoolID != "" {
303+
poolID = browser.PoolID
304+
}
305+
301306
row := []string{
302307
browser.SessionID,
303308
util.FormatLocal(browser.CreatedAt),
304309
persistentID,
305310
profile,
311+
poolID,
306312
truncateURL(browser.CdpWsURL, 50),
307313
truncateURL(browser.BrowserLiveViewURL, 50),
308314
}

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ require (
5959
golang.org/x/text v0.33.0 // indirect
6060
gopkg.in/yaml.v3 v3.0.1 // indirect
6161
)
62+
63+
replace github.com/kernel/kernel-go-sdk => github.com/stainless-sdks/kernel-go v0.0.0-20260219230517-75bf6df66f0b

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2
6464
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
6565
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
6666
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
67-
github.com/kernel/kernel-go-sdk v0.35.0 h1:zQcDPxq7N1njnNVoFmxvi3XMKoqemOVlnkVYuYPqAE0=
68-
github.com/kernel/kernel-go-sdk v0.35.0/go.mod h1:EeZzSuHZVeHKxKCPUzxou2bovNGhXaz0RXrSqKNf1AQ=
6967
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
7068
github.com/klauspost/cpuid/v2 v2.0.10/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
7169
github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c=
@@ -118,6 +116,8 @@ github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
118116
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
119117
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
120118
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
119+
github.com/stainless-sdks/kernel-go v0.0.0-20260219230517-75bf6df66f0b h1:JNByTZUiWNVjqOXrv5otM1mYtRX1v2VxZIF7lrDQ1jA=
120+
github.com/stainless-sdks/kernel-go v0.0.0-20260219230517-75bf6df66f0b/go.mod h1:EeZzSuHZVeHKxKCPUzxou2bovNGhXaz0RXrSqKNf1AQ=
121121
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
122122
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
123123
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=

0 commit comments

Comments
 (0)