Repository navigation
Stop showing raw thread IDs as environment names - #3660
Merged
Merged
Conversation
A personal-project thread runs in a personal-workspace environment with
no name and no branch, so resolveEnvironmentDisplayName fell through to
the workspace folder basename. That basename is the provider instance
key, which the server sets to the thread ID, so mobile Recents and the
reuse-environment picker rendered rows like "thr_5b9tupt9ej".
Name provider-backed environments by their provider display name
("Personal workspace") and keep the folder fallback only for
provider-less directory attachments, whose folder is the only thing
identifying them.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Human comments
What was wrong
A thread in the personal project runs in a
personal-workspaceenvironment, which has neither a name nor a branch.resolveEnvironmentDisplayNametherefore fell through to the workspace folder's basename — and that basename is the environment provider's instance key, which the server sets to the thread ID (thread-environment-placement.ts,environmentProviderInstanceKey: context.thread.id). So every personal thread was labelled with a rawthr_…ID in mobile Recents and in the reuse-environment picker. The folder-name step was introduced in #3227; before that the label wasbranchName ?? name, which was simply empty for these rows.What changed
resolveEnvironmentDisplayNameinpackages/core-ui/src/environment-display.tsnow names a provider-backed environment by its provider display name and uses the workspace folder only for environments with no provider:A personal thread now reads
Personal workspaceinstead ofthr_5b9tupt9ej.resolveWorkspaceFolderNameis no longer exported; it is reachable only through the resolver.Deleting the folder step outright was the simpler change, but it regressed provider-less environments (legacy rows predating #3227, which exist in real installs): with no provider label to fall back to, they degraded to the generic "Environment". Gating the step keeps them named by their folder.
Two deliberate consequences:
Worktree) instead of the checkout folder name (bb) in the sidebar environment group header.thr_…flashing during that window.No wire, schema or CLI changes;
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
packages/core-ui/test/environment-display.test.ts: the case that assertedthr_k72wqg7tcsnow assertsPersonal workspace, plus new cases for the loading window and for provider-less directory attachments. They fail against the previous resolver.pnpm exec turbo run typecheck lint test --filter='...[origin/main]': 118 of 121 tasks pass (@bb/applint reports only pre-existing react-compiler warnings, 0 errors).@bb/integration-testsfailed with ~10 suites hitting their 60s timeout; apnpm start:worktreeinstance was running in the same checkout during the run, and this change is a pure display-string helper with no server, daemon or provider surface, so the timeouts are contention rather than a regression. Worth confirming from CI.thr_zymfj7m9z6 · 4m ago→Personal workspace · just now.thr_hxbeuzp4r9/thr_zymfj7m9z6→Personal workspace.scratch-notes→Worktree.scratch-noteson both builds, confirming parity.🤖 Generated with Claude Code