github / github/app

Folder project silently becomes a collection after a clone is added

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

描述

[Filed by Copilot on behalf of @bghgary]

## Problem

In GitHub Copilot app 1.1.14 on Windows, a folder project created at an empty path silently changes from `folder` to `collection` after a Git clone is placed in its root. The value is persisted as `projects.container_kind`; removing the clone or emptying the directory does not restore the project.

## Reproduction

1. Create a folder project at an empty directory and start a folder session successfully.
2. Clone a Git repository into that project root.
3. Remove the clone or empty the root.
4. Start another folder session.

The dispatch fails with `has no associated worktree`, which points to a worktree problem rather than the project's changed classification. After backing up the database, restoring only the stored kind made the same project start folder sessions again without an app restart.

The failed dispatch also leaves a sidebar row that cannot be cleaned up normally: `archive_session` fails with `fatal: not a git repository: (NULL)`, while `delete_item` reports success but leaves the row.

## Expected

Adding a repository under a folder project should not silently change the project type. If conversion is intentional, the app should warn before changing it, identify that change when a folder dispatch is rejected, and allow the failed session row to be removed.

## Related

[github/app#1955](https://github.com/github/app/issues/1955) fixed folder-project creation selecting a nested `.git` directory in v1.1.7. This case happens after a valid folder project has already been created and used.

贡献指南

打开贡献指南

调研方向

Reproduce the Windows flow: create an empty folder project, clone a repository into its root, empty it, and start another folder session. Inspect the persisted projects.container_kind value and the failed folder dispatch, then check archive_session and delete_item for the leftover sidebar row. Done means adding a repository does not silently change the project type, rejected sessions identify the change, and failed rows can be removed.

由索引模型根据 Issue 内容生成。

评估

技术栈
git
领域
desktop
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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