Skip to content

trunk-merge/pr-3528/1f86d4bb-4ccc-4462-a69b-209e6589c6c4#3550

Closed
trunk-io[bot] wants to merge 8 commits into
mainfrom
trunk-merge/pr-3528/1f86d4bb-4ccc-4462-a69b-209e6589c6c4
Closed

trunk-merge/pr-3528/1f86d4bb-4ccc-4462-a69b-209e6589c6c4#3550
trunk-io[bot] wants to merge 8 commits into
mainfrom
trunk-merge/pr-3528/1f86d4bb-4ccc-4462-a69b-209e6589c6c4

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Jul 17, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA 3d788e333808ff7c664ec7177fabc22dae40c738.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 3528.

haacked and others added 8 commits July 16, 2026 12:29
Each repo group in the sidebar gets a nested "Worktrees (N)" dropdown
listing linked worktrees no task uses. Clicking one creates a promptless
task named after the branch, adopts the worktree via the existing
reuseExistingWorktree flow, and opens the task's chat + shell with an
idle agent session.

- workspace-server: listAdoptableWorktrees filters linked worktrees to
  branch-bearing, task-less ones, excluding registered folders and the
  local-backgrounding stash worktree
- core: buildWorktreeAdoptionInput + worktreeAdoption input flag so a
  synthesized taskDescription passes createTask validation without
  content (no initial agent prompt)
- ui: GroupWorktreesSection nested under each repo group, with
  useAdoptableWorktrees / useStartTaskFromWorktree hooks

Generated-By: PostHog Code
Task-Id: 24032eac-82cc-4c5f-a7e9-30ed9278a6e1
Settings → Worktrees gains a "Show worktrees in sidebar" toggle (on by
default) that hides the per-repo worktrees dropdown and skips its
queries entirely. The dropdown also starts collapsed: expansion is
tracked as the exception in a new expandedWorktreeSections set, since
collapsedSections defaults sections to expanded.

Generated-By: PostHog Code
Task-Id: 24032eac-82cc-4c5f-a7e9-30ed9278a6e1
- Validation in createTask now accepts content OR taskDescription
  instead of enumerating per-flow flags; the worktreeAdoption input
  flag existed only to gate that check, so it's gone
- listAdoptableWorktrees builds occupied-path and registered-folder
  sets in one pass instead of re-querying workspace tables per
  worktree candidate
- SidebarSection reuses the INDENT_SIZE constant from SidebarItem
  instead of a third copy of the indent unit

Generated-By: PostHog Code
Task-Id: 24032eac-82cc-4c5f-a7e9-30ed9278a6e1
With the section hidden until the user enables it in Settings →
Worktrees, expanded-by-default is the right behavior for those who
opted in. That removes the need for expandedWorktreeSections — the
inverse-polarity twin of collapsedSections — so the section now uses
the shared collapsedSections/toggleSection mechanism like every other
sidebar section.

Generated-By: PostHog Code
Task-Id: 24032eac-82cc-4c5f-a7e9-30ed9278a6e1
- Add showSidebarWorktrees to settings rehydration test
- Clarify padding calculation comment in SidebarSection
- Use AdoptableWorktree named type instead of inline object type
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 587d3f8.

@trunk-io trunk-io Bot closed this Jul 17, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-3528/1f86d4bb-4ccc-4462-a69b-209e6589c6c4 branch July 17, 2026 19:30
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