Skip to content

Clarify thread environment identity - #2472

Merged
brsbl merged 10 commits into
bb/shorten-worktree-action-copy-thr_fdabesxhdrfrom
bb/thr_fdabesxhdr
Aug 29, 2026
Merged

Clarify thread environment identity#2472
brsbl merged 10 commits into
bb/shorten-worktree-action-copy-thr_fdabesxhdrfrom
bb/thr_fdabesxhdr

Conversation

@brsbl

@brsbl brsbl commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Direct environments and unnamed worktrees show their host name; named worktrees show their custom name.
  • The branch remains separately visible with the branch icon and copies on click, even if it matches a custom worktree name.
  • The environment icon tooltip distinguishes Local worktree, Remote worktree, Local, and Remote.
  • Provisioning takes precedence, uses the active loading spinner, and keeps the lifecycle label “Provisioning.”
  • Worktree actions and the rename dialog use worktree-specific language. A custom-named worktree shows its branch beneath the field, and “Clear custom name” restores the host as the environment identity.

Composer identity

Before — the unnamed worktree is reduced to the generic “Worktree” label.

Before — generic Worktree environment label

After — the host identifies the environment while the branch remains visible as checkout metadata.

After — host environment identity with separate branch metadata

Rename flow

Before — generic environment terminology and no worktree context.

Before — generic rename environment dialog

After — worktree-specific terminology for an unnamed worktree.

After — rename worktree dialog

Custom-name state — the branch remains visible and clearing the custom name restores host identity.

After — custom worktree name with branch context and Clear custom name action

How you verified

  • Exact parent head 409ef81e9c36ef927e4af0a2bbff89c5001ed5c7 and exact PR head 78b589967f86c575066b2e8ef1d339c97f8c0b3e were rendered in the branch web app with the same project, thread, environment, route, light theme, and 1440×900 viewport.
  • Chrome for Testing 150 exercised hard reload, host and branch rendering, worktree rename and clear, the Local worktree tooltip, and the Create thread in worktree tooltip. All passed with no runtime errors.
  • Remote CI covers the environment-state matrix, icon selection, branch presentation, rename copy, and component integration.

Fixes

No linked GitHub issue; addresses the reported environment-summary and worktree-naming regressions.

BB-Thread-ID: thr_fdabesxhdr

AGENT GENERATED

@brsbl brsbl changed the title Polish environment summaries and prompt controls Clarify thread environment identity Aug 27, 2026
@brsbl
brsbl changed the base branch from main to bb/shorten-worktree-action-copy-thr_fdabesxhdr August 27, 2026 23:30
@brsbl
brsbl force-pushed the bb/thr_fdabesxhdr branch from 78b5899 to 90aeb0f Compare August 29, 2026 07:38
@brsbl
brsbl merged commit 0db384c into main Aug 29, 2026
15 checks passed
@brsbl
brsbl deleted the bb/thr_fdabesxhdr branch August 29, 2026 08:18
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.

![Before — both fixture rows say Stopped — host daemon
restarted](https://raw.githubusercontent.com/brsbl/bb/a236be40b18b147c043415ff93f70ece328baa78/stop-before-93d-final.png)

### After — child head `38bec6236a6b58ca75542bb3e5cff98182cd3b71`

The confirmed restart remains unchanged; the unconfirmed disconnect is
labeled as a lost host connection.

![After — confirmed restart and lost host connection are
distinct](https://raw.githubusercontent.com/brsbl/bb/a236be40b18b147c043415ff93f70ece328baa78/stop-after-38bec-final.png)

BB-Thread-ID: thr_sjdd7gudiq

> AGENT GENERATED
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