github / github/app

[Requests and ideas] Persist "Use worktree" toggle across sessions and add a project-level default (collection projects)

未关闭
#714 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Requests and ideas
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### Feature summary

The new-session dialog already has a "Use worktree" toggle (per-repo for
collection projects, nice). Two gaps make it painful in practice:

1. The toggle does not persist. Every new session starts back at the
default (worktree on), so I have to flip every repo every time.
2. There is no way to set a default checkout strategy on a project
(especially collection projects) or app-wide.

### What problem are you trying to solve?

I'm working on a collection project with 13 Azure Terraform AVM repos. Most
of my sessions want main-folder checkout (lightweight tasks, "install a
skill" sessions, read-only PR reviews, work that needs to persist into the
real checkout). A handful want worktree isolation.

Today, for every new session I have to:

- Open the per-repo branch picker for each of the 13 repos
- Flip the "Use worktree" toggle off on each
- Then start the session

Confirmed via `data.db` that the strategy is stored per-workspace in
`workspaces.workspace_type` only. There's no `checkout_strategy` column on
`projects`, no relevant key in `settings.json` or `config.json`, and the
toggle state isn't remembered between sessions.

A second, related pain point: artifacts I put into a worktree folder
(installing agents/skills into `.github\` of a member repo, for example)
live in an ephemeral path. When the workspace is archived, the work is
effectively lost unless I remembered to mirror it into the main checkout.

### Proposed solution

Any one of these would help, ideally all three:

1. **Remember the last toggle state per project (and per repo within a
collection project)** so the next new-session dialog opens with my
previous choices preselected.
2. **Project-level default**: a setting on the project (especially
collection projects) that defines the default `checkout_strategy` for
new sessions, applied to all member repos but still overridable in the
dialog.
3. **App-wide default in Settings**: a fallback default for any project
without its own override.

### Workflow impact

- For my 13-repo collection, every new session today requires flipping
13 toggles before I can even start working. A persisted choice or a
project default removes that friction entirely.
- Power users who prefer worktree isolation per session keep full
per-session control via the existing toggle.
- Aligns expectations with IDE-extension users (work lands in their real
checkout by default).

### Installation context

- App version: v0.2.23
- OS: Windows 11
- Project type: collection (13 Azure Terraform AVM repos)
- Container kind: `collection`, current checkout strategy: `worktree_set`

### Additional context

The "Use worktree" toggle in the new-session dialog (per-repo for
collection projects) is exactly the right UX primitive. The gap is purely
persistence + defaults.

Related issues, each covering a different slice of the worktree story but
none asking for toggle persistence + project-level default:

- #169 — Decouple sessions from worktrees
- #407 — Configurable worktree location
- #463 — Customize worktree checkout (sparse)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。