fix(sessions): drop "worktree-" prefix from displayed branch name #9

Closed
lz wants to merge 1 commit from drop-worktree-branch-prefix into main
Owner

The session DTO's branch field is a UI-only label — we don't drive git with it (claude-code's --worktree NAME is what creates the actual worktree branch on the worker). The worktree- prefix on the DB column duplicated the concept already implied by the adjacent worktree_name field and rendered as visual noise in the Sessions list (e.g. worktree-alpha instead of just alpha).

This commit drops the prefix in service.ts:113 and updates the three fixture rows in service.test.ts.

Scope: pure cosmetic. No schema change. Existing rows in production databases will keep their old worktree-* value until the session is deleted and recreated — acceptable since branch is display-only.

Note: this is independent of #8 (Config Explorer) and branches off main.

The session DTO's `branch` field is a UI-only label — we don't drive git with it (claude-code's `--worktree NAME` is what creates the actual worktree branch on the worker). The `worktree-` prefix on the DB column duplicated the concept already implied by the adjacent `worktree_name` field and rendered as visual noise in the Sessions list (e.g. `worktree-alpha` instead of just `alpha`). This commit drops the prefix in [`service.ts:113`](nexus/src/lib/server/sessions/service.ts#L113) and updates the three fixture rows in `service.test.ts`. **Scope**: pure cosmetic. No schema change. Existing rows in production databases will keep their old `worktree-*` value until the session is deleted and recreated — acceptable since `branch` is display-only. **Note**: this is independent of #8 (Config Explorer) and branches off `main`.
fix(sessions): drop "worktree-" prefix from the displayed branch name
All checks were successful
ci / nexus (pull_request) Successful in 4m31s
ci / images (./nexus, agent-nexus) (pull_request) Successful in 6m27s
ci / images (./worker, nexus-worker) (pull_request) Successful in 1m0s
d3126dc4da
The session DTO's `branch` field is a UI-only label (we don't drive git
with it; claude-code's `--worktree NAME` creates the actual worktree
branch on the worker). The "worktree-" prefix on the DB column duplicated
the concept already implied by the `worktree_name` field next to it, and
showed up as visual noise in the Sessions list (e.g. "worktree-alpha"
instead of just "alpha").

Drop the prefix in service.ts and update the three fixture rows in
service.test.ts. Pure cosmetic; no schema change, no runtime impact on
existing rows (they'll keep their old `worktree-*` value until recreated).
lz closed this pull request 2026-05-14 21:09:02 +02:00
lz deleted branch drop-worktree-branch-prefix 2026-05-14 21:09:09 +02:00
All checks were successful
ci / nexus (pull_request) Successful in 4m31s
ci / images (./nexus, agent-nexus) (pull_request) Successful in 6m27s
ci / images (./worker, nexus-worker) (pull_request) Successful in 1m0s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lz/agent-nexus!9
No description provided.