Skip to content

feat(cmd): update sandbox list command - #689

Open
vegeris wants to merge 10 commits into
mainfrom
evegeris-update-sandbox-list
Open

vegeris wants to merge 10 commits into
mainfrom
evegeris-update-sandbox-list

Conversation

@vegeris

@vegeris vegeris commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Changelog

Small change to the output of the sandboxes list command; status and type displayed lowercase and now Type: basic will be displayed for basic sandboxes (previously we only showed the type label for partner sandboxes, to differentiate from regular sandboxes).

Summary

We recently introduced 'basic' sandboxes. In the developer dashboard we display a little label to differentiate between 'basic' and regular sandboxes, and there is no label on regular sandboxes. For consistency, this PR adds the 'type' attribute when listing basic sandboxes. We anticipate that a significant percentage of new sandboxes will be basic as this opens sandbox access up to a larger swathe of users.

Preview

Viewing sandboxes in the web UI:

Screenshot 2026-10-08 at 2 44 51 PM

Listing sandboxes in the CLI:

Before After
Screenshot 2026-10-08 at 12 44 13 PM Screenshot 2026-10-08 at 12 46 55 PM

Testing

(List the steps used to verify these changes)

Notes

(Add any additional context, trade-offs, or follow-up items)

Requirements

Comment thread cmd/sandbox/list.go

if s.Status != "" {
status := style.Secondary(fmt.Sprintf("Status: %s", strings.ToTitle(s.Status)))
status := style.Secondary(fmt.Sprintf("Status: %s", strings.ToLower(s.Status)))

@vegeris vegeris Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thinking this could be lowercase so it doesn't feel like we're shouting

  my cool sandbox (E0C6ZL333CM)
    URL: https://sandbox-pwureipq.slack.com
    Type: Partner vs. partner
    Status: ACTIVE vs. active
    Created: 2026-10-06
    Expires: 2026-12-06

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lol

@vegeris
vegeris marked this pull request as ready for review October 8, 2026 20:41
@vegeris
vegeris requested a review from a team as a code owner October 8, 2026 20:41
@vegeris vegeris added enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment labels Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.19%. Comparing base (24242de) to head (1809689).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #689      +/-   ##
==========================================
- Coverage   78.23%   78.19%   -0.05%     
==========================================
  Files         239      239              
  Lines       18149    18150       +1     
==========================================
- Hits        14199    14192       -7     
- Misses       3950     3958       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread cmd/sandbox/list_test.go Outdated
ExpectedStdoutOutputs: []string{"my-sandbox", "T123", "https://my-sandbox.slack.com", "Status: active", "basic-sandbox", "T456"},
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "")
assert.NotContains(t, cm.GetStdoutOutput(), "Type:")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks like this test is failing because you are expecting no type but in list.go we return Type: "basic"

{
	TeamID:       "T456",
	 Name:         "basic-sandbox",
	 Domain:       "basic-sandbox",
     Status:       "active",
	 DateCreated:  1700000000,
	 DateArchived: 0,
	 Type:         "basic",
},

@vegeris vegeris Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops! Updated :)

(Now all sandboxes in the output of the list API will have a 'type' most commonly 'regular' or 'basic')

@vegeris
vegeris requested a review from srtaalej October 8, 2026 22:14
Comment thread cmd/sandbox/list_test.go
cm.API.AssertCalled(t, "ListSandboxes", mock.Anything, "xoxb-test-token", "")
},
},
"with active sandboxes": {

@vegeris vegeris Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It didn't seem worth having separate tests to verify that if the sandbox status was active vs archived, it would be reflected in the printed output. Merged this into a single test for 'printed output displays sandbox attributes as expected'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good choice!

@srtaalej srtaalej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for keeping this command up to date!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants