You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Separate workspace label from host name (alias) #1654
Reviewed 30 October 2026. Status: feature remains outstanding. No implementation PR referencing #1654 was found in the current open-PR inventory or issue-number search. Keep this issue as the implementation tracker.
Source baseline:9bc12ee041ca854c6f81de95fd8c6e49d7cc028c. The following is a proposed implementation, based on source inspection. The existing workspace ID, storage identity and provider identity must continue to work.
1. Findings and design decision
Verified behavior
Source
Consequence
Local workspaces have ID and UID. The existing DisplayName belongs to PlatformMetadata, not ordinary local workspaces.
Replace the ordinary naming interaction with an explicit two-field Save/Cancel form. Retain the existing ID-changing operation as a separate advanced action.
Creation currently derives and uniquifies a workspace ID.
Keep the canonical ID-based SSH alias valid for compatibility; make the new preferred alias additive. No container recreation is needed to update an environment variable.
Implement a display label and a preferred local SSH alias, while retaining the canonical ID.devsy alias and the existing stable UID. This is an SSH configuration alias, not container hostname, DNS registration, Kubernetes resource name or a change to ${devcontainerId}. For example:
Property
Example
Role
Workspace ID
project-42
Existing CLI selector, storage paths and provider operations.
Workspace UID
Existing generated value
Workspace generation and ownership.
Display label
My Horse Social Network
Human-facing name.
Preferred SSH alias
my-project.devsy
New SSH and IDE connection target.
Canonical SSH alias
project-42.devsy
Compatibility target retained for old links and container info.
This is a deliberate refinement of the request: changing the preferred SSH alias does not rename or rebuild the workspace. The canonical alias remains reserved while that workspace exists. Existing workspace rename retains its separate, explicitly disruptive semantics.
2. Product contract
Existing workspaces need no migration command. An absent display label resolves to the workspace ID; an absent preferred alias resolves to ID.devsy. Platform-managed workspaces retain their platform-owned display name and existing connection contract; local edits to these fields are rejected with a specific managed-workspace error in this first version.
Creation initially fills label and alias from the proposed ID. Once the user edits a field, changing the other field does not overwrite it. An explicit label such as My Horse Social Network is preserved as text, not slugified.
Label-only changes never stop, start, rebuild, rename directories or touch SSH configuration. Alias changes update the host names in an existing owned managed SSH block, retaining its transport, user, workdir and other connection settings as well as the canonical alias. They do not start the provider or execute a container command. If no managed block exists yet, save the alias preference and apply it on the next normal SSH configuration during up; do not invent connection settings or claim a new SSH entry has already been installed.
A running SSH session remains connected during an alias change. The old custom alias is removed; new connections use the new alias or the canonical alias. Existing IDE windows may retain the old custom target for a later reconnect, so the successful save can state that reopening the IDE uses the new alias. Do not kill or reopen the IDE automatically.
Save validates changed fields against the latest persisted state and applies all submitted changes together. Desktop sends only dirty fields, with the original values of those fields for an optimistic conflict check; a stale form must not silently overwrite a newer edit to the same field. Cancel and typing have no persistent effect. Frontend conflict checks are advisory; backend validation decides the outcome. An unchanged normalized alias does not trigger SSH inspection, collision checks or rewriting during a label edit.
Local CLI selectors remain workspace IDs/paths. Do not add fuzzy lookup by label or interpret an SSH alias as a different workspace ID.
Display label comparisons use trimmed, NFC-normalized, Unicode case-folded text within the selected Devsy context. Preserve interior spaces and the user's display casing. Reject control characters and labels longer than 120 Unicode code points. Empty explicit label clears the override and uses the ID; validate that effective fallback too. Existing unrelated labels are not renamed.
Store the preferred alias base without .devsy. Accept lowercase ASCII letters, digits and internal hyphens, 1-48 characters, with alphanumeric endpoints. The UI displays the fixed .devsy suffix. Reject whitespace, dots, wildcards, slashes, newlines, an already-suffixed hostname and malformed input with field-specific errors. An empty explicit alias clears the override. New restrictions apply to new custom aliases, not retroactive rejection of existing workspace IDs.
When an alias is created or changed, detect conflicts against both canonical and preferred aliases of other workspaces in the same SSH client configuration namespace: the resolved root configuration and its reachable Include files. Two contexts writing different include files beneath the same root still share that namespace. Also reject an exact literal Host token in an unmanaged SSH block or a managed block owned by another workspace. Matching is case-insensitive. Broad Host * defaults are not themselves collisions. Check reachable include files without modifying them; bound include depth/file count and fail with an actionable validation error when an applicable include cannot be inspected. Do not execute Match exec to validate a name. A label-only update bypasses this entire SSH collision gate.
A host conflict is independent of label uniqueness. A duplicate label or alias is an error with the conflicting workspace/context, without automatic renaming. A proposed alias equal to this same workspace's canonical alias is valid and normalizes to no override.
3. Data model and command interface
Add optional top-level fields to provider.Workspace:
Add small methods/helpers for effective display label, preferred full SSH host and canonical full SSH host. Reuse config.SSHHostSuffix. Do not scatter fallback concatenation throughout Desktop and IDE launchers. For platform workspaces, the display helper respects the existing Platform.DisplayName; do not populate or mutate the persisted pro object for a local label.
Expose effective values in list/describe DTOs as additive fields so Desktop does not duplicate alias normalization. Keep id and uid unchanged in all existing output. The persisted fields above contain overrides; computed fields must not become a second authority.
Add a focused noninteractive command:
# Update both values in one operation.
devsy workspace edit project-42 --display-name 'My Horse Social Network' --ssh-host-alias my-project
# Label-only edit.
devsy workspace edit project-42 --display-name 'New Label'# Reset just the alias to the canonical host.
devsy workspace edit project-42 --ssh-host-alias ''
Omitted flags mean unchanged; an explicitly empty value clears the corresponding override. Use Cobra Changed checks, not zero-value inference. Require at least one editable field. Use the existing global --context and --result-format=auto|plain|json; JSON returns the committed ID, UID, context and effective presentation values. Add the same two optional flags to new-workspace workspace up, carrying them through detached task arguments. Validate/persist them before provider provisioning. Applying them to an existing workspace delegates to the same update helper, rather than bypassing collision checks.
For Desktop's CLI boundary, add hidden optional --expected-uid, --expected-display-name and --expected-ssh-host-alias flags to workspace edit. Compare expected field values after the same normalization used by the form, including effective ID-based fallbacks; an explicitly empty expectation must remain distinguishable from an omitted flag. Desktop always supplies expected UID and the original value for each dirty field. A CLI caller omitting a field expectation explicitly updates that field against current state; omitted editable fields remain unchanged. Pass these expectations through to the locked backend helper, rather than checking them only in the Desktop process before spawning the CLI.
4. Exact backend work
A. Centralize presentation persistence and validation
Add the fields/helpers in pkg/provider/workspace.go; add a focused pkg/workspace/presentation.go for request validation, effective-name comparison and the update operation. Use a request struct with optional field values and expected UID, rather than a long positional argument list.
Implement lookup and validation from current on-disk workspace configuration, scoped to the explicitly selected context. Check expected UID after acquiring the workspace operation lock so a delete/recreate using the same ID cannot receive a stale UI update. Compare any supplied original presentation values under that lock and return a stale-field conflict if a changed field no longer matches. Normalize against current values before deciding whether SSH work is necessary.
Add a home-scoped cross-process name-mutation lock for reservations across contexts, a lock for the resolved SSH root namespace, and a lock for the actual managed write target. Lock ordering is any existing outer configuration lock, workspace operation lock, home name lock, workspace persistence lock, then SSH namespace/target locks in stable path order. Reuse the exact workspace lock key from pkg/client/clientimplementation/locks.go through a shared local helper; do not construct or refresh a provider client merely to edit presentation. Existing lifecycle callers may already hold workspace/machine locks, so provide an internal already-locked path and do not reacquire the same lock. cmd/workspace/import.go already takes config.LockConfig; never acquire that outer lock from inside the new name/persistence/SSH locks. Creation/deletion/ID rename use the same name lock during final local naming changes; never hold it through a provider start, image build or network operation.
In pkg/provider/dir.go and pkg/provider/persist.go, protect these two fields from stale full-workspace saves. A normal update through SaveWorkspaceConfig must preserve the latest committed presentation fields for the same UID under the persistence lock. Define update versus creation explicitly: an update must reject a missing record or different UID, while an intentional creation/import/ID move may initialize the new path under its naming lock. Audit these callers when introducing that distinction; do not infer permission to recreate a deleted record from a stale in-memory object. The explicit presentation update uses a dedicated internal persistence path that may replace the fields without reacquiring an already-held lock. Cover this distinction with a race test; an old agent refresh or IDE-setting update must not erase an alias edit or overwrite a new generation.
Keep using WriteFileAtomic for workspace JSON. Do not replace it with a direct truncating write. Metadata changes are local and must also work when the provider is offline.
Reserve/validate the new name before committing a new workspace's local record, then release the name lock before remote work. If provisioning subsequently fails, cleanup follows the existing workspace lifecycle; it must remove only that UID's reservation/SSH block.
B. Make SSH configuration alias-aware and ownership-aware
Extend SSHConfigParams in pkg/ssh/config.go with preferred host and workspace UID while keeping Workspace as the CLI ID. Generate one managed section containing Host <preferred> <canonical>, deduplicating when equal. ProxyCommand ... workspace ssh ... <ID> retains the ID and explicit context.
Add an encoded resolved-Devsy-home/context/UID ownership comment inside the managed section. Resolve the effective home even when --home is omitted. Locate and replace a block by this ownership tuple, not by a user-visible label; imports can preserve UID, and distinct Devsy homes may share an SSH file. For legacy sections, migrate only a block whose generated ProxyCommand identifies the same context/ID and resolved Devsy home. A legacy tunnel or custom-command block may lack that evidence; if ownership cannot be established, report the specific conflicting block for repair rather than deleting or claiming it.
Refactor GetUser, RemoveFromConfig, section scanning and deletion to accept an explicit owned host/block selector. Retain wrappers for unchanged ID-only callers during migration. Match marker identities exactly: the current strings.HasPrefix matching must not remove foo.devsy-other while operating on foo.devsy.
Use cross-process namespace/target locks and atomic replacement for the target SSH file. The current package-level mutex protects only one process. Revalidate collisions in the root/include graph while the namespace lock is held, including other managed include targets. Preserve unrelated sections, comments, newline style, file mode, custom config paths and read-only-root/include-file operation. Resolve configured symlinks to their intended target; do not replace a symlink accidentally.
For an alias edit, change only the existing owned section's host list and identity markers. Preserve User, ProxyCommand, loopback Hostname/Port, forwarding and other connection settings; configureSSH and reconfigureSSHWithTunnel receive runtime values that an offline edit does not have. If no owned section exists, commit only the validated preference and return a result indicating that installation awaits normal SSH configuration. For an existing section, prepare both candidate payloads before writing. Write the owned SSH-block replacement and then commit the workspace metadata while locks remain held. If the metadata write fails, restore only that workspace's original block; return the original error plus any rollback error. Never report a successful save with one value uncommitted. A rollback failure is a typed partial-update error with a repair hint.
Treat workspace metadata as authoritative after a crash. Before the next managed SSH rewrite for that UID, reconcile all of its owned blocks to the committed metadata, removing a stranded custom alias without touching other owners. This avoids a new general transaction journal while providing deterministic recovery from interruption between the two writes.
Label-only edits bypass SSH parsing, collision validation and writing entirely, including a request that repeats an unchanged normalized alias. They must work even when the SSH config is read-only, has unrelated parse problems or contains a legacy alias conflict.
C. Wire all existing consumers
File / boundary
Requested change
New cmd/workspace/edit.go; cmd/workspace/workspace.go
Register the command, flags, ID completion, structured errors and result output.
Remove only this UID's owned aliases on deletion, using configuration loaded before local records disappear.
pkg/workspace/rename.go
Keep the explicit ID-rename behavior, including removing the owned SSH section until the next up. Preserve custom display-label/alias metadata; the next normal configuration emits the new canonical host and the new ID in ProxyCommand. Do not leave a retained alias pointing at the old ID. Validate collisions before disruption and again at the final local commit. Serialize old/new workspace identities in stable lock order across stop/remove/move/save/owned-block cleanup; the current stop helper releases its lock before those later steps, so refactor its already-locked entry rather than nesting locks. Hold the name lock only for the final local changes. No presentation edit calls Rename.
cmd/container/info.go and connection docs
Keep returning the canonical ID.devsy host, which remains valid. Document it as canonical; do not inject a mutable alias into container env and claim it updates without recreation.
Workspace export/import paths
Preserve explicit labels and revalidate imported aliases in the destination. Stage/read the imported workspace metadata and validate before extracting into the destination workspace path, then revalidate under final naming locks. cmd/workspace/import.go:importWorkspace currently extracts first, so validation cannot simply be appended after its existing save. Reject a collision with a clear reset/edit choice. Never silently overwrite the destination SSH entry.
An export/import test must confirm that the destination resolved home/context and final UID become the alias ownership identity, whether the import retains or regenerates UID. A copied label/alias is not proof of ownership of an existing block.
5. Desktop work
Add a small shared typed presentation request/result contract, including context, workspaceId, expected workspaceUID, optional dirty fields, their original comparison values, and field-specific conflicts. Include whether an SSH entry was updated or only its future preference was saved. Update desktop/src/main/state.ts and desktop/src/renderer/src/lib/types/index.ts with optional persisted/effective fields.
Add workspace_edit IPC in desktop/src/main/ipc.ts, typed wrappers in renderer/src/lib/ipc/commands.ts and realistic mock responses in mock.ts. Use CLI argument arrays and an explicit captured context. Validate the request in the main process; a context switch while Save is in flight cannot apply the result to another workspace.
In WorkspaceDetailPage.svelte, replace the standard Rename interaction with Display label and SSH alias fields, Save and Cancel. Show the immutable ID and canonical SSH host in details. Keep Change workspace ID separate with the existing stop/recreate explanation. Do not navigate to a new route after a presentation edit; routes and job keys continue to use ID.
Keep the draft form values on a conflict or write failure. Associate errors with the correct field and retain keyboard submission, focus and accessible descriptions. The Save button becomes busy only during the request, and a successful response refreshes the existing workspace entry.
In WorkspaceWizard.svelte, separate the display label, custom alias and internal ID state. Existing source-derived ID suggestions may remain until the user edits; explicitly entered labels/aliases must never pass through uniquifyName. Show both independent conflicts before Launch and repeat validation on the backend.
Add one shared frontend display-label fallback helper for WorkspaceCard.svelte, the workspaces page, sidebar/command palette where workspaces are shown, operation headings and desktop/src/main/tray.ts. Continue using ID/UID for maps, action targets, telemetry references, routes, task ownership and status events. Search/filter can match label, ID and preferred alias.
SSH copy buttons and new IDE launches use the preferred host from backend output. The canonical host remains available in expanded connection details. Old payloads without new fields still render and connect using ID.
6. Acceptance tests
Unit and process coverage
Metadata defaults, explicit clear versus omitted field, Unicode normalization/case-folded duplicate labels, control characters, length bounds and all alias grammar boundaries.
Same label/different alias conflicts; different label/same alias conflicts; own canonical alias succeeds; collision with another workspace's canonical alias fails; contexts writing distinct include files under one SSH root cannot claim the same alias.
Exact unmanaged Host conflicts and bounded Include traversal; Host * defaults are preserved; Match exec is never executed; unrelated wildcard rules and comments are byte-preserved where no rewrite is needed.
Concurrent saves claiming one alias yield one success and one conflict. Stale full-workspace writes cannot erase the committed fields, recreate a deleted record or overwrite another UID. Delete/recreate with the same ID rejects an old request; stale Desktop forms reject a conflicting change to the same field while independent dirty-field edits preserve one another.
Workspace-file failure after SSH replacement rolls back the owned section. Crash-state fixtures reconcile to committed metadata on the next write. A rollback failure is visible and never claims success.
Label-only updates make zero provider, container, rename and SSH-read/write calls, including when an unchanged alias is submitted or the SSH namespace has an existing conflict. Alias updates preserve workspace ID/UID, filesystem directory, volumes and container ID.
Both ProxyCommand and existing loopback TCP tunnel mode produce valid Host aliases. Offline alias edits preserve the exact proxy command or loopback endpoint, user and other settings. With no owned block, only the preference changes; the next normal configure installs both aliases. User lookup and deletion work after multiple alias changes. ID rename removes the old owned block and the next up creates aliases whose ProxyCommand selects the new ID. Two homes with the same context/UID cannot replace or delete each other's blocks.
VS Code, JetBrains and Zed tests assert the preferred host in connection arguments and the original ID in storage/job identifiers. container info's canonical command still works.
Desktop tests cover explicit Save/Cancel, independent fields, server-side conflicts, stale-context responses, old payloads, label rendering and actions still targeting the stable ID.
GitHub Actions customer-flow acceptance
Extend the existing rename/up/SSH Ginkgo suites and Desktop Playwright coverage rather than creating a second test framework:
Create a workspace, write a marker in its writable filesystem, and record ID, UID, container ID and current SSH aliases.
Set label My Horse Social Network and preferred alias my-project; verify the CLI and Desktop show the label, ssh my-project.devsy reaches the same workspace, and ssh <ID>.devsy still works.
Change only the label, then only the alias, while the workspace runs. Prove no stop/recreate call, unchanged runtime identity and intact marker. Keep an existing SSH session open during the update.
Restart Desktop and use a fresh CLI process; verify persistence and that new IDE launch arguments use the new preferred alias.
Attempt each independent collision, including from two simultaneous CLI processes and two contexts sharing the same config. Verify neither workspace's block is overwritten.
Delete the workspace and create a different workspace with the same ID. Confirm old UID ownership cannot delete or update the new entry. Exercise the existing explicit ID-rename path separately.
Run the metadata-only flow with the provider offline and platform-managed workspaces visible; local labels still work and platform edits fail before mutation.
Completion: all specified naming behavior is implemented across CLI, Desktop and SSH consumers; required CI passes; the two-field customer flow works without recreation. Implement in signed commits and Draft PRs. Review slices can be persistence/SSH, CLI/IDE integration and Desktop/docs, but this issue remains the single feature tracker.
7. Boundaries
This feature does not rename container hostnames, Kubernetes resources, runtime labels or remote directories. It does not make a local .devsy alias reachable from another computer; remote access is tracked in #1653. It does not change the existing workspace UID or introduce label-based CLI lookup. The retained canonical alias is the compatibility mechanism for already-issued commands and in-container connection information.
Activity
[-][Feature]: Separate workspace label from host[/-][+][Feature]: Separate workspace label from host name (alias)[/+]skevetter commentedon Oct 31, 2026
Implementation plan and current-state assessment
Reviewed 30 October 2026. Status: feature remains outstanding. No implementation PR referencing #1654 was found in the current open-PR inventory or issue-number search. Keep this issue as the implementation tracker.
Source baseline:
9bc12ee041ca854c6f81de95fd8c6e49d7cc028c. The following is a proposed implementation, based on source inspection. The existing workspace ID, storage identity and provider identity must continue to work.1. Findings and design decision
IDandUID. The existingDisplayNamebelongs toPlatformMetadata, not ordinary local workspaces.pkg/provider/workspace.goID/UID.Workspace + SSHHostSuffix; the ProxyCommand uses the workspace ID.pkg/ssh/config.goHostline from the workspace identity in the command.workspace renamestops the workspace, removes its container, moves its directory and changes the ID.pkg/workspace/rename.gosshHostfrom the route ID and its rename control callsworkspace_rename.WorkspaceDetailPage.svelte,rename handlingWorkspaceWizard.svelteID.devsy;container infodoes the same from the injected ID.VS Code,JetBrains,Zed,container infoImplement a display label and a preferred local SSH alias, while retaining the canonical
ID.devsyalias and the existing stableUID. This is an SSH configuration alias, not container hostname, DNS registration, Kubernetes resource name or a change to${devcontainerId}. For example:project-42My Horse Social Networkmy-project.devsyproject-42.devsycontainer info.This is a deliberate refinement of the request: changing the preferred SSH alias does not rename or rebuild the workspace. The canonical alias remains reserved while that workspace exists. Existing
workspace renameretains its separate, explicitly disruptive semantics.2. Product contract
ID.devsy. Platform-managed workspaces retain their platform-owned display name and existing connection contract; local edits to these fields are rejected with a specific managed-workspace error in this first version.My Horse Social Networkis preserved as text, not slugified.up; do not invent connection settings or claim a new SSH entry has already been installed..devsy. Accept lowercase ASCII letters, digits and internal hyphens, 1-48 characters, with alphanumeric endpoints. The UI displays the fixed.devsysuffix. Reject whitespace, dots, wildcards, slashes, newlines, an already-suffixed hostname and malformed input with field-specific errors. An empty explicit alias clears the override. New restrictions apply to new custom aliases, not retroactive rejection of existing workspace IDs.Includefiles. Two contexts writing different include files beneath the same root still share that namespace. Also reject an exact literalHosttoken in an unmanaged SSH block or a managed block owned by another workspace. Matching is case-insensitive. BroadHost *defaults are not themselves collisions. Check reachable include files without modifying them; bound include depth/file count and fail with an actionable validation error when an applicable include cannot be inspected. Do not executeMatch execto validate a name. A label-only update bypasses this entire SSH collision gate.3. Data model and command interface
Add optional top-level fields to
provider.Workspace:Add small methods/helpers for effective display label, preferred full SSH host and canonical full SSH host. Reuse
config.SSHHostSuffix. Do not scatter fallback concatenation throughout Desktop and IDE launchers. For platform workspaces, the display helper respects the existingPlatform.DisplayName; do not populate or mutate the persistedproobject for a local label.Expose effective values in list/describe DTOs as additive fields so Desktop does not duplicate alias normalization. Keep
idanduidunchanged in all existing output. The persisted fields above contain overrides; computed fields must not become a second authority.Add a focused noninteractive command:
Omitted flags mean unchanged; an explicitly empty value clears the corresponding override. Use Cobra
Changedchecks, not zero-value inference. Require at least one editable field. Use the existing global--contextand--result-format=auto|plain|json; JSON returns the committed ID, UID, context and effective presentation values. Add the same two optional flags to new-workspaceworkspace up, carrying them through detached task arguments. Validate/persist them before provider provisioning. Applying them to an existing workspace delegates to the same update helper, rather than bypassing collision checks.For Desktop's CLI boundary, add hidden optional
--expected-uid,--expected-display-nameand--expected-ssh-host-aliasflags toworkspace edit. Compare expected field values after the same normalization used by the form, including effective ID-based fallbacks; an explicitly empty expectation must remain distinguishable from an omitted flag. Desktop always supplies expected UID and the original value for each dirty field. A CLI caller omitting a field expectation explicitly updates that field against current state; omitted editable fields remain unchanged. Pass these expectations through to the locked backend helper, rather than checking them only in the Desktop process before spawning the CLI.4. Exact backend work
A. Centralize presentation persistence and validation
pkg/provider/workspace.go; add a focusedpkg/workspace/presentation.gofor request validation, effective-name comparison and the update operation. Use a request struct with optional field values and expected UID, rather than a long positional argument list.pkg/client/clientimplementation/locks.gothrough a shared local helper; do not construct or refresh a provider client merely to edit presentation. Existing lifecycle callers may already hold workspace/machine locks, so provide an internal already-locked path and do not reacquire the same lock.cmd/workspace/import.goalready takesconfig.LockConfig; never acquire that outer lock from inside the new name/persistence/SSH locks. Creation/deletion/ID rename use the same name lock during final local naming changes; never hold it through a provider start, image build or network operation.pkg/provider/dir.goandpkg/provider/persist.go, protect these two fields from stale full-workspace saves. A normal update throughSaveWorkspaceConfigmust preserve the latest committed presentation fields for the same UID under the persistence lock. Define update versus creation explicitly: an update must reject a missing record or different UID, while an intentional creation/import/ID move may initialize the new path under its naming lock. Audit these callers when introducing that distinction; do not infer permission to recreate a deleted record from a stale in-memory object. The explicit presentation update uses a dedicated internal persistence path that may replace the fields without reacquiring an already-held lock. Cover this distinction with a race test; an old agent refresh or IDE-setting update must not erase an alias edit or overwrite a new generation.WriteFileAtomicfor workspace JSON. Do not replace it with a direct truncating write. Metadata changes are local and must also work when the provider is offline.B. Make SSH configuration alias-aware and ownership-aware
SSHConfigParamsinpkg/ssh/config.gowith preferred host and workspace UID while keepingWorkspaceas the CLI ID. Generate one managed section containingHost <preferred> <canonical>, deduplicating when equal.ProxyCommand ... workspace ssh ... <ID>retains the ID and explicit context.--homeis omitted. Locate and replace a block by this ownership tuple, not by a user-visible label; imports can preserve UID, and distinct Devsy homes may share an SSH file. For legacy sections, migrate only a block whose generated ProxyCommand identifies the same context/ID and resolved Devsy home. A legacy tunnel or custom-command block may lack that evidence; if ownership cannot be established, report the specific conflicting block for repair rather than deleting or claiming it.GetUser,RemoveFromConfig, section scanning and deletion to accept an explicit owned host/block selector. Retain wrappers for unchanged ID-only callers during migration. Match marker identities exactly: the currentstrings.HasPrefixmatching must not removefoo.devsy-otherwhile operating onfoo.devsy.User, ProxyCommand, loopbackHostname/Port, forwarding and other connection settings;configureSSHandreconfigureSSHWithTunnelreceive runtime values that an offline edit does not have. If no owned section exists, commit only the validated preference and return a result indicating that installation awaits normal SSH configuration. For an existing section, prepare both candidate payloads before writing. Write the owned SSH-block replacement and then commit the workspace metadata while locks remain held. If the metadata write fails, restore only that workspace's original block; return the original error plus any rollback error. Never report a successful save with one value uncommitted. A rollback failure is a typed partial-update error with a repair hint.C. Wire all existing consumers
cmd/workspace/edit.go;cmd/workspace/workspace.gopkg/flags/names/names.gocmd/workspace/up/up.go,up_client.go;pkg/workspace/workspace.go:resolveWorkspaceConfigcmd/workspace/up/configure.go:configureSSH,reconfigureSSHWithTunnelpkg/ide/opener/opener.goClient.WorkspaceConfig()and pass it separately from workspace ID to desktop IDE openers.pkg/ide/vscode/open.gopkg/ide/jetbrains/generic.go,pkg/ide/zed/zed.go,zed_linux.gocmd/workspace/list.go,describe.go;pkg/workspace/workspace.go:selectWorkspacepkg/client/clientimplementation/workspace_client.go:removeSSHConfigpkg/workspace/rename.goup. Preserve custom display-label/alias metadata; the next normal configuration emits the new canonical host and the new ID in ProxyCommand. Do not leave a retained alias pointing at the old ID. Validate collisions before disruption and again at the final local commit. Serialize old/new workspace identities in stable lock order across stop/remove/move/save/owned-block cleanup; the current stop helper releases its lock before those later steps, so refactor its already-locked entry rather than nesting locks. Hold the name lock only for the final local changes. No presentation edit callsRename.cmd/container/info.goand connection docsID.devsyhost, which remains valid. Document it as canonical; do not inject a mutable alias into container env and claim it updates without recreation.cmd/workspace/import.go:importWorkspacecurrently extracts first, so validation cannot simply be appended after its existing save. Reject a collision with a clear reset/edit choice. Never silently overwrite the destination SSH entry.An export/import test must confirm that the destination resolved home/context and final UID become the alias ownership identity, whether the import retains or regenerates UID. A copied label/alias is not proof of ownership of an existing block.
5. Desktop work
context,workspaceId, expectedworkspaceUID, optional dirty fields, their original comparison values, and field-specific conflicts. Include whether an SSH entry was updated or only its future preference was saved. Updatedesktop/src/main/state.tsanddesktop/src/renderer/src/lib/types/index.tswith optional persisted/effective fields.workspace_editIPC indesktop/src/main/ipc.ts, typed wrappers inrenderer/src/lib/ipc/commands.tsand realistic mock responses inmock.ts. Use CLI argument arrays and an explicit captured context. Validate the request in the main process; a context switch while Save is in flight cannot apply the result to another workspace.WorkspaceDetailPage.svelte, replace the standard Rename interaction with Display label and SSH alias fields, Save and Cancel. Show the immutable ID and canonical SSH host in details. Keep Change workspace ID separate with the existing stop/recreate explanation. Do not navigate to a new route after a presentation edit; routes and job keys continue to use ID.WorkspaceWizard.svelte, separate the display label, custom alias and internal ID state. Existing source-derived ID suggestions may remain until the user edits; explicitly entered labels/aliases must never pass throughuniquifyName. Show both independent conflicts before Launch and repeat validation on the backend.WorkspaceCard.svelte, the workspaces page, sidebar/command palette where workspaces are shown, operation headings anddesktop/src/main/tray.ts. Continue using ID/UID for maps, action targets, telemetry references, routes, task ownership and status events. Search/filter can match label, ID and preferred alias.6. Acceptance tests
Unit and process coverage
Hostconflicts and boundedIncludetraversal;Host *defaults are preserved;Match execis never executed; unrelated wildcard rules and comments are byte-preserved where no rewrite is needed.Hostaliases. Offline alias edits preserve the exact proxy command or loopback endpoint, user and other settings. With no owned block, only the preference changes; the next normal configure installs both aliases. User lookup and deletion work after multiple alias changes. ID rename removes the old owned block and the nextupcreates aliases whose ProxyCommand selects the new ID. Two homes with the same context/UID cannot replace or delete each other's blocks.container info's canonical command still works.GitHub Actions customer-flow acceptance
Extend the existing rename/up/SSH Ginkgo suites and Desktop Playwright coverage rather than creating a second test framework:
My Horse Social Networkand preferred aliasmy-project; verify the CLI and Desktop show the label,ssh my-project.devsyreaches the same workspace, andssh <ID>.devsystill works.Completion: all specified naming behavior is implemented across CLI, Desktop and SSH consumers; required CI passes; the two-field customer flow works without recreation. Implement in signed commits and Draft PRs. Review slices can be persistence/SSH, CLI/IDE integration and Desktop/docs, but this issue remains the single feature tracker.
7. Boundaries
This feature does not rename container hostnames, Kubernetes resources, runtime labels or remote directories. It does not make a local
.devsyalias reachable from another computer; remote access is tracked in #1653. It does not change the existing workspace UID or introduce label-based CLI lookup. The retained canonical alias is the compatibility mechanism for already-issued commands and in-container connection information.