feat(workspaces): decouple display name from git branch#87
Open
Rinat S (rsolmano) wants to merge 3 commits into
Open
feat(workspaces): decouple display name from git branch#87Rinat S (rsolmano) wants to merge 3 commits into
Rinat S (rsolmano) wants to merge 3 commits into
Conversation
Workspace names rendered in the left-nav as kebab slugs because a workspace's name doubled as its git branch. Split the two: `name` is now a human-readable display label (Title Case, spaces) and `branch` is a kebab slug derived from it and uniqued against refs + worktree dirs. The left-nav shows the name with a secondary monospace branch chip, rendered only when it differs from the name (pristine/legacy rows stay clean). - assist: namers emit Title Case display names (naiveWorkspaceName, toWorkspaceName preserving casing); branch derivation stays in workspaces - workspaces: drop the name === branch invariant; createWorkspace / renameWorkspace set name + derived branch independently; display names may repeat, only the branch is uniqued - host/autoRename: pristine gate keys off the branch, not the display name - web: WorkspaceRow gains a secondary mono branch chip (workspace-branch) - specs updated: contracts / assist / workspaces / host / panels
…chip The git branch now renders on a second line beneath the display name instead of an inline chip, so the name and branch stop competing for horizontal width and both read fully. The branch line is still shown only when it differs from the name, so pristine/legacy `workspace-N` rows stay a single compact line (the row grows to fit via min-h-7 + py-xs). Updates panels + workspaces SPECs and the @agent auto-rename spec's comments/locator (the workspace-branch testid is unchanged).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Workspace names rendered in the left-nav as kebab slugs (e.g.
fix-auth-redirect) because a workspace'snamedoubled as its git branch. That reads poorly. This splits the two:name— a human-readable display label (Title Case, spaces), shown in the sidebar.branch— a kebab slug derived from the name and uniqued against refs + worktree dirs (git-clean, unchanged behavior).The left-nav now shows the display name with a secondary monospace branch chip, rendered only when it differs from the name (so pristine
workspace-N/ legacy rows stay clean). The git branch stays glanceable for matching against git.The contract already had separate
name/branchfields — the server just forced them equal, so there is no wire-shape or protocol-version change.Changes
assist— namers emit Title Case display names:naiveWorkspaceSlug → naiveWorkspaceName(Title Case phrase),toWorkspaceSlug → toWorkspaceName(casing-preserving clamp, soAdd OAuth loginsurvives), andsuggestWorkspaceName's system prompt asks for a short human-readable name. Branch derivation stays out ofassist.workspaces— drop thename === branchinvariant;createWorkspace/renameWorkspaceset the displaynameand the derivedbranchindependently. Display names may repeat; only the branch is uniqued (the chip disambiguates). The autoworkspace-Nplaceholder is unchanged (name === branch).host/autoRename— the pristine-gate keys off the branch (^workspace-\d+$), not the display name, so the format decoupling cannot break it.WorkspaceRowgains a secondary mono branch chip (data-testid="workspace-branch"), token utilities only.contracts/assist/workspaces/host/panelsSPECs to record the decoupling.Out of scope
workspace.renamewire method / UI rename affordance (does not exist today).Verification
check:deps+lint+typecheck— green (pre-commit).bun run test— 151 server unit tests pass (updatedassist/workspaces/autoRenamespecs), plus web/contracts.bun run e2e(no-agent gate) — passes; the intermittent failures observed were confirmed flaky (each passed in isolation; different specs failed across runs, none in the changed area).e2e/auto-rename.live.spec.ts(AGENT, Inc. (@agent)) updated to assert Title Case names + the branch chip.