Skip to content

feat(workspace): add down alias for workspace delete (#1211) - #1215

Draft
skevetter wants to merge 1 commit into
mainfrom
feat/1211-workspace-down-alias
Draft

feat(workspace): add down alias for workspace delete (#1211)#1215
skevetter wants to merge 1 commit into
mainfrom
feat/1211-workspace-down-alias

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Implements devsy workspace down as an alias of the canonical devsy workspace delete command following the design in #1211.

Motivation

Users familiar with Docker Compose often expect devsy workspace down as the inverse of devsy workspace up. Devsy's compose-backed teardown already executes Docker Compose down, while workspace stop owns reversible suspension semantics. Adding down as an exact Cobra alias of workspace delete aligns ergonomics with user mental models without introducing unnecessary lifecycle or state divergence.

Changes

  1. CLI Alias & Command Description (cmd/workspace/delete.go):

    • Added "down" to deleteCmd.Aliases ([]string{"rm", "down"}).
    • Updated deleteCmd.Long to clarify that down and rm perform the same full Devsy workspace teardown, noting Docker/Podman Compose down behavior for Compose-backed workspaces.
  2. CLI Contract Tests (cmd/workspace/delete_test.go):

    • TestDeleteCmd_Aliases: Asserts rm and down are registered aliases.
    • TestDeleteCmd_Resolution: Asserts delete, rm, down, and down <workspace> resolve to the canonical delete command.
    • TestDeleteCmd_HelpExposesDownAlias: Asserts command help output exposes down and rm under Aliases:.
    • TestDeleteCmd_Completion: Asserts generated shell completion suggestions include down.
  3. Documentation (sites/docs-devsy-sh/content/docs/developing-in-workspaces/stop-and-delete-a-workspace.mdx):

    • Added documentation for devsy workspace down under Stop or Delete a Workspace, clarifying its relationship with delete and stop.

Verification

  • Local unit tests pass: go test -v -run '^TestDeleteCmd' ./cmd/workspace
  • Formatting verified: golangci-lint fmt and gofmt
  • Linting verified: golangci-lint run --fast-only
  • Pre-review verified: coderabbit review reported no findings (0 issues across all 3 files)

Closes #1211

Add 'down' as an alias for 'devsy workspace delete' to match common Docker Compose mental models without changing existing teardown semantics.

- Register 'down' in DeleteCmd.Aliases
- Update Long description noting full Devsy teardown and Compose down mapping
- Add CLI contract tests for alias registration, command resolution, help text, and shell completion
- Update documentation in stop-and-delete-a-workspace.mdx

Closes #1211
@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 02b718c
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6aa229d6d1311c0008c0e85d

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev ready!

Name Link
🔨 Latest commit 02b718c
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6aa229d62174e600086bd372
😎 Deploy Preview https://deploy-preview-1215--devsydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add a down alias to workspace delete to align with docker compose down

1 participant