Bulk session management: filter and delete sessions by repo or org, and control whether sessions sync to the cloud
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Feature summary
Add multi-select and filtering to the session list so sessions can be cleaned up in bulk by repository, owner/org, or age — and make it explicit and controllable whether a session's data lives only on my machine or also syncs to the cloud.
### What problem are you trying to solve?
**Cleanup is one-at-a-time.** Sessions accumulate fast, because the app encourages one session per task. After a few weeks that is dozens of sessions across many repos, most of them finished, each holding a worktree on disk and a branch. Removing them means deleting them individually with no way to say "delete everything under this owner" or "delete everything whose PR is already merged". So people either let it pile up or spend a tedious afternoon clicking.
**Cloud vs local is unclear.** When personal repos and work-org repos are both open in the same app, it matters a lot whether a session's transcript is local-only or synced. Right now there is no per-session indicator and no per-project control, so the safe assumption is "I don't know", which is a bad place to be for anyone under an org policy. And once something has synced, there is no obvious "remove the cloud copy" action.
#265 asks for bulk-deleting sessions with merged PRs, which is one useful slice of this. The broader problem is that the session list has no selection model and no filters at all.
### Proposed solution
**1. Selection and filtering in the session list**
- Multi-select with checkboxes, `Shift`-range, and select-all-matching-filter.
- Filters, combinable:
- repository
- owner / org (the big one — "everything not under `my-org`")
- project
- status: idle, running, errored, awaiting approval
- PR state: none, open, merged, closed
- branch: merged into default, deleted upstream
- last activity older than N days
- location: local vs cloud
- Saved filters, so a recurring cleanup is one click.
**2. Bulk actions with an honest confirmation**
Actions: **delete**, **archive**, **prune worktree only**, **delete branch**.
The confirmation should be a summary, not a generic "are you sure" — list how many sessions, which worktree paths will be removed, which branches will be deleted, and call out loudly any session with uncommitted changes or unpushed commits, with the option to skip just those. Destructive cleanup is only comfortable when it is legible.
**3. Archive as a middle ground**
Archiving should drop the worktree from disk (reclaiming the space, which is the main cost) while keeping the session transcript and metadata, so history stays searchable without paying for it. Restoring recreates the worktree from the branch.
**4. Explicit cloud sync control**
- A per-project and global setting for whether session data syncs to the cloud.
- A visible per-session indicator: local-only vs synced.
- A "delete cloud copy" action, and inclusion of cloud copies in bulk delete with a clear count.
- If a project is set to local-only, that should be enforced for sessions created in it, and the indicator should make it obvious.
**5. Optional retention rule**
A setting like "auto-archive sessions whose PR has been merged or closed for more than N days", off by default. This turns cleanup from a chore into a background behavior.
### Workflow impact
Anyone using the app across more than a handful of repos, and especially anyone mixing personal and work orgs. Concretely it reclaims disk space, keeps the session list short enough to actually navigate, and — for the sync part — lets people answer "where does my session data live?" without guessing, which is often a hard requirement rather than a preference.
### Installation context
Desktop app, local and cloud sessions, across multiple projects and owners.
### Additional context
Related: #265 (bulk delete sessions with merged pull requests).
If this needs to be split, the highest-value first slice is owner/org + last-activity filters plus multi-select delete with a worktree/branch summary in the confirmation. The cloud sync indicator and control could follow as its own change.
贡献指南
调研方向
首先阅读相关 issue #265,并将提案范围缩小到建议的第一部分:owner/org 和 last-activity 筛选器,以及多选删除。在决定实现范围之前,先检查 session-list 和 deletion 流程。完成的标准是:可以筛选并删除所选会话,并显示一条确认信息,总结受影响的 worktrees 和 branches。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github
- 领域
- cloud, desktop, devtools
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100