Skip to content

feat(composer): default blank workspace name to a unique marine-creature#1069

Merged
AmethystLiang merged 1 commit intomainfrom
use-default-marine-animal-name
Apr 25, 2026
Merged

feat(composer): default blank workspace name to a unique marine-creature#1069
AmethystLiang merged 1 commit intomainfrom
use-default-marine-animal-name

Conversation

@AmethystLiang
Copy link
Copy Markdown
Contributor

@AmethystLiang AmethystLiang commented Apr 25, 2026

Problem

When a user leaves the workspace name field blank in the composer and has no prompt/linked issue/PR to seed from, getWorkspaceSeedName defaults to the literal "workspace". Creating multiple blank workspaces causes collisions on the same name, forcing git to append numeric suffixes (workspace-2, workspace-3, etc.), which is not user-friendly.

Solution

Wire useComposerState to compute a repo-scoped unique marine-creature name via the existing getSuggestedCreatureName helper and pass it as fallbackName to getWorkspaceSeedName. This ensures blank submissions get a distinct, readable identifier (e.g., "nautilus", "dolphin") instead of colliding, while respecting the nestWorkspaces setting.

Test coverage: Added unit tests for fallback precedence — explicit name still wins over fallback.

Test plan

  • pnpm typecheck
  • Unit tests for getWorkspaceSeedName fallback precedence (2672 tests green)
  • Manual: open Cmd+J composer, leave name blank, create — verify workspace gets a unique creature name

Use the existing getSuggestedCreatureName helper as the fallback seed in
getWorkspaceSeedName so blank submissions get a distinct, readable name
scoped to the selected repo (respecting nestWorkspaces) instead of
colliding on the "workspace" literal.
@AmethystLiang AmethystLiang merged commit 68ceae5 into main Apr 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant