Clarify thread environment identity - #2472
Merged
brsbl merged 10 commits intoAug 29, 2026
Merged
Conversation
brsbl
changed the base branch from
main
to
bb/shorten-worktree-action-copy-thr_fdabesxhdr
August 27, 2026 23:30
brsbl
force-pushed
the
bb/thr_fdabesxhdr
branch
from
August 29, 2026 07:38
78b5899 to
90aeb0f
Compare
brsbl
added a commit
that referenced
this pull request
Aug 29, 2026
## What was wrong The server's daemon-disconnect grace callback classified every unrecovered host/session socket loss as `host-daemon-restarted`, even when no replacement daemon instance had connected. That persisted reason flowed unchanged through the thread events API and timeline projection, so a transient tunnel/session failure rendered as “Stopped — host daemon restarted.” Confirmed restarts already have a separate stable signal: `handleHostSessionOpened` observes a changed daemon `instanceId`. ## What changed - Added the additive persisted interruption reason `host-connection-lost` and use it only when the daemon/session disconnect grace expires without a confirmed replacement instance. - Preserved `host-daemon-restarted` for the existing changed-`instanceId` restart path. - Added lifecycle failure copy and the timeline title “Stopped — connection to host was lost.” - Added regressions at the server lifecycle and thread-view parser boundaries proving lost connections and confirmed restarts remain distinguishable. - Refreshed the Plugin Guide's generated SDK public-API inventory for the additive declaration change. The inherited SDK version remains `0.4.25` and its release guard passes. - No host-daemon wire message changed, so `HOST_DAEMON_PROTOCOL_VERSION` is unchanged. There are no CLI changes. ## How you verified - Red proof on the parent behavior: the new server lifecycle assertion failed 1/11 because the disconnect-grace event was `host-daemon-restarted` instead of `host-connection-lost`. - Green proof on the child behavior: the focused server file passed 11/11 and the thread-view parser file passed 9/9, including distinct assertions for confirmed restart and lost connection. - Regenerated the exhaustive declaration inventory with `pnpm exec turbo run update:sdk-inventory --filter=@bb/plugin-api-map`; only the two declaration hashes affected by the additive reason changed. - Exact rebased head `38bec6236a6b58ca75542bb3e5cff98182cd3b71` passes every required GitHub check, including app, server, packages, integration, Linux package smoke, and macOS package smoke. - Chrome for Testing 152.0.7977.64 rendered the real branch web app at 1440×900 with the same deterministic thread fixture. The untouched parent rendered two restart rows; the exact child rendered one confirmed restart and one lost connection, with no runtime exceptions. Safari is not required for this non-marketing bb UI change. ### Before — untouched PR #2472 head `93d1dca06ab44ae8365a60cd33d996e97d834a8d` Both the confirmed restart and unconfirmed disconnect render as a daemon restart.  ### After — child head `38bec6236a6b58ca75542bb3e5cff98182cd3b71` The confirmed restart remains unchanged; the unconfirmed disconnect is labeled as a lost host connection.  BB-Thread-ID: thr_sjdd7gudiq > AGENT GENERATED
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
The composer reduced an unnamed worktree to the generic “Worktree” label, so users could see the checkout but not which host owned the environment. Environment type was also implicit, worktree rename copy used the broader “environment” concept, and provisioning could be presented as a workspace type instead of a lifecycle state.
What changed
The environment summary now preserves environment identity and checkout metadata as separate dimensions:
Composer identity
Before — the unnamed worktree is reduced to the generic “Worktree” label.
After — the host identifies the environment while the branch remains visible as checkout metadata.
Rename flow
Before — generic environment terminology and no worktree context.
After — worktree-specific terminology for an unnamed worktree.
Custom-name state — the branch remains visible and clearing the custom name restores host identity.
How you verified
409ef81e9c36ef927e4af0a2bbff89c5001ed5c7and exact PR head78b589967f86c575066b2e8ef1d339c97f8c0b3ewere rendered in the branch web app with the same project, thread, environment, route, light theme, and 1440×900 viewport.Fixes
No linked GitHub issue; addresses the reported environment-summary and worktree-naming regressions.
BB-Thread-ID: thr_fdabesxhdr