From 7faef877797d29e2cbe5c85ddbbe13e001e94e1c Mon Sep 17 00:00:00 2001 From: Mason Williams Date: Mon, 5 Jan 2026 12:23:32 -0800 Subject: [PATCH 1/2] feat(browsers): add Pool column to browsers list Shows 'Pooled' when a browser session was acquired from a pool. Uses ExtraFields to detect pool_id until SDK is updated with the field. --- cmd/browsers.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/browsers.go b/cmd/browsers.go index eb4e27b..1f12381 100644 --- a/cmd/browsers.go +++ b/cmd/browsers.go @@ -243,7 +243,7 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error { } // Prepare table data - headers := []string{"Browser ID", "Created At", "Persistent ID", "Profile", "CDP WS URL", "Live View URL"} + headers := []string{"Browser ID", "Created At", "Persistent ID", "Profile", "Pool", "CDP WS URL", "Live View URL"} if in.IncludeDeleted { headers = append(headers, "Deleted At") } @@ -262,11 +262,18 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error { profile = browser.Profile.ID } + // Check for pool_id in ExtraFields (until SDK is updated with PoolID field) + poolID := "-" + if pf, ok := browser.JSON.ExtraFields["pool_id"]; ok && pf.Valid() { + poolID = "Pooled" + } + row := []string{ browser.SessionID, util.FormatLocal(browser.CreatedAt), persistentID, profile, + poolID, truncateURL(browser.CdpWsURL, 50), truncateURL(browser.BrowserLiveViewURL, 50), } From badd9489305cc4ce7392773d963637e8f4540d07 Mon Sep 17 00:00:00 2001 From: Mason Williams Date: Mon, 5 Jan 2026 13:23:54 -0800 Subject: [PATCH 2/2] feat(browsers): log browser details in list output --- cmd/browsers.go | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/cmd/browsers.go b/cmd/browsers.go index 1f12381..eadb5f8 100644 --- a/cmd/browsers.go +++ b/cmd/browsers.go @@ -250,6 +250,9 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error { tableData := pterm.TableData{headers} for _, browser := range browsers { + // log the browser + pterm.Info.Println(browser) + persistentID := "-" if browser.Persistence.ID != "" { persistentID = browser.Persistence.ID @@ -264,8 +267,8 @@ func (b BrowsersCmd) List(ctx context.Context, in BrowsersListInput) error { // Check for pool_id in ExtraFields (until SDK is updated with PoolID field) poolID := "-" - if pf, ok := browser.JSON.ExtraFields["pool_id"]; ok && pf.Valid() { - poolID = "Pooled" + if browser.PoolID != "" { + poolID = browser.PoolID } row := []string{ @@ -370,17 +373,17 @@ func (b BrowsersCmd) Create(ctx context.Context, in BrowsersCreateInput) error { return util.CleanedUpSdkError{Err: err} } - printBrowserSessionResult(browser.SessionID, browser.CdpWsURL, browser.BrowserLiveViewURL, browser.Persistence, browser.Profile) + printBrowserSessionResult(browser.SessionID, browser.CdpWsURL, browser.BrowserLiveViewURL, browser.PoolID, browser.Persistence, browser.Profile) return nil } -func printBrowserSessionResult(sessionID, cdpURL, liveViewURL string, persistence kernel.BrowserPersistence, profile kernel.Profile) { - tableData := buildBrowserTableData(sessionID, cdpURL, liveViewURL, persistence, profile) +func printBrowserSessionResult(sessionID, cdpURL, liveViewURL, poolID string, persistence kernel.BrowserPersistence, profile kernel.Profile) { + tableData := buildBrowserTableData(sessionID, cdpURL, liveViewURL, poolID, persistence, profile) PrintTableNoPad(tableData, true) } // buildBrowserTableData creates a base table with common browser session fields. -func buildBrowserTableData(sessionID, cdpURL, liveViewURL string, persistence kernel.BrowserPersistence, profile kernel.Profile) pterm.TableData { +func buildBrowserTableData(sessionID, cdpURL, liveViewURL, poolID string, persistence kernel.BrowserPersistence, profile kernel.Profile) pterm.TableData { tableData := pterm.TableData{ {"Property", "Value"}, {"Session ID", sessionID}, @@ -399,6 +402,9 @@ func buildBrowserTableData(sessionID, cdpURL, liveViewURL string, persistence ke } tableData = append(tableData, []string{"Profile", profVal}) } + if poolID != "" { + tableData = append(tableData, []string{"Pool ID", poolID}) + } return tableData } @@ -504,6 +510,7 @@ func (b BrowsersCmd) Get(ctx context.Context, in BrowsersGetInput) error { browser.SessionID, browser.CdpWsURL, browser.BrowserLiveViewURL, + browser.PoolID, browser.Persistence, browser.Profile, ) @@ -2082,7 +2089,7 @@ func runBrowsersCreate(cmd *cobra.Command, args []string) error { pterm.Error.Println("Acquire request timed out (no browser available). Retry to continue waiting.") return nil } - printBrowserSessionResult(resp.SessionID, resp.CdpWsURL, resp.BrowserLiveViewURL, resp.Persistence, resp.Profile) + printBrowserSessionResult(resp.SessionID, resp.CdpWsURL, resp.BrowserLiveViewURL, resp.PoolID, resp.Persistence, resp.Profile) return nil }